/*
    MohAcademy Stylesheet - style.css

    This stylesheet contains all the visual styling for the MohAcademy website,
    including global styles, component-specific styles, color palette, and
    responsive adjustments for various screen sizes.

    Key Features:
    - Vibrant, non-white color scheme
    - Responsive design using media queries
    - Flexible layouts with Flexbox and CSS Grid
    - Smooth transitions and hover effects
    - Hero section with image slider
    - Testimonial carousel
    - Scroll reveal animations
*/

/* GLOBAL STYLES & VARIABLES */
:root {
    /* Updated Color Palette - More vibrant and harmonious, with less focus on pure white */
    --primary-color: #007bff; /* A vibrant blue for main actions and links */
    --secondary-color: #28a745; /* A fresh green for accents and secondary actions */
    --tertiary-color: #17a2b8; /* A teal for secondary accents and footer elements */
    --dark-blue: #0056b3; /* Darker blue for hover states */
    --light-green: #218838; /* Darker green for hover states */

    --text-dark: #343a40; /* Dark grey for body text (on light backgrounds) */
    --text-light: #f8f9fa; /* Light grey for text on dark backgrounds */

    /* NEW / ADJUSTED BACKGROUND COLORS - NO MORE PURE WHITE FOR MAIN SECTIONS */
    --background-very-light: #f0f8ff; /* Alice Blue - A very subtle, cool background (closest to white, but still a color) */
    --background-light-grey: #e9ecef; /* Slightly darker light grey for subtle contrast */
    --background-soft-blue: #e0f2f7; /* Very light, calming blue for general sections */
    --background-soft-green: #e9faef; /* Very light, calming green for specific sections */
    --background-dark: #2c3e50; /* Dark blue-grey for footer/specific sections */

    --header-background: #e0f2f7; /* Header background is now light blue */
    --header-shrink-background: rgba(224, 242, 247, 0.95); /* Slightly transparent light blue when shrunk */
    --dropdown-background: #f0f8ff; /* Dropdown menu background - very subtle blue */
    --card-background: #ffffff; /* Keeping cards white for contrast on colored backgrounds */


    --gradient-start: #007bff; /* Blue for gradient start */
    --gradient-end: #6f42c1; /* Purple for gradient end */
    --border-color: #dee2e6; /* Default border color */
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Standard box shadow */
    --transition-speed: 0.3s; /* Global transition speed */

    --header-height: 80px; /* Default value, will be set by JS */
}

/* Universal box-sizing for consistent layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base HTML settings */
html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
    font-size: 16px; /* Base font size for desktops */
}

/* Body styles */
body {
    font-family: 'Lato', sans-serif; /* Body text font */
    line-height: 1.6; /* Improved readability */
    color: var(--text-dark); /* Default text color */
    background-color: var(--background-soft-blue); /* Global background is now soft blue */
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

/* Headings font and color */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif; /* Headings font */
    font-weight: 700; /* Bold headings */
    color: var(--primary-color); /* Primary color for headings */
    line-height: 1.2; /* Tighter line-height for headings */
}

/* Reusable Classes */
.container {
    max-width: 1200px; /* Max width for content */
    margin: 0 auto; /* Center the container */
    padding: 0 20px; /* Default padding for desktop */
}

.section-padding {
    padding: 100px 0; /* Generous padding for sections on desktop */
}

.section-title {
    font-size: 3.5em; /* Larger section titles for desktop */
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px; /* Wider underline */
    height: 5px; /* Thicker underline */
    background-color: var(--secondary-color);
    border-radius: 3px;
}

.section-subtitle {
    font-size: 1.3em; /* Desktop subtitle font size */
    text-align: center;
    max-width: 900px;
    margin: 0 auto 80px auto; /* More spacing below subtitle */
    color: #6c757d; /* Slightly darker grey for subtitles */
}

/* Background Utility Classes */
.bg-light { background-color: var(--background-very-light); } /* Changed from pure white */
.bg-mid { background-color: var(--background-light-grey); } /* Still light, but not pure white */
.bg-dark { background-color: var(--background-dark); color: var(--text-light); } /* Dark background with light text */
.bg-gradient {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: var(--text-light);
}
.overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65); /* Darker overlay for hero/CTA */
    z-index: 1;
}

