:root {
    --primary-color: #002147; /* Navy Blue */
    --secondary-color: #FFD700; /* Gold */
    --accent-color: #005b96; /* Lighter Blue */
    --text-color: #333;
    --light-bg: #f4f7f6;
    --white: #ffffff;
    --font-heading: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.top-bar {
    background-color: var(--primary-color); /* Reverted to Navy Blue */
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

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

.top-bar-left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    color: var(--white);
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--secondary-color);
}

.contact-info span {
    margin-right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.top-bar-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-link {
    font-weight: 600;
    font-size: 0.8rem;
}

.top-link:hover {
    color: var(--secondary-color);
}

.student-portal-btn {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}

.student-portal-btn:hover {
    background-color: var(--secondary-color);
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
    width: auto;
}

.school-name h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-color);
    line-height: 1.2;
}

.motto-short {
    font-style: italic;
    color: var(--accent-color);
    font-size: 0.9rem;
}

nav .nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav .nav-links li {
    position: relative;
}

nav .nav-links li a {
    font-weight: 600;
    color: var(--primary-color);
    transition: color 0.3s;
    font-size: 0.9rem;
    text-transform: uppercase;
}

nav .nav-links li a:hover {
    color: #d32f2f; /* Red hover color like reference */
}

/* Dropdown */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    top: 100%;
    left: 0;
}

.dropdown-content li {
    width: 100%;
}

.dropdown-content a {
    color: black !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-transform: none !important;
    font-size: 0.9rem !important;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: var(--primary-color) !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown .fa-chevron-down {
    font-size: 0.7rem;
    margin-left: 3px;
}

/* Search Icon */
.search-icon a i {
    color: #d32f2f;
    font-size: 1.2rem;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 33, 71, 0.8), rgba(0, 33, 71, 0.8)), url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-style: italic;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background-color: #e6c200;
}

/* Sections General */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--secondary-color);
    margin: 0 auto;
}

.bg-light {
    background-color: var(--light-bg);
}

/* Motto */
.motto-box blockquote {
    font-size: 2rem;
    text-align: center;
    color: var(--primary-color);
    font-family: serif;
    max-width: 800px;
    margin: 0 auto;
}

.motto-box footer {
    margin-top: 20px;
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-style: italic;
    background-color: var(--primary-color);
    display: inline-block;
    padding: 16px 24px;
    border-radius: 6px;
    width: 60%;
    text-align: center;
    letter-spacing: 0.5px;
    margin-left: auto;
    margin-right: auto;
}

/* Motto Bar */
.motto-bar {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-align: center;
    padding: 8px 0;
    font-style: italic;
    letter-spacing: 0.5px;
}

/* Vision & Mission */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.card {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
}

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

.card .icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Values */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.value-item {
    text-align: center;
    padding: 20px;
}

.value-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.value-item h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding-top: 60px;
}

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

.footer-logo h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    background-color: #001835;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* Online Enrolment Button */
.online-enrolment-btn {
    background-color: #d32f2f; /* Red to stand out like reference */
    color: white !important;
    padding: 8px 15px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
    font-size: 0.8rem;
    font-weight: bold;
}

.online-enrolment-btn:hover {
    background-color: #b71c1c;
    color: white !important;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    font-family: var(--font-body);
}

.chat-toggle-btn {
    background-color: #25d366; /* WhatsApp Green */
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s;
}

.chat-toggle-btn:hover {
    transform: scale(1.05);
}

.chat-popup {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-header {
    background-color: #075e54; /* WhatsApp Dark Green */
    color: white;
    padding: 20px;
    position: relative;
}

.chat-header h4 {
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

.close-chat {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    padding: 20px;
    background-color: #f0f2f5;
}

.chat-option {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-option:hover {
    background-color: #f9f9f9;
}

.chat-icon img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}

.chat-info h5 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.chat-info p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 2px;
}

.chat-info .status {
    font-size: 0.7rem;
    color: #25d366;
    font-weight: bold;
}

.chat-action-icon {
    margin-left: auto;
    color: #25d366;
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .top-bar-container {
        flex-direction: column;
        gap: 10px;
    }
    .top-bar-left, .top-bar-right {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap; /* Allow wrapping on smaller screens */
    }
    .contact-info {
        display: none; /* Hide contact info on mobile top bar to save space */
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        width: 100%;
        justify-content: space-between;
    }

    .hamburger {
        display: block;
        position: absolute;
        top: 25px;
        right: 20px;
    }

    nav {
        width: 100%;
        display: none;
        background-color: var(--white);
        padding: 20px 0;
    }

    nav.active {
        display: block;
    }

    nav .nav-links {
        flex-direction: column;
        gap: 0;
        margin-top: 20px;
        align-items: flex-start; /* Left align on mobile */
    }

    nav .nav-links li {
        width: 100%;
    }

    nav .nav-links li a {
        display: block;
        padding: 15px 20px;
        border-top: 1px solid #eee;
    }

    /* Mobile Dropdown */
    .dropdown-content {
        position: static; /* Stack naturally on mobile */
        box-shadow: none;
        background-color: #f0f0f0;
        display: none; /* Hidden by default */
        padding-left: 20px; /* Indent */
    }
    
    .dropdown:hover .dropdown-content {
        display: block; /* Hover works, but for touch we might need click. 
                           Since links are #, tapping them usually triggers hover/focus states on many devices. 
                           Or we can add JS for click toggle. 
                           For now, :hover often works as 'tap' on iOS. */
    }

    .hero-content h2 {
        font-size: 2rem;
    }
}
