/*
Theme Name: Kim Woodbridge Child
Theme URI: https://kimwoodbridge.com/
Description: Single-page Kim Woodbridge fundraiser child theme on Kadence. Warm neutrals + emerald accent. Designed and hosted by Flashcloud.
Author: Flashcloud
Author URI: https://flashcloud.com/
Template: kadence
Version: 1.6.2
*/

/* =========================================================================
   1. Brand tokens
   ========================================================================= */
:root {
    --kw-emerald: #10B981;
    --kw-emerald-rgb: 16, 185, 129;
    --kw-emerald-deep: #047857;
    --kw-emerald-soft: #D1FAE5;
    --kw-emerald-text: #065F46;
    --kw-cream: #FAFAF7;
    --kw-white: #FFFFFF;
    --kw-ink: #1F2937;
    --kw-ink-soft: #4B5563;
    --kw-line: rgba(31, 41, 55, 0.10);
    --kw-font-serif: "PT Serif", Georgia, "Times New Roman", serif;
    --kw-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --kw-container: 760px;
    --kw-radius: 8px;
    --kw-radius-pill: 999px;
    --kw-section-pad: clamp(3rem, 6vw, 5rem);
}

/* =========================================================================
   2. Body + frame resets — Kadence ships light frames + page-title banner;
      strip those for our single-page layout.
   ========================================================================= */
body {
    font-family: var(--kw-font-sans);
    color: var(--kw-ink-soft);
    background: var(--kw-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hide Kadence's empty page-title banner */
.entry-hero, .entry-hero.page-hero-section, .entry-header { display: none !important; }
.content-area { margin: 0 !important; }
.wp-site-blocks > main { flex: 0 0 auto !important; }
.entry { background: transparent !important; }

/* Hide the page H1 since our Elementor hero supplies its own */
.page .entry-title { display: none !important; }

/* =========================================================================
   3. Header — Kadence default container; we just style the menu items.
   ========================================================================= */
.site-branding .site-title a,
.site-title a {
    font-family: var(--kw-font-serif) !important;
    font-weight: 400 !important;
    font-size: 20px !important;
    color: var(--kw-ink) !important;
    text-decoration: none !important;
}
.site-branding .site-description { display: none !important; }

/* Small scroll-anchor nav, sans-serif, soft hover */
.main-navigation .menu > li > a,
.header-navigation .menu > li > a {
    font-family: var(--kw-font-sans) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--kw-ink) !important;
    padding: 0 14px !important;
    transition: color 0.15s ease;
}
.main-navigation .menu > li > a:hover,
.header-navigation .menu > li > a:hover {
    color: var(--kw-emerald-deep) !important;
}

/* =========================================================================
   4. Typography defaults inside Elementor sections
   ========================================================================= */
.kw-section,
.elementor-section {
    color: var(--kw-ink-soft);
}

.kw-section h1, .kw-section h2,
.elementor-section h1, .elementor-section h2 {
    font-family: var(--kw-font-serif);
    color: var(--kw-ink);
    line-height: 1.2;
}

.kw-section p, .elementor-section p {
    font-family: var(--kw-font-sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--kw-ink-soft);
}

/* Generic max-readable column width inside any section */
.kw-prose {
    max-width: var(--kw-container);
    margin: 0 auto;
}

/* =========================================================================
   5. Buttons — primary emerald, large enough for thumb taps
   ========================================================================= */
.kw-btn-primary a,
a.kw-btn-primary {
    display: inline-block;
    background: var(--kw-emerald) !important;
    color: var(--kw-white) !important;
    font-family: var(--kw-font-sans);
    font-weight: 600;
    font-size: 17px;
    padding: 16px 32px !important;
    border-radius: var(--kw-radius-pill) !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(var(--kw-emerald-rgb), 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.kw-btn-primary a:hover,
a.kw-btn-primary:hover {
    background: var(--kw-emerald-deep) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--kw-emerald-rgb), 0.35);
}

/* Make sure Elementor button widget renders our class chain correctly */
.elementor-widget-button .elementor-button.kw-btn-primary {
    background-color: var(--kw-emerald) !important;
    color: var(--kw-white) !important;
    border-radius: var(--kw-radius-pill) !important;
    padding: 16px 32px !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(var(--kw-emerald-rgb), 0.25);
}
.elementor-widget-button .elementor-button.kw-btn-primary:hover {
    background-color: var(--kw-emerald-deep) !important;
}

/* =========================================================================
   5b. Official GoFundMe embed widget — live progress bar + donate button.
   The .gfm-embed div is replaced with an iframe by embed.js. We constrain
   width and remove the iframe's default margin so it sits cleanly under
   the hero copy.
   ========================================================================= */
.kw-gfm-embed {
    max-width: 480px;
    margin: 0 auto;
}
.kw-gfm-embed .gfm-embed-iframe,
.kw-gfm-embed iframe {
    display: block !important;
    width: 100% !important;
    border: 0 !important;
    border-radius: var(--kw-radius);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* =========================================================================
   6. Progress bar (legacy — no longer rendered, kept for safety)
   ========================================================================= */
.kw-progress {
    max-width: var(--kw-container);
    margin: 0 auto;
    padding: 0 1rem;
}
.kw-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--kw-font-sans);
    font-size: 15px;
    color: var(--kw-ink-soft);
    margin-bottom: 12px;
}
.kw-progress-stats strong {
    color: var(--kw-emerald-deep);
    font-weight: 700;
    font-size: 18px;
}
.kw-progress-bar {
    height: 8px;
    background: var(--kw-emerald-soft);
    border-radius: var(--kw-radius-pill);
    overflow: hidden;
    position: relative;
}
.kw-progress-fill {
    height: 100%;
    background: var(--kw-emerald);
    border-radius: var(--kw-radius-pill);
    transition: width 0.5s ease;
}

