/* 
 * Resources Homepage - Mobile First Responsive Design
 * Includes burger menu navigation and category cards
 */

/* ==========================================================================
   Mobile Base Styles (320px+)
   ========================================================================== */

/* General Resets and Base */
.resources-homepage {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Mobile Navigation */
.resources-nav {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0.75rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

.nav-logo:hover {
    color: #34495e;
}

/* Burger Menu Button */
.burger-menu {
    display: block;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.burger-menu:hover {
    background-color: #f8f9fa;
}

.burger-lines {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.burger-line {
    width: 100%;
    height: 2px;
    background-color: #2c3e50;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Burger Animation */
.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 1040;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.mobile-menu-close:hover {
    background-color: #f8f9fa;
}

.mobile-menu-content {
    padding: 1rem;
}

.mobile-menu-section {
    margin-bottom: 2rem;
}

.mobile-menu-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.mobile-menu-item {
    display: block;
    padding: 0.75rem 0;
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
}

.mobile-menu-item:hover {
    color: #007bff;
    background-color: #f8f9fa;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.mobile-menu-item .icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* Hero Section */
.resources-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 2rem 0;
    margin-top: -1px; /* Compensate for sticky nav */
}

.hero-content {
    text-align: center;
    padding: 0 1rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.hero-description {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-visual {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.hero-icon {
    font-size: 4rem;
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

/* Categories Section */
.categories-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.section-description {
    font-size: 1rem;
    color: #6c757d;
    line-height: 1.6;
}

/* Category Cards */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: height 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.category-card:hover::before {
    height: 8px;
}

.category-icon {
    margin-bottom: 1.5rem;
}

.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 2rem;
    color: #fff;
    font-weight: 500;
}

.bg-orange { background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%); }
.bg-blue { background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); }
.bg-purple { background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%); }
.bg-green { background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%); }
.bg-red { background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%); }

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.category-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-title a:hover {
    color: #007bff;
}

.category-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.category-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.topic-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 0.375rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.topic-tag:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* ==========================================================================
   Tablet Styles (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    /* Hide burger menu on tablet+ */
    .burger-menu {
        display: none;
    }
    
    /* Show desktop navigation */
    .desktop-nav {
        display: flex !important;
        align-items: center;
        gap: 2rem;
    }
    
    .nav-link {
        color: #495057;
        text-decoration: none;
        font-weight: 500;
        padding: 0.5rem 0;
        border-bottom: 2px solid transparent;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        color: #007bff;
        border-bottom-color: #007bff;
    }
    
    .hero-content {
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 0 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .category-card {
        padding: 2.5rem 2rem;
    }
}

/* ==========================================================================
   Desktop Styles (992px+)
   ========================================================================== */

@media (min-width: 992px) {
    .resources-hero {
        padding: 4rem 0;
    }
    
    .hero-layout {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 3rem;
        align-items: center;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem;
    }
    
    .hero-content {
        text-align: left;
        padding: 0;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.375rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-visual {
        margin-top: 0;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .section-title {
        font-size: 2.25rem;
    }
}

/* ==========================================================================
   Large Desktop Styles (1200px+)
   ========================================================================== */

@media (min-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .category-card {
        padding: 3rem 2.5rem;
    }
    
    .icon-circle {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
}

/* ==========================================================================
   Accessibility & Performance
   ========================================================================== */

/* Focus styles */
.burger-menu:focus,
.mobile-menu-close:focus,
.nav-link:focus,
.category-title a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .burger-line,
    .mobile-menu,
    .mobile-menu-overlay,
    .category-card,
    .topic-tag {
        transition: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .resources-nav {
        background: #1a1a1a;
        border-bottom-color: #333;
    }
    
    .nav-logo {
        color: #fff;
    }
    
    .burger-line {
        background-color: #fff;
    }
    
    .mobile-menu {
        background: #1a1a1a;
    }
    
    .mobile-menu-item {
        color: #fff;
        border-bottom-color: #333;
    }
    
    .categories-section {
        background: #111;
    }
    
    .category-card {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .section-title,
    .category-title {
        color: #fff;
    }
}

/* Print styles */
@media print {
    .burger-menu,
    .mobile-menu,
    .mobile-menu-overlay {
        display: none;
    }
    
    .resources-hero {
        background: none !important;
        color: #000 !important;
    }
}