/* Design System */
:root {
    /* Premium Palette */
    --color-primary: #D97757;
    /* Terracotta Accent */
    --color-secondary: #2C363F;
    /* Deep Charcoal/Navy */
    --color-accent: #E8DAB2;
    /* Soft Gold */
    --color-bg: #EED5C1;
    /* Matches new logo background */
    --color-bg-alt: #FAFAF7;
    /* Original cream for content contrast */
    --color-bg-card: #FFFFFF;
    --color-text: #333333;
    /* Contrast Gray */
    --color-text-muted: #666666;
    --color-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-full: 50px;

    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(217, 119, 87, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(217, 119, 87, 0.4);
    background-color: #c46648;
}

/* Header */
header {
    padding: var(--spacing-sm) 0;
    position: fixed;
    width: 100%;
    z-index: 100;
    transition: var(--transition);
    background: transparent;
}

header.scrolled {
    background: #EED5C1;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--spacing-xs) 0;
    box-shadow: var(--shadow-sm);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    max-height: 180px;
    width: auto;
    transition: var(--transition);
    display: block;
}

header.scrolled .logo-img {
    max-height: 80px;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-secondary);
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-btn {
    background-color: var(--color-primary);
    color: var(--color-white) !important;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding: var(--spacing-xl) 0;
    color: var(--color-white);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(44, 54, 63, 0.7), rgba(44, 54, 63, 0.3));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    color: var(--color-white);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--color-bg);
    opacity: 0.95;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about {
    padding: var(--spacing-xl) 0;
    background: var(--color-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.card {
    background: var(--color-bg);
    padding: var(--spacing-md);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

/* Footer */
footer {
    background-color: #FAFAFA;
    padding: var(--spacing-lg) 0;
    text-align: center;
    margin-top: auto;
}

/* Gallery Styles */
.hero-small {
    padding: 180px 0 var(--spacing-lg);
    text-align: center;
    background-color: var(--color-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-md);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(transparent, rgba(44, 54, 63, 0.9));
    color: var(--color-white);
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Video Items */
.gallery-video {
    position: relative;
    cursor: pointer;
}

.gallery-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(217, 119, 87, 0.82);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: var(--transition);
    pointer-events: none;
}

.play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid white;
    margin-left: 5px;
}

.gallery-item:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--color-primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .logo-img {
        max-height: 60px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Mobile Navigation */
    .hamburger-menu {
        display: block;
        cursor: pointer;
        z-index: 20;
    }

    .bar {
        width: 25px;
        height: 3px;
        background-color: var(--color-heading);
        margin: 5px 0;
        transition: 0.4s;
    }

    /* Rotate into X */
    .hamburger-menu.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.3s;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 15;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: var(--spacing-sm) 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        color: var(--color-heading);
    }

    /* Mobile Gallery Adjustments */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .hero-small {
        padding-top: 130px;
    }
}

/* Mission List */
.mission-list {
    list-style: none;
    margin-top: var(--spacing-sm);
}

.mission-list li {
    margin-bottom: var(--spacing-xs);
    font-size: 1.1rem;
}

/* Feature Image */
.feature-img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Impact Section */
.impact-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
    padding-top: var(--spacing-md);
}

.card {
    background: var(--color-bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.card h3 {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-xs);
    color: var(--color-secondary);
    font-size: 1.5rem;
}

.card p {
    padding: 0 var(--spacing-md) var(--spacing-md);
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.card-featured {
    border: 2px solid var(--color-primary);
    background-color: #FFF9F7;
}

.urgent-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Donate Section */
.donate-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-secondary);
    color: var(--color-white);
    text-align: center;
}

.donate-section h2 {
    color: var(--color-white);
    font-size: 3rem;
}

