/* =============================================
   CHINMAYARANYAM - Main Stylesheet
   ============================================= */

/* --- Base / Reset --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-black);
    background-color: var(--color-white);
    overflow-x: hidden;
}

a {
    color: var(--color-saffron);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--color-saffron-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-maroon);
    font-weight: 600;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.35rem; }

.heading-decorated {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.heading-decorated::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-saffron), var(--color-gold));
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.heading-decorated .ornament {
    display: block;
    color: var(--color-gold);
    font-size: 1.25rem;
    margin-top: 0.5rem;
    letter-spacing: 0.5em;
}

/* --- Navbar --- */
.navbar-chinmaya {
    background-color: var(--color-maroon);
    padding: 0.75rem 0;
    transition: var(--transition-base);
    z-index: 1050;
}

.navbar-chinmaya.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.navbar-chinmaya .navbar-brand {
    font-family: var(--font-heading);
    color: var(--color-cream) !important;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.navbar-chinmaya .navbar-brand img {
    height: 45px;
    margin-right: 0.5rem;
}

.navbar-chinmaya .nav-link {
    color: rgba(250, 243, 224, 0.85) !important;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    transition: var(--transition-base);
    position: relative;
}

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

.navbar-chinmaya .nav-link.active:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--color-gold);
    border-radius: 1px;
}

.navbar-chinmaya .dropdown-toggle::after {
    border-top-color: var(--color-cream);
    transition: transform 0.3s ease;
}

.navbar-chinmaya .dropdown-toggle:hover::after,
.navbar-chinmaya .dropdown-toggle.active::after {
    border-top-color: var(--color-gold);
}

.navbar-chinmaya .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.navbar-chinmaya .dropdown-menu {
    background-color: var(--color-maroon-dark);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    z-index: 1060;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.navbar-chinmaya .dropdown-item {
    color: var(--color-cream) !important;
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    transition: var(--transition-base);
}

.navbar-chinmaya .dropdown-item:hover,
.navbar-chinmaya .dropdown-item.active {
    background-color: rgba(201, 162, 39, 0.15);
    color: var(--color-gold) !important;
}

.btn-contribute-nav {
    background-color: var(--color-saffron) !important;
    color: var(--color-white) !important;
    border: 2px solid var(--color-gold) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 1.25rem !important;
    border-radius: 50px;
    transition: var(--transition-base);
}

.btn-contribute-nav:hover {
    background-color: var(--color-saffron-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

/* Offcanvas Mobile Menu */
.offcanvas-chinmaya {
    background-color: var(--color-maroon) !important;
}

.offcanvas-chinmaya .offcanvas-header {
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.offcanvas-chinmaya .btn-close {
    filter: invert(1);
}

/* --- Hero Section (Home) --- */
.hero-home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--color-maroon);
}

/* Hero Carousel */
.hero-home #heroCarousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-home #heroCarousel,
.hero-home #heroCarousel .carousel-inner,
.hero-home #heroCarousel .carousel-item {
    height: 100%;
}

.hero-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: heroSlideZoom 8s ease-out forwards;
}

@keyframes heroSlideZoom {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

.hero-home #heroCarousel .carousel-indicators {
    z-index: 3;
    margin-bottom: 4rem;
}

.hero-home #heroCarousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    background-color: transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.hero-home #heroCarousel .carousel-indicators button.active {
    background-color: var(--color-gold);
    opacity: 1;
    transform: scale(1.2);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(123, 36, 28, 0.78) 0%,
        rgba(91, 26, 20, 0.6) 50%,
        rgba(230, 126, 34, 0.35) 100%);
    z-index: 1;
}

.hero-home .hero-content {
    position: relative;
    z-index: 2;
    color: var(--color-cream);
}

.hero-home h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-cream);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.hero-home .tagline {
    font-family: var(--font-heading-alt);
    font-size: 1.35rem;
    color: var(--color-gold-light);
    font-style: italic;
    margin-bottom: 2rem;
}

.hero-home .om-symbol {
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
    display: block;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--color-gold-light);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-12px); }
    60% { transform: translateX(-50%) translateY(-6px); }
}

/* --- Hero Section (Inner Pages) --- */
.hero-inner {
    min-height: 300px;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-inner .hero-overlay {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 300px;
    padding: 6rem 0 3rem;
}

.hero-inner h1 {
    font-size: 2.75rem;
    color: var(--color-cream);
    margin-bottom: 0.5rem;
}

.hero-inner .breadcrumb {
    margin-bottom: 0;
}

.hero-inner .breadcrumb-item a {
    color: var(--color-gold-light);
}

.hero-inner .breadcrumb-item.active {
    color: rgba(250, 243, 224, 0.7);
}

.hero-inner .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(250, 243, 224, 0.5);
}

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