.text-light { color: var(--text-light); } /* Utility class for light text */

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px; /* Pill shape */
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap; /* Prevent button text from breaking */
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
    margin-top: 25px;
}

.btn-primary:hover {
    background-color: var(--dark-blue);
    border-color: var(--dark-blue);
    transform: translateY(-4px); /* Lift effect on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-light);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--light-green);
    border-color: var(--light-green);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.2em;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}
.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-lg-outline {
    padding: 18px 40px;
    font-size: 1.2em;
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}
.btn-lg-outline:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}


/* HEADER SECTION */
.header {
    background-color: var(--header-background);
    padding: 20px 0;
    box-shadow: var(--box-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed) ease-in-out;
}

.header.shrink {
    padding: 10px 0;
    background-color: var(--header-shrink-background);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
}

.logo-icon {
    font-size: 1.5em;
    margin-right: 12px;
    color: var(--secondary-color);
}

.site-name {
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.nav-list {
    list-style: none;
    display: flex;
    position: relative;
    z-index: 10;
}

.nav-list li {
    margin-left: 35px;
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: color var(--transition-speed) ease;
    font-size: 1.05em;
    display: flex;
    align-items: center;
}

.nav-link .dropdown-arrow {
    font-size: 0.7em;
    margin-left: 5px;
    transition: transform var(--transition-speed) ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    bottom: -8px;
    left: 0;
    transition: width var(--transition-speed) ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown Menu Styling */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--dropdown-background);
    box-shadow: var(--box-shadow);
    list-style: none;
    min-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: visibility var(--transition-speed), opacity var(--transition-speed), transform var(--transition-speed);
}

.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 400;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.dropdown-menu li a:hover {
    background-color: var(--background-light-grey);
    color: var(--primary-color);
}

/* Hamburger Menu (for mobile - hidden by default) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 100;
    transition: all var(--transition-speed) ease;
}

.hamburger .bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all var(--transition-speed) ease;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* HERO SECTION */
.hero-section {
    position: relative;
    width: 100%;
    height: 800px;
    overflow: hidden;
    padding-top: var(--header-height); /* Dynamically set by JS */
    display: flex;
    align-items: center;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-align: center;
    opacity: 0;
    transition: opacity 1.8s ease-in-out;
    transform: scale(1.03);
    transition: opacity 1.8s ease-in-out, transform 2.5s ease-out;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.45));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    padding: 0 30px;
}

.hero-content h1 {
    font-size: 5.5em;
    margin-bottom: 25px;
    line-height: 1.1;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.9);
    color: var(--text-light);
}

.hero-content p {
    font-size: 1.6em;
    margin-bottom: 50px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.9);
}

/* Animations for hero buttons (Initial hidden state for JS reveal) */
.animate-fade-in-up {
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.hero-slide.active .animate-fade-in-up {
    opacity: 1;
    transform: translateY(0);
}


/* MAIN CONTENT SECTIONS */

/* Why MohAcademy Section */
.why-mohacademy {
    background-color: var(--background-soft-green);
    text-align: center;
}

.value-propositions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.value-item {
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    border-bottom: 6px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.value-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--secondary-color);
}

.value-item .icon-lg {
    font-size: 4.5em;
    color: var(--secondary-color);
    margin-bottom: 25px;
    transition: color var(--transition-speed) ease;
}
.value-item:hover .icon-lg {
    color: var(--primary-color);
}

.value-item h3 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.value-item p {
    font-size: 1.05em;
    color: var(--text-dark);
}

