/* =========================================
   SWARNA MANDIR - MIDNIGHT LUXURY EDITION
   Production Stylesheet v2.0
   ========================================= */

/* --- 1. FONTS & VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Core Palette */
    --bg-dark: #050505;       /* Deepest Black */
    --bg-panel: #121212;      /* Card Background */
    --bg-glass: rgba(5, 5, 5, 0.95);
    
    /* Gold Accents */
    --gold-primary: #D4AF37;  /* Classic Gold */
    --gold-light: #F9DF7B;    /* Bright Gold */
    --gold-dark: #AA771C;     /* Shadow Gold */
    --gold-gradient: linear-gradient(45deg, #D4AF37, #F9DF7B, #D4AF37);
    
    /* Typography */
    --text-white: #FFFFFF;
    --text-gray: #B0B0B0;
    --text-muted: #6c757d;
    
    /* Functional */
    --bs-primary: #D4AF37;    /* Override Bootstrap Primary */
    --bs-light: #121212;      /* Override Bootstrap Light */
    --bs-dark: #000000;       /* Override Bootstrap Dark */
    
    /* Shadows */
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.15);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --- 2. GLOBAL RESETS --- */
body {
    background-color: var(--bg-dark);
    color: var(--text-gray);
    font-family: 'Lato', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, 
.h1, .h2, .h3, .h4, .h5, .h6, 
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
.navbar-brand {
    font-family: 'Playfair Display', serif !important;
    color: var(--gold-primary) !important;
    font-weight: 700 !important;
}

p {
    color: var(--text-gray);
    line-height: 1.8;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: var(--gold-light);
}

/* Spacing Utilities - REDUCED GAP FIX */
.my-6 { margin-top: 3rem; margin-bottom: 3rem; }
.py-6 { padding-top: 3rem; padding-bottom: 3rem; }
.mt-6 { margin-top: 3rem; }

/* --- 3. LOADER (SPINNER) --- */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease-out, visibility 0s linear .5s;
    z-index: 99999;
    background-color: var(--bg-dark) !important; /* Dark background */
}

#spinner.show {
    transition: opacity .8s ease-out, visibility 0s linear .0s;
    visibility: visible;
    opacity: 1;
}

/* --- 4. BUTTONS (GOLD STYLE) --- */
.btn {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    border-radius: 50px;
}

.btn-primary {
    background: var(--gold-gradient) !important;
    border: none !important;
    color: #000 !important;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    color: #000 !important;
    background-position: right center;
}

.btn-square, .btn-sm-square, .btn-md-square, .btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Circle buttons */
}

/* Social Buttons */
.btn-outline-warning {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}
.btn-outline-warning:hover {
    background: var(--gold-primary);
    color: #000;
}

/* --- 5. NAVBAR (DARK GLASS) --- */
.nav-bar {
    background: var(--bg-glass);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 0; /* Let navbar handle padding */
    transition: 0.3s;
}

.navbar-brand h1 {
    font-size: 2.5rem;
    margin: 0;
    /* Base Shadow to keep text readable */
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    /* Animation: 1.5s is smoother than 1s */
    animation: glow-black 1.5s ease-in-out infinite alternate;
}

.navbar-brand h1 span {
    color: var(--gold-primary);
    /* Base Shadow */
    text-shadow: 0 0 10px rgba(212, 167, 98, 0.8);
    /* Animation: Matches the timing of the black text */
    animation: glow-gold 1.5s ease-in-out infinite alternate;
}

.navbar-nav .nav-link {
    color: var(--text-white) !important;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
    padding: 10px 15px;
    transition: 0.3s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--gold-primary) !important;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Logo Circle */
