/* Variables for easy theme changes */
:root {
    --primary-dark: #11142b;
    --primary-light: #f4f7f6; /* A very light grey, derived from primary context */
    --secondary-dark: #38bee4;
    --secondary-light: #e0f7fa; /* Lighter shade of secondary-dark */
    --white: #ffffff;
    --gray-text: #555; /* Neutral for general text */
    --border-color: #ddd; /* Neutral for borders */
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--primary-dark);
    background-color: var(--primary-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--secondary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Reusable Components */
.button-primary {
    display: inline-block;
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-weight: 600;
    margin-top: 20px;
}

.button-primary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-3px);
}

.button-primary i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.button-primary:hover i {
    transform: translateX(3px);
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-dark);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.cta-button i {
    margin-left: 10px;
}

.section-title-light {
    font-size: 2.8em;
    color: var(--white); /* White text for dark backgrounds */
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title-light::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-dark);
    border-radius: 2px;
}

.section-title-dark { /* New class for dark headings on light backgrounds */
    font-size: 2.8em;
    color: var(--primary-dark); /* Dark text for light backgrounds */
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title-dark::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-dark);
    border-radius: 2px;
}

/* Header & Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.school-logo {
    height: 50px; /* Adjust as needed */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--primary-dark);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--secondary-dark);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-dark);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 999;
    padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--primary-dark);
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: var(--secondary-light);
    color: var(--secondary-dark);
}

/* Mobile Navigation */
.menu-toggle {
    display: none; /* Hidden on desktop */
    font-size: 1.8em;
    cursor: pointer;
    color: var(--primary-dark);
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height as needed */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(17, 20, 43, 0.6), rgba(17, 20, 43, 0.6)); /* Dark overlay using primary-dark */
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1; /* Place image behind overlay */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3.8em;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    font-size: 1.5em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Intro Section (About Mbonea) */
.intro {
    padding: 80px 0;
    background-color: var(--primary-light);
}

.intro-grid {
    display: flex;
    align-items: center;
    gap: 40px;
}

.intro-text {
    flex: 1;
}

.intro-text h2 {
    font-size: 2.5em;
    color: var(--primary-dark);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.intro-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-dark);
    border-radius: 2px;
}

.intro-text p {
    font-size: 1.1em;
    color: var(--gray-text);
    margin-bottom: 15px;
}

.intro-image {
    flex: 1;
    text-align: center;
}

.intro-image img {
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.intro-image img:hover {
    transform: translateY(-5px);
}

/* Highlights Section (Our Achievements) */
.highlights {
    background-color: var(--primary-dark); /* Dark background */
    padding: 80px 0;
    background-image: url('Arusha-Science-06-10-2025_02_11_PM.png'); /* The pattern image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

/* Overlay to darken the background image and make text readable */
.highlights::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 20, 43, 0.8); /* Dark primary color with transparency */
    z-index: 1;
}

.highlights .container {
    position: relative;
    z-index: 2;
}

.highlights-grid {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 50px;
}

.highlight-card {
    background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent white background */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--primary-dark);
}

.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.highlight-card .icon {
    font-size: 3.5em;
    color: var(--secondary-dark); /* Accent color for icons */
    margin-bottom: 20px;
}

.highlight-card .stat-number {
    font-size: 3.8em;
    font-weight: 700;
    color: var(--secondary-dark); /* Secondary color for numbers */
    margin-bottom: 10px;
    line-height: 1;
}

.highlight-card p {
    font-size: 1.2em;
    color: var(--gray-text);
    font-weight: 600;
    margin-top: 10px;
}


/* Testimonials Section */
.testimonials {
    background-color: var(--primary-light);
    padding: 80px 0;
    text-align: center;
}

.testimonial-slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-item {
    min-width: 100%;
    padding: 40px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.testimonial-item p {
    font-style: italic;
    font-size: 1.2em;
    color: var(--gray-text);
    margin-bottom: 20px;
}

.testimonial-item cite {
    display: block;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1.1em;
}

.slider-dots {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--secondary-dark);
}

/* School Gallery Section */
.school-gallery {
    padding: 80px 0;
    background-color: var(--primary-light);
    text-align: center;
}

.school-gallery h2 {
    font-size: 2.5em;
    color: var(--primary-dark); /* This specific section title also uses primary-dark */
    margin-bottom: 20px;
}

.school-gallery .gallery-intro-text {
    font-size: 1.1em;
    color: var(--gray-text);
    max-width: 700px;
    margin: 0 auto 50px auto;
}

.gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.gallery-preview-grid img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-preview-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.text-center {
    text-align: center;
}


/* News & Events Section */
.news-events {
    background-color: var(--white);
    padding: 80px 0;
    display: flex;
    gap: 40px;
}

.news-events .container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.news-column, .events-column {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    background-color: var(--primary-light);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.news-column h2, .events-column h2 {
    font-size: 2em;
    color: var(--primary-dark);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.news-column h2::after, .events-column h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-dark);
    border-radius: 2px;
}

.news-item, .event-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.news-item:last-child, .event-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-item h3 a, .event-item h3 a {
    font-size: 1.4em;
    color: var(--primary-dark);
    margin-bottom: 8px;
    display: block;
    transition: color 0.3s ease;
}