/* Curriculum Insights Section (Parallax background) */
.curriculum-insights {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.curriculum-item {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.curriculum-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

.curriculum-item img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.curriculum-item h4 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.curriculum-item p {
    font-size: 0.95em;
    color: var(--text-dark);
}

/* NEW: Latest Articles Section */
.latest-articles {
    background-color: var(--background-very-light);
    text-align: center;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.article-card {
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    text-align: left;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.article-card h3 {
    font-size: 1.5em;
    padding: 20px 25px 10px;
    color: var(--primary-color);
}

.article-card p {
    font-size: 0.95em;
    padding: 0 25px 20px;
    color: var(--text-dark);
}

.article-card .read-more {
    display: block;
    padding: 15px 25px 20px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-speed) ease;
}

.article-card .read-more:hover {
    color: var(--primary-color);
}

.article-card .read-more i {
    margin-left: 8px;
    transition: margin-left var(--transition-speed) ease;
}

.article-card .read-more:hover i {
    margin-left: 12px;
}


/* Student Success Showcase (Testimonials Carousel) */
.student-success-showcase {
    background-color: var(--background-soft-blue);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.testimonial-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 30px 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.8s ease-in-out;
}

.testimonial-card {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    padding: 30px;
    margin: 0 15px;
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-speed) ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary-color);
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.testimonial-quote {
    font-size: 1.15em;
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
    color: #555;
}

.student-name {
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.student-location {
    font-size: 0.9em;
    color: #888;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-light);
    border: none;
    padding: 15px 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 20px;
}

.carousel-nav.next {
    right: 20px;
}

/* NEW: Subject CTA Section */
.subject-cta {
    text-align: center;
}

.subject-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.subject-cta-buttons .btn {
    min-width: 180px;
}


/* Call to Action Section */
.cta-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.cta-content h2 {
    font-size: 4em;
    margin-bottom: 30px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
}

.cta-content p {
    font-size: 1.4em;
    margin-bottom: 50px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}


/* FOOTER SECTION */
.footer {
    background-color: var(--background-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 0 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.6em;
    margin-bottom: 25px;
    color: var(--tertiary-color);
    font-family: 'Poppins', sans-serif;
}

.footer-column p,
.footer-column ul {
    font-size: 0.95em;
    line-height: 1.8;
}

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

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.footer-column ul li a:hover {
    color: var(--tertiary-color);
}

.social-links {
    margin-top: 25px;
}
.social-links a {
    color: var(--text-light);
    font-size: 1.8em;
    margin-right: 20px;
    transition: color var(--transition-speed) ease, transform 0.2s ease;
}

.social-links a:hover {
    color: var(--tertiary-color);
    transform: translateY(-5px);
}

.footer-gallery .gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 10px;
}

.footer-gallery .gallery-thumbs img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.footer-gallery .gallery-thumbs img:hover {
    transform: scale(1.1);
    opacity: 0.95;
    border-color: var(--tertiary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 25px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom .fa-heart {
    color: #e74c3c;
}


/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 110px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease, transform 0.2s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--dark-blue);
    transform: translateY(-3px);
}

/* REVEAL ON SCROLL ANIMATIONS (CSS for initial state - JS adds .active class) */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal.fade-up {
    /* Specific styling for fade-up reveal (can add more specific transforms here) */
}
.reveal.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}
.reveal.fade-in.active {
    opacity: 1;
}

/* ====================================================================== */
/* MEDIA QUERIES FOR RESPONSIVENESS                                     */
/* ====================================================================== */

/* Extra Large Devices (Desktops, 1200px and up) - Optional adjustments for very wide screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Large Devices (Desktops/Laptops, 992px to 1199px) */
@media (max-width: 1199px) {
    html {
        font-size: 15px;
    }
    .hero-section {
        height: 700px;
    }
    .hero-content h1 {
        font-size: 4.8em;
    }
    .hero-content p {
        font-size: 1.5em;
    }
    .section-title {
        font-size: 3em;
    }
    .section-subtitle {
        font-size: 1.2em;
        margin-bottom: 70px;
    }
    .value-item, .curriculum-item {
        padding: 35px;
    }
    .testimonial-card {
        margin: 0 10px;
    }
    .article-card img {
        height: 180px;
    }
}

/* Medium Devices (Tablets, 768px to 991px) */
@media (max-width: 991px) {
    html {
        font-size: 14px;
    }
    .section-padding {
        padding: 80px 0;
    }
    .section-title {
        font-size: 2.8em;
    }
    .section-subtitle {
        font-size: 1.1em;
        margin-bottom: 50px;
    }
    .hero-section {
        height: 600px;
    }
    .hero-content h1 {
        font-size: 4em;
    }
    .hero-content p {
        font-size: 1.3em;
        margin-bottom: 40px;
    }

    /* Adjust grids for tablets to prevent items from becoming too wide or too narrow */
    .value-propositions-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 30px;
    }
    .curriculum-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 25px;
    }

    .curriculum-insights {
        min-height: 550px;
    }
    .curriculum-item img {
        width: 70px;
        height: 70px;
    }

    .article-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
    .article-card img {
        height: 160px;
    }

    /* Testimonial carousel for tablets - show 2 cards */
    .testimonial-card {
        flex: 0 0 50%; /* Show 2 cards per view */
        max-width: 50%;
        margin: 0 10px;
    }

    .cta-section {
        min-height: 400px;
    }
    .cta-content h2 {
        font-size: 3.5em;
    }
    .cta-content p {
        font-size: 1.3em;
    }

    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 25px;
    }
}

