/*--------------------------------------------------------------
 * Footer Styles
 * Styles for the site footer (footer.php).
 *
 * @package Thrive_Kids_GI_Care
 *--------------------------------------------------------------*/

/* ── Google Fonts (if not already loaded) ─────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;500;600&display=swap');

/* ── Footer Base ─────────────────────────────────────────────── */
.site-footer {
    background-color: #1F4F46;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Subtle organic background decoration (like the reference curves) */
.site-footer::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    border: 1px solid rgba(158, 240, 26, 0.06);
    pointer-events: none;
}

.site-footer::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    border: 1px solid rgba(158, 240, 26, 0.05);
    pointer-events: none;
}

/* ── Footer Brand Hero ───────────────────────────────────────── */
.footer__brand {
    text-align: center;
    padding: 80px 24px 50px;
    position: relative;
    z-index: 1;
}

.footer__brand-name {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 500;
    color: #F3F7F6;
    line-height: 1.05;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.footer__brand-tagline {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    letter-spacing: 0.02em;
}

/* ── Footer Main Content ─────────────────────────────────────── */
.footer__main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 48px 0px;
    position: relative;
    z-index: 1;
    align-items: start;
}

/* ── Section Headings ────────────────────────────────────────── */
.footer__heading {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px;
    line-height: 1.2;
}

/* ── Contact Section (Left) ──────────────────────────────────── */
.footer__contact {
    justify-self: start;
}

.footer__contact-columns {
    display: flex;
    gap: 40px;
}

.footer__contact-info p,
.footer__contact-info a {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 6px;
    text-decoration: none;
    line-height: 1.6;
    display: block;
}

.footer__contact-info a:hover {
    color: #2F7D6B;
}

/* Social links */
.footer__social {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer__social-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #ffffff6d !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
    line-height: 1.6;
}

.footer__social-link:hover {
    color: #9EF01A !important;
}

.footer__social-link svg {
    opacity: 1;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.footer__social-link:hover svg {
    opacity: 1;
}

/* ── CTA Section (Center) ────────────────────────────────────── */
.footer__cta {
    display: flex;
    gap: 12px;
    align-self: center;
    justify-self: center;
    flex-wrap: wrap;
    justify-content: center;
}

.footer__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    height: 44px;
    padding: 0 5px 0 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    transition: background-color 0.5s ease, color 0.35s ease, border-color 0.35s ease;
    gap: 14px;
}

/* Sliding background */
.footer__cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    transform: translateX(-105%);
    transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 0;
}

.footer__cta-btn:hover::before {
    transform: translateX(0);
}

.footer__cta-btn>span:first-child {
    position: relative;
    z-index: 1;
}

.footer__cta-arrow {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.1rem;
    transition: background-color 0.35s ease, color 0.35s ease;
    flex-shrink: 0;
}

/* ── Primary: dark green border → fills dark green on hover ─── */
.footer__cta-btn--primary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.footer__cta-btn--primary .footer__cta-arrow {
    background-color: transparent;
    color: #ffffff;
}

.footer__cta-btn--primary::before {
    background-color: #ffffff;
}

.footer__cta-btn--primary:hover {
    color: #1F4F46;
    border-color: #ffffff;
}

.footer__cta-btn--primary:hover .footer__cta-arrow {
    background-color: rgba(31, 79, 70, 0.1);
    color: #1F4F46;
}

