/* ==========================================================================
   MIST GLOBAL STYLESHEET
   Theme: "Mayaneri" Traditional Architecture
   ========================================================================== */

/* --- CSS VARIABLES (DESIGN SYSTEM) --- */
:root {
    --terracotta-red: #C04A3B;
    --sandstone-beige: #F4ECD8;
    --deep-bronze: #4A3728;
    --marigold-yellow: #E5A93C;
    --granite-grey: #5C605D;
    --bg-texture: radial-gradient(circle at center, rgba(74, 55, 40, 0.03) 0, rgba(74, 55, 40, 0) 100%);
}

/* --- RESET & BASE STYLES --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Lora', serif;
    background-color: var(--sandstone-beige);
    color: var(--deep-bronze);
    background-image: var(--bg-texture);
    line-height: 1.6;
}

h1, h2, h3, h4, .nav-links a {
    font-family: 'Cinzel', serif;
    color: var(--terracotta-red);
    margin-top: 0;
}

a {
    text-decoration: none;
    color: var(--terracotta-red);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--marigold-yellow);
}

/* --- HEADER & NAVIGATION --- */
header {
    background-color: var(--deep-bronze);
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--terracotta-red);
    
    /* Sticky Floating Properties */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px; 
}

.logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); 
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    color: var(--sandstone-beige);
    margin: 0;
    font-size: 28px;
    letter-spacing: 2px;
    line-height: 1.1;
}

.logo-text span {
    color: var(--marigold-yellow);
    font-size: 14px;
    font-family: 'Lora', serif;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--sandstone-beige);
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--marigold-yellow);
}

/* --- MODERN MOBILE MENU TOGGLE (Animated Hamburger) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--sandstone-beige);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger Animation to 'X' */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* --- HERO SECTION --- */
.hero {
    text-align: center;
    padding: 80px 20px;
    background-color: rgba(244, 236, 216, 0.8);
    border-bottom: 2px solid rgba(74, 55, 40, 0.1);
}

.hero h2 {
    font-size: 42px;
    margin-bottom: 10px;
}

.hero p.sub-headline {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 30px;
}

.affiliation-box {
    display: inline-block;
    border: 2px solid var(--marigold-yellow);
    padding: 15px 30px;
    background-color: #fffaf0;
    border-radius: 8px;
    margin-bottom: 40px;
    font-size: 14px;
}

.affiliation-box strong {
    display: block;
    margin-bottom: 5px;
    color: var(--terracotta-red);
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--terracotta-red);
    color: var(--sandstone-beige) !important;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    border-radius: 4px;
    margin: 0 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--marigold-yellow);
    color: var(--deep-bronze) !important;
    border: 2px solid var(--deep-bronze);
}

.btn-outline {
    background-color: transparent;
    color: var(--terracotta-red) !important;
    border: 2px solid var(--terracotta-red);
}

/* --- LAYOUT CONTAINERS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px auto;
}

.intro h2 {
    font-size: 32px;
}

/* --- HIGHLIGHTS GRID --- */
.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.highlight-card {
    background-color: #fffaf0;
    padding: 30px;
    border-top: 5px solid var(--marigold-yellow);
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

.highlight-card h3 {
    font-size: 22px;
    color: var(--deep-bronze);
}

/* --- NOTICE BOARD --- */
.notice-board {
    background-color: var(--terracotta-red);
    color: var(--sandstone-beige);
    padding: 50px 20px;
    text-align: center;
    margin-top: 60px;
}

.notice-board h2 {
    color: var(--sandstone-beige);
}

.notice-list {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.notice-list li {
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    padding: 15px 20px;
    border-left: 4px solid var(--marigold-yellow);
    border-radius: 4px;
}

.badge {
    background-color: var(--marigold-yellow);
    color: var(--deep-bronze);
    padding: 3px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    margin-right: 10px;
}

/* --- FOOTER --- */
footer {
    background-color: var(--granite-grey);
    color: var(--sandstone-beige);
    padding: 60px 20px 20px 20px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    border-bottom: 1px solid rgba(244, 236, 216, 0.2);
    padding-bottom: 40px;
    margin-bottom: 20px;
}

.footer-grid h3 {
    color: var(--marigold-yellow);
}

.footer-bottom {
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
}

.footer-links a {
    color: var(--marigold-yellow);
    margin: 0 10px;
}

/* --- FLOATING WHATSAPP BUTTON --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 2px 2px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 2px 2px 20px rgba(0,0,0,0.4);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    object-fit: contain; 
}

/* --- RESPONSIVE QUERIES FOR MOBILE --- */

@media (max-width: 900px) {
    .highlights, .footer-grid, .admissions-grid, .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        padding: 12px 15px;
        flex-wrap: nowrap; 
        position: fixed; 
        width: 100%;
    }
    
    /* Limit logo width so it doesn't push the hamburger button out */
    .logo {
        max-width: 85%;
        gap: 10px;
    }

    .logo-img {
        height: 40px; /* Slightly smaller to make room */
    }

    .logo-text h1 {
        font-size: 20px;
    }

    /* Make the full institute name wrap beautifully on small screens */
    .logo-text span {
        display: block;
        font-size: 10px; 
        line-height: 1.2;
        white-space: normal; /* Allows text to drop to the next line */
    }

    .menu-toggle {
        display: flex; 
    }
    
    .nav-links {
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background-color: var(--deep-bronze);
        flex-direction: column;
        text-align: center;
        padding: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden; 
        transition: max-height 0.4s ease-in-out; 
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }

    .nav-links.active {
        max-height: 350px; 
        border-top: 2px solid var(--terracotta-red);
    }

    .nav-links a {
        padding: 15px 0;
        display: block;
        border-bottom: 1px solid rgba(244, 236, 216, 0.05);
    }

    body {
        padding-top: 65px; /* Adjust padding to clear the fixed header */
    }

    .hero {
        padding: 50px 20px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .hero p.sub-headline {
        font-size: 16px;
    }

    .btn {
        display: block;
        margin: 15px auto;
        max-width: 250px;
        width: 100%;
    }

    .container {
        padding: 40px 20px;
    }

    .table-wrapper {
        overflow-x: auto;
        width: 100%;
        margin-bottom: 30px;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}