/* ========================================
   CSS Reset & Base Styles
   ======================================== */

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

/* ========================================
   Design System
   ======================================== */

:root {
    /* Colors */
    --color-background: #faf8f5;
    --color-text: #2a2a2a;

    /* Typography */
    --font-header: 'Averia Serif Libre', serif;
    --font-body: 'Lato', sans-serif;

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

/* ========================================
   Typography
   ======================================== */

body {
    font-family: var(--font-body);
    letter-spacing: 1px;
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    text-transform: lowercase;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-header);
    text-transform: none;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
}

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* ========================================
   Layout
   ======================================== */

main {
    width: 100%;
    min-height: 100vh;
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-background);
    border-bottom: 1px solid rgba(42, 42, 42, 0.1);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    padding: 8px;
    z-index: 2000;
    /* Ensure it's above the nav-links overlay (z-index 1000) */
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
    transition: opacity 0.3s ease;
    text-transform: lowercase;
    position: relative;
    padding-bottom: 4px;
    /* Space for the underline */
}

.nav-links a:hover {
    opacity: 1;
    /* Keep opacity fully visible on hover for the underline effect */
}

.nav-links a.active {
    font-weight: 700;
}

/* Shared Squiggly Underline Style */
.nav-links a::after,
.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    /* Start with 0 width for animation */
    height: 3px;
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 2 Q 2.5 0, 5 2 T 10 2 T 15 2 T 20 2 T 25 2 T 30 2 T 35 2 T 40 2 T 45 2 T 50 2 T 55 2 T 60 2 T 65 2 T 70 2 T 75 2 T 80 2 T 85 2 T 90 2 T 95 2 T 100 2' stroke='%23d97638' fill='none' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 20px 3px;
    transition: width 0.3s ease-in-out;
    /* The ease-in animation */
}

.nav-links a.active::after {
    width: 100%;
    /* Active link always has full underline */
}

.footer-links a.active::after {
    width: 100%;
}

/* Hover effect for Nav Links (Desktop) */
@media (min-width: 768px) {
    .nav-links a:hover::after {
        width: 100%;
    }
}

/* Social Icons */
.footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon {
    display: none;
}

