/* ============================================
   KARMA AYURVEDA — Custom CSS (Tailwind Companion)
   Warm & Earthy Ayurvedic Design System
   ============================================ */

/* --- Intro Video Section --- */
.ka-section {
    padding: 3.5rem 0;
}

.ka-video-section {
    background: #1B4332;
}

.ka-container {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.ka-section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ka-section-tag {
    display: inline-block;
    background: rgba(82,183,136,0.18);
    color: #52B788;
    border: 1px solid rgba(82,183,136,0.35);
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 0.3rem 1rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.ka-section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.ka-section-desc {
    color: rgba(255,255,255,0.68);
    font-size: 0.95rem;
}

.ka-video-container {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.38);
    aspect-ratio: 16 / 9;
    background: #000;
}

.ka-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ka-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.28) 0%, transparent 50%);
    pointer-events: none;
}

.ka-video-audio-toggle {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 9999px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 5;
}

.ka-video-audio-toggle:hover {
    background: rgba(255,255,255,0.28);
}

/* --- intl-tel-input Overrides --- */
.iti.iti--allow-dropdown {
    width: 100%;
}
.iti__flag-container {
    z-index: 20;
}
.iti__selected-flag {
    background: transparent !important;
    border-right: 1px solid #e5e0d8;
    padding: 0 8px;
}
.iti__country-list {
    z-index: 60;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid #e5e0d8;
}
.form-phone,
.form-phone-alt {
    padding-left: 50px !important;
}

/* --- Error States (kept for contactform.js compatibility) --- */
.error-border {
    border: 2px solid #dc2626 !important;
    outline: none !important;
}
.error-border:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}
.error-border::placeholder {
    color: #dc2626 !important;
    opacity: 0.7;
}

/* --- Validation Messages --- */
.validation-message {
    font-size: 0.8rem;
    min-height: 1.2em;
    margin-top: 2px;
    color: transparent;
    transition: color 0.2s;
}
.validation-message.error {
    color: #dc2626;
}

/* --- SVG Section Dividers --- */
.section-divider {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.section-divider svg {
    display: block;
    width: 100%;
    height: 60px;
}
.section-divider-flip {
    transform: rotate(180deg);
}

/* --- Scroll Animations --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.scroll-animate-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-animate-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}
.scroll-animate-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-animate-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Stagger delays for children --- */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* --- Image Modal --- */
.img-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    cursor: zoom-out;
}
.img-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.img-modal-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.img-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    transition: transform 0.2s;
}
.img-modal-close:hover {
    transform: scale(1.2);
}

/* --- FAQ Premium 2-col --- */
.faq-section {
    background: linear-gradient(180deg, #F5F0E8 0%, #FAF7F2 60%, #F0EBE0 100%);
}

.faq-section-pill {
    display: inline-block;
    padding: 0.35rem 1.1rem;
    background: rgba(82, 183, 136, 0.12);
    color: #2D6A4F;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid rgba(82, 183, 136, 0.28);
}

.faq-cols {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.faq-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.faq-grid {
    display: none; /* legacy, replaced by faq-cols */
}

.faq-item {
    background: #ffffff;
    border: 1px solid rgba(196, 168, 130, 0.22);
    border-radius: 1rem;
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 6px 24px rgba(27, 67, 50, 0.09);
    border-color: rgba(82, 183, 136, 0.32);
    transform: translateY(-1px);
}

.faq-item.open {
    border-color: rgba(82, 183, 136, 0.45);
    box-shadow: 0 8px 28px rgba(27, 67, 50, 0.12);
    transform: translateY(0);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    cursor: pointer;
    user-select: none;
}

.faq-num {
    min-width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.6rem;
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.25s ease;
}

.faq-item.open .faq-num {
    background: linear-gradient(135deg, #52B788 0%, #2D6A4F 100%);
}

.faq-q-text {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1B4332;
    line-height: 1.45;
}

.faq-chevron {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: rgba(82, 183, 136, 0.1);
    color: #52B788;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease, background 0.25s ease, color 0.25s ease;
}

.faq-item.open .faq-chevron {
    transform: rotate(45deg);
    background: #52B788;
    color: #ffffff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer-inner {
    padding: 0.85rem 1.1rem 1.1rem 4.05rem;
    border-top: 1px solid rgba(196, 168, 130, 0.18);
    font-size: 0.855rem;
    color: #4b5563;
    line-height: 1.7;
}

@media (max-width: 767px) {
    .faq-cols {
        flex-direction: column;
    }
    .faq-answer-inner {
        padding: 0.85rem 1rem 1rem 1rem;
    }
}

/* --- Sticky Header transition --- */
.header-glass {
    background: rgba(27, 67, 50, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* --- Timeline connector line --- */
.timeline-line {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #52B788, #2D6A4F, #1B4332);
    border-radius: 2px;
}
@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
    }
}

/* --- Mobile CTA Fixed Bottom --- */
.mobile-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
    padding: 12px 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

/* --- Popup overlay (kept for compatibility) --- */
#popup {
    background-color: #1B4332 !important;
    color: white !important;
    max-width: 600px;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 40px 20px 20px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}
#popup button.closeModal {
    padding: 0 7px;
    font-size: 30px;
    border: none;
    color: #FAF7F2;
    background: transparent;
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
}
#backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 1000;
}

