/* ============================================
   Ma Sarada Jyotish Kendra - Premium Light Cream Theme
   ============================================ */

/* Brand Colors */
:root {
    --bg-base: #FAF6EE;
    --bg-surface: #FFFFFF;
    --bg-soft: #F1E9DA;
    --brand-gold: #D9A626;
    --brand-gold-dark: #B48A18;
    --brand-green: #4D7C0F;
    --brand-green-bright: #84CC16;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border-glass: rgba(17, 24, 39, 0.1);
}

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

body {
    overflow-x: hidden;
    background-color: var(--bg-base);
}

/* Typography */
.font-display {
    font-family: 'Cinzel', serif;
}

.font-body {
    font-family: 'Inter', sans-serif;
}

/* Metallic Gold Text Gradient - darkened for readability on light backgrounds */
.text-gradient-gold {
    background: linear-gradient(to right, #C77700, #9A7B00, #854D0E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 1px rgba(255, 255, 246, 0.55));
}

/* --- Hero readability helpers (clean, balanced - work on dark & light images) --- */
/* Soft dark scrim behind the centered hero content.
   Keeps edges of the photo visible while giving text a consistent, subtle base. */
.hero-scrim {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 70% at 50% 45%, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.18) 55%, transparent 100%);
    pointer-events: none;
}

/* Gentle dark text-shadow for light text (reads on bright parts too) */
.text-shadow-scrim {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 3px 14px rgba(0, 0, 0, 0.45);
}

/* Button Premium Gold */
.btn-premium-gold {
    background: linear-gradient(to right, #FACC15, #EAB308);
    color: #1F2937;
    font-weight: 700;
    border: 1px solid rgba(212, 175, 55, 0.9);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-premium-gold:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
}

/* Button Outline Green - frosted surface so it reads on any background */
.btn-outline-green {
    border: 1.5px solid #4D7C0F;
    color: #3F6212;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0.5rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: all 0.3s ease;
}

.btn-outline-green:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
}

/* Glass Cards */
.card-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 4px 24px rgba(17, 24, 39, 0.06);
    transition: all 0.3s ease;
}

.card-glass:hover {
    border-color: rgba(217, 166, 38, 0.4);
    box-shadow: 0 12px 30px rgba(217, 166, 38, 0.12);
    transform: translateY(-4px);
}

/* Solid White Card (for on-page white cards only) */
.card-white {
    background: #FFFFFF;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 4px 24px rgba(17, 24, 39, 0.08);
    transition: all 0.3s ease;
}

.card-white:hover {
    border-color: rgba(217, 166, 38, 0.4);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
    transform: translateY(-4px);
}

/* Navigation Links */
.nav-link {
    position: relative;
    color: #4B5563;
    font-weight: 500;
    transition: color 0.3s ease;
    padding-bottom: 4px;
}

.nav-link:hover {
    color: #B48A18;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #D9A626, #4D7C0F);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #B48A18;
}

/* Hero Slider */
.hero-slider {
    height: 600px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Form Inputs (light) */
.input-dark {
    background: #FFFFFF;
    border: 1px solid rgba(17, 24, 39, 0.15);
    color: #1F2937;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.input-dark::placeholder {
    color: #9CA3AF;
}

.input-dark:focus {
    border-color: #D9A626;
    box-shadow: 0 0 0 3px rgba(217, 166, 38, 0.15);
    outline: none;
}

/* Star Ratings */
.star-rating {
    color: #D9A626;
}

/* Ethics Box */
.ethics-box {
    background: rgba(127, 29, 29, 0.06);
    border: 1px solid rgba(127, 29, 29, 0.25);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #EFE7D8;
}

::-webkit-scrollbar-thumb {
    background: #B48A18;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D9A626;
}

/* Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Responsive Media - guarantee no image overflows, stretches or distorts on any size */
img,
picture,
video {
    max-width: 100%;
    height: auto;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Keeps aspect ratio, never crops/stretches; defaults to full column width */
.responsive-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* About astrologer image (Home About section + About page): full-width band context.
   Fixed width keeps it compact; height:auto + object-fit:contain preserve the original
   aspect ratio exactly (never cropped, stretched or distorted). */
.img-about {
    width: 210px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .img-about {
        width: 180px;
    }
}

@media (max-width: 480px) {
    .img-about {
        width: 160px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-slider {
        height: 460px;
    }
    .card-glass {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 400px;
    }
}

/* ============================================
   Mobile Responsiveness Enhancements
   ============================================ */

/* Prevent horizontal overflow anywhere (safety net) */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    overflow-wrap: break-word;
}
img, picture, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* Hero needs enough height so stacked content is never clipped on phones */
@media (max-width: 768px) { .hero-slider { height: 500px; } }
@media (max-width: 480px) { .hero-slider { height: 530px; } }

/* Keep page/column headings from overflowing a 320px screen */
@media (max-width: 640px) {
    h1.text-gradient-gold { font-size: clamp(1.5rem, 6vw, 2.25rem); }
}

/* Service detail body copy: avoid runaway overflow from wide inline content */
.prose {
    max-width: 100%;
    overflow-wrap: break-word;
}
.prose img {
    max-width: 100%;
    height: auto;
}
table, pre {
    max-width: 100%;
    overflow-x: auto;
}

/* Enquiry modal: keep it inside the viewport on small screens */
#enquiry-modal .card-glass {
    max-height: 92vh;
    overflow-y: auto;
}

/* Enquiry modal: a bit taller on desktop for better proportions */
@media (min-width: 1024px) {
    #enquiry-modal .card-glass {
        min-height: 560px;
        max-width: 30rem;
    }

    /* Larger form fields on desktop */
    #enquiry-modal input,
    #enquiry-modal select,
    #enquiry-modal textarea {
        padding: 0.85rem 1rem;
        font-size: 1rem;
    }

    #enquiry-modal label {
        font-size: 0.875rem;
    }

    #enquiry-modal .space-y-3 {
        row-gap: 1.1rem;
    }
}

/* Floating contact: respect device notches / safe areas */
#floating-contact {
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
    right: calc(1.5rem + env(safe-area-inset-right));
}

/* Comfortable tap targets for the mobile menu */
@media (max-width: 1023px) {
    #mobile-menu a,
    #mobile-menu button {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* Hero: compact & vertically centred on phones; dots sit clear of the buttons */
@media (max-width: 640px) {
    .hero-slide {
        display: flex;
        align-items: center;
    }
    .hero-slide .container {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .hero-slide .max-w-3xl {
        width: 100%;
    }
    .hero-slider {
        height: 100svh;
        min-height: 500px;
        max-height: 620px;
    }
}
