/* ============================================
   Sunshine Through Johnny Foundation - Styles
   ============================================ */

/* --- CSS VARIABLES & RESET --- */
:root {
    --primary-green: #2E5939;
    --primary-green-light: #4a7c59;
    --accent-gold: #F4D03F;
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-muted: #777;
    --bg-cream: #f9f9f5;
    --bg-white: #ffffff;
    --border-light: #eee;
    --border-medium: #ddd;
    --border-light-on-dark: rgba(255, 255, 255, 0.1);
    --control-inactive: #bbb;
    --overlay-green: rgba(46, 89, 57, 0.9);
    --overlay-light: rgba(255, 255, 255, 0.8);
    --shadow-header: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-small: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 4px 15px rgba(0, 0, 0, 0.1);
    --font-family-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-family-heading: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-size-xs: 0.8rem;
    --font-size-sm: 0.9rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.1rem;
    --font-size-xl: 1.2rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --line-height-body: 1.6;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.25rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;
    --space-4xl: 4rem;
    --container-text: 600px;
    --container-narrow: 800px;
    --container-default: 900px;
    --container-wide: 1100px;
    --radius-xs: 3px;
    --radius-sm: 4px;
    --radius-md: 5px;
    --radius-lg: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* <picture> wrapper generates no box. */
picture {
    display: contents;
}/* --- ACCESSIBILITY UTILITIES --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -9999px;
    left: -9999px;
    z-index: 1000;
    background-color: var(--accent-gold);
    color: var(--primary-green);
    font-weight: bold;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: var(--space-sm);
    left: 50%;
    transform: translateX(-50%);
}

body {
    font-family: var(--font-family-body);
    line-height: var(--line-height-body);
    color: var(--text-dark);
    background-color: var(--bg-cream);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
    color: var(--primary-green);
    margin-bottom: var(--space-md);
}

p {
    margin-bottom: var(--space-xl);
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    background-color: var(--accent-gold);
    color: var(--primary-green);
    padding: var(--space-sm) var(--space-xl);
    text-decoration: none;
    font-weight: bold;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    transition: background 0.3s ease;
    border: 2px solid var(--primary-green);
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-green);
    color: var(--accent-gold);
}

/* --- HEADER & NAV --- */
.site-header {
    background-color: var(--primary-green);
    color: var(--text-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-header);
}

.nav-container {
    max-width: var(--container-wide);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-lg);
    position: relative;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 101;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-image {
    transform: scale(1.05);
}

.logo-text {
    font-size: var(--font-size-2xl);
    font-weight: bold;
    color: var(--accent-gold);
    white-space: nowrap;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 10px;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu a:hover {
    color: var(--accent-gold);
}

/* --- HERO SECTION --- */
.hero {
    background-color: var(--primary-green);
    color: var(--text-light);
    text-align: center;
    padding: var(--space-4xl) var(--space-lg);
    background-image: linear-gradient(var(--overlay-green), var(--overlay-green));
}

.hero h1 {
    color: var(--accent-gold);
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-xs);
}

.hero p {
    font-size: var(--font-size-xl);
    max-width: var(--container-text);
    margin: 0 auto var(--space-2xl) auto;
}

/* --- SLIDESHOW SECTION --- */
.slideshow-container {
    max-width: var(--container-narrow);
    position: relative;
    margin: 40px auto;
    background: var(--bg-white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--border-medium);
}

.slide-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 50%, var(--accent-gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: var(--font-size-xl);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.slide-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.mySlides {
    display: none;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    border: none;
    background: none;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    color: var(--primary-green);
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    user-select: none;
    background-color: var(--overlay-light);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
    border-radius: var(--radius-xs) 0 0 var(--radius-xs);
}

.prev:hover, .next:hover {
    background-color: var(--accent-gold);
    color: var(--primary-green);
}

.dot-container {
    text-align: center;
    margin-top: 15px;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    padding: 0;
    border: none;
    background: none;
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--control-inactive);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: var(--primary-green);
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from { opacity: .4 }
    to { opacity: 1 }
}

/* --- SECTIONS GENERAL --- */
section {
    padding: var(--space-4xl) var(--space-lg);
    max-width: var(--container-default);
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-2xl);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-gold);
    margin: 10px auto 0;
}

/* --- ABOUT SECTION --- */
.story-box {
    background: var(--bg-white);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    border-left: 5px solid var(--accent-gold);
}

.story-divider {
    border: 0;
    border-top: 1px solid var(--border-light);
    margin: var(--space-lg) 0;
}

.mission-list {
    margin-left: var(--space-lg);
    margin-bottom: var(--space-lg);
}