.section-cream {
    background-color: var(--color-cream);
}

.section-maroon {
    background-color: var(--color-maroon);
    color: var(--color-cream);
}

.section-maroon h2,
.section-maroon h3,
.section-maroon h4 {
    color: var(--color-cream);
}

.section-maroon .heading-decorated::after {
    background: linear-gradient(90deg, var(--color-gold), var(--color-saffron));
}

/* Section Divider */
.divider-ornament {
    text-align: center;
    margin: 0;
    padding: 1rem 0;
    position: relative;
}

.divider-ornament::before,
.divider-ornament::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 2rem);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.divider-ornament::before { left: 0; }
.divider-ornament::after { right: 0; }

.divider-ornament span {
    color: var(--color-gold);
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
    background-color: var(--color-white);
    padding: 0 1rem;
}

.section-cream .divider-ornament span {
    background-color: var(--color-cream);
}

/* --- Card Styles --- */
.card-spiritual {
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
    height: 100%;
    background: var(--color-white);
}

.card-spiritual:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-gold);
}

.card-spiritual .card-img-top {
    height: 220px;
    object-fit: cover;
}

.card-spiritual .card-body {
    padding: 1.5rem;
}

.card-spiritual .card-title {
    font-family: var(--font-heading);
    color: var(--color-maroon);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.card-spiritual .card-text {
    font-size: 0.95rem;
    color: var(--color-gray-600);
    line-height: 1.6;
}

/* --- Button Overrides --- */
.btn-saffron {
    background-color: var(--color-saffron);
    color: var(--color-white);
    border: none;
    font-weight: 500;
    padding: 0.6rem 1.75rem;
    border-radius: 50px;
    transition: var(--transition-base);
}

.btn-saffron:hover {
    background-color: var(--color-saffron-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.btn-gold {
    background-color: var(--color-gold);
    color: var(--color-white);
    border: none;
    font-weight: 500;
    padding: 0.6rem 1.75rem;
    border-radius: 50px;
    transition: var(--transition-base);
}

.btn-gold:hover {
    background-color: var(--color-gold-dark);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-outline-gold {
    background-color: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
    font-weight: 500;
    padding: 0.6rem 1.75rem;
    border-radius: 50px;
    transition: var(--transition-base);
}

.btn-outline-gold:hover {
    background-color: var(--color-gold);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-outline-cream {
    background-color: transparent;
    color: var(--color-cream);
    border: 2px solid var(--color-cream);
    font-weight: 500;
    padding: 0.6rem 1.75rem;
    border-radius: 50px;
    transition: var(--transition-base);
}

.btn-outline-cream:hover {
    background-color: var(--color-cream);
    color: var(--color-maroon);
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gallery-grid .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    aspect-ratio: 4/3;
}

.gallery-grid .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

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

.gallery-grid .gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(123, 36, 28, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
}

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

.gallery-grid .gallery-item .gallery-overlay i {
    color: var(--color-cream);
    font-size: 1.75rem;
}

/* --- Gallery Filters --- */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.gallery-filter-btn {
    background: transparent;
    border: 2px solid var(--color-gold);
    color: var(--color-maroon);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-base);
}

.gallery-filter-btn:hover {
    background-color: rgba(201, 162, 39, 0.15);
    color: var(--color-maroon);
}

.gallery-filter-btn.active {
    background-color: var(--color-saffron);
    border-color: var(--color-saffron);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.gallery-item.hidden {
    display: none !important;
}

/* --- Timeline (History Page) --- */
.timeline-vertical {
    position: relative;
    padding: 2rem 0;
}

.timeline-vertical::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--color-gold), var(--color-saffron));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 1.5rem 2.5rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 2rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--color-gold);
    border: 3px solid var(--color-cream);
    box-shadow: 0 0 0 3px var(--color-gold);
    z-index: 1;
}

.timeline-item:nth-child(odd)::before {
    right: -8px;
}

.timeline-item:nth-child(even)::before {
    left: -8px;
}

.timeline-content {
    background: var(--color-white);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-gold);
}

.timeline-year {
    display: inline-block;
    background-color: var(--color-maroon);
    color: var(--color-cream);
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* --- Bank Details Card --- */
.bank-details-card {
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-white) 100%);
    border: 2px solid var(--color-gold);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.bank-details-card .bank-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(201, 162, 39, 0.3);
}

