/* ==========================================================================
   Science Behind Ayurveda - Refined Optimizations (Understanding Your Prakriti)
   ========================================================================== */

#science-section {
    padding: 52px 0;
    position: relative;
    background-image: url('../images/Botanical-Corner-Background.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Ensure background layers don't capture clicks */
#science-section * {
    pointer-events: auto;
}

/* Cream overlay — keep text readable but let botanical show through */
#science-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(242, 239, 232, 0.42);
    pointer-events: none;
    z-index: 0;
}

/* Unused — removed second corner */
#science-section::after {
    display: none;
}


.home-science__layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    align-items: center;
}

/* Tablet & Mobile Breakpoints for Responsive Grid */
@media (max-width: 991px) {
    .home-science__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    #science-section {
        padding: 48px 0;
    }
}

/* LEFT COLUMN: VISUAL ILLUSTRATION CONTAINER */
.home-science__visual {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 16px;
    /* White space around illustration */
}

/* prakriti relative container for overlays placement */
.prakriti-container {
    position: relative;
    width: 100%;
    max-width: 528px;
    /* Image size (max 480px + 10% = 528px) */
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    animation: slowFloat 7s ease-in-out infinite;
    /* Soft float, no zoom, no rotate */
    transform: translateX(-24px);
    /* Shift left on desktop so columns feel balanced */
}

@media (max-width: 991px) {
    .prakriti-container {
        transform: none !important;
        /* Centered illustration on tablet/mobile */
    }
}

.prakriti-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

/* Radial Glow Backdrop placed behind WebP Illustration (Reduced intensity to 8%) */
.prakriti-glow {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 107, 63, 0.08) 0%, rgba(250, 247, 242, 0) 65%);
    z-index: 1;
    pointer-events: none;
}


/* OVERLAY HIGHLIGHT MARKERS */
.dosha-highlight {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    box-sizing: border-box;
}

/* 1. DOSHA CIRCLES (Restore Turn 2 setup - 25.2% size, original glows, active overlays) */
.dosha-highlight--circle {
    border-width: 3.5px;
    border-style: solid;
    border-radius: 50%;
    width: 25.2%;
    height: 25.2%;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.dosha-highlight--vata {
    left: 3.5%;
    top: 14%;
    border-color: #5d9cec;
}

.dosha-highlight--pitta {
    right: 3.3%;
    /* User-adjusted coordinate precision */
    top: 14.1%;
    /* User-adjusted coordinate precision */
    border-color: #fc6e51;
}

.dosha-highlight--kapha {
    left: 37.4%;
    bottom: 3.2%;
    border-color: #8cc152;
}

/* Active Highlight triggered by corresponding open according card */
.dosha-highlight--circle.is-active {
    opacity: 1;
    transform: scale(1);
}

.dosha-highlight--circle.dosha-highlight--vata.is-active {
    box-shadow: 0 0 25px rgba(93, 156, 236, 0.4), inset 0 0 15px rgba(93, 156, 236, 0.2);
    animation: highlightPulse 2s ease-in-out infinite alternate;
}

.dosha-highlight--circle.dosha-highlight--pitta.is-active {
    box-shadow: 0 0 25px rgba(252, 110, 81, 0.4), inset 0 0 15px rgba(252, 110, 81, 0.2);
    animation: highlightPulse 2s ease-in-out infinite alternate;
}

.dosha-highlight--circle.dosha-highlight--kapha.is-active {
    box-shadow: 0 0 25px rgba(140, 193, 82, 0.4), inset 0 0 15px rgba(140, 193, 82, 0.2);
    animation: highlightPulse 2s ease-in-out infinite alternate;
}


/* 2. BODY POINTS (Restore Turn 2 setup - simple indicator points over the body chakras, hidden when inactive) */
.dosha-highlight--point {
    background-color: var(--theme-white);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    border-radius: 50%;
    width: 2.2%;
    height: 2.2%;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.dosha-highlight--point-vata {
    left: 49%;
    top: 14.5%;
    border-color: #5d9cec;
}

.dosha-highlight--point-pitta {
    left: 48.9%;
    top: 27.2%;
    border-color: #fc6e51;
}

.dosha-highlight--point-kapha {
    left: 48.9%;
    top: 37.4%;
    border-color: #8cc152;
}

/* Active body point styles */
.dosha-highlight--point.is-active {
    opacity: 1;
    transform: scale(1);
}

.dosha-highlight--point-vata.is-active {
    box-shadow: 0 0 12px #5d9cec, 0 0 4px #5d9cec;
}

.dosha-highlight--point-pitta.is-active {
    box-shadow: 0 0 12px #fc6e51, 0 0 4px #fc6e51;
}

.dosha-highlight--point-kapha.is-active {
    box-shadow: 0 0 12px #8cc152, 0 0 4px #8cc152;
}


/* RIGHT COLUMN: TEXT CONTENT & EXPANDABLE ACCORDIONS */
.home-science__content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 630px;
    /* Reduced accordion width on desktop (620px-650px) */
    justify-self: end;
    /* Shift right to align nicely */
    position: relative;
    z-index: 10;
}

@media (max-width: 991px) {
    .home-science__content {
        max-width: 100%;
        /* Fully responsive on tablets/mobiles */
        justify-self: center;
    }
}

/* Eyebrow label — "KNOW YOUR NATURE" style */
.home-science .section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: #1a6640;
    margin: 0 0 16px;
    line-height: 1;
}