.logo-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--gold-primary);
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- 6. HERO SECTION (CINEMATIC) --- */
.hero-container, .hero-header {
    background: radial-gradient(circle at 70% 50%, #1a1a1a 0%, #000 70%);
    position: relative;
    overflow: hidden;
}

/* Golden Glow Behind Hero */
.hero-glow-effect {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--gold-primary);
    filter: blur(150px);
    opacity: 0.1; /* Subtle ambience */
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

/* --- 7. CARDS (SERVICE, TEAM, BLOG) --- */
.service-item, 
.team-item, 
.blog-item,
.testimonial-item {
    background-color: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 30px;
    transition: 0.4s;
    height: 100%;
    box-shadow: none;
}

.service-item:hover, 
.team-item:hover, 
.blog-item:hover {
    transform: translateY(-10px);
    background-color: #1a1a1a;
    border-color: var(--gold-primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.service-content-icon i {
    color: var(--gold-primary);
    transition: 0.3s;
}

/* --- 8. COLLECTIONS (EVENTS) --- */
.event-img {
    height: 350px !important; /* Fixed desktop height */
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    /* White background so product details are visible */
    background-color: #fff; 
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: 0.4s;
}

.event-img img {
    width: 100%;
    height: 100%;
    /* PREVENT CROPPING: Show full jewelry piece */
    object-fit: contain !important; 
    padding: 15px; /* Internal spacing */
    transition: transform 0.5s ease;
}

.event-img:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
}

.event-img:hover img {
    transform: scale(1.1);
}

/* Overlay Styling */
.event-overlay {
    background: rgba(0, 0, 0, 0.85);
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.3s;
}

.event-img:hover .event-overlay {
    opacity: 1;
}

.event-overlay h4 {
    color: var(--gold-primary) !important;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Tab Pills */
.nav-pills .nav-link {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-gray);
    border-radius: 50px;
    padding: 8px 25px;
    margin: 5px;
    transition: 0.3s;
}

.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
    background: var(--gold-primary);
    color: #000;
    border-color: var(--gold-primary);
}

/* --- 9. CONTACT FORM --- */
.contact-form {
    background-color: var(--bg-panel);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-control {
    background-color: #0a0a0a;
    border: 1px solid #333;
    color: var(--text-white);
    border-radius: 4px;
}

.form-control:focus {
    background-color: #000;
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    color: var(--text-white);
}

.form-control::placeholder {
    color: #555;
}

/* --- 10. FOOTER --- */
.footer {
    background-color: #000;
    border-top: 1px solid #222;
    padding-top: 5rem;
    margin-top: 0 !important;
}

.footer-item h4, .footer-item h1 {
    color: var(--gold-primary) !important;
}

.footer .btn.btn-link {
    color: var(--text-gray);
    text-decoration: none;
    transition: 0.3s;
}

.footer .btn.btn-link:hover {
    color: var(--gold-primary);
    padding-left: 10px;
}

.copyright {
    background-color: #080808;
    border-top: 1px solid #1a1a1a;
}

/* --- 11. BANNERS (STATIC PAGES) --- */
/* For About, Contact, Services banners */
.container-fluid.p-0.mb-5.wow.fadeIn img {
    /* Ensure they fit nicely */
    object-fit: cover;
    object-position: center;
    max-height: 350px; /* Consistent banner height */
    filter: brightness(0.8); /* Slight dim for luxury feel */
}

/* --- 12. ANIMATIONS --- */

/* Intense Black Glow (Swarna) */

/* SUPER INTENSE Gold Glow (Mandir) */
@keyframes glow-gold {
    from { 
        text-shadow: 
            0 0 10px rgba(255, 220, 20, 0.6),
            0 0 20px rgba(255, 215, 0, 0.4);
    }
    to { 
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 1), 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 40px rgba(255, 215, 0, 0.8),
            0 0 50px rgba(255, 215, 0, 0.6),
            0 0 60px rgba(255, 215, 0, 0.4);
    }
}

/* --- 13. MOBILE RESPONSIVENESS (Consolidated Fixes) --- */
@media (max-width: 991.98px) {
    /* General Spacing */
    /* 1. General Spacing - TIGHTER MOBILE LAYOUT */
    .py-6 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .my-6 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
    .mt-6 { margin-top: 1.5rem !important; } /* Fix gap above collections/footer */

    /* Navbar */
    .navbar.py-4 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .logo-circle { width: 45px; height: 45px; }
    .navbar-brand h1 { font-size: 1.8rem; }

    /* Hero */
    .hero-container { padding: 2rem 0; margin-bottom: 1rem; }
    .hero-title { font-size: 2rem !important; margin-bottom: 1rem; }
    .hero-container img { max-height: 250px; width: auto; margin: 0 auto; display: block; }
    
    /* Footer Layout Fix */
    .footer .row > div { margin-bottom: 30px; }
    .footer .row .col-6 { padding: 0 10px; } /* Ensure spacing for side-by-side */

    /* Collections: Tab Grid (5x2) */
    .event .nav-pills { 
        display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; 
    }
    .event .nav-pills .nav-item { flex: 0 0 18%; width: 18%; margin: 0; padding: 0; }
    .event .nav-pills .nav-item a { padding: 5px 0; font-size: 0.65rem; text-align: center; }
    .event .nav-pills .nav-item span { width: auto !important; }

    /* Collections: 3-Column Image Grid */
    .event .tab-content .col-md-6 {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
        padding: 3px;
    }
    .event-img {
        height: 120px !important; /* Mobile height */
        background-color: #fff;
    }
    .event-overlay h4 { font-size: 0.6rem; }
    .event-overlay a { width: 25px; height: 25px; }
}

/* =========================================
   TASK: COLLECTION TABS & CARD FIXES
   ========================================= */

/* --- 1. Uniform Collection Tabs (Gold -> Black) --- */
.event .nav-pills .nav-item {
    margin: 5px !important;
}

.event .nav-pills .nav-link {
    /* Shape & Size */
    width: 140px !important;       /* Fixed width for uniformity */
    height: 45px !important;       /* Fixed height */
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50px !important; /* Perfect pill shape */
    
    /* Default State: Gold BG, Black Text */
    background-color: var(--gold-primary) !important;
    color: #000 !important;
    border: 1px solid var(--gold-primary) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.85rem !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

/* Force the span inside to inherit colors correctly */
.event .nav-pills .nav-link span {
    color: inherit !important; 
    width: auto !important; /* Override inline styles */
}

/* =========================================
   TASK: COLLECTION UI REPAIR
   ========================================= */

/* --- 1. Collection Options (Tabs) --- */
/* Target specifically to override Bootstrap */
.event .nav-pills .nav-link {
    /* Shape & Layout */
    width: 150px !important;       /* Uniform Width */
    height: 50px !important;       /* Uniform Height */
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50px !important;
    margin: 5px !important;
    
    /* DEFAULT STATE: Gold Background, Black Text */
    background-color: var(--gold-primary) !important;
    color: #000 !important;
    border: 2px solid var(--gold-primary) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.85rem !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Force the text inside to inherit the color */
.event .nav-pills .nav-link span {
    color: inherit !important;
    font-family: 'Lato', sans-serif !important;
    width: auto !important; /* Reset inline width */
}

/* HOVER & ACTIVE STATE: Black Background, Gold Text */
.event .nav-pills .nav-link:hover,
.event .nav-pills .nav-link.active {
    background-color: #000 !important;
    color: var(--gold-primary) !important;
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); /* Gold Glow */
    transform: translateY(-3px);
}

/* --- 2. Fix White Cards (Make them Dark) --- */
.event-img {
    /* Change background from White to Dark Panel Color */
    background-color: var(--bg-panel) !important; /* #121212 */
    
    /* Add Gold Border */
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    
    /* Ensure height remains fixed */
    height: 350px !important;
}

/* Adjust Image to float nicely inside the dark card */
.event-img img {
    /* 'Contain' ensures the whole image is seen */
    object-fit: contain !important;
    
    /* Padding keeps it away from the gold border */
    padding: 20px !important;
    
    /* Brightness fix: If images have white backgrounds, this helps blend slightly,
       but 'contain' is safer than 'cover' for product visibility */
    transition: transform 0.5s ease;
}

.event-img:hover img {
    transform: scale(1.1);
}

/* --- 3. Mobile Layout Fixes for Tabs --- */
@media (max-width: 767.98px) {
    .event .nav-pills .nav-link {
        width: 110px !important; /* Smaller buttons on mobile */
        height: 40px !important;
        font-size: 0.7rem !important;
        padding: 0 !important;
    }
}

/* =========================================
   TASK: FOOTER FIXES (Background & Spacing)
   ========================================= */

/* 1. Force Dark Background (Overrides bg-light) */
.footer, .footer.bg-light {
    background-color: #050505 !important; /* Deep Black */
    color: #B0B0B0 !important;            /* Light Gray Text */
    border-top: 1px solid rgba(212, 175, 55, 0.2); /* Gold Border Top */
    margin-top: 0 !important;             /* Remove extra top spacing */
    padding-top: 4rem !important;
}

/* 2. Fix Link Colors (Overrides text-body) */
.footer a.text-body, 
.footer .footer-item a {
    color: #B0B0B0 !important; /* Make links visible */
    transition: 0.3s;
    text-decoration: none;
}

.footer a.text-body:hover, 
.footer .footer-item a:hover {
    color: #D4AF37 !important; /* Gold on hover */
    padding-left: 5px;         /* Slight nudge effect */
}

/* 3. Increase Gap Between "Swarna Mandir" and "Quick Links" */
@media (min-width: 992px) {
    /* Target the first column (Brand Info) and push the next one away */
    .footer .row .col-lg-3:first-child {
        padding-right: 80px !important; /* Adds significant breathing room */
    }
}

/* 4. Social Icons Styling */
.footer .btn-primary {
    background: transparent !important;
    border: 1px solid #D4AF37 !important;
    color: #D4AF37 !important;
}

.footer .btn-primary:hover {
    background: #D4AF37 !important;
    color: #000 !important;
}

/* 5. Copyright Section Darkening */
.copyright, .copyright.bg-dark {
    background-color: #000000 !important; /* Pure Black */
    border-top: 1px solid #111;
}

/* =========================================
   TASK: FINAL UI POLISH (Icons, Button, Gallery)
   ========================================= */

/* --- 1. Fix Social Icons Cropping (Navbar & Footer) --- */
.btn-square, .btn-sm-square, .btn-md-square, .btn-lg-square {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important; /* Remove padding that causes cropping */
    border-radius: 50% !important;
}

/* Adjust Footer Icons specifically to be slightly larger & centered */
.footer .btn-sm-square {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.1rem !important; /* Ensure icon fits nicely */
}

/* Adjust Navbar Icons */
.navbar .btn-md-square {
    width: 45px !important;
    height: 45px !important;
}

/* --- 2. Fix Back-to-Top Button Position --- */
.back-to-top {
    position: fixed !important;
    right: 30px !important;
    bottom: 30px !important;
    z-index: 9999 !important; /* Force on top of everything */
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important; /* Ensure visibility */
    /* Ensure no transform affects position */
    transform: none !important; 
}

/* --- 3. Fix Social Gallery Shapes (Perfect Circles) --- */
.social-thumb {
    /* Responsive sizing based on grid column */
    width: 100% !important; 
    
    /* Modern trick: Forces the element to always be a square */
    aspect-ratio: 1 / 1 !important;
    
    /* Ensure image fills the square without stretching */
    object-fit: cover !important;
    
    /* Make it circular */
    border-radius: 50% !important;
    
    /* Consistent border/padding */
    padding: 3px !important;
    border: 1px solid var(--gold-primary) !important;
    background-color: transparent !important;
}

/* Fix for older browsers that might not support aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
    .social-thumb {
        height: 80px !important; /* Fallback fixed height */
        width: 80px !important;
    }
}