/* =========================================================================
   7. Timeline — native Elementor widgets per entry, decoration via CSS.
   Structure: .kw-timeline-section contains a column with:
     [heading "My timeline"] [text intro] [inner-section.kw-timeline-entry]+
   Each .kw-timeline-entry has padding-left: 32px and we draw the dot via
   ::before on the entry. Connector line is drawn via the section's ::before
   spanning from the first to the last entry.
   ========================================================================= */
.kw-timeline-section .elementor-widget-wrap {
    position: relative;
}
/* Connector line — vertical emerald-soft rail behind the entries */
.kw-timeline-section .kw-timeline-entry:not(:last-of-type)::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 22px;
    bottom: -24px;
    width: 2px;
    background: var(--kw-emerald-soft);
    z-index: 0;
}
.kw-timeline-section .kw-timeline-entry,
.kw-timeline-section section.kw-timeline-entry,
.kw-timeline-section .elementor-element.kw-timeline-entry {
    position: relative;
    padding-left: 32px !important;
}
/* When the shortcode renders the entries directly inside the column wrap
   (without Elementor's outer wrappers), the entry needs its own margin. */
.kw-timeline-section section.kw-timeline-entry {
    margin-bottom: 24px;
}
.kw-timeline-section .kw-timeline-entry::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 18px;
    height: 18px;
    background: var(--kw-emerald);
    border: 3px solid var(--kw-white);
    box-shadow: 0 0 0 2px var(--kw-emerald);
    border-radius: 50%;
    z-index: 1;
}
/* Eyebrow date heading inside the entry — when shortcode-rendered, the
   widget's inline color/family aren't there, so we set them explicitly. */
.kw-timeline-section .kw-timeline-entry .kw-timeline-date,
.kw-timeline-section .kw-timeline-entry .kw-timeline-date .elementor-heading-title {
    color: var(--kw-emerald-deep) !important;
    font-family: var(--kw-font-sans) !important;
    margin: 0 0 4px 0;
}
.kw-timeline-section .kw-timeline-entry .kw-timeline-date .elementor-heading-title {
    text-transform: uppercase;
    letter-spacing: 0.08em !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}