/* ── Secondary: outline → fills lime on hover ─────────────────── */
.footer__cta-btn--secondary {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.footer__cta-btn--secondary .footer__cta-arrow {
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.footer__cta-btn--secondary::before {
    background-color: #2F7D6B;
}

.footer__cta-btn--secondary:hover {
    color: #ffffff;
    border-color: #2F7D6B;
}

.footer__cta-btn--secondary:hover .footer__cta-arrow {
    background-color: #276B5C;
    color: #ffffff;
}

/* ── Quick Links Section (Right) ─────────────────────────────── */
.footer__links {
    justify-self: end;
}

.footer__links-columns {
    display: flex;
    gap: 40px;
}

.footer__links-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__links-col a {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.6;
}

.footer__links-col a:hover {
    color: #2F7D6B;
}

/* ── Footer Bottom Bar ───────────────────────────────────────── */
.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.footer__bottom-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Legal entity name */
.footer__entity {
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    font-weight: 500;
    color: rgba(158, 240, 26, 0.45);
    margin: 14px 0 0;
    letter-spacing: 0.03em;
    text-align: center;
}

.footer__copyright {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.footer__policies {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 20px;
}

.footer__policies a {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer__policies a:hover {
    color: #ffffff;
}

.footer__policies a+a::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.15);
    margin-right: 8px;
    vertical-align: middle;
}

/* Emergency disclaimer */
.footer__emergency {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    margin: 0;
    padding: 16px 48px 40px;
    line-height: 1.5;
}

/* ── Sticky CTA (Global) ─────────────────────────────────────── */
.sticky-cta {
    position: fixed;
    bottom: 60px;
    right: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    height: 60px;
    padding: 0 10px 0 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color 0.5s ease, color 0.35s ease, border-color 0.35s ease, transform 0.3s ease, box-shadow 0.3s ease;
    gap: 14px;

    background-color: #2F7D6B;
    color: #ffffff !important;
    border: 1px solid #2F7D6B;
    box-shadow: 0 8px 24px rgba(31, 79, 70, 0.25);
    z-index: 9999;
}

/* Sliding background */
.sticky-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    transform: translateX(-105%);
    transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 0;
    background-color: #276B5C;
}

.sticky-cta:hover::before {
    transform: translateX(0);
}

.sticky-cta:hover {
    color: #ffffff !important;
    border-color: #1F4F46;
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(31, 79, 70, 0.3);
}

/* Text above sliding bg */
.sticky-cta>span:first-child {
    position: relative;
    z-index: 1;
}

/* Arrow circle */
.sticky-cta svg {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 10px;
    /* fake box sizing so it scales like the actual arrow container */
    border-radius: 50%;
    font-size: 1.1rem;
    transition: background-color 0.35s ease, color 0.35s ease;
    flex-shrink: 0;

    background-color: #ffffff;
    color: #2F7D6B;
    box-sizing: border-box;
}

.sticky-cta:hover svg {
    background-color: #2F7D6B;
    color: #ffffff;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — Footer
   ══════════════════════════════════════════════════════════════ */

/* ── Tablet / smaller desktop (≤ 1024px) ─────────────────────── */
@media (max-width: 1024px) {
    .footer__main {
        grid-template-columns: 1fr 1fr;
        gap: 40px 30px;
        padding: 40px 32px 50px;
    }

    .footer__contact {
        grid-column: 1;
    }

    .footer__links {
        grid-column: 2;
        justify-self: end;
    }

    .footer__cta {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
    }

    .footer__bottom-inner {
        padding: 20px 32px;
    }
}

/* ── Tablet / Mobile Sticky CTA ──────────────────────────────── */
@media screen and (max-width: 768px) {
    .sticky-cta-wrap {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 16px 20px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 255, 255, 0.4);
        display: flex;
        justify-content: center;
        z-index: 9999;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
    }

    .sticky-cta {
        position: relative;
        bottom: auto;
        right: auto;
        transform: none;
        width: 100%;
        max-width: 320px;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(31, 79, 70, 0.2);
    }

    .sticky-cta:hover {
        transform: translateY(-2px);
        /* Slight lift on mobile */
    }
}

/* ── Tablet portrait (≤ 768px) ───────────────────────────────── */
@media (max-width: 768px) {
    .footer__brand {
        padding: 60px 24px 40px;
    }

    .footer__brand-name {
        font-size: clamp(2.8rem, 10vw, 4.5rem);
    }

    .footer__main {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 30px 24px 50px;
        text-align: center;
    }

    .footer__contact {
        justify-self: center;
    }

    .footer__contact-columns {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .footer__contact-info {
        text-align: center;
    }

    .footer__social {
        flex-direction: row;
        gap: 16px;
    }

    .footer__heading {
        font-size: 1.4rem;
    }

    .footer__cta {
        grid-column: 1;
        grid-row: auto;
        flex-direction: column;
        align-items: center;
    }

    .footer__links {
        grid-column: 1;
        justify-self: center;
    }

    .footer__links-columns {
        gap: 48px;
    }

    .footer__bottom-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 20px 24px;
    }

    .footer__policies {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ── Mobile (≤ 480px) ────────────────────────────────────────── */
@media (max-width: 480px) {
    .footer__brand {
        padding: 48px 16px 32px;
    }

    .footer__brand-name {
        font-size: 2.6rem;
    }

    .footer__brand-tagline {
        font-size: 0.95rem;
    }

    .footer__main {
        padding: 24px 16px 40px;
        gap: 32px;
    }

    .footer__contact-columns {
        gap: 16px;
    }

    .footer__links-columns {
        gap: 32px;
    }

    .footer__cta-btn {
        font-size: 0.85rem;
    }

    .footer__policies {
        padding: 8px 14px;
        gap: 6px;
    }

    .footer__policies a {
        font-size: 0.75rem;
    }

    .footer__bottom-inner {
        padding: 16px;
    }
}