/*--------------------------------------------------------------
 * How It Works Page Styles
 * Styles specific to the page-how-it-works.php template.
 *
 * @package Thrive_Kids_GI_Care
 *--------------------------------------------------------------*/

/* ── Google Fonts (shared with front-page) ───────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,700;1,400&family=Inter:wght@400;500;600&display=swap');

/* ── Hero Section ────────────────────────────────────────────── */
.hiw-hero {
    position: relative;
    width: calc(100% - 32px);
    max-width: 100%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    margin: 16px auto 40px auto;
    box-sizing: border-box;
}

/* Soft gradient background — calm, earthy, warm */
.hiw-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(212, 228, 196, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(169, 200, 146, 0.35) 0%, transparent 55%),
        linear-gradient(160deg, #f6f5f0 0%, #eef0e7 35%, #e4e8dc 65%, #dde3d3 100%);
    z-index: 0;
}

/* Subtle texture / noise overlay (optional, cosmetic) */
.hiw-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 200px;
    opacity: 0.5;
    z-index: 1;
}

/* ── Content ─────────────────────────────────────────────────── */
.hiw-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 880px;
    padding: 100px 24px 80px;
    animation: hiwFadeIn 1s ease-out both;
}

@keyframes hiwFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Badge ────────────────────────────────────────────────────── */
.hiw-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 50px;
    background-color: rgba(158, 240, 26, 0.1);
    border: 1px solid rgba(158, 240, 26, 0.2);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4e7e00;
    margin-bottom: 28px;
}

/* ── Title ────────────────────────────────────────────────────── */
.hiw-hero__title {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 500;
    line-height: 1.18;
    color: #1F4F46;
    margin: 0 0 24px;
    letter-spacing: -0.02em;
}

/* ── Subtitle ─────────────────────────────────────────────────── */
.hiw-hero__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    font-weight: 400;
    line-height: 1.75;
    color: #2E2E2E;
    margin: 0 auto 40px;
    max-width: 600px;
}

/* ── CTA Button ──────────────────────────────────────────────── */
.hiw-hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hiw-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    height: 50px;
    padding: 0 6px 0 24px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
    overflow: hidden;
    position: relative;
    gap: 16px;
    background-color: #2F7D6B;
    color: #ffffff !important;
    border: 1px solid #2F7D6B;
    transition: background-color 0.4s ease, color 0.35s ease, border-color 0.35s ease;
}

.hiw-hero__btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background-color: #276B5C;
    transform: translateX(-105%);
    transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 0;
}

.hiw-hero__btn:hover::before {
    transform: translateX(0);
}

.hiw-hero__btn>span:first-child {
    position: relative;
    z-index: 1;
}

.hiw-hero__btn:hover {
    color: #ffffff !important;
    border-color: #1F4F46;
}

.hiw-hero__btn-arrow {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #2F7D6B;
    transition: background-color 0.35s ease, color 0.35s ease;
    flex-shrink: 0;
}

.hiw-hero__btn:hover .hiw-hero__btn-arrow {
    background-color: #2F7D6B;
    color: #ffffff;
}

/* ── Scroll Indicator ─────────────────────────────────────────── */
.hiw-hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hiw-hero__scroll span {
    display: block;
    width: 24px;
    height: 40px;
    border-radius: 14px;
    border: 2px solid rgba(45, 74, 45, 0.25);
    position: relative;
}

.hiw-hero__scroll span::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: #276B5C;
    border-radius: 4px;
    animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) translateY(12px);
        opacity: 0.3;
    }
}

/* ── Reassurance Strip ──────────────────────────────────────── */
.reassurance {
    padding: 60px 24px;
}

.reassurance__inner {
    max-width: 1400px;
    margin: 0 auto;
}

.reassurance__title {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.4rem, 3vw, 2.8rem);
    font-weight: 400;
    line-height: 1.3;
    color: #1F4F46;
    margin: 0 0 48px;
    text-align: center;
    letter-spacing: -0.01em;
}