/* =========================================
   TASK: NAVBAR & SOCIAL ICON REPAIR
   ========================================= */

/* 1. Force Perfect Circle & Centering */
.navbar .btn-sm-square,
.footer .btn-sm-square {
    width: 40px !important;       /* Slightly larger for breathing room */
    height: 40px !important;      /* Match width for perfect circle */
    padding: 0 !important;        /* Zero padding is CRITICAL to prevent cropping */
    display: flex !important;     /* Use Flexbox to center the icon */
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    line-height: 0 !important;    /* Remove line-height offsets */
}

/* 2. Adjust Icon Size */
.navbar .btn-sm-square i,
.footer .btn-sm-square i {
    font-size: 1.1rem !important; /* Ensure icon fits inside the 40px circle */
    margin: 0 !important;         /* Remove default margins */
    vertical-align: middle !important;
}

/* 3. Social Button Specifics */
.btn-outline-warning {
    border: 1px solid var(--gold-primary) !important;
    color: var(--gold-primary) !important;
    background: transparent !important;
    transition: all 0.3s ease;
}

.btn-outline-warning:hover {
    background: var(--gold-primary) !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5); /* Glowing hover effect */
    transform: translateY(-2px);
}

.btn-outline-warning:hover i,
.btn-outline-warning:focus i,
.btn-outline-warning:active i {
    color: #000000 !important;
}

