/* 
   ==========================================================================
   JAVA ENTERPRISE ACADEMY - ULTIMATE CSS ARCHITECTURE
   Version: 2.0 (Premium Enterprise Grade)
   Design System: SaaS / Modern Documentation / Elite Academy
   ==========================================================================
*/

/* --- 1. CSS RESET & BASE --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;600;700&display=swap');

:root {
    /* Color Palette - Premium White Theme */
    --primary: #2563eb;        /* Professional Blue */
    --secondary: #f8fafc;      /* Light Gray / Slate 50 */
    --accent: #10b981;         /* Spring Green */
    --highlight: #2563eb;      /* Royal Blue (Mapped to Primary Blue) */
    --bg-main: #ffffff;        /* Pure White */
    --bg-alt: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing & Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

/* --- 2. GLOBAL STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Strictly prevent horizontal scroll */
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video, canvas, svg, iframe, embed, object {
    max-width: 100%;
    height: auto;
    display: block;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%; /* Fix scaling on some mobile browsers */
}

h1, h2, h3, h4, .premium-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--primary); /* Blue headings */
    word-wrap: break-word; /* Ensure headings wrap on small screens */
    overflow-wrap: break-word;
}

h1 { 
    font-size: clamp(2rem, 8vw, 3.5rem); 
    margin-bottom: 1rem; 
}
h2 { 
    font-size: clamp(1.5rem, 6vw, 2.25rem); 
    margin-bottom: 1rem; 
}
h3 { 
    font-size: clamp(1.25rem, 4vw, 1.5rem); 
    margin-bottom: 0.75rem; 
}
h4 { 
    font-size: clamp(1.1rem, 3vw, 1.25rem); 
    margin-bottom: 0.5rem; 
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 3px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- 3. LAYOUT COMPONENTS --- */

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    background: var(--bg-alt);
    padding: 100px 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.05), transparent);
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--primary);
    line-height: 1.1;
}

.hero p {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

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

/* Phase Grid & Cards */
.phase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1300px;
    margin: -60px auto 3rem;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.phase-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.phase-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary);
}

.phase-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.phase-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.phase-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.phase-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.phase-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Buttons */
.btn-premium {
    background: var(--primary);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-premium:hover {
    background: #1d4ed8;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
    color: white;
}

.btn-accent {
    background: var(--accent);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.btn-accent:hover {
    background: #059669;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

/* Sidebar Layout (Phase Pages) */
.docs-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
    align-items: start;
    background: white;
}

.sidebar {
    background: var(--bg-alt);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    margin-right: 2rem;
    border-radius: var(--radius-lg);
    margin-top: 2rem;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.sidebar-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 800;
    padding-left: 12px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    display: block;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
}

.sidebar-nav a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

/* Content Area */
.content-area {
    padding: 40px 2rem 60px;
    background: white;
}

.docs-layout .content-area {
    border-left: 1px solid var(--border);
    padding-top: 20px;
}

.content-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Resource Lists */
.resource-list {
    list-style: none;
    padding: 0;
}

.resource-list li {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.resource-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.resource-list a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.resource-list .icon {
    color: var(--accent);
    flex-shrink: 0;
    font-weight: bold;
}

/* Interview & Question Cards */
.interview-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition);
}

.interview-card:hover {
    background: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateX(10px);
}

.interview-card h4 {
    color: var(--highlight);
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

section {
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

section:last-of-type {
    border-bottom: none;
}

section h2.premium-title {
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

section h2.premium-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--highlight);
    border-radius: 2px;
}

/* Specialized Components */
.checklist-item {
    display: flex;
    gap: 20px;
    margin-bottom: 1.25rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    align-items: flex-start;
}

.checklist-item:hover {
    border-color: var(--accent);
    background: white;
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.checklist-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 4px;
    accent-color: var(--accent);
    cursor: pointer;
}

.tip-box, .warning-box {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.tip-box {
    background: #f0fdf4;
    border-left: 5px solid var(--accent);
}

.warning-box {
    background: #fef2f2;
    border-left: 5px solid #ef4444;
}

.module-card, .project-card, .interview-card {
    margin: 1.5rem 0;
}

.module-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.project-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.interview-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.objectives-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.phase-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 800px;
    line-height: 1.8;
}

/* Footer */
.premium-footer {
    background: var(--bg-alt);
    color: var(--text-main);
    padding: 4rem 2rem 3rem;
    margin-top: 0;
    border-top: 1px solid var(--border);
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-brand h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
    line-height: 1.6;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* Form Controls */
.contact-form {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Code Blocks */
pre {
    background: #f8fafc;
    color: var(--text-main);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: var(--shadow-sm);
}

code {
    background: #f1f5f9;
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
    font-weight: normal;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 1.5rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -7px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: var(--highlight);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.timeline-content h4 {
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 1.2rem;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    background: var(--border);
    border-radius: 50px;
    height: 10px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--highlight), var(--accent));
    border-radius: 50px;
    transition: width 1s ease-in-out;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.95rem;
}

tr:hover td {
    background: #f8fafc;
}

/* Badges & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

.tag {
    background: #f1f5f9;
    color: var(--secondary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    font-weight: 500;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--highlight);
}

.breadcrumbs span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.breadcrumbs span::before {
    content: '→';
    font-weight: 700;
}

/* --- 12. RESPONSIVENESS & MOBILE OVERRIDES --- */

/* Hamburger Menu Base */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--highlight);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* 1200px - Large Tablets & Laptops */
@media (max-width: 1200px) {
    .docs-layout {
        grid-template-columns: 260px 1fr;
    }
    .nav-container {
        padding: 0 1.5rem;
    }
    .phase-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        max-width: 1100px;
    }
}

/* 992px - Medium Screens / Small Laptops */
@media (max-width: 992px) {
    .nav-links {
        gap: 1.5rem;
    }
    
    .hero {
        padding: 60px 1.5rem;
    }

    .phase-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        gap: 1.5rem;
    }
}

