/* -------------------------------------------------------------------------- */
/* 0. GLOBAL RESET, BASE STYLES & FONT DEFINITIONS */
/* -------------------------------------------------------------------------- */

/* Import the Montserrat font family */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700;900&display=swap');

/* Define CSS Variables for Malgudi Vidyanikethan */
:root {
    --primary-color: #050a30;   /* Main Brand Color (Deep Navy) */
    --secondary-color: #ff6c00; /* Accent Color (Orange) */
    --accent-blue: #23337d;     /* Secondary Blue (Hover states) */
    --text-grey: #4e4e4e;       /* Dark Grey for body content */
    --text-black: #000000;      /* Pure Black */
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-grey);
    width: 100vw;
    overflow-x: hidden;
    background-color: var(--white);
}

/* Global container style */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}


/* -------------------------------------------------------------------------- */
/* 1. TOP HEADER BAR STYLING (Desktop) */
/* -------------------------------------------------------------------------- */
.top-header-bar {
    background-color: var(--white);
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styling */
.logo {
    display: block;
}

.logo-image {
    height: 100px; /* Main School Logo Size */
    width: auto;
    transition: height 0.3s;
}

/* Top Header Actions (Social Icons and Button) */
.top-header-actions {
    display: flex;
    align-items: center;
}

/* Social Icon Styling (Header) */
.social-icons {
    display: flex;
    align-items: center;
    margin-right: 20px; 
}

.social-icons a {
    color: var(--primary-color);
    font-size: 20px;
    margin-left: 15px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--secondary-color);
}

/* Enquire Now Button Styling */
.btn-enquire {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.btn-enquire:hover {
    background-color: var(--accent-blue);
}

/* --- Hamburger Menu Icon (Hidden on Desktop) --- */
.hamburger-icon {
    display: none; /* Hidden by default on desktop */
    cursor: pointer;
    font-size: 28px;
    color: var(--primary-color);
}


/* -------------------------------------------------------------------------- */
/* 2. MAIN TAB BAR STYLING (Desktop Navigation) */
/* -------------------------------------------------------------------------- */
.header-wrapper {
    width: 100%;
}

.site-header {
    background-color: var(--primary-color);
    color: var(--primary-color);
    padding: 0 30px 0 30px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    /* Default: This is the DESKTOP NAVIGATION */
}

/* Navigation Styling */
.main-nav {
    flex-grow: 0;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 0;
}

.main-nav ul {
    list-style: none;
    display: flex; /* Keeps horizontal layout on desktop */
    padding: 0;
    margin: 0;
}

/* Dropdown Container Setup */
.main-nav ul li.dropdown {
    position: relative;
    padding: 0;
    margin: 0 0px 0 15px;
}

.main-nav ul li {
    white-space: nowrap;
}

/* Main Tab Link Styling (Default) */
.main-nav ul li a {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 18px;
    display: inline-block;
    border-radius: 0px;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s, color 0.3s;
}

/* Hover State Styling and Dropdown Visibility */
.main-nav ul li a:hover { background-color: var(--secondary-color); color: white; }
.main-nav ul li.active a { background-color: var(--secondary-color) !important; color: white; box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3); }
.main-nav ul li.dropdown:hover > .dropdown-menu { display: block; visibility: visible; opacity: 1; }