/* =========================================
   TASK: FIX SERVICE DETAIL CARDS (Horizontal Layout)
   ========================================= */

/* 1. Main Card Container */
.service-detail-item {
    overflow: hidden;
    height: 100%;
    transition: transform 0.3s ease;
    /* Ensure it behaves like a flex container wrapper */
    display: flex; 
    flex-direction: column; 
}

.service-detail-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15) !important;
    border-color: var(--gold-primary) !important;
}

/* 2. The Horizontal Layout Wrapper */
.service-detail-content {
    display: flex;
    flex-direction: row; /* Forces Side-by-Side */
    height: 100%;
    align-items: stretch;
}

/* 3. Image Section (Left Side - 40%) */
.service-detail-img {
    flex: 0 0 40%;
    max-width: 40%;
    position: relative;
    overflow: hidden;
    min-height: 250px; /* Fixed height constraint */
}

.service-detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills area nicely */
    object-position: center;
    transition: transform 0.5s ease;
}

.service-detail-item:hover .service-detail-img img {
    transform: scale(1.1);
}

/* 4. Text Section (Right Side - 60%) */
.service-detail-text {
    flex: 0 0 60%;
    max-width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px !important;
}

/* =========================================
   MOBILE FIXES V4.0 (Grid System)
   ========================================= */