.reassurance__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.reassurance__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    border: 1px solid #e0e0dc;
    border-radius: 20px;
    padding: 48px 48px;
    opacity: 0;
    transform: translateY(20px);
}

.reassurance__icon-wrap {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background-color: #f0f0ee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
}

.reassurance__icon-img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.reassurance__heading {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1F4F46;
    margin: 0 0 10px;
    line-height: 1.3;
}

.reassurance__desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 400;
    color: #6b7b6b;
    line-height: 1.65;
    margin: 0;
}

/* ── Parent Involvement Section ─────────────────────────────── */
.parent-section {
    padding: 100px 24px;
}

.parent-section__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 80px;
}

.parent-section__content {
    flex: 1;
}

.parent-section__media {
    flex: 0 0 500px;
    position: relative;
}

.parent-section__badge {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #276B5C;
    background-color: rgba(204, 255, 51, 0.25);
    padding: 8px 18px;
    border-radius: 50px;
    margin-bottom: 24px;
}

.parent-section__title {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 400;
    line-height: 1.2;
    color: #1F4F46;
    margin: 0 0 24px;
    letter-spacing: -0.02em;
}

.parent-section__intro {
    font-family: 'Inter', sans-serif;
    font-size: 0.96rem;
    font-weight: 400;
    line-height: 1.75;
    color: #2E2E2E;
    margin: 0 0 40px;
    max-width: 520px;
}

.parent-section__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.parent-section__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.parent-section__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #2F7D6B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    margin-top: 2px;
}

.parent-section__item-title {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.96rem;
    font-weight: 600;
    color: #1F4F46;
    margin-bottom: 6px;
}

.parent-section__item-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #6b7b6b;
    margin: 0;
}

.parent-section__img-wrap {
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    height: 680px;
}

.parent-section__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.parent-section__quote {
    position: absolute;
    bottom: -24px;
    left: -32px;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    max-width: 280px;
}

.parent-section__quote-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.92rem;
    font-style: italic;
    line-height: 1.55;
    color: #1F4F46;
    margin: 0 0 10px;
}

.parent-section__quote-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: #8a9a8a;
}

/* ── Stacking Steps Section ──────────────────────────────────── */
.steps {
    padding: 100px 24px;
}

.steps__inner {
    max-width: 960px;
    margin: 0 auto;
}

.steps__header {
    text-align: center;
    margin-bottom: 64px;
}

.steps__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 50px;
    background-color: rgba(158, 240, 26, 0.1);
    border: 1px solid rgba(158, 240, 26, 0.2);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4e7e00;
    margin-bottom: 20px;
}

.steps__title {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.2;
    color: #1F4F46;
    margin: 0;
}

/* ── Stack container ─────────────────────────────────────────── */
.steps__stack {
    position: relative;
}

/* ── Individual card ─────────────────────────────────────────── */
.steps__card {
    position: sticky;
    top: 20vh;
    border-radius: 20px;
    overflow: hidden;
    background-color: #276B5C;
    will-change: transform;
    transition: transform 0.1s linear;
    transform-origin: center top;
}

.steps__card:not(:first-child) {
    margin-top: 40px;
}

.steps__card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 400px;
}

/* ── Text side ───────────────────────────────────────────────── */
.steps__card-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px 36px;
}

.steps__card-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(213, 227, 197, 0.2);
    border: 1px solid rgba(213, 227, 197, 0.3);
    font-family: 'Inter', sans-serif;
    font-size: 3.1rem;
    font-weight: 200;
    color: #d5e3c5;
    margin-bottom: 34px;
    letter-spacing: 0.02em;
}

.steps__card-heading {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 500;
    line-height: 1.25;
    color: #ffffff;
    margin: 0 0 16px;
}

.steps__card-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    max-width: 380px;
}

/* ── Image side ──────────────────────────────────────────────── */
.steps__card-media {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    margin: 16px 16px 16px 0;
    height: calc(100% - 32px);
}

