:root {
    /* Color Palette */
    --primary-color: #800000;
    /* Deep Saffron / Maroon */
    --primary-light: #B33030;
    /* Lighter Maroon */
    --secondary-color: #D4AF37;
    /* Gold Accents */
    --bg-color: #FDFBF7;
    /* Off-white / Ivory */
    --text-color: #333333;
    /* Dark Gray */
    --text-light: #FDFBF7;
    /* Light Text */
    --highlight-red: #9e2a2b;
    /* Temple Red */
    --highlight-beige: #E6DCC3;
    /* Sandalwood Beige */

    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-subheading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 100px 0;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
}

.subheading {
    font-family: var(--font-subheading);
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Utilities */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
    color: var(--text-light);
}

.text-gold {
    color: var(--secondary-color) !important;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-family: var(--font-subheading);
    font-weight: 700;
}

.btn-primary-custom:hover {
    background-color: var(--primary-light);
    color: var(--text-light);
    transform: translateY(-2px);
}

.btn-outline-custom {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 5px;
    background: transparent;
    transition: all 0.3s ease;
    font-family: var(--font-subheading);
    font-weight: 700;
}

.btn-outline-custom:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Utilities */
.section-padding {
    padding: var(--section-padding);
}

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

/* Navigation */
.navbar {
    padding-top: 15px;
    padding-bottom: 15px;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-color) !important;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 63vh;
    /* Full screen height mostly */
    /* Full screen height mostly */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('assets/img/GurukulBanner.png');
    /* Guru and Student style image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    padding-top: 80px;
    /* Offset for fixed header */
    margin-top: -80px;
    /* Pull up behind header if transparent header is desired, but here we keep standard */
}

/* For truly transparent header overlay:
   Remove margin/padding here and make navbar absolute/transparent.
   For now, we stick to standard fixed navbar.
*/
.hero-section {
    margin-top: 70px;
    /* Push down to clear fixed navbar path */
    padding-top: 100px;
    padding-bottom: 100px;
}

.hero-section h1 {
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Animations */
.animate-fade-up {
    animation: fadeUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-100 {
    animation-delay: 0.2s;
}

.delay-200 {
    animation-delay: 0.4s;
}

.delay-300 {
    animation-delay: 0.6s;
}

/* About Section */
.letter-spacing-2 {
    letter-spacing: 2px;
}

/* Classes Section */
.class-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.class-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .1) !important;
}

.icon-wrapper {
    height: 80px;
    width: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    border-radius: 50%;
    border: 2px solid rgba(128, 0, 0, 0.1);
}

/* Gallery Section */
.gallery-item {
    cursor: pointer;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item img {
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: rgba(128, 0, 0, 0.05);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(128, 0, 0, 0.1);
}

.accordion-item {
    background-color: #fff;
}

/* Footer */
.hover-white:hover {
    color: #fff !important;
}

.hover-gold:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-2px);
    display: inline-block;
}

.text-primary-light {
    color: var(--primary-light) !important;
}

.font-heading {
    font-family: var(--font-heading);
}

footer .form-control:focus {
    box-shadow: none;
}

/* Testimonials */
.testimonial-card {
    border-radius: 15px;
    background: #fff;
    padding: 40px;
    position: relative;
    border: 1px solid rgba(128, 0, 0, 0.05);
}

.testimonial-card::before {
    content: '“';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 80px;
    color: var(--primary-color);
    opacity: 0.1;
    font-family: serif;
    line-height: 1;
}

.testimonial-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--highlight-beige);
}

/* News & Events */
.news-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.news-date {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#backToTop:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

/* Smooth Navigation Active State */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }

    .display-3 {
        font-size: 2.5rem;
    }
}