/* Custom Styles for Shree Maha Kali Temple */

/* CSS Variables for Hindu Theme */
:root {
    --primary-color: #D4650F;
    --secondary-color: #FF6F00;
    --accent-color: #FFD700;
    --dark-primary: #B71C1C;
    --light-bg: #FFF8E1;
    --text-dark: #2C1810;
    --text-light: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow: 0 4px 6px rgba(212, 101, 15, 0.1);
    --shadow-dark: 0 8px 16px rgba(212, 101, 15, 0.2);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
    padding-top: 70px; /* Account for fixed navbar */
}

/* Language-specific fonts */
html[lang="hi"] body {
    font-family: 'Noto Sans Devanagari', sans-serif;
}

html[lang="kn"] body {
    font-family: 'Noto Sans Kannada', sans-serif;
}

html[lang="en"] body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    font-weight: 600;
}

.display-4, .display-5 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

/* Navigation Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent-color);
}

.navbar-brand {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    margin: 0 5px;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 5px;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="50" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="50" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="90" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.divine-symbol {
    animation: float 3s ease-in-out infinite;
}

.divine-title {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.hero-buttons .btn {
    margin: 0 10px;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Divine Separator */
.divine-separator {
    text-align: center;
    padding: 40px 0;
    color: var(--primary-color);
    font-size: 2rem;
    position: relative;
}

/* Decorative spacing for the 'Jai Kali Ma' line */
.divine-decoration {
    padding: 1.25rem 0; /* vertical space above and below */
}

.divine-decoration .sanskrit-name {
    margin: 0.25rem 0; /* ensure a little breathing room */
    font-size: 1.15rem;
}

.divine-separator::before,
.divine-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.divine-separator::before {
    left: 0;
}

.divine-separator::after {
    right: 0;
}

/* Section Titles */
.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Feature Cards */
.feature-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    box-shadow: var(--shadow);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
}

.feature-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card .btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.feature-card .btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: scale(1.05);
}

/* About Section */
.feature-highlight {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.feature-highlight:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.temple-stats .stat-item {
    padding: 20px;
    background: linear-gradient(135deg, rgba(212, 101, 15, 0.1), rgba(255, 111, 0, 0.1));
    border-radius: 10px;
    margin: 10px 0;
}

.temple-stats .stat-item h3 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.temple-image-placeholder {
    height: 400px;
    background: linear-gradient(135deg, var(--light-bg) 0%, rgba(212, 101, 15, 0.1) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--primary-color);
    position: relative;
    overflow: hidden;
}

.temple-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="temple-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><rect width="20" height="20" fill="transparent"/><circle cx="10" cy="10" r="2" fill="rgba(212,101,15,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23temple-pattern)"/></svg>');
    opacity: 0.5;
}

.placeholder-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

/* Gallery Section */
.gallery-placeholder {
    height: 250px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="gallery-pattern" width="15" height="15" patternUnits="userSpaceOnUse"><rect width="15" height="15" fill="transparent"/><circle cx="7.5" cy="7.5" r="1" fill="rgba(255,255,255,0.2)"/></pattern></defs><rect width="100" height="100" fill="url(%23gallery-pattern)"/></svg>');
    opacity: 0.7;
}

.gallery-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    text-align: center;
    color: white;
    padding: 20px;
}

/* Kali Forms Section */
.page-header {
    background: linear-gradient(135deg, var(--dark-primary) 0%, var(--primary-color) 100%);
    padding: 80px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="kali-pattern" width="30" height="30" patternUnits="userSpaceOnUse"><rect width="30" height="30" fill="transparent"/><circle cx="15" cy="15" r="3" fill="rgba(255,255,255,0.1)"/><path d="M5,5 L25,25 M25,5 L5,25" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23kali-pattern)"/></svg>');
    opacity: 0.3;
}

.sanskrit-name {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.kali-form-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    box-shadow: var(--shadow);
    position: relative;
}

.kali-form-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
}

.form-order {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 2;
}

.kali-image {
    height: 200px;
    background: linear-gradient(135deg, var(--dark-primary) 0%, var(--primary-color) 100%);
    position: relative;
}

.kali-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="kali-bg" width="20" height="20" patternUnits="userSpaceOnUse"><rect width="20" height="20" fill="transparent"/><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23kali-bg)"/></svg>');
    opacity: 0.5;
}

/* Pooja Offerings */
.pooja-icon {
    color: var(--primary-color);
}