@media (max-width: 991.98px) {
    /* 1. Spacing Resets */
    .py-6 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    .my-6 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
    .mt-6 { margin-top: 2rem !important; }

    /* 2. Hero Section (One Line Fix) */
    .hero-container { padding: 1rem 0; margin-bottom: 1rem; }
    
    .hero-badge {
        font-size: 0.55rem !important; 
        font-weight: 700 !important;
        letter-spacing: 0.5px !important;
        white-space: nowrap !important;
        padding: 4px 8px !important;
        width: auto !important;
        display: inline-block !important;
    }

    .hero-title { 
        font-size: 1.5rem !important; 
        margin-bottom: 0.5rem !important;
    }
    
    .hero-container img { 
        max-height: 130px !important; 
        width: auto !important; 
        margin: 0 auto;
        display: block;
    }

    /* 3. Collections Tabs (CSS GRID - The Fix) */
    .event .nav-pills {
        display: grid !important;
        /* Force exactly 5 columns of equal width */
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 5px !important; /* Space between buttons */
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
    }

    .event .nav-pills .nav-item {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .event .nav-pills .nav-link {
        width: 100% !important; /* Fill the grid cell */
        height: 35px !important; /* Fixed height */
        font-size: 0.6rem !important; /* Tiny text to fit "Necklaces" */
        padding: 0 2px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 5px !important; /* Rectangular-ish rounded for space efficiency */
    }
    
    /* Ensure text doesn't break layout */
    .event .nav-pills .nav-link span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 4. Footer Spacing & Gap Fix */
    .footer .row > div { margin-bottom: 25px; }
    
    /* Remove margin from the LAST item (Social Gallery) to close the gap */
    .footer .row > div:last-child { margin-bottom: 0 !important; }
    
    .footer .row .col-6 { padding: 0 5px; }

    /* 5. Collections Grid (3 Columns) */
    .event .tab-content .col-md-6 {
        flex: 0 0 33.3333% !important;
        width: 33.3333% !important;
        max-width: 33.3333% !important;
        padding: 2px !important;
    }

    .event-img {
        height: 100px !important;
        border: 1px solid rgba(212, 175, 55, 0.2) !important;
    }
    
    .event-img img {
        padding: 4px !important;
    }

    .event-overlay h4 { display: none !important; }
    .event-overlay a { width: 100%; height: 100%; opacity: 0; }
}

/* make Swarna glow like Mandir */
.navbar-brand h1 .swarna {
    /* keep color consistent with your theme */
    color: var(--bs-primary);
    /* copy Mandir's glow */
    text-shadow: 0 0 10px rgba(212,167,98,0.8);
    animation: glow-gold 1.5s ease-in-out infinite alternate;
}

/* if you want Swarna slightly different intensity, tweak text-shadow or duration */

/* --- Force service-detail cards to use ~90vw and stack on small screens --- */
@media (max-width: 576px) {
    /* 1) Reduce container side padding so 90vw visually fits */
    .service > .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* 2) Remove Bootstrap row gutters that reduce perceived width */
    .service .row.g-4 {
        --bs-gutter-x: 0 !important;
        --bs-gutter-y: 8px !important; /* small vertical gap */
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 3) Make each bootstrap column full width on mobile */
    .service .col-lg-6,
    .service .row .col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* 4) Force the card element to occupy 90vw */
    .service-detail-item {
        width: 90vw !important;
        max-width: 90vw !important;
        box-sizing: border-box !important;
        margin: 0 auto 12px auto !important;
        padding: 8px 0 !important; /* keep some vertical breathing room */
    }

    /* 5) Cancel the desktop flex split and center content */
    .service-detail-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 10px !important;
        padding: 0 !important;
    }

    /* 6) Remove enforced min-height/cropping and make image a centered thumbnail */
    .service-detail-img {
        flex: 0 0 auto !important;
        /* Note: Width/Height here are overridden by the 991px block below, 
           but we fix the shape just in case */
        width: 100% !important; 
        height: auto !important;
        min-height: 250px !important; /* Ensure it matches the other mobile rule */
        overflow: hidden !important;
        margin: 0 auto !important;
        border-radius: 4px !important; /* <--- FIXED: Square/Rectangle shape */
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        display: block !important;
    }

    /* 7) Ensure image fills the thumbnail without distortion */
    .service-detail-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center center !important;
        transform: none !important; /* cancel hover-scale on mobile */
    }

    /* 8) Text area adjustments */
    .service-detail-text {
        flex: 0 0 auto !important;
        padding: 6px 10px 14px 10px !important;
        text-align: center !important;
    }

    /* 9) Make action buttons compact and centered */
    .service-detail-text .btn {
        display: inline-block !important;
        margin-top: 8px !important;
    }

    /* 10) Finally, explicitly unset the desktop flex width rules that appear earlier */
    .service-detail-img,
    .service-detail-text {
        /* overrides for earlier 'flex: 0 0 35%' / '65%' rules */
        width: auto !important;
        flex-basis: auto !important;
    }
}