/* Small Devices (Landscape Phones, 576px to 767px, and most portrait tablets) */
@media (max-width: 767px) {
    html {
        font-size: 13px;
    }
    .container {
        padding: 0 15px;
    }
    .section-padding {
        padding: 60px 0;
    }
    .section-title {
        font-size: 2.5em;
        margin-bottom: 20px;
    }
    .section-title::after {
        width: 70px;
        height: 3px;
    }
    .section-subtitle {
        font-size: 1em;
        margin-bottom: 40px;
    }

    /* Header & Nav for Mobile */
    .header {
        padding: 15px 0;
    }
    .header.shrink {
        padding: 10px 0;
    }
    .logo {
        font-size: 1.5em;
    }
    .logo-icon {
        font-size: 1.1em;
        margin-right: 6px;
    }

    /* Mobile Navigation Menu Styling */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--header-background);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transform: translateX(100%);
        transition: transform var(--transition-speed) ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        display: flex;
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
    }
    .nav-list li {
        margin: 0;
        width: 100%;
    }
    .nav-link {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        color: var(--text-dark);
        justify-content: center;
        font-size: 1.1em;
    }
    .nav-link:hover, .nav-link.active {
        background-color: var(--background-soft-blue);
        color: var(--primary-color);
    }
    .nav-link::after { display: none; }

    /* Dropdown on mobile - make them expand directly within the menu */
    .dropdown .dropdown-menu {
        position: relative;
        top: auto;
        left: auto;
        box-shadow: none;
        border-radius: 0;
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        background-color: var(--background-very-light);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }

    .dropdown.active .dropdown-menu {
        max-height: 500px;
        transition: max-height 0.6s ease-in;
    }

    .dropdown-menu li a {
        padding-left: 40px;
        font-size: 1em;
        border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
    }
    .dropdown-menu li:last-child a {
        border-bottom: none;
    }
    .hamburger {
        display: flex;
    }

    .hero-section {
        height: 450px;
    }
    .hero-content h1 {
        font-size: 2.8em;
        margin-bottom: 15px;
    }
    .hero-content p {
        font-size: 1.2em;
        margin-bottom: 30px;
    }
    .btn {
        padding: 10px 25px;
        font-size: 0.9em;
    }
    .btn-lg, .btn-lg-outline {
        padding: 12px 28px;
        font-size: 1em;
    }

    /* Single column grid for most sections on small devices */
    .value-propositions-grid, .curriculum-grid, .article-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .curriculum-insights {
        min-height: 500px;
    }
    .curriculum-item img {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    .article-card img {
        height: 150px;
    }


    /* Testimonial carousel for small phones - show 1 card */
    .testimonial-card {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0;
        padding: 20px;
    }
    .carousel-nav {
        font-size: 1.2em;
        padding: 10px 12px;
        
    }
    .carousel-nav.prev { left: 5px; }
    .carousel-nav.next { right: 5px; }


    .cta-section {
        min-height: 350px;
    }
    .cta-content h2 {
        font-size: 2.8em;
        margin-bottom: 20px;
    }
    .cta-content p {
        font-size: 1.1em;
        margin-bottom: 30px;
    }

    .subject-cta-buttons {
        gap: 15px;
    }
    .subject-cta-buttons .btn {
        min-width: 150px;
        padding: 10px 20px;
        font-size: 0.9em;
    }

    /* Footer adjustments for stacking */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column {
        margin-bottom: 30px;
    }
    .social-links {
        display: flex;
        justify-content: center;
    }
    .footer-gallery .gallery-thumbs {
        justify-content: center;
    }
    .footer-bottom {
        font-size: 0.85em;
    }

    .back-to-top {
        bottom: 100px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2em;
    }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575px) {
    html {
        font-size: 12px;
    }
    .hero-content h1 {
        font-size: 2.2em;
    }
    .hero-content p {
        font-size: 1em;
    }
    .section-title {
        font-size: 2em;
    }
    .cta-content h2 {
        font-size: 2.2em;
    }
    .cta-content p {
        font-size: 1em;
    }
    .btn {
        padding: 8px 20px;
        font-size: 0.85em;
    }
    .btn-lg, .btn-lg-outline {
        padding: 10px 25px;
        font-size: 0.9em;
    }

    .carousel-nav {
        padding: 8px 10px;
        font-size: 1em;
    }

    .subject-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    .subject-cta-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Optional: Landscape mode for phones (e.g., iPhone SE, Pixel 2/3 in landscape) */
@media (min-width: 481px) and (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        height: 380px;
    }
    .hero-content h1 {
        font-size: 2.5em;
    }
    .hero-content p {
        font-size: 1.1em;
    }
    .section-padding {
        padding: 40px 0;
    }
    .value-propositions-grid, .curriculum-grid, .article-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }
    .testimonial-card {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .article-card img {
        height: 120px;
    }
}

