/* ========================================
   Soup for Hope - Main Stylesheet
   Brand Colors from Logo:
   - Teal/Deep Cyan: #2B6F7E (primary)
   - Coral/Salmon: #D96459 (accent)
   - Cream: #F5F1E8 (background)
======================================== */

/* === ROOT VARIABLES === */
:root {
    --primary-color: #2B6F7E;
    --secondary-color: #D96459;
    --accent-light: #5BA3B3;
    --accent-coral: #E88074;
    --cream: #F5F1E8;
    --white: #FFFFFF;
    --dark: #1A1A1A;
    --gray: #6B7280;
    --light-gray: #E5E7EB;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    --transition: all 0.3s ease;
}

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

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--cream);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
}

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

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-light));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-coral));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-text {
    background: none;
    padding: 0;
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-text:hover {
    color: var(--accent-light);
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.logo img {
    height: 90px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--dark);
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 1rem 0;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0.5rem 1.5rem;
}

.dropdown-menu a {
    color: var(--dark);
    display: block;
}

.dropdown-menu a:hover {
    color: var(--primary-color);
}

.nav-btn {
    margin-left: 1rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    transition: var(--transition);
}

/* === HERO SECTION === */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/hero_scene.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
    margin-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--white);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* === MISSION SECTION === */
.mission-section {
    padding: 5rem 0;
    background: var(--white);
}

.mission-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-coral));
    border-radius: 2px;
}

.mission-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* === STATS SECTION === */
.stats-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-light));
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* === PROGRAMS SECTION === */
.programs-section {
    padding: 5rem 0;
    background: var(--cream);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 700px;
    margin: 1rem auto 3rem;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.program-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.program-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, transparent, rgba(0,0,0,0.2));
}

.program-icon {
    position: relative;
    z-index: 10;
    font-size: 4rem;
    color: var(--white);
}

.program-content {
    padding: 2rem;
}

.program-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.program-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* === STORIES SECTION === */
.stories-section {
    padding: 5rem 0;
    background: var(--white);
}

.stories-slider {
    max-width: 800px;
    margin: 3rem auto;
    position: relative;
    min-height: 300px;
}

.story-card {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-coral));
    color: var(--white);
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.story-card.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.quote-icon {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.story-text {
    font-size: 1.25rem;
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 2rem;
}

.story-author {
    font-weight: 600;
    font-size: 1rem;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--accent-light);
    transform: scale(1.1);
}

/* === EVENTS PREVIEW === */
.events-preview-section {
    padding: 5rem 0;
    background: var(--cream);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.event-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.event-card.category-fundraiser {
    border-left-color: #D96459;
}

.event-card.category-community {
    border-left-color: #2B6F7E;
}

.event-card.category-awareness {
    border-left-color: #E88074;
}

.event-card.category-workshop {
    border-left-color: #5BA3B3;
}

.event-header {
    padding: 1.5rem;
    background: var(--light-gray);
}

.event-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.event-title {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 0;
}

.event-body {
    padding: 1.5rem;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.event-description {
    color: var(--gray);
    margin-bottom: 1rem;
}

.event-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    font-size: 1.125rem;
}

/* === NEWSLETTER SECTION === */
.newsletter-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-light));
    color: var(--white);
}

.newsletter-content {
    max-width: 800px;
    margin: 0 auto;
}

.newsletter-text {
    text-align: center;
    margin-bottom: 2rem;
}

.newsletter-text h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.newsletter-text p {
    font-size: 1.125rem;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.newsletter-form input {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: 3px solid var(--secondary-color);
}

.form-message {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 600;
}

.form-message.success {
    background: rgba(74, 222, 128, 0.2);
    border: 2px solid #4ade80;
}

.form-message.error {
    background: rgba(248, 113, 113, 0.2);
    border: 2px solid #f87171;
}

/* === CTA SECTION === */
.cta-section {
    padding: 5rem 0;
    background: var(--white);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2.5rem;
}

/* === FOOTER === */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

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

.footer-logo {
    max-width: 200px;
    margin-bottom: 1rem;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.footer-col h4 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-info i {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    color: var(--secondary-color);
}

/* === CHATBOT === */
.chatbot-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-coral));
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 2rem;
    width: 380px;
    max-width: calc(100vw - 4rem);
    height: 500px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-container.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-light));
    color: var(--white);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--cream);
}

.bot-message,
.user-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: var(--secondary-color);
}

.message-content {
    flex: 1;
}

.message-content p {
    background: var(--white);
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.5rem;
}

.user-message .message-content p {
    background: var(--secondary-color);
    color: var(--white);
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.quick-reply {
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.quick-reply:hover {
    background: var(--primary-color);
    color: var(--white);
}

.chatbot-input {
    padding: 1rem;
    border-top: 1px solid var(--light-gray);
    display: flex;
    gap: 0.75rem;
}

.chatbot-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 25px;
    font-family: var(--font-body);
    font-size: 0.938rem;
}

.chatbot-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chatbot-input button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.chatbot-input button:hover {
    background: var(--accent-light);
}

/* === RESPONSIVE === */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .hero {
        margin-top: 80px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .programs-grid,
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .chatbot-container {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 80px;
    }
    
    .chatbot-toggle {
        right: 1rem;
    }
}

@media (max-width: 640px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