/* =========================================
   TASK: SERVICE CARD MOBILE FIX (Stacking)
   ========================================= */

/* Use a higher specificity media query (max-width: 991.98px) to catch all mobile/tablets */
@media (max-width: 991.98px) {
    
    /* 1. Force Vertical Stack */
    .service-detail-content {
        flex-direction: column !important; /* Image Top, Text Bottom */
    }
    
    /* 2. Resize Image Container */
    .service-detail-img {
        flex: 0 0 auto !important; /* Allow height to be defined by pixels */
        width: 100% !important;    /* Full width */
        max-width: 100% !important;
        height: 250px !important;  /* Fixed height for uniformity */
    }
    
    /* 3. Ensure Image Fits Properly */
    .service-detail-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* No cropping, just filling */
        object-position: center !important;
    }
    
    /* 4. Text Container Sizing (UPDATED) */
    .service-detail-text {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 25px 20px !important;
        
        /* THIS CENTERS THE BUTTON AND TEXT */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* Forces button to center */
        text-align: center !important;  /* Centers the text */
    }
    
    /* 5. Title & Text Sizing for Mobile */
    .service-detail-text h4 {
        font-size: 1.25rem !important;
        margin-bottom: 10px !important;
    }
    
    .service-detail-text p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
    }
}

/* Unified banner sizing for all pages except index.html */
:root {
    --banner-height-desktop: 420px; /* change if needed */
    --banner-height-mobile: 220px;  /* change if needed */
}

/* Apply sizing only on .page-banner */
.page-banner {
    height: var(--banner-height-desktop);
    overflow: hidden;
    position: relative;
}

/* Make image fit the banner WITHOUT CROPPING */
.page-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;     /* show full image */
    object-position: center;
    background-color: #fff;  /* letterbox background */
    padding: 4px;            /* optional safe padding */
    box-sizing: border-box;
}

/* Mobile height */
@media (max-width: 576px) {
    .page-banner {
        height: var(--banner-height-mobile) !important;
    }

    .page-banner img {
        padding: 2px;
    }
}

/* Default: show desktop banner, hide mobile banner */
.banner-desktop {
    display: block;
}

.banner-mobile {
    display: none;
}

/* Make desktop banner scale properly */
.banner-desktop img {
    width: 100%;
    height: auto;
    display: block;
}

/* Make mobile banner scale properly */
.banner-mobile img {
    width: 100%;
    height: auto;
    display: block;
}

/* MOBILE VIEW */
@media (max-width: 768px) {

    /* Hide desktop, show mobile */
    .banner-desktop {
        display: none !important;
    }

    .banner-mobile {
        display: block !important;
    }
}

/* Desktop banner visible by default */
.banner-desktop {
    display: block;
}

.banner-desktop img {
    width: 100%;
    height: auto;
    display: block;
}

/* Mobile banner hidden by default */
.banner-mobile {
    display: none;
}

.banner-mobile img {
    width: 100%;
    height: auto;
    display: block;
}

/* Mobile View */
@media (max-width: 768px) {
    .banner-desktop {
        display: none !important;
    }
    .banner-mobile {
        display: block !important;
    }
}

/* Increase hero image size on desktop */
.hero-img {
    width: 100%;
    height: auto;
}

@media (min-width: 992px) {
    .hero-img {
        max-height: 420px;   /* adjust as needed */
        width: auto;
    }
}

/* Footer social icon fix — force icon to turn black on hover */
.footer .btn-outline-warning:hover i {
    color: #000 !important;
}

