/* --- Global Styles & Variables --- */
:root {
    --primary-color: #005f73;
    --secondary-color: #0a9396;
    --accent-color: #ee9b00;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --white: #ffffff;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky header */
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    font-weight: 700;
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* --- Header & Navigation --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.cta-button {
    padding: 12px 28px;
    background: linear-gradient(90deg, var(--accent-color), #ffbe0b);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 155, 0, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(238, 155, 0, 0.6);
}

/* --- Hero Section --- */
#hero {
    background: linear-gradient(rgba(0, 95, 115, 0.7), rgba(0, 48, 73, 0.8)), url('../Assets/img9.jpg') no-repeat center center/cover;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content {
    max-width: 800px;
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 4.5rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.hero-content h2 {
    font-size: 2rem;
    color: var(--white);
    font-family: var(--font-primary);
    font-weight: 300;
    margin-bottom: 2rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

/* --- About Section --- */
#about {
    padding: 6rem 5%;
    background: var(--white);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-content {
    flex: 1.2;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-top: 2rem;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.stat p {
    font-weight: 600;
}

/* --- Mission Section --- */
#mission {
    padding: 6rem 5%;
    background-color: var(--primary-color);
}

.mission-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
}

#mission .section-title, #mission p {
    color: var(--white);
}

#mission .section-title::after {
    background: var(--white);
}

/* --- Programs Section --- */
#programs {
    padding: 6rem 5%;
}

.program-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

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

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* In your style.css file, replace the old rule with this one */

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This makes the image fill the circle */
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Replace all old #gallery styles with this new, advanced block */

/* --- Gallery Section --- */
#gallery {
    padding: 6rem 0; /* Only vertical padding on the section */
    background: var(--white);
}

.gallery-wrapper {
    max-width: 1400px; /* Controls the width of the title */
    margin: 0 auto;
    padding: 0 2rem; /* Adds side padding for the title */
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Move the track by the width of the first 10 images */
        transform: translateX(calc(-350px * 10 - 1rem * 10));
    }
}

.gallery-container {
    overflow: hidden; /* This is crucial for hiding the scrolling content */
    position: relative;
    /* This creates the fade-out effect on the sides */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.gallery-track {
    display: flex;
    gap: 1rem;
    /* The magic: apply the infinite scroll animation */
    animation: scroll 60s linear infinite;
}

/* Pause the animation when the user hovers over it */
.gallery-container:hover .gallery-track {
    animation-play-state: paused;
}

.gallery-item {
    flex: 0 0 350px; /* Each item has a fixed width */
    height: 280px;
    overflow: hidden;
    border-radius: 10px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* The hover effect still works! */
.gallery-item:hover {
    transform: scale(1.05);
}

/* --- Testimonials Section --- */
#testimonials {
    padding: 6rem 5%;
    background-color: #eaf4f4;
}

.testimonials-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
    position: relative;
    border-top: 5px solid var(--secondary-color);
}

.testimonial-card img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: -5.5rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    color: #555;
    margin-bottom: 1.5rem;
    position: relative;
}

.testimonial-text::before, .testimonial-text::after {
    content: '"';
    font-family: Georgia, serif;
    font-size: 4rem;
    color: var(--secondary-color);
    opacity: 0.2;
    position: absolute;
}

.testimonial-text::before {
    top: -1.5rem;
    left: 0;
}
.testimonial-text::after {
    bottom: -3.5rem;
    right: 0;
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary-color);
}


/* --- Contact & Footer --- */
#contact {
    padding: 6rem 5%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

#contact h2, #contact p {
    color: var(--white);
    max-width: 600px;
}

#contact .section-title::after {
    background: var(--white);
}

footer {
    background: #1d3557;
    color: #a8dadc;
    padding: 4rem 5% 2rem;
}

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

.footer-logo {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 1rem;
}

footer h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

footer ul {
    list-style: none;
}

footer ul li a {
    text-decoration: none;
    color: #a8dadc;
    transition: color 0.3s ease;
}

footer ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #457b9d;
    padding-top: 2rem;
    font-size: 0.9rem;
}


/* --- Animations --- */
.animate-on-load { animation: fadeInDown 1s ease-out forwards; }
.animate-on-load-delay { animation: fadeInDown 1s 0.3s ease-out both; }
.animate-on-load-delay-2 { animation: fadeInDown 1s 0.6s ease-out both; }

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Responsive Design --- */
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: var(--primary-color); }

@media (max-width: 992px) {
    .about-container { flex-direction: column; }
    .hero-content h1 { font-size: 3.5rem; }
    .hero-content h2 { font-size: 1.6rem; }
    .section-title { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        height: calc(100vh - 80px);
        text-align: center;
        transition: 0.3s ease-in-out;
        gap: 2rem;
        padding-top: 3rem;
    }

    .nav-links.active { left: 0; }
    .nav-cta { display: none; }
    .hamburger { display: block; z-index: 10; }

    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero-content h1 { font-size: 2.5rem; }
    .hero-content h2 { font-size: 1.2rem; }
}
/* --- Page Hero Styles (for top banner on new pages) --- */
.page-hero {
    background: linear-gradient(rgba(0, 95, 115, 0.8), rgba(0, 48, 73, 0.9)), url('../Assets/img20.jpg') no-repeat center center/cover;
    padding: 5rem 2rem;
    text-align: center;
    color: var(--white);
}
.page-hero h1 {
    font-size: 3.5rem;
    color: var(--white);
}
.page-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0.5rem auto 0;
}

/* --- General Content Styles --- */
/* This is a key fix: ensures all sections have consistent padding */
#principal-desk, 
#why-choose-us,
#admission-steps,
#fee-structure,
#curriculum-details,
#work-culture,
#job-openings,
#contact-details,
#map {
    padding: 6rem 5%;
}

/* Gives alternate sections a background color */
.alternate-bg {
    background-color: #eaf4f4;
}

/* --- About Page: Container fix --- */
/* This container is used on multiple pages now and is robust */
.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Admissions Page: Steps --- */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.step {
    text-align: center;
}
.step-number {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.step h3 {
    margin-bottom: 0.5rem;
}

/* --- Fee Structure Section Centering --- */
#fee-structure {
    text-align: center;
}
#fee-structure p {
    max-width: 700px; 
    margin: -2rem auto 3rem;
}

/* --- Academics Page: Program Details --- */
.program-detail {
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}
.program-detail:last-child {
    border-bottom: none;
}
.program-detail.alternate-bg {
    border-radius: 15px; /* Optional: adds a nice touch */
}
.program-detail h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* --- Careers Page: Job Listings --- */
.job-listing {
    background: var(--white);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--accent-color);
}
.job-listing h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.cta-button-small {
    display: inline-block;
    padding: 8px 20px;
    background: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}
.cta-button-small:hover {
    background-color: var(--primary-color);
}

/* --- Contact Page: Flex Container and Form --- */
.contact-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}
.contact-info, .contact-form {
    flex: 1;
    min-width: 320px;
}
.contact-info h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}
.contact-info p {
    margin-bottom: 1.5rem;
}
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 1rem;
}
.contact-form button {
    border: none;
    cursor: pointer;
    align-self: flex-start;
}

/* --- Map Section --- */
#map {
    padding: 0; /* The map should be full-width, edge-to-edge */
}
#map iframe {
    display: block;
    width: 100%;
}

/* --- Responsive & Logo Fixes --- */
.logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}
@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
    }
}