/* Sub-menu styles */
.dropdown-menu { display: none; visibility: hidden; opacity: 0; position: absolute; top: 100%; left: 0; z-index: 100; background-color: var(--primary-color); min-width: 220px; list-style: none; padding: 0; margin: 0; border-radius: 0 0 5px 5px; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); }
.dropdown-menu li a { font-weight: 400; border-radius: 0 !important; background-color: transparent; color: white; box-shadow: none; padding: 10px 15px; width: 100%; display: block; text-align: left; white-space: normal; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.dropdown-menu li.active > a { background-color: var(--secondary-color) !important; font-weight: 700; }
.main-nav ul .dropdown-menu li:not(.active) a { background-color: transparent !important; }
.main-nav ul .dropdown-menu li:hover > a, .main-nav ul .dropdown-menu li a:hover { background-color: var(--accent-blue) !important; color: white; font-weight: 700; }

/* Mobile Actions Wrapper - Hidden on Desktop */
.mobile-actions-wrapper {
    display: none; 
}


/* -------------------------------------------------------------------------- */
/* 3. HERO SECTION STYLES */
/* -------------------------------------------------------------------------- */
.hero-section { background-color: var(--primary-color); color: white; min-height: 450px; display: flex; align-items: flex-end; justify-content: flex-start; padding: 0; margin-bottom: 40px; background-size: cover; background-position: center; background-attachment: scroll; }
.hero-content-wrapper { padding: 30px; width: 100%; max-width: 1200px; margin: 0 auto; text-align: left; }
.hero-section h1 { font-size: 44px; font-weight: 700; margin-bottom: 0; }
.hero-section p { font-size: 20px; font-weight: 400; margin-bottom: 0; }


/* -------------------------------------------------------------------------- */
/* 4. FOOTER STYLING */
/* -------------------------------------------------------------------------- */
.site-footer { background-color: var(--primary-color); color: #ffffff; padding-top: 40px; font-size: 13px; }
.footer-top { display: flex; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 0 30px 40px 30px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.footer-column { width: 30%; }
.footer-logo-column { width: 50%; }
.footer-top > .footer-column:not(.footer-logo-column) { width: 25%; }
.footer-column h3 { color: var(--secondary-color); font-weight: 700; font-size: 15px; margin-bottom: 20px; border-bottom: 2px solid var(--secondary-color); padding-bottom: 5px; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li { margin-bottom: 6px; }
.footer-column a { color: #ffffff; text-decoration: none; transition: color 0.3s; }
.footer-column a:hover { color: var(--secondary-color); }
.footer-contact-details { max-width: 90%; }
.footer-contact-details p { margin-bottom: 4px; }
.footer-contact-details i { margin-right: 8px; color: var(--secondary-color); }
.footer-logo-image { height: 150px; width: auto; margin-bottom: 15px; }
.footer-bottom { background-color: var(--text-black); display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; font-size: 12px; color: rgba(255, 255, 255, 0.8); }
.footer-bottom p { margin: 0; }
.footer-social-links a { color: #ffffff; font-size: 16px; margin-left: 10px; transition: color 0.3s; }
.footer-social-links a:hover { color: var(--secondary-color); }


/* ========================================================================= */
/* 5. RESPONSIVE DESIGN - MEDIA QUERIES (Mobile and Tablet)                  */
/* ========================================================================= */

/* --- Tablet/Small Laptop adjustments (Max width 1024px) --- */
@media (max-width: 1024px) {
    .logo-image { height: 80px; }
    .main-nav ul li a { font-size: 12px; padding: 8px 12px; }

    /* Footer adjustments */
    .footer-top { flex-wrap: wrap; padding-bottom: 20px; }
    .footer-logo-column { width: 100%; margin-bottom: 20px; }
    .footer-top > .footer-column:not(.footer-logo-column) { width: 33.33%; margin-bottom: 20px; }
}

/* --- Mobile Device adjustments (Max width 768px) --- */
@media (max-width: 768px) {
    
    /* 1. Header Changes */
    .top-header-bar {
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }
    
    .logo-image {
        height: 60px; /* Smallest logo size on mobile */
    }

    /* HIDE DESKTOP navigation and actions on mobile */
    .site-header,
    .top-header-actions {
        display: none;
    }

    /* SHOW the hamburger icon */
    .hamburger-icon {
        display: block; 
    }

    /* 2. Mobile Navigation Structure - Hidden by default */
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100vw;
        background-color: var(--primary-color);
        z-index: 99;
        overflow-y: auto;
        
        /* Transition effect for smooth open/close (optional) */
        transition: transform 0.3s ease-in-out;
        transform: translateX(-100%);
    }

    /* Mobile Menu ACTIVE State - Shown when the JS toggles the class */
    .site-header.mobile-nav-active {
        display: flex; /* Override the display: none above */
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 0;
        transform: translateX(0); /* Slide menu into view */
    }
    
    .main-nav { width: 100%; margin: 0; }
    .main-nav ul { flex-direction: column; width: 100%; margin-top: 50px; /* Space from top */ }
    .main-nav ul li.dropdown,
    .main-nav ul li { width: 100%; margin: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }

    .main-nav ul li a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        box-shadow: none;
        background-color: transparent;
        font-size: 16px;
        font-weight: 500;
    }
    
    /* Dropdown specific mobile styles */
    .dropdown-menu {
        position: static;
        display: block !important; 
        visibility: visible;
        opacity: 1;
        background-color: var(--accent-blue); 
        min-width: 100%;
        border-radius: 0;
    }
    .dropdown-menu li a { padding-left: 40px; font-size: 14px; }
    
    /* 3. Integrated Mobile Actions (Social, Button) */
    .mobile-actions-wrapper {
        display: flex; /* Show the mobile actions wrapper */
        width: 100%;
        padding: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        flex-direction: column;
        align-items: center;
        gap: 15px;
        background-color: var(--primary-color);
    }
    
    .mobile-actions-wrapper .social-icons {
        margin: 0;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        justify-content: center;
    }
    
    .mobile-actions-wrapper .btn-enquire {
        width: 80%;
        text-align: center;
        padding: 12px 20px;
        font-size: 14px;
        order: -1;
    }

    /* 4. Footer Changes */
    .footer-top {
        flex-direction: column;
        padding: 0 20px 20px 20px;
    }
    .footer-column {
        width: 100% !important;
        margin-bottom: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding: 15px 20px;
    }
    .footer-bottom p {
        margin-bottom: 10px;
    }
}

/* Responsive adjustment for the Hero Section (Max width 576px) */
@media (max-width: 576px) {
    .hero-section { min-height: 250px; }
    .hero-content-wrapper { padding: 20px; }
    .hero-section h1 { font-size: 32px; }
    .hero-section p { font-size: 16px; }
}