.btn-lg-outline.mt-5 {
    margin-left: 20%;
    margin-top: 25px;
}

/* ====================================================================== */
/* MEDIA QUERIES FOR RESPONSIVENESS                                     */
/* ====================================================================== */

/* Extra Large Devices (Desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Large Devices (Desktops/Laptops, 992px to 1199px) */
@media (max-width: 1199px) {
    html { font-size: 15px; }
    
    /* Shrink navigation gaps slightly to prevent clipping on small laptops */
    .nav-list li { margin-left: 18px; }
    .nav-link { font-size: 0.95em; }

    .hero-section { height: 700px; }
    .hero-content h1 { font-size: 4.8em; }
    .hero-content p { font-size: 1.5em; }
    .section-title { font-size: 3em; }
    .section-subtitle { font-size: 1.2em; margin-bottom: 70px; }
    .value-item, .curriculum-item { padding: 35px; }
    .testimonial-card { margin: 0 10px; }
    .article-card img { height: 180px; }
}

/* Medium Devices (Tablets/iPads, 768px to 991px) */
@media (max-width: 991px) {
    html { font-size: 14px; }

    /* --- iPad Fix: Activate Hamburger Menu Here --- */
    .header { padding: 15px 0; }
    .header.shrink { padding: 10px 0; }
    .logo { font-size: 1.5em; }
    .logo-icon { font-size: 1.1em; margin-right: 6px; }

    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--header-background);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transform: translateX(100%);
        transition: transform var(--transition-speed) ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        display: flex;
        overflow-y: auto;
    }
    .nav-menu.active { transform: translateX(0); }

    .nav-list { flex-direction: column; width: 100%; padding: 20px 0; }
    .nav-list li { margin: 0; width: 100%; }
    .nav-link {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        color: var(--text-dark);
        justify-content: center;
        font-size: 1.1em;
    }
    .nav-link:hover, .nav-link.active {
        background-color: var(--background-soft-blue);
        color: var(--primary-color);
    }
    .nav-link::after { display: none; }

    .dropdown .dropdown-menu {
        position: relative;
        top: auto;
        left: auto;
        box-shadow: none;
        border-radius: 0;
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        background-color: var(--background-very-light);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }
    .dropdown.active .dropdown-menu {
        max-height: 500px;
        transition: max-height 0.6s ease-in;
    }
    .dropdown-menu li a {
        padding-left: 40px;
        font-size: 1em;
        border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
    }
    .dropdown-menu li:last-child a { border-bottom: none; }
    /* --- End Hamburger Fix --- */

    .section-padding { padding: 80px 0; }
    .section-title { font-size: 2.8em; }
    .section-subtitle { font-size: 1.1em; margin-bottom: 50px; }
    .hero-section { height: 600px; }
    .hero-content h1 { font-size: 4em; }
    .hero-content p { font-size: 1.3em; margin-bottom: 40px; }

    .value-propositions-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
    .curriculum-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 25px; }
    .curriculum-insights { min-height: 550px; }
    .curriculum-item img { width: 70px; height: 70px; }
    .article-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
    .article-card img { height: 160px; }
    
    .testimonial-card { flex: 0 0 50%; max-width: 50%; margin: 0 10px; }
    
    .cta-section { min-height: 400px; }
    .cta-content h2 { font-size: 3.5em; }
    .cta-content p { font-size: 1.3em; }
    .footer-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 25px; }
}

