/* ====================== 1. CORE VARIABLES & RESET ====================== */
:root {
    --primary-color: #00bcd4; /* Bright Cyan/Teal Accent */
    --primary-dark: #0097a7;
    --secondary-color: #1e3c72; /* Deep Navy Blue (Primary Brand Color) */
    --text-color: #333;
    --text-light: #555;
    --card-bg: #fff;
    --cta-color: #4CAF50; /* Success Green for key actions */
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    
    /* === ANIMATED GRADIENT BACKGROUND === */
    background: linear-gradient(-45deg, #f0f4f8, #e3edf6, #f0f4f8, #e3edf6);
    background-size: 400% 400%;
    animation: gradientAnimation 18s ease infinite;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

a {
    text-decoration: none;
    color: var(--primary-dark);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====================== 2. GLOBAL ELEMENTS & BUTTONS ====================== */

/* Top Announcement Bar */
.top-announcement {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 8px 0;
    font-size: 0.9rem;
    text-align: center;
}
.top-announcement a {
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 10px;
}

/* Header */
.global-header {
    background-color: var(--card-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}
.logo i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 1.2em;
}

.desktop-nav {
    display: none; /* Mobile Menu handled by JS/Media Query */
}

.nav-link {
    color: var(--text-color);
    padding: 10px 15px;
    font-weight: 500;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    background-color: #f5f5f5;
}

.auth-buttons {
    display: none; /* Hidden on mobile */
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    display: block;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-align: center;
}

.btn-primary-cta {
    background-color: var(--cta-color);
    color: white;
}
.btn-primary-cta:hover {
    background-color: #388E3C;
}

.btn-secondary {
    background: none;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    margin-right: 10px;
}
.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
}
.btn-primary-lg:hover {
    background-color: var(--primary-dark);
}

.btn-primary-outline {
    background: none;
    color: var(--secondary-color);
    border-color: #ddd;
    border-radius: var(--border-radius);
    padding: 10px 20px;
    font-size: 0.95rem;
}
.btn-primary-outline:hover {
    background-color: #f0f0f0;
}


/* ====================== 3. HOME PAGE COMPONENTS ====================== */
.main-content-area {
    padding-bottom: 50px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--secondary-color), #2a5298);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero-content .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 40px;
}

.hero-form-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 450px;
    margin: 0 auto 25px;
}
.hero-form-box input {
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    color: var(--text-color);
}
.hero-form-box button {
    width: 100%;
}

.hero-cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.video-link {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
}
.video-link i {
    font-size: 1.5rem;
    margin-right: 8px;
    color: var(--primary-color);
}
.rating {
    font-size: 0.9rem;
    color: #ccc;
}
.rating i {
    color: #ffc107;
}


/* Success Stats */
.success-stats {
    background-color: var(--card-bg);
    padding: 30px 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    text-align: center;
}

.stat-item {
    border-right: none;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}


/* General Section Title */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
    margin: 60px 0 40px;
}


/* Feature Highlights */
.feature-highlights {
    padding: 20px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-bottom: 4px solid transparent;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--primary-color);
}

.feature-icon {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
    font-weight: 600;
}


/* Program/Course Cards (Used in both files) */
.course-grid-page {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 50px;
}

.program-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.program-card:hover {
    transform: translateY(-5px);
}

.card-header {
    padding: 18px 20px;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
}

.card-body {
    padding: 20px;
}

.exam-tag {
    display: inline-block;
    background-color: #e0f7fa;
    color: var(--primary-dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.details {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.details i {
    margin-right: 8px;
    color: var(--primary-color);
}

.price {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cta-color);
    margin: 15px 0;
}


/* ====================== 4. COURSE PAGE LAYOUT ====================== */
.page-title-bar {
    padding: 30px 0;
    text-align: center;
}
.page-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}
.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.course-page-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Filter Sidebar (Mobile) */
.filter-sidebar {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.filter-group {
    margin-bottom: 25px;
}
.filter-group h3 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}
.filter-group label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 8px;
    cursor: pointer;
    color: var(--text-light);
}
.filter-sidebar .btn {
    width: 100%;
}


/* Search/Sort Bar */
.search-sort-bar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}
.search-sort-bar input, .search-sort-bar select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
}


/* ====================== 5. GLOBAL FOOTER ====================== */
.global-footer {
    background-color: var(--secondary-color);
    color: #f0f0f0;
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 15px;
}
.footer-col h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li a {
    color: #f0f0f0;
    display: block;
    padding: 5px 0;
    font-size: 0.95rem;
    opacity: 0.9;
}
.footer-col ul li a:hover {
    color: var(--primary-color);
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    margin-right: 15px;
}
.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}


/* ====================== 6. RESPONSIVENESS (Media Queries) ====================== */

/* Tablet and Small Desktop (Min-width 768px) */
@media (min-width: 768px) {
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .desktop-nav {
        display: flex;
        gap: 5px;
    }
    
    .auth-buttons {
        display: block;
    }
    
    .menu-toggle {
        display: none;
    }

    /* Hero Form/CTA */
    .hero-form-box {
        flex-direction: row;
        max-width: 700px;
    }
    .hero-form-box button {
        width: auto;
    }
    .hero-cta-group {
        flex-direction: row;
    }

    /* Stats Grid */
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .stat-item {
        border-right: 1px solid #eee;
    }
    .stat-item:last-child {
        border-right: none;
    }

    /* Feature Grid */
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Course Grid */
    .course-grid-page {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer Grid */
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
    
    /* Course Page Layout */
    .course-page-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .filter-sidebar {
        flex: 0 0 250px; /* Fixed width sidebar on desktop */
        position: sticky;
        top: 80px;
    }
    
    .course-list-main {
        flex-grow: 1;
    }
    
    .search-sort-bar {
        flex-direction: row;
        justify-content: space-between;
    }
    .search-sort-bar input {
        flex: 1;
    }
    .search-sort-bar select {
        flex: 0 0 200px;
    }
}

/* Large Desktop (Min-width 1200px) */
@media (min-width: 1200px) {
    .course-grid-page {
        grid-template-columns: repeat(3, 1fr);
    }
}