.home-science .eyebrow-arrow {
    font-size: 12px;
    color: #c49e4f;
    opacity: 0.8;
}

.home-science .section-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #1a2e22;
    /* deep forest green matching reference */
    font-size: 42px;
    font-weight: 700;
    line-height: 1.15;
    margin-top: 0;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

@media (max-width: 991px) {
    .home-science .section-title {
        font-size: 40px;
    }

    .home-science .section-eyebrow {
        margin-bottom: 12px;
    }
}

@media (max-width: 767px) {
    .home-science .section-title {
        font-size: 32px;
    }
}

.home-science .section-desc {
    color: #5a6e62;
    /* slightly muted green-grey matching reference */
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0 0 8px 0;
    /* smaller bottom gap — second paragraph follows */
    max-width: 540px;
}

.home-science .section-desc+.section-desc {
    margin-bottom: 20px;
    /* bigger gap after last paragraph before accordion */
}

/* ACCORDIONS SLOT */
.dosha-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.accordion-item {
    background-color: var(--theme-white);
    border-radius: 12px;
    /* Soft rounded corners */
    border: 1px solid rgba(15, 107, 63, 0.04);
    box-shadow: 0 6px 20px rgba(31, 43, 36, 0.015);
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.accordion-item:hover {
    border-color: rgba(15, 107, 63, 0.12);
    box-shadow: 0 10px 28px rgba(31, 43, 36, 0.035);
}

/* Active Accordion styling: 4px solid green left border, stronger green shadow */
.accordion-item.is-expanded {
    border-color: rgba(15, 107, 63, 0.12);
    border-left: 4px solid var(--theme-primary);
    /* 4px solid green left border */
    box-shadow: 0 12px 30px rgba(15, 107, 63, 0.12);
    /* Slightly stronger premium green shadow */
}

/* Header style adjusting padding */
.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 16px 22px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    outline: none;
}

.accordion-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 18px;
    flex-shrink: 0;
}

.accordion-icon--vata {
    background-color: #5d9cec;
}

.accordion-icon--pitta {
    background-color: #fc6e51;
}

.accordion-icon--kapha {
    background-color: #8cc152;
}

.accordion-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--theme-ink);
    margin-right: auto;
    transition: color 0.3s;
    letter-spacing: -0.2px;
}

.accordion-item.is-expanded .accordion-title {
    color: var(--theme-primary-dark);
}

/* Modern Chevron Arrow Indicator (Borders based) */
.accordion-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--theme-muted);
    border-bottom: 2px solid var(--theme-muted);
    transform: rotate(-45deg);
    /* Chevron Right (Closed) */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease;
    flex-shrink: 0;
    margin-right: 4px;
}

/* Chevron Down (Open) rotated smoothly */
.accordion-item.is-expanded .accordion-chevron {
    border-color: var(--theme-primary);
    transform: rotate(45deg);
    /* Chevron Down */
}

/* Accordion body expand animations */
.accordion-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.35s ease-out;
}

.accordion-item.is-expanded .accordion-body {
    opacity: 1;
}

/* Better internal spacing for body inner */
.accordion-body__inner {
    padding: 0 28px 24px 58px;
    /* Padding for copy alignment */
}

/* Bullet list typography matches clinical requirements */
.accordion-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accordion-bullets li {
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--theme-ink);
    position: relative;
    padding-left: 20px;
}

.accordion-bullets li::before {
    content: '•';
    position: absolute;
    left: 4px;
    top: -1px;
    color: var(--theme-primary);
    font-size: 18px;
    line-height: 1;
}

/* FLOATING TIMING KEYFRAMES (Subtle floating, 4px translate) */
@keyframes slowFloat {

    0%,
    100% {
        transform: translateY(0) translateX(-24px);
    }

    50% {
        transform: translateY(-4px) translateX(-24px);
    }
}

/* Reset keyframe for tablets/mobiles where float is offsetless */
@media (max-width: 991px) {
    @keyframes slowFloat {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-4px);
        }
    }
}

@keyframes highlightPulse {
    0% {
        transform: scale(0.98);
        box-shadow: 0 0 15px rgba(var(--badge-light-color), 0.35), inset 0 0 8px rgba(var(--badge-light-color), 0.15);
    }

    100% {
        transform: scale(1.03);
        box-shadow: 0 0 30px rgba(var(--badge-light-color), 0.7), inset 0 0 20px rgba(var(--badge-light-color), 0.35);
    }
}

/* PREFERS REDUCED MOTION SCOPES */
@media (prefers-reduced-motion: reduce) {
    .prakriti-container {
        animation: none !important;
    }

    .dosha-highlight--circle.is-active,
    .dosha-highlight--point {
        animation: none !important;
    }

    .accordion-body {
        transition: none !important;
    }
}