.bank-details-card .bank-header .icon {
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 0.75rem;
}

.bank-details-card .bank-header h3 {
    font-family: var(--font-heading);
    color: var(--color-maroon);
    font-size: 1.4rem;
    margin-bottom: 0;
}

.bank-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(201, 162, 39, 0.15);
}

.bank-detail-row:last-child {
    border-bottom: none;
}

.bank-detail-row .label {
    font-weight: 600;
    color: var(--color-maroon);
    font-size: 0.9rem;
    min-width: 140px;
}

.bank-detail-row .value {
    font-weight: 500;
    color: var(--color-black);
    font-size: 1rem;
    flex: 1;
    text-align: right;
    margin: 0 1rem;
}

.bank-detail-row .btn-copy {
    background: none;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.bank-detail-row .btn-copy:hover {
    background-color: var(--color-gold);
    color: var(--color-white);
}

.bank-detail-row .btn-copy.copied {
    background-color: #27ae60;
    border-color: #27ae60;
    color: var(--color-white);
}

/* --- Google Maps --- */
.map-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* --- Footer --- */
.footer-chinmaya {
    background-color: var(--color-maroon-dark);
    color: rgba(250, 243, 224, 0.85);
    padding: 4rem 0 0;
}

.footer-chinmaya h5 {
    font-family: var(--font-heading);
    color: var(--color-gold);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    letter-spacing: 0.05em;
}

.footer-chinmaya p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-chinmaya a {
    color: rgba(250, 243, 224, 0.75);
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.footer-chinmaya a:hover {
    color: var(--color-gold);
    padding-left: 4px;
}

.footer-chinmaya .footer-links li {
    margin-bottom: 0.5rem;
    list-style: none;
}

.footer-chinmaya .footer-links li::before {
    content: '\F285';
    font-family: 'bootstrap-icons';
    margin-right: 0.5rem;
    color: var(--color-saffron);
    font-size: 0.7rem;
}

.footer-chinmaya .footer-contact li {
    list-style: none;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.footer-chinmaya .footer-contact i {
    color: var(--color-saffron);
    width: 20px;
    margin-right: 0.5rem;
}

.footer-bottom {
    background-color: var(--color-maroon);
    text-align: center;
    padding: 1.25rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(201, 162, 39, 0.15);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--color-gold);
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* --- Utility Classes --- */
.text-gold { color: var(--color-gold) !important; }
.text-saffron { color: var(--color-saffron) !important; }
.text-maroon { color: var(--color-maroon) !important; }
.text-cream { color: var(--color-cream) !important; }
.bg-cream { background-color: var(--color-cream) !important; }
.bg-maroon { background-color: var(--color-maroon) !important; }

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

/* --- Event Card --- */
.event-card {
    border-left: 4px solid var(--color-saffron);
    background: var(--color-white);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    height: 100%;
}

.event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.event-card .event-date {
    display: inline-block;
    background-color: var(--color-maroon);
    color: var(--color-cream);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* --- Blockquote (Gurudev Quotes) --- */
.quote-spiritual {
    background-color: var(--color-cream);
    border-left: 4px solid var(--color-gold);
    padding: 1.5rem 2rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 2rem 0;
    font-family: var(--font-heading-alt);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-maroon);
    position: relative;
}

.quote-spiritual::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--color-gold);
    position: absolute;
    top: -0.5rem;
    left: 0.75rem;
    line-height: 1;
    font-family: Georgia, serif;
}

/* =============================================
   DIVINE TRANSITION EFFECTS
   ============================================= */

/* === PRELOADER === */
.preloader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--color-maroon-dark) 0%, var(--color-maroon) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-om {
    font-size: 4rem;
    color: var(--color-gold);
    animation: preloaderPulse 1.5s ease-in-out infinite, preloaderGlow 1.5s ease-in-out infinite;
}

.preloader-text {
    font-family: var(--font-heading);
    color: var(--color-cream);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    margin-top: 1rem;
    opacity: 0.7;
}

@keyframes preloaderPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes preloaderGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(201, 162, 39, 0.3); }
    50% { text-shadow: 0 0 30px rgba(201, 162, 39, 0.7), 0 0 60px rgba(201, 162, 39, 0.3); }
}

