:root {
    --primary-color: #800000; /* Deep Maroon */
    --gold: #D4AF37;
    --parchment: #fdf7e2; /* Warm Cream/Parchment background */
    --text-dark: #333;
    --white: #fff;
    --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    --temple-border: repeating-linear-gradient(
        45deg,
        var(--gold) 0,
        var(--gold) 10px,
        transparent 10px,
        transparent 20px
    );
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--parchment);
}

/* Brand Header at Top */
.brand-header {
    background-color: var(--white);
    border-bottom: 2px solid var(--gold);
    padding: 0.8rem 5%;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.brand-logo {
    height: 70px;
    width: auto;
    transition: height 0.3s;
}

.brand-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    font-weight: 700;
    margin: 0;
    transition: font-size 0.3s;
}

.brand-header h1 span {
    color: var(--gold);
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
}


/* Temple Border at bottom of Navbar */
.navbar::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: 
        linear-gradient(45deg, transparent 33.33%, var(--primary-color) 33.33%, var(--primary-color) 66.66%, transparent 66.66%),
        linear-gradient(-45deg, transparent 33.33%, var(--primary-color) 33.33%, var(--primary-color) 66.66%, transparent 66.66%);
    background-size: 20px 20px;
    background-repeat: repeat-x;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.logo span {
    color: var(--gold);
}

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

.nav-links li a {
    text-decoration: none;
    color: var(--text-dark);
    margin-right: 2.5rem;
    font-weight: 500;
    transition: color 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-links li:last-child a {
    margin-right: 0;
}

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

/* Hero Section */
.hero {
    height: 85vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    border-bottom: 5px solid var(--gold);
    overflow: hidden;
}

.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;
    animation: slideShow 24s linear infinite;
}

/* Slideshow animation */
@keyframes slideShow {
    0% { opacity: 0; }
    5% { opacity: 1; }
    16.6% { opacity: 1; }
    21.6% { opacity: 0; }
    100% { opacity: 0; }
}

.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 4s; }
.slide:nth-child(3) { animation-delay: 8s; }
.slide:nth-child(4) { animation-delay: 12s; }
.slide:nth-child(5) { animation-delay: 16s; }
.slide:nth-child(6) { animation-delay: 20s; }

/* Dark overlay for readability */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/silk.png');
    opacity: 0.2;
    pointer-events: none;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 0 1rem;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content h1 span {
    color: var(--gold);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.btn {
    display: inline-block;
    margin-top: 2.5rem;
    padding: 14px 40px;
    background: var(--gold-gradient);
    color: var(--white);
    text-decoration: none;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Mobile Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 5px;
}

/* Login Button Styling */
.login-btn {
    background: var(--gold-gradient);
    color: var(--white) !important;
    padding: 10px 25px !important;
    border-radius: 2px !important;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Global Utilities */
.back-btn {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    transition: color 0.3s;
}

.back-btn:hover {
    color: var(--gold);
}

.back-btn.white {
    color: white;
}

.back-btn.white:hover {
    color: var(--gold);
}

@media (max-width: 768px) {
    .back-btn {
        font-size: 0.8rem;
    }
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .brand-container {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .brand-logo {
        height: 50px;
    }

    .brand-header h1 {
        font-size: 1.6rem;
        letter-spacing: 1.5px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 5%;
    }

    .nav-container {
        padding: 0.5rem 5%;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 1rem 0;
        z-index: 999;
        border-top: 1px solid #eee;
        animation: slideDown 0.3s ease-out;
    }

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

    .nav-links.active {
        display: flex;
    }

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

    .nav-links li a {
        margin-right: 0;
        display: block;
        padding: 0.8rem;
        border-bottom: 1px solid #f9f9f9;
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 24px;
        height: 18px;
    }

    .hamburger span {
        width: 100%;
        height: 2px;
        margin: 0;
        transition: all 0.3s ease;
    }

    .nav-left {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .brand-header h1 {
        font-size: 1.3rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 12px 30px;
        font-size: 0.8rem;
    }
}

/* About Section */
.about-section {
    padding: 5rem 5%;
    background-color: var(--white);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-top: 2rem;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
}

.about-text p {
    margin-bottom: 1.2rem;
    color: #444;
    text-align: justify;
}

/* Qualifications Grid */
.qualifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.qual-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-left: 3px solid var(--gold);
    transition: transform 0.3s;
}

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

.qual-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 3px;
}

.qual-item h4 {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.qual-item p {
    font-size: 0.8rem !important;
    margin: 0 !important;
    color: #666 !important;
    text-align: left !important;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border: 5px solid var(--gold);
}

@media (max-width: 992px) {
    .about-content {
        flex-direction: column-reverse;
        gap: 2rem;
    }
    
    .about-image img {
        max-width: 400px;
    }
}

/* Classes Section */
.classes-section {
    padding: 5rem 5%;
    background-color: var(--parchment);
}

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

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title span {
    color: var(--gold);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--gold-gradient);
    margin: 10px auto;
}

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

.class-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border-top: 4px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

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

.class-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.class-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.class-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.batch {
    margin-bottom: 1.5rem;
}

.batch:last-child {
    margin-bottom: 0;
}

.batch h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.batch p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start; /* Align icon with the first line of text */
}

.batch p i {
    color: var(--gold);
    margin-right: 12px;
    width: 16px;
    flex-shrink: 0; /* Prevent icon from shrinking */
    margin-top: 4px; /* Adjust to align with the first line of text */
}

.inquiry-nav-btn {
    color: var(--gold) !important;
    font-weight: 700 !important;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none; /* Controlled by JS */
    justify-content: center;
    align-items: flex-start; /* Changed from center to allow top-aligned scrolling */
    z-index: 2000;
    backdrop-filter: blur(5px);
    overflow-y: auto; /* Enable scrolling */
    padding: 20px 0; /* Add some space at top/bottom when scrolling */
}

/* Modal Content */
.modal-content {
    background: var(--parchment);
    width: 90%;
    max-width: 700px;
    padding: 2.5rem; /* Slightly reduced padding */
    margin: auto; /* Center with flex-start parent */
    border-radius: 15px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border: 2px solid var(--gold);
}

@media (max-width: 600px) {
    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }
    .modal-body .section-title {
        font-size: 1.8rem;
    }
    .inquiry-form .form-row {
        grid-template-columns: 1fr; /* Stack rows on mobile */
        gap: 0;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    line-height: 1;
}

.modal-body .section-title {
    margin-bottom: 1rem;
    font-size: 2.2rem;
}

/* Animation */
.scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Update Inquiry Form for Modal */
.inquiry-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.inquiry-form .btn {
    width: 100%;
    margin-top: 1rem;
    cursor: pointer;
}

/* Contact Section */
.contact-section {
    padding: 5rem 5%;
    background-color: var(--parchment);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.info-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.info-card i {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: transform 0.3s;
}

.social-btn.whatsapp {
    background: #25D366;
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn:hover {
    transform: translateY(-3px);
}

/* Footer */
.main-footer {
    background: var(--primary-color);
    color: #fff;
    padding: 2rem 5%;
    border-top: 5px solid var(--gold);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .inquiry-form .form-row, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links a {
        margin: 0 10px;
    }
}