/* --- TESTIMONIALS SECTION --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-2xl);
}

.testimonial-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    padding: var(--space-2xl);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.testimonial-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-gold);
}

.testimonial-quote {
    font-style: italic;
    font-size: var(--font-size-md);
    margin: 0;
}

.testimonial-attribution {
    margin: 0;
}

.testimonial-attribution cite {
    font-style: normal;
    font-weight: bold;
    color: var(--primary-green);
}

.testimonial-relationship {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* --- SPONSORS SECTION --- */
.sponsor-tier {
    margin-bottom: var(--space-3xl);
}

.sponsor-tier__title {
    text-align: center;
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-xl);
}

.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-lg);
    align-items: center;
}

.sponsor-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    text-align: center;
}

.sponsor-link {
    text-decoration: none;
}

.sponsor-logo {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

.sponsor-name {
    font-weight: bold;
    color: var(--primary-green);
    font-size: var(--font-size-lg);
}

/* --- GALLERY GRID --- */
.gallery-section {
    max-width: var(--container-wide);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-lg);
}

.gallery-item {
    margin: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-align: center;
}

/* --- SHOP SECTION --- */
.shop-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xl);
    align-items: center;
    background: var(--bg-white);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
}

.shop-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.shop-image__product {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

.shop-details {
    flex: 1;
    min-width: 300px;
}

.price-tag {
    font-size: var(--font-size-3xl);
    color: var(--primary-green);
    font-weight: bold;
    margin: var(--space-md) 0;
}

.qr-section {
    text-align: center;
    margin-top: var(--space-2xl);
}

.qr-text {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-md);
}