/* === PAGE FADE-IN === */
.page-loaded main {
    animation: pageFadeIn 0.8s ease-out forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === HERO CAROUSEL CROSSFADE === */
.hero-home .carousel-item {
    transition: opacity 1.5s ease-in-out;
}

/* === OM SYMBOL GOLDEN SHIMMER === */
.hero-home .om-symbol {
    animation: omShimmer 3s ease-in-out infinite, omFloat 6s ease-in-out infinite;
}

@keyframes omShimmer {
    0%, 100% {
        text-shadow: 0 0 10px rgba(201, 162, 39, 0.4),
                     0 0 20px rgba(201, 162, 39, 0.2);
        color: var(--color-gold);
    }
    50% {
        text-shadow: 0 0 20px rgba(201, 162, 39, 0.8),
                     0 0 40px rgba(201, 162, 39, 0.4),
                     0 0 60px rgba(201, 162, 39, 0.2);
        color: var(--color-gold-light);
    }
}

@keyframes omFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* === HERO TITLE TEXT GLOW === */
.hero-home h1 {
    animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3),
                     0 0 20px rgba(250, 243, 224, 0.15);
    }
}

/* === INNER HERO PARALLAX === */
.hero-inner {
    background-attachment: fixed;
    overflow: hidden;
}

.hero-inner h1 {
    animation: innerHeroReveal 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes innerHeroReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
        letter-spacing: 0.15em;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: 0.05em;
    }
}

/* === FLOATING GOLDEN PARTICLES === */
.particles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.8), transparent);
    border-radius: 50%;
    animation: particleFloat linear infinite;
    opacity: 0;
}

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(0) translateX(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-100vh) translateX(20px); }
}

/* === CARD GOLDEN GLOW HOVER === */
.card-spiritual {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.5s ease;
}

.card-spiritual:hover {
    box-shadow: var(--shadow-lg), 0 0 20px rgba(201, 162, 39, 0.15);
}

.card-spiritual .card-img-top {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-spiritual:hover .card-img-top {
    transform: scale(1.05);
}

.card-spiritual:hover .bi {
    animation: iconPulse 0.6s ease-in-out;
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* === GALLERY ENHANCED EFFECTS === */
.gallery-grid .gallery-item img {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.5s ease;
}

.gallery-grid .gallery-item:hover img {
    filter: brightness(0.85);
}

.gallery-grid .gallery-item .gallery-overlay {
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: linear-gradient(135deg, rgba(123, 36, 28, 0.6) 0%, rgba(201, 162, 39, 0.3) 100%);
}

.gallery-grid .gallery-item .gallery-overlay i {
    transform: scale(0.5);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-grid .gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* === GALLERY LIGHTBOX === */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.95);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: pointer;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 0 40px rgba(201, 162, 39, 0.3);
    transform: scale(0.85);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--color-cream);
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 9999;
}

.lightbox-close:hover {
    transform: rotate(90deg);
    color: var(--color-gold);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-cream);
    font-size: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 1rem;
}

.lightbox-nav:hover { color: var(--color-gold); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-cream);
    font-family: var(--font-heading-alt);
    font-size: 0.95rem;
    text-align: center;
    opacity: 0.8;
    max-width: 80%;
}

/* === HEADING DECORATED LINE GROW === */
.heading-decorated::after {
    transform-origin: center;
    transform: scaleX(0);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.heading-decorated.animate-line::after {
    transform: scaleX(1);
}

/* === QUOTE HOVER EFFECTS === */
.quote-spiritual {
    transition: box-shadow 0.5s ease, border-left-color 0.5s ease;
}

.quote-spiritual:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--color-saffron);
}

.quote-spiritual::before {
    transition: transform 0.6s ease, color 0.6s ease;
}

.quote-spiritual:hover::before {
    transform: scale(1.15);
    color: var(--color-saffron);
}

/* === OM DIVIDER PULSE === */
.divider-ornament span {
    animation: omDividerPulse 4s ease-in-out infinite;
}

@keyframes omDividerPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: none;
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 15px rgba(201, 162, 39, 0.4);
    }
}

.divider-ornament::before,
.divider-ornament::after {
    animation: lineShimmer 4s ease-in-out infinite;
}

@keyframes lineShimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* === BUTTON RIPPLE === */
.btn-saffron,
.btn-gold,
.btn-outline-gold,
.btn-outline-cream,
.btn-contribute-nav {
    position: relative;
    overflow: hidden;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleEffect {
    to { transform: scale(4); opacity: 0; }
}

/* === BUTTON GLOW HOVER === */
.btn-saffron:hover {
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4),
                0 0 20px rgba(230, 126, 34, 0.2);
}