/* --- Tawk.to bubble hide --- */
.tawk-bubble-container {
    visibility: hidden !important;
    display: none !important;
}

/* --- Grayscale hover for media logos --- */
.grayscale-hover {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}
.grayscale-hover:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- Hero organic shape --- */
.hero-organic-shape {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(82, 183, 136, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-reference-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 27, 40, 0.55) 0%, rgba(7, 27, 40, 0.18) 48%, rgba(27, 67, 50, 0.18) 100%),
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 32%),
        radial-gradient(circle at 82% 74%, rgba(82, 183, 136, 0.12) 0%, transparent 25%);
    pointer-events: none;
}

.hero-mesh-glow {
    position: absolute;
    width: 34rem;
    height: 34rem;
    border-radius: 9999px;
    filter: blur(36px);
    opacity: 0.42;
    pointer-events: none;
}

.hero-mesh-glow-left {
    left: -10rem;
    top: -8rem;
    background: radial-gradient(circle, rgba(28, 100, 242, 0.16) 0%, rgba(28, 100, 242, 0) 70%);
}

.hero-mesh-glow-right {
    right: -8rem;
    bottom: -10rem;
    background: radial-gradient(circle, rgba(82, 183, 136, 0.22) 0%, rgba(82, 183, 136, 0) 70%);
}

.hero-reference-grid {
    min-height: 42rem;
}

.hero-copy-panel {
    padding-top: 2rem;
    padding-bottom: 3.5rem;
}

.hero-brand-title {
    font-family: "DM Sans", sans-serif;
    font-size: clamp(3.5rem, 9vw, 6.25rem);
    font-weight: 800;
    letter-spacing: -0.06em;
}

.hero-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.hero-trust-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 9999px;
    background: #f6b25c;
    box-shadow: 0 0 0 4px rgba(246, 178, 92, 0.16);
}

.hero-cta-strip {
    display: inline-flex;
    align-items: center;
    min-height: 3.5rem;
    padding: 0.8rem 1.4rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #c0392b 0%, #d97706 100%);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: 0 18px 40px rgba(192, 57, 43, 0.24);
}

.hero-info-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 52, 67, 0.28);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
}

.hero-doctor-column {
    align-self: stretch;
}

#appointment-form {
    padding-bottom: 3.5rem;
}

.hero-doctor-stage {
    position: relative;
    height: 100%;
    min-height: 46rem;
}

.hero-doctor-stage::before {
    content: "";
    position: absolute;
    inset: auto 15% 0;
    height: 0.75rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.18);
    filter: blur(10px);
    z-index: 1;
}

.hero-doctor-glow {
    display: none;
}

.hero-doctor-image {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: auto;
    max-width: 20rem;
    object-fit: contain;
    object-position: bottom center;
    z-index: 2;
}

.hero-consult-card {
    position: relative;
    background: rgba(255, 251, 245, 0.98);
    border: 1px solid rgba(196, 168, 130, 0.28);
    border-radius: 1.75rem;
    padding: 1.25rem;
    max-width: 25rem;
    margin-left: auto;
    box-shadow: 0 18px 40px rgba(5, 24, 36, 0.22);
}

.hero-consult-card::before {
    content: "";
    position: absolute;
    inset: auto 1.5rem -0.8rem;
    height: 1.6rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.18);
    filter: blur(18px);
    z-index: -1;
}

.hero-form-shell {
    border-radius: 1.5rem;
}

.hero-form-header {
    margin-bottom: 0.75rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(27, 67, 50, 0.08);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.8) 0%, rgba(248, 250, 252, 1) 100%);
}