/* Title heading inside the entry — serif, ink color, larger */
.kw-timeline-section .kw-timeline-entry .kw-timeline-title,
.kw-timeline-section .kw-timeline-entry .kw-timeline-title .elementor-heading-title {
    font-family: var(--kw-font-serif) !important;
    color: var(--kw-ink) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 0 10px 0;
}

/* Body paragraphs inside each entry */
.kw-timeline-section .kw-timeline-entry .kw-timeline-body,
.kw-timeline-section .kw-timeline-entry .kw-timeline-body .elementor-widget-container {
    color: var(--kw-ink-soft);
    font-family: var(--kw-font-sans);
}
.kw-timeline-section .kw-timeline-entry .kw-timeline-body p {
    margin: 0 0 12px 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--kw-ink-soft);
}
.kw-timeline-section .kw-timeline-entry .kw-timeline-body p:last-child {
    margin-bottom: 0;
}

/* Show-more clamp: when an entry's body widget overflows past 220px we mark
   the entry with .kw-clampable (added by JS). The body gets a max-height and
   a soft fade so the cutoff doesn't look like content is broken. */
.kw-timeline-section .kw-timeline-entry.kw-clampable .kw-timeline-body {
    max-height: 220px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.35s ease;
}
.kw-timeline-section .kw-timeline-entry.kw-clampable .kw-timeline-body::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 64px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--kw-white) 90%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}
/* Cream-bg sections (story section is cream too, just in case timeline ever
   moves to a cream section the fade should match) */
.kw-section[style*="rgb(250"] .kw-timeline-entry.kw-clampable .kw-timeline-body::after,
.kw-timeline-section[style*="rgb(250"] .kw-timeline-entry.kw-clampable .kw-timeline-body::after {
    background: linear-gradient(to bottom, rgba(250, 250, 247, 0), var(--kw-cream) 90%);
}
.kw-timeline-section .kw-timeline-entry.kw-clampable.is-expanded .kw-timeline-body {
    max-height: 2000px;  /* large enough to fit any entry */
}
.kw-timeline-section .kw-timeline-entry.kw-clampable.is-expanded .kw-timeline-body::after {
    opacity: 0;
}
/* Make sure the entry's widget-wrap stacks children vertically rather than
   flex-row (Elementor default) so the photo and toggle button each get a
   full-width row of their own. */
.kw-timeline-section .kw-timeline-entry .elementor-widget-wrap {
    flex-direction: column !important;
    align-items: stretch;
}

/* Featured image inside a timeline entry. Sits below the body, soft frame.
   When the entry is clamped, hide the photo so it doesn't dangle between
   the cut-off body and the "Show more" button. It reappears on expand. */
.kw-timeline-section .kw-timeline-entry .kw-timeline-photo {
    display: block;
    margin: 16px 0 0 0;
    padding: 0;
    border-radius: var(--kw-radius);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    max-width: 480px;
    background: var(--kw-cream);
    align-self: flex-start;
}
.kw-timeline-section .kw-timeline-entry .kw-timeline-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--kw-radius);
}
/* Hide the photo while the entry is clamped, reveal on expand. */
.kw-timeline-section .kw-timeline-entry.kw-clampable:not(.is-expanded) .kw-timeline-photo {
    display: none;
}

/* The toggle button itself — override Kadence's blue focus ring and any
   default button styling that bleeds through. Block-level + width:max-content
   keeps the dotted underline hugging the text rather than spanning the full
   column, and prevents it from sitting inline next to the photo figure. */
