/* Website Resources CSS - Bauni Law Group
 * Modern, responsive styles for legal resources section
 */

/* Root Variables for Consistent Colors and Styling */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #2980b9;
    --text-color: #333;
    --light-text: #7f8c8d;
    --background-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #f0f0f0;
    --footer-bg: #2c3e50;
    --footer-text: #ecf0f1;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 6px 12px rgba(0,0,0,0.15);
    --transition-speed: 0.3s;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

a:hover {
    color: var(--accent-color);
}

p {
    margin-bottom: 1rem;
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

main {
    padding: 20px 0 40px;
}

/* Accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    z-index: 1000;
    transition: top var(--transition-speed) ease;
}

.skip-to-content:focus {
    top: 0;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
}

.logo a {
    color: white;
}

.logo a:hover {
    color: white;
    opacity: 0.9;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav ul li a {
    color: white;
    font-size: 16px;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

nav ul li a.active {
    color: white;
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 3px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Page Title & Description */
.page-header {
    margin-bottom: 40px;
}

.page-title {
    margin: 30px 0 15px;
    color: var(--primary-color);
    font-size: 32px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.page-description {
    font-size: 18px;
    color: var(--light-text);
    max-width: 800px;
    line-height: 1.6;
}

/* Resources Container */
.resources-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Category Sections */
.category-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    padding: 25px;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.category-section:hover {
    box-shadow: var(--shadow-lg);
}

.category-title {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 2px;
    background-color: var(--secondary-color);
    bottom: -2px;
    left: 0;
}

/* Article Sliders */
.articles-slider {
    position: relative;
    margin: 20px 0;
}

.slider-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    gap: 10px;
}

.slider-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed) ease, 
                transform 0.2s ease,
                box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.slider-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.slider-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.slider-btn:active {
    transform: translateY(1px);
}

.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) var(--border-color);
}

.slider-container::-webkit-scrollbar {
    height: 8px;
}

.slider-container::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 4px;
}

.slider-container::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 4px;
}

/* Article Cards */
.article-card {
    flex: 0 0 300px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed) ease, 
                box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-category-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 20px;
    font-weight: 600;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-content h3 {
    margin-top: 0;
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-content h3 a {
    color: var(--primary-color);
}

.article-content h3 a:hover {
    color: var(--secondary-color);
}

.article-meta {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.article-meta i {
    margin-right: 5px;
    opacity: 0.7;
}

.meta-divider {
    margin: 0 8px;
}

.article-description {
    font-size: 14px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    margin-top: auto;
    color: var(--secondary-color);
    position: relative;
}

.read-more::after {
    content: '→';
    margin-left: 5px;
    transition: transform var(--transition-speed) ease;
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* Empty States & Error Messages */
.empty-category {
    padding: 30px;
    text-align: center;
    color: var(--light-text);
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.empty-category h3 {
    margin-bottom: 10px;
}

.error-message {
    background-color: #fef2f2;
    color: #b91c1c;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #ef4444;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message i {
    font-size: 20px;
}

/* Footer Styles */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-column {
    flex: 1 1 300px;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--footer-text);
    transition: color var(--transition-speed) ease, 
                padding-left var(--transition-speed) ease;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-social {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--footer-text);
    border-radius: 50%;
    transition: all var(--transition-speed) ease;
}

.footer-social a:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.footer-contact-icon {
    margin-right: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-speed) ease;
    z-index: 99;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 992px) {
    .footer-column {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    nav {
        position: relative;
    }
    
    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--primary-color);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        gap: 0;
        display: none;
        z-index: 10;
    }
    
    nav ul.show {
        display: flex;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 12px 20px;
    }
    
    nav ul li a:hover {
        background-color: rgba(52, 152, 219, 0.1);
    }
    
    nav ul li a.active::after {
        display: none;
    }
    
    .article-card {
        flex: 0 0 calc(100% - 40px);
        max-width: 400px;
        margin: 0 auto;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .page-description {
        font-size: 16px;
    }
    
    .footer-column {
        flex: 0 0 100%;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .category-title {
        font-size: 20px;
    }
    
    .article-card {
        flex: 0 0 100%;
    }
    
    .slider-container {
        padding-bottom: 15px;
    }
    
    .category-section {
        padding: 20px 15px;
    }
    
    .slider-btn {
        width: 35px;
        height: 35px;
    }
}

/* Print Styles */
@media print {
    header, footer, .slider-controls, .back-to-top {
        display: none;
    }
    
    body {
        background-color: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .category-section, .article-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #eee;
    }
    
    .article-card {
        page-break-inside: avoid;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Focus Styles for Accessibility */
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
}