.hero-form-kicker {
    margin: 0 0 0.3rem;
    color: #6b87a3;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-form-title {
    margin: 0;
    color: #244460;
    font-family: "DM Sans", sans-serif;
    font-size: 1.0rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.05;
}

.hero-form-subtitle {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.4;
}

.hero-form-input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid #d7dee7;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #244460;
    font-size: 0.88rem;
    line-height: 1.3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 10px rgba(36, 68, 96, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-form-input::placeholder {
    color: #94a3b8;
}

.hero-form-input:focus {
    outline: none;
    border-color: #52b788;
    box-shadow: 0 0 0 4px rgba(82, 183, 136, 0.12);
}

.hero-form-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #244460 50%), linear-gradient(135deg, #244460 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(0.95rem), calc(100% - 14px) calc(0.95rem);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.hero-form-textarea {
    min-height: 5rem;
    resize: vertical;
}

.hero-form-submit {
    width: 100%;
    min-height: 2.75rem;
    border: 0;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #c0392b 0%, #d97706 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 12px 20px rgba(192, 57, 43, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.hero-form-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 18px 28px rgba(192, 57, 43, 0.26);
}

.hero-form-compact {
    gap: 0.6rem;
}

.hero-form-compact .validation-message {
    margin-top: 0;
    min-height: 0;
    font-size: 0.72rem;
    line-height: 1.2;
}

.hero-form-compact .form-phone,
.hero-form-compact .form-phone-alt {
    padding-left: 3rem !important;
}

.hero-form-compact .iti__selected-flag {
    padding: 0 7px;
}

.hero-form-compact label {
    font-size: 0.68rem;
}

.hero-form-compact > p {
    font-size: 0.65rem;
}

.hero-callout a {
    text-shadow: 0 8px 28px rgba(246, 178, 92, 0.22);
}

/* Desktop-only hero background image */
@media (min-width: 768px) {
    #appointment {
        background: linear-gradient(135deg, rgb(31 89 64 / 0%) 0%, rgb(17 55 38 / 53%) 50%, rgba(27, 67, 50, 0.82) 100%), url(../images/karmaayurvedaherobackground.png) center center / cover no-repeat !important;
    }
}

@media (max-width: 1279px) {
    .hero-reference-grid {
        min-height: auto;
    }

    .hero-copy-panel {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    #appointment-form {
        padding-bottom: 2rem;
    }

    .hero-doctor-column {
        align-self: auto;
    }

    .hero-doctor-stage {
        height: auto;
        min-height: 28rem;
    }

    .hero-doctor-image {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        display: block;
        margin: 0 auto;
        width: min(100%, 20rem);
        max-height: 28rem;
    }
}

@media (max-width: 767px) {
    .hero-brand-title {
        font-size: clamp(3rem, 16vw, 4.5rem);
    }

    .hero-doctor-column {
        display: none;
    }

    .hero-cta-strip {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 1rem;
    }

    .hero-info-chip {
        width: 100%;
        justify-content: center;
    }

    .hero-doctor-stage {
        min-height: 22rem;
    }

    .hero-doctor-image {
        width: min(90%, 18rem);
        max-height: 22rem;
    }

    .hero-consult-card {
        max-width: none;
        padding: 0.95rem;
        border-radius: 1.5rem;
    }

    .hero-form-title {
        font-size: 1.35rem;
    }
}

/* --- Video container for YouTube lazy-load --- */
.video-container {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
}
.video-container img {
    width: 100%;
    display: block;
    transition: transform 0.3s;
}
.video-container:hover img {
    transform: scale(1.03);
}
.video-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: background 0.3s;
}
.video-container:hover .video-play-btn {
    background: rgba(0,0,0,0.15);
}
.video-play-btn svg {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.video-container iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 12px;
}

/* --- Tab Styles --- */
.tab-btn.active {
    background: #1B4332 !important;
    color: white !important;
    border-color: #1B4332 !important;
}

/* --- Leaf Decoration --- */
.leaf-decoration {
    position: absolute;
    opacity: 0.04;
    pointer-events: none;
}

/* --- Map container (keep map styles intact) --- */
#map-container {
    min-height: 400px;
    border-radius: 12px;
    overflow: hidden;
}

/* --- Print --- */
@media print {
    .mobile-cta-bar,
    #popup,
    #backdrop,
    .tawk-bubble-container {
        display: none !important;
    }
}