.pooja-item {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.pooja-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

/* Social Activities */
.activity-placeholder {
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.activity-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="activity-pattern" width="15" height="15" patternUnits="userSpaceOnUse"><rect width="15" height="15" fill="transparent"/><circle cx="7.5" cy="7.5" r="1" fill="rgba(255,255,255,0.2)"/></pattern></defs><rect width="100" height="100" fill="url(%23activity-pattern)"/></svg>');
    opacity: 0.7;
}

.activity-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-dark);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--dark-primary) 0%, var(--primary-color) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cta-pattern" width="25" height="25" patternUnits="userSpaceOnUse"><rect width="25" height="25" fill="transparent"/><circle cx="12.5" cy="12.5" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23cta-pattern)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.cta-buttons .btn {
    margin: 0 10px;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.cta-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-top: 3px solid var(--primary-color);
}

.hover-accent:hover {
    color: var(--accent-color) !important;
    transition: color 0.3s ease;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(212, 101, 15, 0.3);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 101, 15, 0.4);
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 15px 15px 0 0;
}

.modal-body {
    padding: 2rem;
}

/* Modal visual polish */
.modal-header .modal-avatar {
    width: 48px;
    height: 48px;
}
.modal-header .modal-avatar i {
    font-size: 1.25rem;
}
.modal-header .modal-title-wrap h5 {
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Subtle pop animation when modal opens */
@keyframes modalPop {
    from { transform: translateY(-6px) scale(0.995); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal.show .modal-dialog {
    animation: modalPop 190ms ease-out;
}

/* Contact card polish */
.contact-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcfbfb 100%);
    border: 1px solid rgba(0,0,0,0.04);
}
.contact-card h5 {
    font-size: 1.05rem;
}
.contact-card .contact-link {
    color: var(--primary-color);
    font-weight: 700;
}
.contact-card .btn {
    border-radius: 999px;
}

/* Map placeholder style */
.contact-map-placeholder {
    height: 220px;
    background: linear-gradient(135deg, rgba(0,0,0,0.02), rgba(0,0,0,0.01));
}
.contact-map-placeholder i {
    opacity: 0.55;
}

/* Make small buttons consistent */
.btn-sm {
    padding: 0.35rem 0.7rem;
}

/* Accessibility: focus states */
.contact-card a:focus, .contact-card button:focus {
    outline: 3px solid rgba(212,101,15,0.18);
    outline-offset: 2px;
}

/* Contact modal: improved contact card and map styles */
.contact-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
}

.contact-card .contact-link {
    color: var(--dark-primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 220px;
    border: 0;
    display: block;
}

.contact-map .p-3 {
    border-top: 1px solid #eee;
}

/* Placeholder styling for contact modal map (no embedded map) */
.contact-map-placeholder {
    height: 220px;
}

@media (max-width: 576px) {
    .contact-map-placeholder {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .contact-map iframe {
        min-height: 200px;
    }
}

.kali-detail-image {
    height: 200px;
    background: linear-gradient(135deg, var(--dark-primary) 0%, var(--primary-color) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        padding: 60px 0;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-buttons .btn {
        margin: 5px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .feature-card {
        margin-bottom: 20px;
    }

    .temple-stats .stat-item {
        margin: 5px 0;
    }

    .navbar-nav .nav-link {
        margin: 2px 0;
    }

    .cta-buttons .btn {
        margin: 5px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .hero-overlay {
        padding: 60px 0;
    }

    .display-4 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .feature-card .card-body {
        padding: 1.5rem;
    }

    .kali-form-card .card-body {
        padding: 1.5rem;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Utility Classes */
.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus States */
.btn:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(212, 101, 15, 0.25);
}

/* Print Styles */
@media print {
    .navbar,
    .scroll-to-top,
    .hero-buttons,
    footer {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .container {
        max-width: none !important;
        width: 100% !important;
    }
}

/* Mobile-first responsive enhancements */
@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .hero-section {
        min-height: 80vh;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .feature-card, .kali-form-card {
        margin-bottom: 1rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .gallery-item {
        margin-bottom: 1rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .hero-section {
        min-height: 70vh;
        padding: 2rem 0;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 1rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .temple-stats .stat-item {
        margin-bottom: 1rem;
    }
}

/* Enhanced button styles for better UX */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-dark);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Smooth animations for better feel */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure popups work properly */
.modal {
    backdrop-filter: blur(5px);
}

.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-dark);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 15px 15px;
}