/*
 * Theme Name:   HCF Kadence Child
 * Theme URI:    https://hacafo.org
 * Description:  Happy Care Foundation child theme — brand system, layout components, page-specific styles
 * Author:       Happy Care Foundation
 * Author URI:   https://hacafo.org
 * Template:     kadence
 * Version:      1.0.0
 * License:      GNU General Public License v2 or later
 */

/* ═══════════════════════════════════════════════════════════
   TABLE OF CONTENTS
   1.  CSS Custom Properties (Brand Tokens)
   2.  Base Reset & Typography
   3.  Buttons & Links
   4.  Navigation & Header
   5.  Footer
   6.  Hero Sections
   7.  Stats Bars
   8.  Program Cards
   9.  Story / Testimonial Cards
   10. Values Grid
   11. Stat Counters
   12. Impact SDG Badges
   13. Donate Page — Fund Allocation Bars
   14. Forms
   15. Utility Classes
   16. Responsive Breakpoints
═══════════════════════════════════════════════════════════ */

/* ─── 1. CSS Custom Properties ─────────────────────────── */
:root {
    /* Colours */
    --hcf-navy:      #0A2342;
    --hcf-navy-80:   rgba(10, 35, 66, 0.80);
    --hcf-navy-50:   rgba(10, 35, 66, 0.50);
    --hcf-magenta:   #C2185B;
    --hcf-magenta-h: #a3154e; /* hover */
    --hcf-lime:      #8BC34A;
    --hcf-teal:      #00796B;
    --hcf-gold:      #F9A825;
    --hcf-white:     #FFFFFF;
    --hcf-light:     #F8F9FA;
    --hcf-border:    #DEE2E6;
    --hcf-gray:      #6C757D;
    --hcf-dark:      #212529;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  6rem;
    --space-2xl: 8rem;

    /* Layout */
    --container: 1200px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

    /* Transitions */
    --transition: 0.22s ease;
}

/* ─── 2. Base Reset & Typography ────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--hcf-dark);
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--hcf-navy);
    line-height: 1.15;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--hcf-magenta);
    display: block;
    margin-bottom: 0.75rem;
}

blockquote {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--hcf-navy);
    border-left: 4px solid var(--hcf-magenta);
    padding: 1rem 0 1rem 2rem;
    margin: 2rem 0;
}

/* ─── 3. Buttons & Links ────────────────────────────────── */
.btn,
.wp-block-button__link {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 2.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary,
.wp-block-button.is-style-fill .wp-block-button__link {
    background: var(--hcf-magenta);
    color: #fff;
    border-color: var(--hcf-magenta);
}
.btn-primary:hover,
.wp-block-button.is-style-fill .wp-block-button__link:hover {
    background: var(--hcf-magenta-h);
    border-color: var(--hcf-magenta-h);
    color: #fff;
    box-shadow: 0 4px 16px rgba(194,24,91,0.30);
}

.btn-secondary,
.wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent;
    color: var(--hcf-navy);
    border-color: var(--hcf-navy);
}
.btn-secondary:hover {
    background: var(--hcf-navy);
    color: #fff;
}

.btn-white-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.7);
}
.btn-white-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

/* ─── 4. Navigation & Header ────────────────────────────── */
.site-header,
.header-wrap {
    background: var(--hcf-navy) !important;
}

.header-nav .nav-link,
.header-navigation a {
    color: rgba(255,255,255,0.9) !important;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}
.header-nav .nav-link:hover,
.header-navigation a:hover {
    color: var(--hcf-gold) !important;
}

/* Donate nav CTA button */
.nav-cta > a,
.header-navigation .menu-item-donate > a {
    background: var(--hcf-magenta) !important;
    color: #fff !important;
    padding: 0.45rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.nav-cta > a:hover {
    background: var(--hcf-magenta-h) !important;
    color: #fff !important;
}

.site-logo img { max-height: 56px; width: auto; }

/* ─── 5. Footer ─────────────────────────────────────────── */
.site-footer,
.footer-wrap {
    background: var(--hcf-navy) !important;
    color: rgba(255,255,255,0.75);
}

.site-footer h4,
.site-footer .footer-widget-title,
.site-footer .footer-heading {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.site-footer p,
.site-footer li { color: rgba(255,255,255,0.72); font-size: 0.92rem; }

.site-footer a {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    transition: color var(--transition);
}
.site-footer a:hover { color: var(--hcf-gold); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.10);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
}

.footer-reg-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    margin-top: 1rem;
}

