/**
 * Temple Website Custom Stylesheet (style.css)
 * Project: Dynamic Hindu Temple Website (PHP/MySQL/Bootstrap)
 * ----------------------------------------------------------------
 */

/* ==================================================================== */
/* 0. ROOT VARIABLES & GLOBAL STYLES */
/* ==================================================================== */

:root {
    /* Temple Color Palette */
    --color-primary: #8B0000; /* Deep Maroon/Red (Traditional) */
    --color-secondary: #A52A2A; /* Darker Red/Brown (Accent) */
    --color-accent-gold: #FFC107; /* Gold/Saffron (Divinity & Highlights) */
    --color-text-dark: #333333; /* Dark text for readability */
    --color-background-light: #f7f3e8; /* Light Cream/Ivory (Page Background) */
    --color-background-dark: #280000; /* Near-black for footer/overlay */
    
    /* ======================================= */
    /* EYE-CATCHING ORANGE GRADIENT (New) */
    /* ======================================= */
    --color-orange-dark: #FF8C00; /* Dark Orange (Start of Gradient) */
    --color-orange-mid: #FFA500; /* Standard Orange (Middle) */
    --color-orange-light: #FFCC33; /* Bright Yellow-Orange (End of Gradient/Highlight) */
    
    /* The actual gradient definition for use in backgrounds */
    --gradient-orange-eye-catchy: linear-gradient(to right, var(--color-orange-dark), var(--color-orange-mid), var(--color-orange-light));
    
    /* Font and Spacing */
    --font-primary: 'Baloo Tamma 2', 'Poppins', Arial, sans-serif;
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}
body {
   
    padding-top: 10px; /* 80px header height + 20px space */

    font-family: var(--font-primary);
    font-family: 'Baloo Tamma 2', 'Poppins', Arial, sans-serif;
    color: var(--color-text-dark); /* Ensure text color is readable */
    line-height: 1.6; /* Good readability */
    background-color: var(--color-background-light);
    color: var(--color-text-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}
/* Define the height of the fixed header */


/* Apply padding to the wrapper to compensate for the fixed header */
.main-content-wrapper {
    /* (Header Height: 90px) + (Desired Gap: 30px) = 120px */
    padding-top: 10px; 
    min-height: 100vh;
}

.shadow-lg {
    /* Stronger, richer shadow */
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.25) !important;
}

.text-danger {
    color: var(--color-primary) !important;
}

.text-primary {
    color: var(--color-secondary) !important;
}

/* ==================================================================== */
/* 1. HEADER & NAVIGATION STYLES */
/* ==================================================================== */
.navbar-fixed-top {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030; /* High z-index to stay on top */
    height: 80px; /* Example height */
}
.navbar {
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    background-color: var(--color-primary) !important; /* Default state */
    padding-top: 15px;
    padding-bottom: 15px;
}

/* Scrolled State (from custom.js) */
.navbar.scrolled {
    background-color: var(--color-background-dark) !important; /* Darker when scrolled */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    color: var(--color-accent-gold) !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    transition: color var(--transition-speed);
}

.nav-link:hover, .nav-link.active {
    color: var(--color-accent-gold) !important;
}

/* Header Button Style (Seva/Donations) */
.navbar .btn-warning {
    background-color: var(--color-accent-gold) !important;
    border: 1px solid var(--color-accent-gold);
    color: var(--color-primary) !important;
    font-weight: 600;
    transition: all var(--transition-speed);
}
.navbar .btn-warning:hover {
    background-color: #ffd861 !important;
}
/* ==================================== */
/* 1. HEADER & NAVIGATION STYLES */
/* ==================================== */

