/*
Theme Name: Calgary Harvest
Theme URI: https://calgaryharvest.ca
Author: Calgary Harvest
Author URI: https://calgaryharvest.ca
Description: A warm, organic WordPress theme for Calgary Harvest — connecting fruit tree owners with volunteer pickers. Find it, pick it, share it, eat it!
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: calgary-harvest
Tags: community, harvest, organic, fruit-trees, volunteer
*/

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    /* Primary palette — from the logo */
    --ch-green-dark:   #2d5a27;
    --ch-green-mid:    #4a8c3f;
    --ch-green-light:  #6db85a;
    --ch-green-pale:   #e8f5e1;

    --ch-red:          #c0392b;
    --ch-red-dark:     #96281b;
    --ch-red-light:    #e74c3c;

    --ch-cream:        #f4f1e6;
    --ch-cream-dark:   #e8e4d4;
    --ch-white:        #ffffff;
    --ch-brown:        #5d4037;
    --ch-brown-light:  #8d6e63;
    --ch-text:         #333333;
    --ch-text-light:   #666666;

    /* Warm accent */
    --ch-orange:       #e67e22;
    --ch-yellow:       #f1c40f;

    /* Typography */
    --font-heading: 'Nunito', 'Segoe UI', sans-serif;
    --font-body:    'Open Sans', 'Segoe UI', sans-serif;

    /* Spacing */
    --section-padding: 5rem 0;
    --container-width: 1200px;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--ch-text);
    background-color: var(--ch-cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--ch-green-mid);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--ch-green-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--ch-green-dark);
    line-height: 1.3;
    margin-bottom: 0.75em;
    font-weight: 700;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1.2em;
}

/* ========================================
   UTILITY
   ======================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center { text-align: center; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    line-height: 1.4;
}

.btn-primary {
    background: var(--ch-red);
    color: var(--ch-white);
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.3);
}

.btn-primary:hover {
    background: var(--ch-red-dark);
    color: var(--ch-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.4);
}

.btn-secondary {
    background: var(--ch-green-mid);
    color: var(--ch-white);
    box-shadow: 0 4px 15px rgba(74, 140, 63, 0.3);
}

.btn-secondary:hover {
    background: var(--ch-green-dark);
    color: var(--ch-white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--ch-green-dark);
    border: 2px solid var(--ch-green-dark);
}

.btn-outline:hover {
    background: var(--ch-green-dark);
    color: var(--ch-white);
    transform: translateY(-2px);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.site-header {
    background: var(--ch-white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-branding img {
    height: 55px;
    width: auto;
}

.site-branding .site-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ch-green-dark);
    margin: 0;
    line-height: 1.2;
}

.site-branding .site-title a {
    color: inherit;
}

.site-branding .tagline {
    font-size: 0.75rem;
    color: var(--ch-green-mid);
    font-style: italic;
    margin: 0;
}

/* Main navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.main-navigation a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--ch-text);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--ch-green-dark);
    background: var(--ch-green-pale);
}

.main-navigation .donate-link a {
    background: var(--ch-red);
    color: var(--ch-white);
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
}

.main-navigation .donate-link a:hover {
    background: var(--ch-red-dark);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--ch-green-dark);
    margin: 5px 0;
    border-radius: 3px;
    transition: var(--transition);
}

@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--ch-white);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        padding: 1rem;
    }

    .main-navigation.toggled {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation a {
        padding: 0.8rem 1rem;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--ch-green-dark) 0%, var(--ch-green-mid) 100%);
    color: var(--ch-white);
    padding: 6rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23f4f1e6' d='M0,40 C360,80 720,0 1080,40 C1260,60 1380,50 1440,40 L1440,80 L0,80 Z'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: cover;
}

.hero h1 {
    color: var(--ch-white);
    font-size: 3.2rem;
    margin-bottom: 0.5em;
    position: relative;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 2rem;
    position: relative;
}

.hero .btn {
    position: relative;
    margin: 0 0.5rem;
}

/* Apple decoration */
.hero-apple {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
    padding: var(--section-padding);
}

.section-alt {
    background: var(--ch-white);
}

.section-green {
    background: linear-gradient(135deg, var(--ch-green-dark), var(--ch-green-mid));
    color: var(--ch-white);
}

.section-green h2,
.section-green h3 {
    color: var(--ch-white);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5em;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--ch-red);
    border-radius: 2px;
}

.section-header p {
    color: var(--ch-text-light);
    font-size: 1.1rem;
    max-width: 650px;
    margin: 1rem auto 0;
}