.news-item h3 a:hover, .event-item h3 a:hover {
    color: var(--secondary-dark);
}

.news-item .date, .event-item .date {
    font-size: 0.9em;
    color: var(--gray-text);
    margin-bottom: 10px;
    display: block;
}

.news-item .date i, .event-item .date i {
    margin-right: 5px;
    color: var(--secondary-dark);
}

.news-item p, .event-item p {
    font-size: 1em;
    color: var(--gray-text);
    margin-bottom: 15px;
}

.news-item a, .event-item a {
    color: var(--secondary-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-item a:hover, .event-item a:hover {
    color: var(--primary-dark);
}

.news-item a i, .event-item a i {
    margin-left: 5px;
    font-size: 0.8em;
}

/* Admissions CTA Section */
.admissions-cta {
    background-color: var(--secondary-dark); /* Using secondary-dark as the base background */
    padding: 80px 0;
    text-align: center;
    color: var(--primary-dark); /* Dark text */
    background-image: url('Arusha-Science-06-10-2025_02_12_PM.png'); /* Use the provided image as background */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.admissions-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(56, 190, 228, 0.7); /* Using secondary-dark with transparency */
    z-index: 1;
}

.admissions-cta .container {
    position: relative;
    z-index: 2;
}

.admissions-cta .admissions-subtext {
    font-size: 1.4em;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.admissions-cta h2 {
    color: var(--primary-dark);
    font-size: 3em;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.admissions-cta h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-dark);
    border-radius: 2px;
}

.admissions-cta .admissions-description {
    font-size: 1.2em;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--primary-dark);
}

.admissions-cta .cta-button {
    background-color: var(--primary-dark);
    color: var(--secondary-light);
    font-size: 1.2em;
    padding: 20px 40px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.admissions-cta .cta-button:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.admissions-cta .cta-button i {
    margin-left: 10px;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 20px 0;
    font-size: 0.95em;
    text-align: center;
}

footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    text-align: left;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-col h3 {
    color: var(--secondary-dark);
    margin-bottom: 25px;
    font-size: 1.4em;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-dark);
    border-radius: 1.5px;
}

.footer-col p, .footer-col li {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--secondary-dark);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    color: var(--white);
    font-size: 1.5em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    transform: translateY(-3px);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-links {
        gap: 20px;
    }

    .hero-content h1 {
        font-size: 3em;
    }

    .hero-content p {
        font-size: 1.3em;
    }

    .intro-grid {
        flex-direction: column;
        text-align: center;
    }

    .intro-text h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .highlights-grid {
        justify-content: center;
    }

    .highlight-card {
        min-width: 250px;
        max-width: 40%;
    }

    .testimonial-item {
        padding: 30px;
    }

    .news-events .container {
        flex-direction: column;
    }

    .news-column, .events-column {
        min-width: unset;
        width: 100%;
    }

    .news-column h2::after, .events-column h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-col {
        min-width: 45%;
        text-align: center;
    }

    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--white);
        position: absolute;
        top: 80px;
        left: 0;
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
        z-index: 990;
    }

    .navbar .nav-links.active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
        margin: 10px 0;
    }

    .nav-links a {
        font-size: 1.1em;
        padding: 10px 0;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 25px;
    }

    .school-logo {
        height: 45px;
    }

    .hero {
        height: 450px;
    }

    .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-content p {
        font-size: 1.1em;
    }

    .intro {
        padding: 60px 0;
    }

    .intro-text h2 {
        font-size: 2em;
    }

    .highlights {
        padding: 60px 0;
    }

    .highlights .section-title-light {
        font-size: 2.2em;
    }

    .highlights-grid {
        flex-direction: column;
        align-items: center;
    }

    .highlight-card .stat-number {
        font-size: 3.2em;
    }

    .highlight-card p {
        font-size: 1em;
    }

    .testimonials {
        padding: 60px 0;
    }

    .testimonial-item {
        padding: 20px;
    }

    .testimonial-item p {
        font-size: 1em;
    }

    .school-gallery {
        padding: 60px 0;
    }

    .school-gallery h2 {
        font-size: 2em;
    }

    .gallery-preview-grid {
        grid-template-columns: 1fr;
    }

    .news-events {
        padding: 60px 0;
    }

    .news-column h2, .events-column h2 {
        font-size: 1.8em;
    }

    .admissions-cta {
        padding: 60px 0;
    }

    .admissions-cta h2 {
        font-size: 2.2em;
    }

    .admissions-cta .admissions-description {
        font-size: 1em;
    }

    .admissions-cta .cta-button {
        padding: 15px 30px;
        font-size: 1em;
    }

    footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
    }

    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2em;
    }

    .hero-content p {
        font-size: 1em;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 0.9em;
    }

    .section-title-light, .section-title-dark {
        font-size: 1.8em;
    }

    .intro-text h2 {
        font-size: 1.8em;
    }

    .highlight-card .stat-number {
        font-size: 2.8em;
    }

    .highlight-card p {
        font-size: 1em;
    }

    .testimonial-item p {
        font-size: 0.9em;
    }

    .news-item h3 a, .event-item h3 a {
        font-size: 1.2em;
    }
}