.main-header {
    /* Critical: Makes the header stay at the top */
    position: fixed; 
    top: 0;
    width: 100%;
    z-index: 1050; /* Ensure it's above all page content */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 1a. Top Utility Bar (Smallest bar) */
.top-utility-bar {
    background-color: #A00000; /* Darker red */
    color: white;
}
.top-utility-bar a {
    color: #FFDDDD !important;
    text-decoration: none;
}
.top-utility-bar a:hover {
    color: white !important;
}

/* 1b. Branding Bar (Logo and Donation Button) */
.branding-bar {
    background-color: #FFFFFF; /* White background */
    border-bottom: 1px solid #EEEEEE;
}
.temple-logo {
    height: 70px; /* Adjust size */
    width: auto;
}
.branding-text {
    color: #800000; /* Primary Temple Color (Deep Red/Maroon) */
    font-weight: 700;
}
.donation-btn {
    background-color: #FFA500; /* Bright Orange */
    border-color: #FF8C00;
    color: #800000;
}
.donation-btn:hover {
    background-color: #FF8C00;
    color: #FFFFFF;
}

/* Example usage in your stylesheet */
.main-nav-menu {
    background: var(--gradient-orange-eye-catchy);
}

.donation-btn {
    background-color: var(--color-orange-mid);
}

.hover-effect:hover {
    color: var(--color-orange-dark);
}

/* ==================================== */
/* 2. CRITICAL CONTENT COMPENSATION FIX */
/* ==================================== */

/* Calculate the total height of all fixed header sections:
   Utility Bar (~30px) + Branding Bar (~100px) + Nav Menu (~50px) = ~180px
   Use 200px to be safe and add a little gap.
*/
.main-content-wrapper {
    padding-top: 200px; /* Adjust this value precisely based on your final header height */
    min-height: 100vh;
}

/* ==================================================================== */
/* 2. HERO SLIDER STYLES (temple-slider) */
/* ==================================================================== */
.hero-slider-section {
    width: 100%;
}

/* 1. CRITICAL: Define the fixed height for the slider container */
#heroCarousel {
    width: 100%;
    height: 550px; /* Adjust this value (e.g., 450px to 600px) */
    overflow: hidden; 
}

/* 2. Ensure Bootstrap elements take up the full container height */
.carousel-inner,
.carousel-item {
    height: 100%;
}

/* 3. Image Sizing and Fitting (Uses your provided class name) */
.slide-image {
    width: 100%;
    height: 100%;
    
    /* CRITICAL: Ensures the image covers the entire defined area (550px), cropping if needed */
    object-fit: cover; 
    
    /* Ensure the transform is reset, and use a reasonable transition speed */
    transition: transform 0.5s ease-in-out; 
}

/* Optional: Make the image slightly bigger than the container on hover/focus 
   to create a gentle continuous movement effect */
.carousel-item.active .slide-image {
    transform: scale(1.03); 
    transition: transform 10s ease-out; /* Slow zoom effect while active */
}

/* Optional: Style the caption for better readability */
.carousel-caption {
    bottom: 20%; /* Position caption higher up */
    background-color: rgba(0, 0, 0, 0.55); /* Darker overlay for text contrast */
    border-radius: 10px;
}
.carousel-item {
    height: 60vh; 
    min-height: 450px; 
}

.slide-image {
    width: 100%;
    height:100%;
    object-fit: cover; 
    
    /* Ensures smooth animation if any */
   transition: transform 0.5s ease-in-out;
    /* background-size: cover;  */ 
    background-position: center;
    /*position: absolute; */
    /* Optional: Slight parallax or zoom effect on slide change */
    transition: transform 10s ease-in-out; 
}
.carousel-item.active .slide-image {
    transform: scale(1.03);
}

.slide-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Advanced Gradient Overlay: Ensures text readability on the left */
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.1) 100%);
}

.carousel-caption {
    top: 0; bottom: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding-left: 10%; padding-right: 10%;
    text-align: left;
}

.carousel-caption h2 {
    color: var(--color-accent-gold);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9); /* Deep shadow for 3D look */
    letter-spacing: 2px;
}

.carousel-caption p.lead {
    color: #ffffff;
    font-size: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.caption-inner {
    max-width: 50%; 
}

/* Custom Hero Button */
.custom-btn {
    background-color: var(--color-primary); 
    color: #ffffff;
    border: 2px solid var(--color-accent-gold);
    font-weight: bold;
    padding: 12px 35px;
    border-radius: 50px; /* Pill shape for modern look */
    letter-spacing: 1px;
}

.custom-btn:hover {
    background-color: var(--color-accent-gold); 
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: scale(1.05);
}

/* Secondary Deity Image Positioning */
.caption-secondary-img {
    height: 100%; 
    width: auto;
    max-height: 90%; 
    object-fit: contain;
    position: relative;
    bottom: -10%; 
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5)); /* Shadow to lift the image */
}

/* Custom Carousel Indicators (Dots) */
.custom-indicators button {
    background-color: var(--color-primary); 
    border: 1px solid var(--color-accent-gold);
}
.custom-indicators button.active {
    background-color: var(--color-accent-gold);
    box-shadow: 0 0 5px var(--color-accent-gold);
}


/* ==================================================================== */
/* 3. HOME PAGE SECTIONS & CARDS */
/* ==================================================================== */