.kw-timeline-toggle,
.kw-timeline-section button.kw-timeline-toggle {
    display: block;
    width: max-content;
    margin-top: 16px;
    margin-bottom: 4px;
    background: transparent !important;
    border: 0 !important;
    padding: 4px 0 !important;
    color: var(--kw-emerald-deep) !important;
    font-family: var(--kw-font-sans) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-decoration: none !important;
    border-bottom: 1px dotted currentColor !important;
    border-radius: 0;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1.4;
    text-align: left;
}
.kw-timeline-toggle:hover {
    color: var(--kw-emerald) !important;
}
/* Kill Kadence/UA default focus ring (blue), use a subtle emerald underline */
.kw-timeline-toggle:focus,
.kw-timeline-toggle:focus-visible,
.kw-timeline-toggle:active {
    outline: 2px solid transparent !important;
    outline-offset: 2px;
    color: var(--kw-emerald) !important;
    border-bottom-color: var(--kw-emerald) !important;
    border-bottom-style: solid !important;
    background: transparent !important;
    box-shadow: none !important;
}
.kw-timeline-toggle::after {
    content: "↓";
    transition: transform 0.2s ease;
}
.kw-timeline-entry.is-expanded .kw-timeline-toggle::after {
    transform: rotate(180deg);
}
.kw-timeline-intro {
    max-width: 560px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Legacy timeline block (kept as fallback; nothing renders it now) */
.kw-timeline {
    max-width: var(--kw-container);
    margin: 0 auto;
    position: relative;
    padding-left: 32px;
}
.kw-timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--kw-emerald-soft);
}
.kw-timeline-item {
    position: relative;
    padding-bottom: 32px;
}
.kw-timeline-item::before {
    content: "";
    position: absolute;
    left: -32px;
    top: 6px;
    width: 18px;
    height: 18px;
    background: var(--kw-emerald);
    border: 3px solid var(--kw-white);
    box-shadow: 0 0 0 2px var(--kw-emerald);
    border-radius: 50%;
}
.kw-timeline-date {
    font-family: var(--kw-font-sans);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--kw-emerald-deep);
    margin: 0 0 4px 0;
}
.kw-timeline-title {
    font-family: var(--kw-font-serif);
    font-size: 22px;
    color: var(--kw-ink);
    margin: 0 0 8px 0;
    line-height: 1.3;
}
.kw-timeline-body {
    font-family: var(--kw-font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--kw-ink-soft);
    margin: 0;
}
.kw-timeline-placeholder {
    background: var(--kw-cream);
    border: 1px dashed var(--kw-line);
    border-radius: var(--kw-radius);
    padding: 16px 20px;
    color: var(--kw-ink-soft);
    font-style: italic;
}

/* =========================================================================
   8. How donations help — three native-widget cards in a 3-col inner-section.
   The inner-section .kw-help-cards is just the wrapper; each column is the
   actual card. We give the columns a white "card" look with padding + radius.
   ========================================================================= */
.kw-help-section .kw-help-cards > .elementor-container > .elementor-column {
    background: var(--kw-white);
    border-radius: var(--kw-radius);
    padding: 32px 24px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin: 0 8px;
}
/* Icon SVG circle wrapper */
.kw-help-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--kw-emerald-soft);
    color: var(--kw-emerald-deep);
    display: flex;
    align-items: center;
    justify-content: center;
}
.kw-help-card-icon svg {
    width: 28px;
    height: 28px;
}
/* Centered heading + text inside each card column */
.kw-help-card-title .elementor-heading-title {
    text-align: center;
}
.kw-help-card-body p {
    margin: 0;
}

/* =========================================================================
   9. Footer — minimal copyright row
   ========================================================================= */