/* 1024px - Tablets (Landscape) */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        z-index: 1002;
        transition: var(--transition);
        margin-right: 0;
        box-shadow: var(--shadow-lg);
        height: 100vh;
        width: 280px;
        padding-top: 5rem;
        max-width: 80vw;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .docs-layout .content-area {
        border-left: none;
        padding: 20px 1.5rem 60px;
        width: 100%;
        max-width: 100vw;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* 768px - Tablets (Portrait) & Large Phones */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 5rem 2rem;
        transition: var(--transition);
        z-index: 1000;
        box-shadow: var(--shadow-lg);
        gap: 1rem;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border);
        width: 100%;
        color: var(--text-main);
    }

    .nav-links a:hover {
        color: var(--primary);
    }

    .hero {
        padding: 50px 1rem;
    }

    .phase-grid {
        grid-template-columns: 1fr;
        margin-top: -30px;
        padding: 0 1.5rem;
        width: 100%;
        max-width: 600px;
    }

    section {
        padding: 25px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .resource-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        border-radius: 0;
        margin: 1rem -1rem;
        width: calc(100% + 2rem);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        width: 100%;
    }

    .module-card, .project-card, .interview-card {
        padding: 1.25rem;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .timeline-item {
        padding-left: 2rem;
    }

    .content-container {
        padding: 0 1rem;
    }
}

/* 576px - Small Tablets & Phones */
@media (max-width: 576px) {
    .contact-form {
        padding: 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        padding: 0 1rem;
    }

    .btn-premium {
        width: 100%;
        justify-content: center;
    }

    .breadcrumbs {
        flex-wrap: wrap;
        gap: 6px;
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    pre {
        padding: 0.85rem;
        font-size: 0.8rem;
        border-radius: 8px;
        margin: 1rem -1rem;
        width: calc(100% + 2rem);
    }

    .checklist-item {
        padding: 0.85rem;
        gap: 10px;
    }
}

/* 480px - Small Phones (Samsung, iPhone Mini, etc.) */
@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .phase-card {
        padding: 1rem;
    }

    .phase-badge {
        font-size: 0.6rem;
        padding: 2px 6px;
    }

    .premium-title {
        font-size: 1.5rem !important;
    }
    
    .content-area {
        padding: 15px 1rem 50px !important;
    }

    /* Force all containers to stay within viewport */
    .nav-container,
    .hero,
    .phase-grid,
    .content-container,
    .footer-container,
    .docs-layout,
    .container {
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Fix for hero section specifically */
    .hero {
        padding: 40px 1rem !important;
        text-align: center;
    }

    .hero h1 {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* 360px - Extra Small Phones (Samsung Galaxy S, etc.) */
@media (max-width: 360px) {
    .nav-logo {
        font-size: 1rem;
    }
    
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    
    .hero {
        padding: 40px 0.75rem;
    }
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-card-compact {
    margin: 0 !important;
    padding: 1.5rem !important;
}

.project-number-badge {
    width: 24px;
    height: 24px;
    background: var(--highlight);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.flagship-project-card {
    border: 2px solid var(--highlight) !important;
    background: linear-gradient(to bottom right, #ffffff, #f8fafc) !important;
    position: relative;
    overflow: hidden;
}

.flagship-project-card .badge-warning {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

/* Resource Page Enhancements */
.resource-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease forwards;
}

.resource-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.resource-section-header:hover {
    border-color: var(--primary);
}

.resource-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.resource-section-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.phase-number {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.9rem;
}

.difficulty-badge {
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
}

.diff-beginner { background: #dcfce7; color: #166534; }
.diff-intermediate { background: #dbeafe; color: #1e40af; }
.diff-advanced { background: #fef9c3; color: #854d0e; }
.diff-expert { background: #fee2e2; color: #991b1b; }

.resource-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary);
}

.resource-card h4 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-category-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.resource-links-group {
    margin-bottom: 1.5rem;
}

.resource-links-group:last-child {
    margin-bottom: 0;
}

.resource-links-group h5 {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-links-group h5 i {
    color: var(--accent);
}

.resource-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.resource-link-item:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.resource-link-item i {
    font-size: 0.8rem;
    color: var(--primary);
}

.resource-section-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    transition: max-height 0.5s ease-out, opacity 0.3s ease;
    overflow: hidden;
}

.resource-section.collapsed .resource-section-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.resource-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.toggle-icon {
    transition: var(--transition);
    font-size: 1.25rem;
    color: var(--text-muted);
}

.resource-search-filter {
    background: var(--bg-alt);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    border: 1px solid var(--border);
}

.search-input-wrapper {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-size: 1rem;
    transition: var(--transition);
}

.search-input-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 50px;
    background: white;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.download-roadmap-btn {
    margin-left: auto;
}

@media (max-width: 1100px) {
    .resource-section-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .resource-section-content {
        grid-template-columns: 1fr;
    }
    
    .resource-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .resource-section-meta {
        width: 100%;
        justify-content: space-between;
    }
    
    .resource-search-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .download-roadmap-btn {
        margin-left: 0;
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Hover Scaling */
.hover-scale {
    transition: var(--transition);
}

.hover-scale:hover {
    transform: scale(1.02);
}