/* ========================================
   CARDS / GRID
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--ch-white);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: var(--transition);
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.card h3 {
    margin-bottom: 0.5em;
}

.card p {
    color: var(--ch-text-light);
    font-size: 0.95rem;
}

/* ========================================
   HOW IT WORKS — STEPS
   ======================================== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    counter-reset: step-counter;
}

.step {
    text-align: center;
    position: relative;
    padding: 2rem 1.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--ch-green-mid);
    color: var(--ch-white);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(74, 140, 63, 0.3);
}

.step-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ========================================
   DONATION THERMOMETER
   ======================================== */
.thermometer-wrap {
    max-width: 500px;
    margin: 2rem auto;
    text-align: center;
}

.thermometer {
    background: var(--ch-cream-dark);
    border-radius: 50px;
    height: 40px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
}

.thermometer-fill {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--ch-green-light), var(--ch-red));
    transition: width 1s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
    min-width: 60px;
}

.thermometer-fill span {
    color: var(--ch-white);
    font-weight: 700;
    font-size: 0.85rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.thermometer-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-weight: 600;
    color: var(--ch-text-light);
}

.thermometer-raised {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ch-green-dark);
    margin-bottom: 0.25rem;
}

.thermometer-goal {
    color: var(--ch-text-light);
    margin-bottom: 1.5rem;
}

/* ========================================
   FIND A TREE / FIND PICKERS
   ======================================== */
.dual-cta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.cta-card {
    background: var(--ch-white);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: 0 4px 25px rgba(0,0,0,0.08);
    transition: var(--transition);
    border-top: 5px solid transparent;
}

.cta-card:hover {
    transform: translateY(-5px);
}

.cta-card.picker-cta {
    border-top-color: var(--ch-red);
}

.cta-card.owner-cta {
    border-top-color: var(--ch-green-mid);
}

.cta-card .card-icon {
    font-size: 4rem;
}

/* ========================================
   TESTIMONIALS
   ======================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial {
    background: var(--ch-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    position: relative;
}

.testimonial::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--ch-green-pale);
    font-family: Georgia, serif;
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    line-height: 1;
}

.testimonial p {
    font-style: italic;
    padding-top: 1rem;
    color: var(--ch-text-light);
}

.testimonial-author {
    font-weight: 700;
    color: var(--ch-green-dark);
    font-style: normal;
    margin-top: 1rem;
    display: block;
}

/* ========================================
   STATS BAR
   ======================================== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    text-align: center;
    padding: 3rem 0;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--ch-white);
    margin-bottom: 0.25em;
}

.stat-item p {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
}

/* ========================================
   CONTACT FORM
   ======================================== */
.contact-form {
    max-width: 650px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--ch-green-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border: 2px solid var(--ch-cream-dark);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--ch-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--ch-green-mid);
    box-shadow: 0 0 0 4px rgba(74, 140, 63, 0.15);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ========================================
   GOOGLE FORM EMBED
   ======================================== */
.google-form-wrap {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--ch-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.google-form-wrap iframe {
    width: 100%;
    min-height: 600px;
    border: none;
    border-radius: 8px;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--ch-green-dark);
    color: rgba(255,255,255,0.85);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--ch-white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-col p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

.footer-col ul a:hover {
    color: var(--ch-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ========================================
   PAGE HEADERS
   ======================================== */
.page-header-banner {
    background: linear-gradient(135deg, var(--ch-green-dark), var(--ch-green-mid));
    color: var(--ch-white);
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
}

.page-header-banner::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23f4f1e6' d='M0,30 C360,60 720,0 1080,30 C1260,45 1380,38 1440,30 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: cover;
}

.page-header-banner h1 {
    color: var(--ch-white);
    font-size: 2.8rem;
    margin-bottom: 0.3em;
}

.page-header-banner p {
    opacity: 0.9;
    font-size: 1.15rem;
}

/* ========================================
   VOLUNTEER PAGE
   ======================================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.benefit-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--ch-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.benefit-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    :root {
        --section-padding: 3.5rem 0;
    }

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

    .hero {
        padding: 4rem 0 3.5rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    .hero .btn {
        display: block;
        margin: 0.5rem auto;
        max-width: 250px;
    }

    .card-grid,
    .dual-cta {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-header-banner {
        padding: 3rem 0 2rem;
    }

    .page-header-banner h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }

    .header-inner {
        padding: 0.75rem 1rem;
    }
}

/* ========================================
   WORDPRESS CORE CLASSES
   ======================================== */
.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--ch-text-light);
    text-align: center;
    padding-top: 0.5rem;
}

.sticky,
.gallery-caption,
.bypostauthor {}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* WordPress block editor support */
.entry-content > * {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

.wp-block-image img {
    border-radius: 12px;
}