/* Small Devices (Landscape Phones, 576px to 767px) */
@media (max-width: 767px) {
    html { font-size: 13px; }
    .container { padding: 0 15px; }
    .section-padding { padding: 60px 0; }
    .section-title { font-size: 2.5em; margin-bottom: 20px; }
    .section-title::after { width: 70px; height: 3px; }
    .section-subtitle { font-size: 1em; margin-bottom: 40px; }

    .hero-section { height: 450px; }
    .hero-content h1 { font-size: 2.8em; margin-bottom: 15px; }
    .hero-content p { font-size: 1.2em; margin-bottom: 30px; }
    .btn { padding: 10px 25px; font-size: 0.9em; }
    .btn-lg, .btn-lg-outline { padding: 12px 28px; font-size: 1em; }

    .value-propositions-grid, .curriculum-grid, .article-grid { grid-template-columns: 1fr; gap: 25px; }
    .curriculum-insights { min-height: 500px; }
    .curriculum-item img { width: 60px; height: 60px; margin-bottom: 15px; }
    .article-card img { height: 150px; }

    .testimonial-card { flex: 0 0 100%; max-width: 100%; margin: 0; padding: 20px; }
    .carousel-nav { font-size: 1.2em; padding: 10px 12px; }
    .carousel-nav.prev { left: 5px; }
    .carousel-nav.next { right: 5px; }

    .cta-section { min-height: 350px; }
    .cta-content h2 { font-size: 2.8em; margin-bottom: 20px; }
    .cta-content p { font-size: 1.1em; margin-bottom: 30px; }
    .subject-cta-buttons { gap: 15px; }
    .subject-cta-buttons .btn { min-width: 150px; padding: 10px 20px; font-size: 0.9em; }

    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-column { margin-bottom: 30px; }
    .social-links { display: flex; justify-content: center; }
    .footer-gallery .gallery-thumbs { justify-content: center; }
    .footer-bottom { font-size: 0.85em; }

    .back-to-top { bottom: 100px; right: 20px; width: 45px; height: 45px; font-size: 1.2em; }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575px) {
    html { font-size: 12px; }
    .hero-content h1 { font-size: 2.2em; }
    .hero-content p { font-size: 1em; }
    .section-title { font-size: 2em; }
    .cta-content h2 { font-size: 2.2em; }
    .cta-content p { font-size: 1em; }
    .btn { padding: 8px 20px; font-size: 0.85em; }
    .btn-lg, .btn-lg-outline { padding: 10px 25px; font-size: 0.9em; }
    .carousel-nav { padding: 8px 10px; font-size: 1em; }
    .subject-cta-buttons { flex-direction: column; align-items: center; }
    .subject-cta-buttons .btn { width: 100%; max-width: 250px; }
}

/* Optional: Landscape mode for phones */
@media (min-width: 481px) and (max-width: 767px) and (orientation: landscape) {
    .hero-section { height: 380px; }
    .hero-content h1 { font-size: 2.5em; }
    .hero-content p { font-size: 1.1em; }
    .section-padding { padding: 40px 0; }
    .value-propositions-grid, .curriculum-grid, .article-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
    .testimonial-card { flex: 0 0 50%; max-width: 50%; }
    .article-card img { height: 120px; }
}

.btn-lg-outline.mt-5 {
    margin-left: 20%;
    margin-top: 25px;
}