/* ─── 6. Hero Sections ──────────────────────────────────── */
.hcf-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hcf-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 35, 66, 0.88) 0%,
        rgba(10, 35, 66, 0.55) 60%,
        rgba(10, 35, 66, 0.40) 100%
    );
    z-index: 1;
}

.hcf-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: var(--space-xl) var(--space-md);
    color: #fff;
}

.hcf-hero h1,
.hcf-hero .hero-heading {
    color: #fff;
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    margin-bottom: 1.5rem;
}

.hcf-hero p {
    color: rgba(255,255,255,0.85);
    font-size: 1.15rem;
    max-width: 560px;
    margin-bottom: 2rem;
}

/* Page-level hero (shorter) */
.hcf-page-hero {
    background: var(--hcf-navy);
    padding: var(--space-xl) var(--space-md) var(--space-lg);
    text-align: center;
}
.hcf-page-hero h1 { color: #fff; }
.hcf-page-hero .eyebrow { color: var(--hcf-gold); }

/* ─── 7. Stats Bar ──────────────────────────────────────── */
.stats-bar {
    background: var(--hcf-navy);
    padding: var(--space-md) 0;
}

.stats-bar__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 1px;
    background: rgba(255,255,255,0.08);
}

.stats-bar__item {
    padding: 2rem 1.5rem;
    background: var(--hcf-navy);
}

.stats-bar__number {
    font-family: var(--font-heading);
    font-size: 3.25rem;
    font-weight: 700;
    color: var(--hcf-gold);
    line-height: 1;
    display: block;
}

.stats-bar__label {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.60);
    margin-top: 0.4rem;
}

/* ─── 8. Program Cards ──────────────────────────────────── */
.program-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
}
.program-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.program-card__image {
    aspect-ratio: 4/3;
    overflow: hidden;
}
.program-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.program-card:hover .program-card__image img {
    transform: scale(1.04);
}

.program-card__body {
    padding: 1.5rem;
    border-top: 3px solid var(--hcf-magenta);
}
.program-card__body h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Numbered program sections (Programs page) */
.program-number {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--hcf-magenta);
    margin-bottom: 0.6rem;
    display: block;
}

.program-section { padding: var(--space-xl) 0; }
.program-section:nth-child(even) { background: var(--hcf-light); }

.program-section__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}
.program-section--reverse .program-section__grid {
    direction: rtl;
}
.program-section--reverse .program-section__grid > * {
    direction: ltr;
}

.program-section__image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.program-section__image img {
    width: 100%;
    aspect-ratio: 5/4;
    object-fit: cover;
    display: block;
}

.program-bullets {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
}
.program-bullets li {
    padding: 0.4rem 0 0.4rem 1.75rem;
    position: relative;
    font-size: 0.95rem;
}
.program-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--hcf-teal);
}

/* ─── 9. Story / Testimonial Cards ─────────────────────── */
.story-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.story-card::before {
    content: '\201C';
    font-family: var(--font-heading);
    font-size: 9rem;
    color: var(--hcf-magenta);
    opacity: 0.08;
    position: absolute;
    top: -1.5rem;
    left: 1rem;
    line-height: 1;
    pointer-events: none;
}

.story-card__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}
.story-card__badge--reintegration { background: rgba(0,121,107,0.12); color: var(--hcf-teal); }
.story-card__badge--mental-health  { background: rgba(194,24,91,0.10); color: var(--hcf-magenta); }
.story-card__badge--skills         { background: rgba(139,195,74,0.15); color: #558B2F; }
.story-card__badge--legal          { background: rgba(10,35,66,0.10);  color: var(--hcf-navy); }

.story-card blockquote {
    font-size: 1.15rem;
    border: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.story-card__attribution {
    font-size: 0.85rem;
    color: var(--hcf-gray);
    font-weight: 500;
}

/* ─── 10. Values Grid ───────────────────────────────────── */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: var(--space-md);
}

.value-card {
    border-left: 4px solid var(--hcf-magenta);
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
    background: #fff;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.value-card:hover { box-shadow: var(--shadow-md); }
.value-card:nth-child(2) { border-left-color: var(--hcf-teal); }
.value-card:nth-child(3) { border-left-color: var(--hcf-lime); }
.value-card:nth-child(4) { border-left-color: var(--hcf-gold); }
.value-card:nth-child(5) { border-left-color: var(--hcf-navy); }
.value-card:nth-child(6) { border-left-color: var(--hcf-magenta); }

.value-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

/* ─── 11. Stat Counters ─────────────────────────────────── */
.stat-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition);
}
.stat-card:hover { transform: translateY(-3px); }

.stat-card__number {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--hcf-magenta);
    line-height: 1;
    display: block;
}