/* Ensure button background becomes gold on hover */
.footer .btn-outline-warning:hover {
    background-color: var(--gold-primary) !important;
    border-color: var(--gold-primary) !important;
    color: #000 !important; /* fallback */
}

/* Footer Contact – mobile font adjustments */
@media (max-width: 576px) {
    .footer .footer-item p {
        font-size: 0.85rem !important;   /* smaller text */
        font-weight: 400 !important;     /* lighter weight */
        line-height: 1.1 !important;     /* tighter spacing */
        white-space: nowrap !important;  /* keep in one line */
        overflow: hidden;                /* avoid wrapping */
        text-overflow: ellipsis;         /* if text is too long */
    }

    /* Icons smaller so text starts earlier */
    .footer .footer-item p i {
        font-size: 0.9rem !important;
        margin-right: 6px !important;
    }
}

@media (max-width: 576px) {
    .container img.d-lg-none {
        width: 55% !important;
        max-width: 260px !important;
    }
}

/* Remove border ONLY from banner images */
.page-banner img {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Footer description: allow multiline text on mobile */
@media (max-width: 576px) {
    .footer .footer-item p:not(:has(i)) {
        white-space: normal !important;   /* allow next line */
        overflow: visible !important;
        text-overflow: unset !important;
        line-height: 1.4 !important;
    }
}

/* Footer title: keep "Swarna Mandir" in one line on desktop */
@media (min-width: 992px) {
    .footer h1 {
        font-size: 2.1rem !important;   /* reduced from ~2.5rem */
        font-weight: 600 !important;    /* slightly lighter */
        white-space: nowrap;            /* force single line */
        line-height: 1.1;
    }
}

/* Footer contact details – allow wrapping for email & address (all views) */
.footer .footer-contact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

/* Icon fixed width so text aligns cleanly */
.footer .footer-contact i {
    flex-shrink: 0;
    width: 20px;
    margin-top: 3px;
}

/* Text can wrap to next line */
.footer .footer-contact span {
    white-space: normal !important;   /* allow multiline */
    overflow: visible !important;
    word-break: break-word;           /* break long words if needed */
}

/* Footer social gallery – reduce image size */
.footer .footer-gallery .col-4,
.footer .footer-gallery .col-3 {
    flex: 0 0 28% !important;   /* smaller than default 33% */
    max-width: 28% !important;
}

.footer .footer-gallery img {
    width: 100% !important;
    height: auto;
    max-height: 70px;          /* control visual size */
    object-fit: cover;
}

/* Footer social gallery – FORCE size reduction */
@media (max-width: 576px) {
    .footer .social-thumb {
        width: 75px !important;
        height: 75px !important;
        min-width: 75px !important;
        min-height: 75px !important;
    }

    .footer .social-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }
}

/* =========================================
   TASK: CONTACT BOX MOBILE FIX
   ========================================= */

/* Mobile Tweaks for Contact Page Boxes */
@media (max-width: 576px) {
    
    /* 1. Reset container padding to prevent squeeze */
    .contact .p-5 {
        padding: 1.5rem !important; /* Reduce from 3rem (p-5) to 1.5rem */
    }

    /* 2. Fix Info Box Overflow */
    .contact-info-box {
        padding: 1rem !important;   /* Reduce internal padding (p-4 -> p-3 approx) */
        align-items: flex-start;    /* Align icon to top of text block */
    }

    /* 3. Resize Icon */
    .contact-info-box i {
        font-size: 1.5rem !important; /* Smaller icon */
        margin-right: 1rem !important; /* Less gap (me-4 -> me-3 approx) */
        margin-top: 5px; /* Visual alignment with text top */
    }

    /* 4. FORCE Text Wrapping */
    .contact-info-box div {
        min-width: 0; /* CRITICAL: Allows flex child to shrink below content size */
        width: 100%;
    }

    .contact-info-box p {
        word-wrap: break-word;      /* Break long words/emails */
        overflow-wrap: break-word;  /* Modern standard */
        white-space: normal !important; /* Allow wrapping */
        font-size: 0.9rem;          /* Slightly smaller text for fit */
        line-height: 1.4;
    }
}

/* =========================================
   FINAL PRODUCTION PATCH v5.0
   (Full Width Videos, Natural Images, Email Fit)
   ========================================= */