.donate-section p {
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
    font-size: 1.25rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.donation-options {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    padding: 0.8rem 2rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #fff;
    color: var(--color-primary);
}

.btn-large {
    background-color: #fff;
    color: var(--color-primary);
    padding: 0.8rem 3rem;
    font-size: 1.1rem;
}

.btn-large:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Footer */
footer {
    background-color: var(--color-bg);
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

footer p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--color-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    /* Clean, sharper corners like reference */
    width: 90%;
    max-width: 600px;
    /* Narrower, focused modal */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideUp 0.4s;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.modal-header-centered {
    padding: var(--spacing-lg) var(--spacing-lg) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.modal-logo-large {
    height: 120px;
    /* Larger logo */
    width: auto;
}

.modal-mission-text h3 {
    color: var(--color-heading);
    margin-bottom: var(--spacing-xs);
    font-size: 1.4rem;
}

.modal-mission-text p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 90%;
    margin: 0 auto;
}

.close-btn {
    color: #888;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.close-btn:hover {
    color: #333;
}

/* Form Styles */
.modal-form-full {
    width: 100%;
}

/* Donation Type Toggle */
.donation-type-toggle {
    display: flex;
    margin-bottom: var(--spacing-md);
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.type-btn {
    flex: 1;
    padding: 12px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    color: #333;
    transition: all 0.2s;
}

.type-btn.active {
    background-color: #D32F2F;
    /* Red accent from reference */
    color: #fff;
}

/* Amount Grid */
.donation-amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: var(--spacing-sm);
}

.mission-collage-container {
    margin-top: var(--spacing-md);
    width: 100%;
}

.mission-collage {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: block;
}

.amount-btn {
    padding: 12px;
    border: 1px solid #ddd;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    color: #333;
    transition: all 0.2s;
}

.amount-btn:hover {
    border-color: #aaa;
}

.amount-btn.active {
    background-color: #D32F2F;
    color: #fff;
    border-color: #D32F2F;
}

/* Custom Input */
.custom-amount-input {
    grid-column: span 2;
    /* Take up 2 remaining slots if grid is 3 */
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 10px;
    position: relative;
    /* In the reference, custom input is its own box. 
       Let's make sure it fits the grid logic or sits cleanly.
       For a 3-column grid, 6 buttons fit nicely. 
       The 7th item (custom) should probably be separate or integrated.
       Let's adjust grid to allow custom input.
    */
}

.custom-amount-input {
    grid-column: span 2;
    /* Spans last 2 slots of 2nd row */
    height: 100%;
    background: #fff;
}

.custom-amount-input input {
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    font-size: 1rem;
    padding-left: 5px;
}

.currency-symbol {
    color: #555;
    font-weight: bold;
}

/* Fee Cover */
.fee-cover {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--spacing-lg);
    font-size: 0.85rem;
    color: #666;
}

.fee-cover input {
    accent-color: #D32F2F;
}

/* Payment Buttons */
.payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-btn {
    width: 100%;
    padding: 12px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
    transition: all 0.2s;
}

.pay-btn:hover {
    background: #f5f5f5;
}

.paypal-btn {
    color: #003087;
    /* PayPal Blue */
    font-weight: 700;
    font-style: italic;
    /* Mimic Logo style slightly */
}

.card-btn {
    background: #fff;
    color: #333;
}

.bank-btn {
    background: #f9f9f9;
}

@media (max-width: 500px) {
    .donation-amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-logo-large {
        height: 80px;
    }
}

.tiktok-highlight {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--radius);
    margin-top: var(--spacing-md);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--color-primary);
}

.tiktok-icon {
    width: 32px;
    height: 32px;
    fill: var(--color-white);
    flex-shrink: 0;
}

.tiktok-text h4 {
    color: var(--color-white);
    margin-bottom: 5px;
}

.tiktok-text p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.5;
}

.tiktok-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    fill: #fff;
    margin-top: 3px;
    filter: drop-shadow(2px 2px 0px rgba(254, 44, 85, 0.8)) drop-shadow(-2px -2px 0px rgba(37, 244, 238, 0.8));
}

.tiktok-text h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: #fff;
}

.tiktok-text p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
    color: #eee;
}

@media (max-width: 768px) {
    .tiktok-highlight {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tiktok-text h4 {
        text-align: center;
    }

    .tiktok-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }
}