/* === 1. VARIABLES & RESET === */
:root {
    /* Color Palette */
    --primary: #2563eb;       /* Royal Blue */
    --primary-dark: #1e40af;
    --secondary: #f59e0b;     /* Amber/Orange */
    --bg-body: #f3f4f6;       /* Light Grey */
    --bg-card: #ffffff;
    --text-main: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    
    /* Social Colors */
    --whatsapp: #25d366;
    --telegram: #0088cc;

    /* Spacing & Effects */
    --container-width: 1100px;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === 2. HEADER === */
.main-header {
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-img { height: 50px; width: auto; }
.highlight { color: var(--primary); }

.desktop-nav ul { display: flex; gap: 30px; }
.desktop-nav a { font-weight: 600; font-size: 0.95rem; color: var(--text-main); }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--primary); }

/* Mobile Toggle */
.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }

/* === 3. HERO SEARCH === */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 30px;
}

.hero-section h1 { font-size: 2rem; margin-bottom: 10px; }
.hero-section p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 25px; }

.search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

#search-form { display: flex; }
#search-input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 50px 0 0 50px;
    border: none;
    outline: none;
    font-size: 1rem;
}
#search-form button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}
#search-form button:hover { background: #d97706; }

/* === 4. CARDS & LAYOUT === */
.main-content { margin-bottom: 50px; }

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.card-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.card-header h2 { font-size: 1.4rem; color: var(--text-main); }

/* Icon Boxes */
.icon-box {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.2rem;
}
.blue { background: #3b82f6; }
.green { background: #10b981; }
.purple { background: #8b5cf6; }

/* Unit Grid (Unit 1-10) */
.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.unit-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}
.unit-item:hover { transform: translateY(-3px); border-color: var(--primary); }
.unit-item span { display: block; font-weight: bold; color: var(--primary); margin-bottom: 5px; }
.unit-item small { color: var(--text-light); font-size: 0.85rem; line-height: 1.2; display: block; }

/* Grids */
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.grid-4-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

/* List Links (Quizzes/PYQs) */
.list-links li { border-bottom: 1px solid #f1f5f9; }
.list-links li:last-child { border-bottom: none; }
.list-links a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 10px;
    font-weight: 500;
}
.list-links a:hover { color: var(--primary); background: #f8fafc; padding-left: 15px; }

/* Mini Cards (Jobs, etc) */
.mini-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 1px solid transparent;
}
.mini-card:hover { border-color: var(--primary); transform: translateY(-5px); }

.icon-circle {
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.5rem; margin-bottom: 10px;
}
.orange { background: #f97316; }
.teal { background: #14b8a6; }
.red { background: #ef4444; }
.yellow { background: #eab308; }

/* === 5. FOOTER === */
.site-footer {
    background: #111827;
    color: #9ca3af;
    padding: 50px 0 30px;
    text-align: center;
}

.author-link { color: #facc15; font-weight: bold; border-bottom: 1px dotted #facc15; }
.author-link:hover { color: white; border-bottom-style: solid; }

.social-buttons { margin: 25px 0; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.btn-social {
    padding: 10px 20px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}
.whatsapp { background: var(--whatsapp); }
.telegram { background: var(--telegram); }
.btn-social:hover { opacity: 0.9; transform: scale(1.05); }

.footer-divider { height: 1px; background: #374151; margin: 30px auto; width: 80%; }

.footer-links { margin-bottom: 20px; font-size: 0.9rem; }
.footer-links a { margin: 0 10px; color: #d1d5db; }
.footer-links a:hover { color: white; text-decoration: underline; }
.footer-links span { color: #4b5563; }

.copyright { font-size: 0.8rem; opacity: 0.7; }

/* === 6. MOBILE RESPONSIVE === */
.mobile-nav {
    position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
    background: white; z-index: 1000; padding: 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: 0.3s ease-in-out;
}
.mobile-nav.open { right: 0; }
.mobile-nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 900;
    display: none;
}
.mobile-nav-overlay.open { display: block; }

.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
#close-menu { background: none; border: none; font-size: 2rem; cursor: pointer; }
.mobile-links li { margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.mobile-links a { font-size: 1.1rem; color: var(--text-main); font-weight: 600; }

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-toggle { display: block; }
    .grid-2-col { grid-template-columns: 1fr; }
    .hero-section h1 { font-size: 1.5rem; }
    .search-wrapper { width: 100%; }
    #search-input { width: 100%; }
}