.site-footer,
.site-footer-row-container,
.site-footer-row-container-inner {
    background: var(--kw-cream) !important;
    color: var(--kw-ink-soft) !important;
}
.site-footer * { color: var(--kw-ink-soft) !important; }
.site-footer a { color: var(--kw-emerald-deep) !important; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .site-info,
.site-footer .footer-html {
    font-family: var(--kw-font-sans);
    font-size: 14px;
    line-height: 1.6;
}
/* Hide unused footer rows */
.site-footer .site-top-footer-wrap,
.site-footer .site-middle-footer-wrap { display: none !important; }
.site-footer .site-bottom-footer-wrap .site-footer-row-container-inner {
    padding: 18px 24px !important;
}

/* =========================================================================
   10. Header — sticky on scroll. White-bg site so we just keep the header
   pinned with a thin bottom border + subtle shadow when scrolled.
   ========================================================================= */
#masthead {
    position: sticky !important;
    top: 0;
    z-index: 100;
    background: var(--kw-white) !important;
    transition: box-shadow 0.2s ease, border-bottom-color 0.2s ease;
    border-bottom: 1px solid transparent;
}
.site-header-row-container,
.site-main-header-wrap,
.site-main-header-inner-wrap {
    background: var(--kw-white) !important;
}
/* When the page has scrolled past the top, deepen the divider */
body.kw-scrolled #masthead {
    border-bottom-color: var(--kw-line);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* Anchor-jump scroll offset so titles clear the ~80px sticky header */
#story, #timeline, #how, #donate, #contact,
.elementor-element[id="story"],
.elementor-element[id="timeline"],
.elementor-element[id="how"] {
    scroll-margin-top: 100px;
}

/* =========================================================================
   11. Hero portrait — soft shadow + tighter circle clip
   ========================================================================= */
.kw-hero-portrait img {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
}

/* =========================================================================
   12. Mobile drawer — cream background, dark text (Kadence default is black bg)
   ========================================================================= */
.popup-drawer-side-right .drawer-inner,
.popup-drawer .drawer-inner {
    background: var(--kw-cream) !important;
}
.mobile-navigation .menu > li > a,
.popup-drawer .menu > li > a {
    color: var(--kw-ink) !important;
    font-family: var(--kw-font-sans) !important;
    font-weight: 500 !important;
    font-size: 17px !important;
    padding: 14px 24px !important;
}
.mobile-navigation .menu > li > a:hover,
.popup-drawer .menu > li > a:hover {
    color: var(--kw-emerald-deep) !important;
}
.popup-drawer .menu > li {
    border-bottom: 1px solid var(--kw-line);
}
.drawer-toggle-close,
.popup-drawer .menu-toggle-close {
    color: var(--kw-ink) !important;
}

/* =========================================================================
   13. Mobile (≤ 600px)
   ========================================================================= */
@media (max-width: 600px) {
    /* Help cards stack — Elementor inner-section columns stack via its own
       mobile breakpoint, but force it here too in case of Elementor's
       responsive_extras flag. */
    .kw-help-section .kw-help-cards > .elementor-container {
        flex-direction: column !important;
    }
    .kw-help-section .kw-help-cards > .elementor-container > .elementor-column {
        width: 100% !important;
        margin: 0 0 16px 0;
    }

    /* Tighten typography */
    .kw-section h1,
    .elementor-section h1 { font-size: 32px !important; }
    .kw-section h2,
    .elementor-section h2 { font-size: 26px !important; }

    /* Hero portrait smaller on mobile but still prominent */
    .kw-hero-portrait img {
        max-width: 220px !important;
    }

    /* Timeline tightening on mobile */
    .kw-timeline-section .elementor-element.kw-timeline-entry {
        padding-left: 28px !important;
    }
    .kw-timeline-section .kw-timeline-entry::before {
        left: 0;
        width: 16px;
        height: 16px;
        top: 4px;
    }
    .kw-timeline-section .kw-timeline-entry:not(:last-of-type)::after {
        left: 7px;
    }

    /* Legacy timeline (unused now) */
    .kw-timeline { padding-left: 28px; }
    .kw-timeline-item::before { left: -28px; width: 16px; height: 16px; top: 4px; }
}