/* Quick Links/Timings Banner (Eye-Catchy Gradient) */
.quick-banner-gradient {
    /* Rich, auspicious gradient: deep red to gold-red mix */
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
    border: 3px solid var(--color-accent-gold); 
    border-radius: 15px !important;
}

.timing-card {
    background-color: rgba(255, 255, 255, 0.1); /* Slight white overlay for contrast */
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px); /* Subtle blur effect */
}

/* Service Cards */
.service-card {
    background-color: #ffffff;
    border-radius: 10px !important;
    transition: all var(--transition-speed) ease;
    border: 1px solid var(--color-background-light); /* Soft border */
}

.service-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 15px 30px rgba(139, 0, 0, 0.3) !important; /* Stronger hover shadow */
    border-color: var(--color-accent-gold);
}

.service-card i {
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

/* Events Preview Card */
.event-preview-card {
    border-radius: 10px;
    overflow: hidden;
    transition: all var(--transition-speed);
}

.event-preview-card:hover {
    transform: scale(1.01);
}

.event-preview-card .card-header {
    background: linear-gradient(45deg, var(--color-secondary) 0%, var(--color-primary) 100%) !important;
}


/* ==================================================================== */
/* 4. FOOTER STYLING */
/* ==================================================================== */

.temple-footer {
    background-color: var(--color-background-dark); 
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Footer Background Image Overlay */
.temple-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/footer_bg_texture.jpg'); 
    background-size: cover;
    background-position: center;
    opacity: 0.08; /* Highly transparent */
    z-index: -1; 
}

.temple-footer h5 {
    color: var(--color-accent-gold) !important;
    border-bottom: 2px solid rgba(255, 193, 7, 0.3); /* Subtle underline */
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    line-height: 2.2;
    transition: color var(--transition-speed);
}

.footer-link:hover {
    color: var(--color-accent-gold); 
    text-decoration: none;
}

.social-icons a {
    color: var(--color-accent-gold);
    transition: color var(--transition-speed);
}

.social-icons a:hover {
    color: #ffffff !important;
}

/* --- GALLERY & NEWS TAB STYLING --- */

.gallery-tabs {
    background-color: var(--color-background-light); /* Light cream background for the pill container */
    border: 1px solid rgba(139, 0, 0, 0.1);
}

.gallery-tabs .nav-link {
    color: var(--color-secondary);
    font-weight: 600;
    margin: 5px;
    padding: 10px 20px;
    transition: all var(--transition-speed);
}

.gallery-tabs .nav-link.active {
    background-color: var(--color-primary); /* Deep Red background */
    color: #ffffff; /* White text */
    box-shadow: 0 4px 8px rgba(139, 0, 0, 0.4);
    transform: translateY(-2px);
}

.gallery-tabs .nav-link:not(.active):hover {
    color: var(--color-accent-gold);
}


/* --- GALLERY THUMBNAIL STYLING --- */

.gallery-item-wrapper, .video-card, .clip-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: transform var(--transition-speed);
}

.gallery-item-wrapper:hover, .video-card:hover, .clip-card:hover {
    transform: scale(1.03);
}

.gallery-thumb, .video-thumb-img, .clip-thumb-img {
    width: 100%;
    height: 150px; /* Fixed height for consistent grid look */
    object-fit: cover;
    transition: opacity var(--transition-speed);
}

.view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 0, 0, 0.6);
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.gallery-item-wrapper:hover .view-overlay {
    opacity: 1;
}

/* Video Play Icon */
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-accent-gold);
    font-size: 3rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    pointer-events: none; /* Allows click-through to the card */
}


/* --- MODAL STYLING (Large View) --- */

.modal-content-custom {
    background-color: var(--color-background-light);
    border: 4px solid var(--color-accent-gold); /* Attractive border */
    border-radius: 10px;
}

.modal-header {
    background-color: var(--color-primary);
    color: #ffffff;
}

.modal-header .btn-close {
    filter: invert(1); /* White close button */
}
/* ==================================================================== */
/* 5. RESPONSIVENESS ADJUSTMENTS */
/* ==================================================================== */

@media (max-width: 992px) {
    .carousel-item {
        height: 50vh;
        min-height: 350px;
    }
    .carousel-caption {
        padding: 0 5%;
        justify-content: center;
    }
    .caption-inner {
        max-width: 100%; 
        padding: 15px;
        background: rgba(0, 0, 0, 0.6); /* Solid background for mobile text readability */
        border-radius: 10px;
        text-align: center;
    }
    .caption-secondary-img {
        display: none !important; /* Hide deity image on small screens */
    }
    .quick-banner-gradient .col-lg-4 {
        text-align: center !important;
    }
}