.steps__card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── About / Trust Section ──────────────────────────────────── */
.hiw-about {
    padding: 0 24px 100px 24px;
}

.hiw-about__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hiw-about__col--left {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 50px;
}

.hiw-about__col--center {
    flex: 1;
    text-align: left;
}

.hiw-about__col--right {
    flex: 0 0 320px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding-top: 300px;
}

.hiw-about__badge {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1F4F46;
    background-color: #f0f0ee;
    padding: 10px 20px;
    border-radius: 50px;
}

.hiw-about__img-wrap {
    border-radius: 16px;
    overflow: hidden;
}

.hiw-about__img-wrap--left {
    width: 100%;
    height: 420px;
}

.hiw-about__img-wrap--right {
    width: 100%;
    height: 380px;
}

.hiw-about__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hiw-about__heading {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 400;
    line-height: 1.25;
    color: #1F4F46;
    margin: 0 0 28px;
    letter-spacing: -0.01em;
}

.hiw-about__highlight {
    display: inline-block;
    background-color: #2F7D6B;
    color: #fff;
    padding: 2px 14px;
    border-radius: 8px;
    font-style: italic;
}

.hiw-about__text {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.7;
    color: #2E2E2E;
    margin: 0 0 16px;
    max-width: 480px;
}

/* Button – outline with sliding fill */
.hiw-about__btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    height: 50px;
    padding: 0 6px 0 24px;
    background-color: #2F7D6B;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid #2F7D6B;
    border-radius: 50px;
    text-decoration: none;
    gap: 14px;
    overflow: hidden;
    transition: color 0.3s ease, border-color 0.3s ease;
    margin-top: 12px;
    z-index: 1;
}

.hiw-about__btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #276B5C;
    border-radius: 50px;
    transform: translateX(-105%);
    transition: transform 0.4s ease;
    z-index: -1;
}

.hiw-about__btn:hover {
    color: #ffffff !important;
    border-color: #1F4F46;
}

.hiw-about__btn:hover::before {
    transform: translateX(0);
}

.hiw-about__btn-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #2F7D6B;
    transition: background-color 0.3s ease;
}

.hiw-about__btn:hover .hiw-about__btn-arrow {
    background-color: #2F7D6B;
    color: #ffffff;
}

/* ── Page Content ─────────────────────────────────────────────── */
.hiw-page-content {
    padding: 80px 24px;
}