.qr-code {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* --- SHOP PRODUCT CARDS (Phase 11: shirt + hat) --- */
.shop-products {
    display: grid;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.product-card {
    margin-bottom: 0;
}

.shop-footer {
    background: var(--bg-white);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    text-align: center;
}

.tax-note {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    max-width: var(--container-text);
    margin: 0 auto;
}

.shop-donate {
    margin-top: var(--space-xl);
}

/* --- SPONSOR CTA (Phase 11) --- */
.sponsor-cta {
    text-align: center;
    margin-top: var(--space-xl);
}

/* --- FULL STORY (Phase 11) --- */
.story-subtitle {
    text-align: center;
    font-size: var(--font-size-xl);
    font-weight: bold;
    margin-bottom: var(--space-lg);
}

/* --- UPDATES LISTING --- */
.updates-section {
    max-width: var(--container-narrow);
}

.update-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.update-title {
    margin-bottom: var(--space-xs);
}

.update-title a {
    color: var(--primary-green);
    text-decoration: none;
}

.update-title a:hover {
    text-decoration: underline;
}

.update-date {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.update-excerpt {
    margin-bottom: 0;
}

/* --- POST PAGES --- */
.post {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.post-header {
    margin-bottom: var(--space-lg);
    background: none;
    position: static;
    box-shadow: none;
    padding: 0;
    color: inherit;
}

.post-title {
    font-size: var(--font-size-3xl);
}

.post-date {
    color: var(--text-muted);
    margin-bottom: 0;
}

.post-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
}

.post-content {
    max-width: var(--container-text);
}

/* --- CONTACT & FOOTER --- */
footer {
    background-color: var(--primary-green);
    color: var(--text-light);
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    margin-top: var(--space-2xl);
}

.contact-info p {
    margin-bottom: var(--space-xs);
}

.email-link {
    color: var(--accent-gold);
}

.tax-id {
    font-size: var(--font-size-sm);
    opacity: 0.8;
    margin-top: var(--space-md);
}

/* --- DECORATIVE DIVIDERS --- */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-2xl) 0;
    max-width: var(--container-text);
    margin: 0 auto;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
}

.divider-icon {
    font-size: var(--font-size-2xl);
    color: var(--accent-gold);
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* --- QUOTE BANNERS --- */
.quote-banner {
    background-color: var(--primary-green);
    color: var(--text-light);
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    margin: var(--space-2xl) 0;
}

.quote-banner-alt {
    background-color: var(--bg-cream);
    color: var(--primary-green);
    border-top: 3px solid var(--accent-gold);
    border-bottom: 3px solid var(--accent-gold);
}

.quote-text {
    font-size: var(--font-size-4xl);
    font-weight: bold;
    font-style: italic;
    margin-bottom: var(--space-xs);
    color: var(--accent-gold);
}

.quote-banner-alt .quote-text {
    color: var(--primary-green);
}

.quote-attribution {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin: 0;
}

/* --- RESPONSIVE --- */

/* Large phones and small tablets (768px and below) */
@media (max-width: 768px) {
    /* Hamburger menu visible */
    .hamburger-menu {
        display: flex;
    }

    .nav-container {
        flex-wrap: wrap;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-green);
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        transition: max-height 0.3s ease, visibility 0.3s;
        box-shadow: var(--shadow-small);
    }

    .nav-menu.active {
        max-height: 400px;
        visibility: visible;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin: 0;
    }

    .nav-menu a {
        padding: 15px 20px;
        border-top: 1px solid var(--border-light-on-dark);
        width: 100%;
        text-align: center;
    }

    .logo-text {
        font-size: var(--font-size-xl);
        white-space: normal;
    }

    /* Responsive Typography */
    .hero h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .hero p {
        font-size: var(--font-size-md);
    }

    .section-title {
        font-size: 1.75rem;
    }

    .quote-text {
        font-size: var(--font-size-3xl);
    }

    /* Spacing optimization */
    section {
        padding: 3rem 15px;
    }

    .hero {
        padding: 3rem 15px;
    }

    .quote-banner {
        padding: 2rem 15px;
    }

    footer {
        padding: 2rem 15px;
    }

    /* Slideshow optimization */
    .slideshow-container {
        width: 95%;
        padding: 15px;
    }

    .slide-placeholder {
        height: 280px;
    }

    .prev, .next {
        padding: 12px;
        font-size: 22px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dot {
        height: 18px;
        width: 18px;
        margin: 0 4px;
    }

    /* Shop section */
    .shop-container {
        flex-direction: column;
        padding: var(--space-xl);
    }

    .shop-image,
    .shop-details {
        min-width: 100%;
    }

    .price-tag {
        font-size: 1.75rem;
    }

    .story-box {
        padding: var(--space-xl);
    }
}

/* Tablets (600px and below) */
@media (max-width: 600px) {
    .hero h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    .quote-text {
        font-size: 1.75rem;
    }

    section {
        padding: 2.5rem 15px;
    }

    .hero {
        padding: 2.5rem 15px;
    }

    .quote-banner {
        padding: 1.75rem 15px;
    }

    .slide-placeholder {
        height: 250px;
    }

    .logo-image {
        height: 50px;
    }

    .logo-text {
        font-size: var(--font-size-lg);
    }
}

/* Large phones (480px and below) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: clamp(1.25rem, 7vw, 1.75rem);
    }

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

    .section-title {
        font-size: 1.4rem;
    }

    .quote-text {
        font-size: var(--font-size-2xl);
    }

    .quote-attribution {
        font-size: var(--font-size-md);
    }

    section {
        padding: 2rem 12px;
    }

    .hero {
        padding: 2rem 12px;
    }

    .quote-banner {
        padding: 1.5rem 12px;
    }

    footer {
        padding: 1.75rem 12px;
    }

    .slide-placeholder {
        height: 220px;
    }

    .slideshow-container {
        padding: 10px;
    }

    .prev, .next {
        padding: 10px;
        font-size: 20px;
    }

    .shop-container {
        padding: var(--space-md);
    }

    .story-box {
        padding: var(--space-lg);
    }

    .btn {
        padding: 10px 20px;
        font-size: var(--font-size-sm);
    }

    .qr-code {
        width: 120px;
        height: 120px;
    }

    .logo-image {
        height: 45px;
    }

    .logo-text {
        font-size: var(--font-size-md);
    }
}

/* Small phones (360px and below) */
@media (max-width: 360px) {
    .hero h1 {
        font-size: clamp(1.15rem, 8vw, 1.5rem);
    }

    .hero p {
        font-size: var(--font-size-sm);
    }

    .section-title {
        font-size: 1.3rem;
    }

    .quote-text {
        font-size: 1.35rem;
    }

    section {
        padding: 1.75rem 10px;
    }

    .hero {
        padding: 1.75rem 10px;
    }

    .quote-banner {
        padding: 1.25rem 10px;
    }

    footer {
        padding: 1.5rem 10px;
    }

    .slide-placeholder {
        height: 200px;
    }

    .slideshow-container {
        padding: 8px;
    }

    .prev, .next {
        padding: 8px;
        font-size: 18px;
    }

    .dot {
        height: 16px;
        width: 16px;
        margin: 0 3px;
    }

    .shop-container {
        padding: var(--space-sm);
    }

    .story-box {
        padding: var(--space-md);
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .price-tag {
        font-size: var(--font-size-2xl);
    }

    .qr-code {
        width: 100px;
        height: 100px;
    }

    .qr-text {
        font-size: var(--font-size-xs);
    }

    .logo-image {
        height: 40px;
    }

    .logo-text {
        font-size: var(--font-size-sm);
    }

    .nav-container {
        padding: 0 15px;
    }

    .tax-id {
        font-size: var(--font-size-xs);
    }
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
    .fade,
    .divider-icon {
        animation: none;
    }

    .logo-image,
    .btn,
    .prev,
    .next,
    .dot,
    .nav-menu,
    .hamburger-line {
        transition: none;
    }
}