/* --- TASK 1: DESKTOP VIDEO (Full Width, Fixed Height) --- */
@media (min-width: 992px) {
    .video-container {
        width: 100% !important;
        height: 700px !important; /* Fixed height for desktop */
        background-color: #000 !important;
        overflow: hidden !important;
        position: relative !important;
    }

    .video-container video {
        width: 100vw !important; /* Force Viewport Width */
        height: 100% !important;
        object-fit: cover !important; /* Fills the box */
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Desktop video: fixed height 550px, show full video (no cropping) */
/* @media (min-width: 992px) {
  .video-container {
    width: 100% !important;
    height: 550px !important;        
    background-color: #000 !important;
    overflow: hidden !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important; */
   /* } */ 

  /* .video-container video { */
    /* Keep full video visible at container height without cropping */
    /* height: 100% !important;         
    /* width: auto !important;          
    max-width: 100% !important;      
    object-fit: contain !important;  
    position: relative !important;   
    top: auto !important;
    left: auto !important;
    transform: none !important;
  }
}


/* --- TASK 2: GLOBAL FOOTER FIXES --- */
.footer .footer-contact i {
    color: var(--gold-primary) !important; /* Gold Icons */
}

/* Desktop Email Style */
.footer .footer-contact.email span {
    font-size: 1.2rem !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
}

/* --- TASK 3: MOBILE SPECIFIC FIXES --- */
@media (max-width: 991.98px) {
    
    /* 1. Reset Video for Mobile */
    .video-container {
        height: auto !important;
        width: 100% !important;
    }
    
    .video-container video {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        position: static !important;
        transform: none !important;
    }

    /* 2. Service Cards: Show Original Image Height (No Crop) */
    .service-detail-img {
        height: auto !important;
        min-height: 0 !important;
        width: 100% !important;
        flex: 0 0 auto !important;
        border-radius: 4px 4px 0 0 !important;
    }
    
    .service-detail-img img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        border-radius: 4px 4px 0 0 !important;
    }

    /* 3. EMAIL FIT FIX (Crucial for Col-6 Layout) */
    /* Shrink the email text specifically on mobile to fit in the small column */
    .footer .footer-contact.email span {
        font-size: 0.75rem !important;   /* Small enough to fit */
        letter-spacing: -0.5px !important; /* Condense letters */
        white-space: nowrap !important;    /* Force one line */
        display: inline-block !important;
        vertical-align: middle !important;
    }

    /* Shrink the icon and gap to save space */
    .footer .footer-contact.email i {
        font-size: 0.8rem !important;
        margin-right: 4px !important; /* Reduce gap */
        vertical-align: middle !important;
    }
}

.service-detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile: FORCE CENTER & FLEX */
@media (max-width: 991.98px) {
    .service-detail-img {
        height: auto !important;
        min-height: 0 !important;
        /* CRITICAL FIX: Forces the container to behave like a flexbox, enabling centering */
        display: flex !important; 
        justify-content: center !important;
        align-items: center !important;
    }
    
    /* Ensure image respects the centering */
    .service-detail-img img {
        width: 100% !important; /* Fills the width of the container */
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }
}

/* =========================================
   TASK: CONTACT PAGE BORDER STYLING
   ========================================= */

.contact-info-box {
    /* Force specific border colors: Top | Right | Bottom | Left */
    border-color: #ffffff #ffffff var(--gold-primary) #ffffff !important;
    
    /* Optional: Make the bottom gold line slightly thicker for better visibility */
    border-bottom-width: 3px !important;

    border-top-width: 3px !important;

    border-left-width: 3px !important;

    border-right-width: 3px !important;
}

/* Mobile: reduce gap above "Swarna Mandir" in footer */
@media (max-width: 767px) {

  footer h4,
  footer h5 {
    margin-top: 8px !important;   /* reduce excessive top gap */
  }

  footer .footer-content,
  footer .footer-about,
  footer .footer-section {
    padding-top: 8px !important;
    margin-top: 0 !important;
  }
}

/* Mobile: align menu items AND icons to the right (keep existing UI) */
@media (max-width: 991px) {

  /* Cancel Bootstrap centering */
  .nav-bar .navbar-nav {
    margin-left: auto !important;
    margin-right: 0 !important;
    text-align: right;
  }

  /* Align nav links */
  .nav-bar .navbar-nav .nav-link {
    text-align: right;
  }

  /* Push icons container to the right */
  .nav-bar .navbar-collapse {
    justify-content: flex-end;
  }

  .nav-bar .navbar-collapse .d-flex {
    margin-left: auto !important;
    justify-content: flex-end;
  }
}

