:root {
    --primary-color: #8B0000;
    /* Deep red/maroon for 'MERIT' */
    --secondary-color: #002147;
    /* Navy Blue for professionalism */
    --accent-color: #FFD700;
    /* Gold for highlights */
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --white: #FFFFFF;
    --bg-light: #F3F4F6;
    --bg-dark: #111827;
    --transition: all 0.3s ease;
    --container-width: 1200px;
    --header-height: 120px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #a00000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 20px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Header */
header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 100px;
    /* Adjust based on actual logo ratio */
}

.nav-menu ul {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-dark);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
#hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
    overflow: hidden;
    /* Ensure slides don't overflow */
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95) 40%, rgba(255, 255, 255, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.badge {
    background-color: rgba(139, 0, 0, 0.1);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

#hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-separator {
    width: 1px;
    height: 40px;
    background-color: #ddd;
}

/* About Section */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.image-box {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.image-box:hover img {
    transform: scale(1.05);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.lead {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 500;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--secondary-color);
}

.feature-list i {
    color: var(--primary-color);
}

/* Courses Section */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.course-card {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-top-color: var(--primary-color);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(139, 0, 0, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.course-card h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.course-card ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: var(--text-light);
    position: relative;
    padding-left: 20px;
}

.course-card ul li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Why Choose Us */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-box {
    text-align: center;
    padding: 30px;
    border-radius: 16px;
    background: var(--white);
    border: 1px solid #eee;
    transition: var(--transition);
}

.feature-box:hover {
    border-color: var(--primary-color);
    background: rgba(139, 0, 0, 0.02);
}

.feature-box i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-box h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Methodology */
.methodology-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.steps {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    gap: 20px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    position: relative;
}

.step-num {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.1);
    display: block;
    margin-bottom: -20px;
    z-index: 0;
}

.step h4 {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    color: var(--accent-color);
}

/* Founder */
.founder-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 60px;
    display: flex;
    align-items: center;
    gap: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.founder-quote {
    flex: 1;
}

.founder-quote i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.founder-quote h3 {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.8;
}

.founder-info h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.founder-img-wrapper {
    flex: 0 0 200px;
    text-align: center;
}

.founder-img-box {
    width: 250px;
    height: 250px;
    max-width: 80vw;
    /* Responsive on very small screens */
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.founder-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    /* Double ensure circle */
}

/* Branches */
.branches-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.branch-tag {
    background: var(--white);
    padding: 10px 25px;
    border-radius: 30px;
    border: 1px solid #ddd;
    font-weight: 500;
    transition: var(--transition);
    cursor: default;
}

.branch-tag:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: #0b1120;
    color: #9ca3af;
    padding-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid #1f2937;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.contact-details p {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-details i {
    color: var(--primary-color);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    padding: 20px 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    #hero h1 {
        font-size: 2.8rem;
    }

    .about-wrapper {
        grid-template-columns: 1fr;
    }

    .founder-card {
        flex-direction: column-reverse;
        text-align: center;
        padding: 40px;
    }

    .founder-img-wrapper {
        flex: unset;
        /* Remove fixed basis */
        width: 100%;
        margin-bottom: 30px;
    }

    .founder-img-box {
        margin: 0 auto;
        /* Enhance centering */
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--white);
        flex-direction: column;
        padding: 40px;
        transition: 0.3s;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
    }

    .mobile-toggle {
        display: block;
    }

    .header-cta {
        display: none;
    }

    #hero h1 {
        font-size: 2.2rem;
    }

    .steps {
        flex-direction: column;
    }
}

/* Gallery Page Styles */
.page-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a3c6d 100%);
    color: var(--white);
    padding: 120px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.gallery-grid {
    column-count: 3;
    column-gap: 20px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    background: #f0f0f0;
    /* Removed fixed height to allow natural image ratio */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: auto;
    /* Maintain aspect ratio */
    display: block;
    transition: transform 0.5s;
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

@media (max-width: 900px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
    }
}

.upload-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.upload-wrapper h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.upload-wrapper p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.file-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#file-name {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}