.hiw-page-content__inner {
    max-width: 960px;
    margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media screen and (max-width: 960px) {
    .hiw-hero {
        min-height: 70vh;
    }

    .hiw-hero__content {
        padding: 80px 20px 60px;
    }

    .parent-section {
        padding: 80px 20px;
    }

    .parent-section__inner {
        flex-direction: column;
        gap: 60px;
    }

    .parent-section__media {
        flex: none;
        width: 100%;
    }

    .parent-section__img-wrap {
        height: 420px;
    }

    .parent-section__quote {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 20px;
        max-width: 100%;
    }

    .steps {
        padding: 80px 20px;
    }

    .steps__card-body {
        height: 300px;
    }

    .steps__card-text {
        padding: 40px 32px;
    }

    .hiw-about {
        padding: 0 20px 80px;
    }

    .hiw-about__inner {
        flex-direction: column;
        gap: 32px;
    }

    .hiw-about__col--left {
        flex: none;
        width: 100%;
        padding-top: 0;
    }

    .hiw-about__col--center {
        order: -1;
    }

    .hiw-about__col--right {
        flex: none;
        width: 100%;
        padding-top: 0;
        justify-content: flex-start;
    }

    .hiw-about__img-wrap--left,
    .hiw-about__img-wrap--right {
        height: 280px;
    }
}

@media screen and (max-width: 768px) {
    .hiw-hero {
        width: calc(100% - 24px);
        min-height: 65vh;
        border-radius: 12px;
        margin: 12px auto 0;
    }

    .hiw-hero__content {
        padding: 70px 16px 56px;
    }

    .hiw-hero__badge {
        padding: 6px 16px;
        font-size: 0.72rem;
        margin-bottom: 22px;
    }

    .hiw-hero__title {
        font-size: clamp(1.8rem, 5vw, 2.6rem);
    }

    .hiw-hero__subtitle {
        font-size: 0.92rem;
        margin-bottom: 32px;
    }

    .hiw-hero__scroll {
        bottom: 20px;
    }

    .reassurance {
        padding: 60px 20px;
    }

    .reassurance__title {
        margin-bottom: 36px;
    }

    .reassurance__cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    .parent-section {
        padding: 64px 16px;
    }

    .parent-section__img-wrap {
        height: 320px;
    }

    .steps {
        padding: 64px 16px;
    }

    .steps__header {
        margin-bottom: 48px;
    }

    .steps__card {
        border-radius: 16px;
        position: relative;
        top: auto;
    }

    .steps__card:not(:first-child) {
        margin-top: 24px;
    }

    .steps__card-body {
        grid-template-columns: 1fr;
        height: auto;
    }

    .steps__card-text {
        padding: 28px 24px;
        order: 2;
    }

    .steps__card-media {
        margin: 12px 12px 0 12px;
        height: 220px;
        order: 1;
    }

    .steps__card-number {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        margin-bottom: 16px;
    }

    .steps__card-heading {
        font-size: 1.25rem;
    }

    .steps__card-desc {
        font-size: 0.88rem;
    }

    .hiw-about {
        padding: 0 16px 64px;
    }

    .hiw-about__col--left,
    .hiw-about__col--right {
        display: none;
    }

    .hiw-about__heading {
        font-size: clamp(1.5rem, 3vw, 2rem);
    }
}

@media screen and (max-width: 480px) {
    .hiw-hero {
        width: calc(100% - 16px);
        min-height: 60vh;
        border-radius: 10px;
        margin: 8px auto 0;
    }

    .hiw-hero__content {
        padding: 60px 12px 48px;
    }

    .hiw-hero__badge {
        padding: 5px 14px;
        font-size: 0.68rem;
        margin-bottom: 18px;
    }

    .hiw-hero__title {
        font-size: 1.7rem;
        line-height: 1.25;
    }

    .hiw-hero__title br {
        display: none;
    }

    .hiw-hero__subtitle {
        font-size: 0.88rem;
        line-height: 1.65;
        margin-bottom: 28px;
    }

    .hiw-hero__btn {
        height: 46px;
        padding: 0 5px 0 20px;
        font-size: 0.88rem;
    }

    .hiw-hero__btn-arrow {
        width: 34px;
        height: 34px;
    }

    .hiw-hero__scroll {
        display: none;
    }

    .reassurance {
        padding: 48px 16px;
    }

    .reassurance__title {
        font-size: 1.2rem;
        margin-bottom: 28px;
    }

    .reassurance__cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .steps {
        padding: 48px 12px;
    }

    .steps__header {
        margin-bottom: 36px;
    }

    .steps__badge {
        font-size: 0.72rem;
        padding: 6px 16px;
    }

    .steps__card {
        border-radius: 14px;
    }

    .steps__card:not(:first-child) {
        margin-top: 20px;
    }

    .steps__card-text {
        padding: 24px 20px;
    }

    .steps__card-media {
        height: 180px;
        margin: 10px 10px 0 10px;
    }

    .steps__card-number {
        width: 36px;
        height: 36px;
        font-size: 0.88rem;
        margin-bottom: 14px;
    }

    .steps__card-heading {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .steps__card-desc {
        font-size: 0.82rem;
        line-height: 1.6;
    }

    .hiw-about {
        padding: 0 12px 48px;
    }

    .hiw-about__heading {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .hiw-about__text {
        font-size: 0.88rem;
    }

    .hiw-about__btn {
        height: 44px;
        font-size: 0.78rem;
        padding: 0 5px 0 20px;
    }
}