.nav-icon::after,
.footer-icon::after {
    display: none !important;
    /* Remove squiggly underline for icons */
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .hamburger {
        display: flex;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    }

    .nav-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-background);
        flex-direction: column;
        justify-content: flex-start;
        /* Changed from center to allow scrolling */
        align-items: center;
        gap: 1.5rem;
        transition: right 0.3s ease;
        z-index: 1000;
        padding-top: 120px;
        /* Space for the header/close button */
        padding-bottom: 2rem;
        overflow-y: auto;
        /* Enable scrolling */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 2.25rem;
    }

    .nav-links a.active::after {
        bottom: -8px;
        height: 3px;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .logo img {
        height: 60px;
    }

    .footer-links a {
        font-size: 1.875rem;
    }

    .charity-card {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* Add padding to body to account for fixed navbar */
/* Add padding to body to account for fixed navbar */
body {
    padding-top: 93px;
}

/* ========================================
   Components
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing-md);
    background-image: url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
}

.hero h1 {
    color: white;
    text-transform: lowercase;
    margin-bottom: var(--spacing-md);
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
}

.hero-text {
    color: var(--color-background);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
    text-transform: uppercase;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 400;
    text-transform: lowercase;
    display: inline-block;
    line-height: 1;
}

.btn-shop {
    background-color: #8a5534;
    color: white;
}

.btn-shop:hover {
    background-color: #6d4229;
    transform: translateY(-2px);
}

.btn-about {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-about:hover {
    background-color: white;
    color: var(--color-text);
    transform: translateY(-2px);
}

/* Featured Products Section */
.featured-products {
    padding: var(--spacing-lg) var(--spacing-md);
    background-color: var(--color-background);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.product-item {
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

.product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-item img:hover {
    transform: scale(1.05);
}

/* Mission Statement Section */
.mission {
    padding: var(--spacing-lg) var(--spacing-md);
    background-color: #f3e9e2;
}

.mission-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.mission-item h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.mission-item p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    color: var(--color-text);
}

/* Donation Banner */
.donation-banner {
    padding: var(--spacing-lg) var(--spacing-md);
    background-color: #8a5534;
}

.banner-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.donation-banner p {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    line-height: 1.6;
    color: #faf8f5;
    font-weight: 400;
}

/* Footer */
.footer {
    background-color: var(--color-text);
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-background);
    text-decoration: none;
    font-size: 1.125rem;
    transition: opacity 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

.footer-links a:hover {
    opacity: 1;
}

@media (min-width: 768px) {
    .footer-links a:hover::after {
        width: 100%;
    }
}

.footer-info {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.footer-info p {
    color: var(--color-background);
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.8;
    margin-bottom: var(--spacing-sm);
}

.footer-info a {
    color: var(--color-background);
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.footer-info a:hover {
    opacity: 0.7;
}

.footer-copyright {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(250, 248, 245, 0.2);
}

.footer-copyright p {
    color: var(--color-background);
    font-size: 0.875rem;
    opacity: 0.8;
}

.footer-credits {
    margin-top: 0.75rem;
    font-size: 0.75rem;
}

.footer-credits a {
    color: var(--color-background);
    text-decoration: none;
    transition: opacity 0.3s ease;
    opacity: 0.7;
}

.footer-credits a:hover {
    text-decoration: underline;
    opacity: 1;
}

/* About Page */
.about-hero {
    padding: var(--spacing-xl) var(--spacing-md);
    background-color: #3d5e5e;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-intro {
    color: #faf8f5;
    order: 1;
}

.about-intro h2 {
    margin-bottom: var(--spacing-sm);
    color: #faf8f5;
}

.about-intro p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    color: #faf8f5;
}

.intro-text {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.about-image {
    order: 2;
}

.about-body {
    color: #faf8f5;
    order: 3;
}

.about-body p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    color: #faf8f5;
}

/* Page Tags */
.page-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: var(--spacing-sm);
}

.about-intro .page-tag {
    color: #faf8f5;
}

.charities-intro .page-tag {
    color: var(--color-text);
}

.about-body .closing {
    font-style: italic;
}

/* Mobile spacing adjustments for about page */
@media (max-width: 767px) {
    .about-container {
        gap: 1.5rem;
    }

    .about-intro p:last-child {
        margin-bottom: 0;
    }

    .about-hero {
        padding-bottom: 2rem;
    }

    .footer {
        padding-top: 2rem;
    }
}

/* Charities Page */
.charities-section {
    padding: var(--spacing-xl) var(--spacing-md);
    background-color: var(--color-background);
    min-height: 100vh;
}

.charities-container {
    max-width: 1200px;
    margin: 0 auto;
}

.charities-intro {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.charities-intro h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.charities-intro p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
    color: var(--color-text);
    max-width: 800px;
    margin: 0 auto;
}

.donation-total {
    display: inline-block;
    padding: 0.875rem 2rem;
    margin-top: var(--spacing-md);
    background: linear-gradient(135deg, #f08a4f 0%, #d97638 50%, #c85f20 100%);
    color: white;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(217, 118, 56, 0.3);
    letter-spacing: 0.5px;
}

.charity-card {
    background-color: white;
    border-radius: 8px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.charity-logo {
    margin-bottom: var(--spacing-md);
}

.charity-logo img {
    max-width: 300px;
    width: 100%;
    height: auto;
}

.charity-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}



/* Responsive Design */

.charity-content p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

.charity-link {
    display: inline-block;
    color: #d97638;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 400;
    transition: opacity 0.3s ease;
}

.charity-link:hover {
    opacity: 0.7;
}


/* ========================================
   Responsive Design
   ======================================== */

/* Mobile First - Base styles above are mobile */

/* Tablet */
@media (min-width: 768px) {
    .hero {
        padding: var(--spacing-lg);
    }

    .logo img {
        height: 60px;
    }

    .nav-links {
        gap: var(--spacing-lg);
    }

    .nav-links a {
        font-size: 1.125rem;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .mission-container {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

    .mission {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    /* About Page Desktop Layout */
    .about-container {
        display: grid;
        grid-template-columns: 45% 1fr;
        grid-template-areas:
            "image intro"
            "image body";
        column-gap: var(--spacing-xl);
        row-gap: var(--spacing-sm);
    }

    .about-intro {
        grid-area: intro;
        order: unset;
    }

    .about-image {
        grid-area: image;
        order: unset;
    }

    .about-body {
        grid-area: body;
        order: unset;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .hero {
        padding: var(--spacing-xl);
    }

    .logo img {
        height: 80px;
    }

    .nav-container {
        padding: 0 var(--spacing-lg);
    }

    body {
        padding-top: 113px;
    }
}