.stat-card__label {
    font-size: 0.88rem;
    color: var(--hcf-gray);
    font-weight: 500;
    margin-top: 0.6rem;
    line-height: 1.3;
}

.stats-grid-6 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ─── 12. SDG Badges ────────────────────────────────────── */
.sdg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.sdg-badge {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    flex-direction: column;
    gap: 2px;
}
.sdg-badge span { font-size: 0.55rem; font-weight: 600; letter-spacing: 0.05em; }

.sdg-badge--3  { background: #4C9F38; }
.sdg-badge--4  { background: #C5192D; }
.sdg-badge--5  { background: #FF3A21; }
.sdg-badge--8  { background: #A21942; }
.sdg-badge--10 { background: #DD1367; }
.sdg-badge--16 { background: #00689D; }

/* ─── 13. Fund Allocation Bars ──────────────────────────── */
.fund-allocation { margin-top: var(--space-md); }

.fund-bar-wrap { margin-bottom: 1.4rem; }

.fund-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.fund-bar-label span:first-child {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--hcf-navy);
}
.fund-bar-label span:last-child {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--hcf-gray);
}

.fund-bar-track {
    background: var(--hcf-border);
    border-radius: 100px;
    height: 10px;
    overflow: hidden;
}

.fund-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fund-bar-fill--teal    { background: var(--hcf-teal);    width: 40%; }
.fund-bar-fill--navy    { background: var(--hcf-navy);    width: 25%; }
.fund-bar-fill--magenta { background: var(--hcf-magenta); width: 20%; }
.fund-bar-fill--gold    { background: var(--hcf-gold);    width: 15%; }

/* ─── 14. Forms ─────────────────────────────────────────── */
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container select,
.wpforms-container textarea {
    border: 1.5px solid var(--hcf-border) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.75rem 1rem !important;
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
    width: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.wpforms-container input:focus,
.wpforms-container select:focus,
.wpforms-container textarea:focus {
    border-color: var(--hcf-teal) !important;
    box-shadow: 0 0 0 3px rgba(0,121,107,0.15) !important;
    outline: none !important;
}

.wpforms-container .wpforms-submit {
    background: var(--hcf-magenta) !important;
    color: #fff !important;
    border: none !important;
    padding: 0.85rem 2.5rem !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    cursor: pointer;
    transition: background var(--transition) !important;
}
.wpforms-container .wpforms-submit:hover {
    background: var(--hcf-magenta-h) !important;
}

/* Volunteer tab tags */
.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}
.role-tag {
    background: rgba(10,35,66,0.07);
    color: var(--hcf-navy);
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
}
.role-tag:hover {
    background: var(--hcf-navy);
    color: #fff;
    cursor: default;
}

/* ─── 15. Utility Classes ───────────────────────────────── */
.text-center { text-align: center; }
.text-white  { color: #fff; }
.text-navy   { color: var(--hcf-navy); }
.text-magenta{ color: var(--hcf-magenta); }
.text-gold   { color: var(--hcf-gold); }

.bg-navy   { background: var(--hcf-navy); }
.bg-light  { background: var(--hcf-light); }
.bg-white  { background: #fff; }

.section      { padding: var(--space-xl) 0; }
.section--sm  { padding: var(--space-lg) 0; }
.container    { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-md); }
.divider      { border: none; border-top: 1px solid var(--hcf-border); margin: var(--space-md) 0; }

.hcf-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

/* ─── 16. Responsive Breakpoints ───────────────────────── */

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
    .program-section__grid  { grid-template-columns: 1fr; gap: var(--space-md); }
    .program-section--reverse .program-section__grid { direction: ltr; }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid-6 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    :root { --space-xl: 3.5rem; --space-lg: 2.5rem; }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }

    .hcf-hero { min-height: 80vh; }

    .stats-bar__grid   { grid-template-columns: 1fr; }
    .stats-bar__item   { padding: 1.5rem 1rem; }
    .stats-bar__number { font-size: 2.5rem; }

    .values-grid { grid-template-columns: 1fr; }
    .stats-grid-6 { grid-template-columns: 1fr; }

    .program-section__grid { grid-template-columns: 1fr; }

    .sdg-grid .sdg-badge { width: 56px; height: 56px; font-size: 0.9rem; }

    .story-card { padding: 1.75rem 1.25rem; }
    .story-card blockquote { font-size: 1rem; }
}

/* Small mobile (≤ 480px) */
@media (max-width: 480px) {
    .btn, .wp-block-button__link { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
    .stat-card__number { font-size: 2.25rem; }
}
