/* Custom CSS for Temple Website */

:root {
    --primary-color: #d35400; /* Deep Orange / Saffron */
    --secondary-color: #b33939; /* Deep Red */
    --accent-color: #f39c12; /* Golden Yellow */
    --bg-light: #fdfbf7;
}

body {
    font-family: 'Noto Sans Tamil', sans-serif;
    background-color: var(--bg-light);
    color: #333;
}

.font-tamil {
    font-family: 'Mukta Malar', 'Noto Sans Tamil', sans-serif;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.thiruvasagam {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    animation: fadeIn 2s;
}

.thiruvasagam-sub {
    font-size: 1.2rem;
    animation: fadeIn 3s;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Header */
.navbar-brand .temple-brand-name {
    font-size: 1.3rem;
    color: var(--secondary-color);
}
.custom-nav-link {
    font-weight: 700;
    color: var(--secondary-color) !important; /* Start with color instead of plain gray */
    padding: 10px 15px !important;
    margin: 0 5px;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.custom-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    z-index: -1;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    border-radius: 8px;
}

.custom-nav-link:hover, .custom-nav-link.active {
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(211, 84, 0, 0.3);
}

.custom-nav-link:hover::before, .custom-nav-link.active::before {
    opacity: 1;
}

/* Music Toggle Button */
.music-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-color);
    border: none;
}
.back-to-top:hover {
    background-color: var(--secondary-color);
}

/* Hero Section */
.hero-slider-container {
    background: #000;
}
.carousel-item {
    height: 85vh; /* Increased from 60vh */
    min-height: 600px; /* Increased from 400px */
    background: #000;
    color: white;
    position: relative;
}
.carousel-item img, .carousel-item video {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}
.carousel-caption {
    bottom: 20%;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px; /* Increased padding */
    border-radius: 10px;
}

/* Section Styling */
.section-title {
    color: var(--secondary-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 40px; /* Increased margin */
}
.section-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background-color: var(--accent-color);
    bottom: -15px; /* Moved down */
    left: 25%;
}

/* Gallery Hover */
.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 30px; /* Increased margin */
}
.gallery-item:hover {
    transform: scale(1.03);
}
.gallery-img {
    width: 100%;
    height: 350px; /* Increased from 250px */
    object-fit: cover;
}

/* Cards */
.pooja-card {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}
.pooja-card:hover {
    transform: translateY(-5px);
}
.pooja-card img {
    height: 200px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
}

/* Footer */
footer {
    background-color: #2c3e50 !important;
}
footer h5 {
    color: var(--accent-color) !important;
}

/* Om Animation */
.om-animated {
    animation: omPulse 2s infinite ease-in-out;
}

@keyframes omPulse {
    0% { transform: scale(1); text-shadow: 0 0 10px rgba(243, 156, 18, 0.5); }
    50% { transform: scale(1.2); text-shadow: 0 0 30px rgba(243, 156, 18, 1); }
    100% { transform: scale(1); text-shadow: 0 0 10px rgba(243, 156, 18, 0.5); }
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    /* Header Temple Name Center Alignment */
    .navbar-brand {
        flex-direction: column !important;
        text-align: center;
        max-width: 80%;
    }
    .navbar-brand img {
        margin-right: 0 !important;
        margin-bottom: 5px;
        width: 60px !important;
        height: 60px !important;
    }
    .temple-brand-name {
        line-height: 1.4 !important;
    }
    .temple-brand-name span:first-child {
        font-size: 1.2rem !important;
    }
    .temple-brand-name span:last-child {
        font-size: 1.4rem !important;
    }

    /* Preloader Text Alignment and Size */
    .preloader-content {
        padding: 0 20px;
    }
    .thiruvasagam {
        font-size: 1.4rem !important;
        text-align: center;
    }
    .thiruvasagam-sub {
        font-size: 1rem !important;
        text-align: center;
    }
    .om-animated {
        font-size: 4rem !important;
    }

    /* Hero Section Responsive */
    .carousel-item {
        height: 60vh;
        min-height: 400px;
    }
    .carousel-caption {
        bottom: 10%;
        padding: 15px;
    }
    .carousel-caption h2 {
        font-size: 1.3rem;
    }
    
    /* Make section padding smaller on mobile */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Make gallery images responsive */
    .gallery-img {
        height: 200px;
    }
}