.btn-outline-gold:hover {
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3),
                0 0 15px rgba(201, 162, 39, 0.15);
}

.btn-contribute-nav:hover {
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4),
                0 0 15px rgba(230, 126, 34, 0.2);
}

/* === COUNTER ANIMATION === */
.counter-value {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* === TIMELINE DOT PULSE === */
.timeline-item::before {
    animation: timelineDotPulse 3s ease-in-out infinite;
}

@keyframes timelineDotPulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--color-gold); }
    50% { box-shadow: 0 0 0 3px var(--color-gold), 0 0 12px rgba(201, 162, 39, 0.4); }
}

.timeline-content {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.5s ease,
                border-color 0.5s ease;
}

.timeline-content:hover {
    transform: translateY(-4px);
}

/* === EVENT CARD GLOW === */
.event-card {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.5s ease,
                border-left-color 0.5s ease;
}

.event-card:hover {
    border-left-color: var(--color-gold);
    box-shadow: var(--shadow-md), 0 0 15px rgba(201, 162, 39, 0.1);
}

/* === BACK TO TOP ENHANCED === */
#back-to-top {
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 15px rgba(230, 126, 34, 0.3);
}

#back-to-top.visible {
    animation: backToTopAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

/* === NAVBAR SMOOTH TRANSITION === */
.navbar-chinmaya {
    transition: padding 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease,
                background-color 0.4s ease;
}

.navbar-chinmaya .nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--color-gold);
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

.navbar-chinmaya .nav-link:not(.dropdown-toggle):hover::after {
    transform: scaleX(1);
}

.navbar-chinmaya .nav-link.active:not(.dropdown-toggle)::after {
    transform: scaleX(1);
}

/* === FALLING FLOWER PETALS === */
.petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1040;
    overflow: hidden;
}

.petal {
    position: absolute;
    top: -20px;
    pointer-events: none;
}

.petal-shape {
    width: 100%;
    height: 100%;
    border-radius: 50% 0 50% 0;
    background: linear-gradient(135deg, var(--petal-color-1, #f4a261) 0%, var(--petal-color-2, #e76f51) 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

@keyframes petalFall {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) rotate(0deg) scale(0.8);
    }
    8% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
    85% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: translateX(var(--petal-drift, 80px)) translateY(100vh) rotate(var(--petal-rotate, 720deg)) scale(0.5);
    }
}

@keyframes petalSway {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(15px); }
    75% { transform: translateX(-15px); }
}

.petal.falling {
    animation: petalFall var(--petal-duration, 10s) linear forwards;
}

.petal .petal-shape {
    animation: petalSway var(--petal-sway, 3s) ease-in-out infinite;
}

/* === ACCESSIBILITY: REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero-home .hero-slide { animation: none; }
    .hero-home .carousel-item { transition-duration: 0.01ms !important; }
    .particle { display: none; }
    .petals-container { display: none; }
    .preloader { display: none; }
    .heading-decorated::after { transform: scaleX(1); }
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    .section-padding { padding: var(--section-py-sm) 0; }
    .hero-home h1 { font-size: 2.75rem; }
    .hero-home .tagline { font-size: 1.1rem; }
    .hero-inner { min-height: 250px; }
    .hero-inner .hero-overlay { min-height: 250px; padding: 5rem 0 2.5rem; }
    .hero-inner h1 { font-size: 2.25rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767.98px) {
    .hero-home h1 { font-size: 2.25rem; }
    .hero-inner { background-attachment: scroll; }
    .bank-details-card { padding: 1.5rem; }
    .bank-detail-row { flex-wrap: wrap; gap: 0.5rem; }
    .bank-detail-row .value { text-align: left; margin: 0; }
    .bank-detail-row .btn-copy { margin-left: auto; }

    /* Timeline single column */
    .timeline-vertical::before { left: 20px; }
    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 3.5rem;
        padding-right: 1rem;
        text-align: left;
    }
    .timeline-item::before,
    .timeline-item:nth-child(odd)::before,
    .timeline-item:nth-child(even)::before {
        left: 12px;
        right: auto;
    }
}

@media (max-width: 575.98px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .hero-home h1 { font-size: 1.85rem; letter-spacing: 0.03em; }
    .hero-inner h1 { font-size: 1.75rem; }
    .bank-details-card .bank-header .icon { font-size: 2rem; }
    .petals-container { z-index: 900; }
}
