/* Stardew Valley Showcase - Premium Cozy CSS stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Sarabun:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

/* Design Tokens & Theme Variables */
:root {
    --primary-color: #4A7A4E;       /* Forest Green */
    --primary-light: #6E9E71;      /* Light Leaf Green */
    --primary-dark: #325A36;       /* Deep Pine Green */
    --secondary-color: #A06235;     /* Warm Wooden Brown */
    --secondary-dark: #784824;      /* Deep Mahogany Wood */
    --accent-color: #E29B35;        /* Golden Honey/Autumn Sun */
    --accent-light: #FDE8A5;        /* Summer Sunflower */
    --bg-cream: #FCFAF5;            /* Soft Cream White */
    --bg-soft-brown: #F4ECE1;       /* Warm Cozy Sand */
    --text-dark: #352219;           /* Charcoal Cocoa */
    --text-medium: #5D4336;         /* Ground Coffee */
    --text-light: #FFFFFF;          /* Snow White */
    --border-color: #E8DDCD;        /* Soft Dirt/Clay Border */
    
    --card-shadow: 0 10px 30px rgba(74, 122, 78, 0.08);
    --hover-shadow: 0 20px 40px rgba(160, 98, 53, 0.15);
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --glass-bg: rgba(252, 250, 245, 0.75);
    --glass-border: rgba(232, 221, 205, 0.5);
    
    --font-heading: 'Outfit', 'Sarabun', sans-serif;
    --font-body: 'Sarabun', 'Outfit', sans-serif;
}

/* Base Styles & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

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

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

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
    position: relative;
    z-index: 2;
}

/* Falling Leaves Animation background */
.falling-leaves-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.leaf {
    position: absolute;
    display: block;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    opacity: 0.65;
    border-radius: 50% 0 50% 0;
    animation: fall 10s linear infinite;
}

@keyframes fall {
    0% {
        top: -5%;
        transform: translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        top: 105%;
        transform: translateX(120px) rotate(360deg);
        opacity: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 5px;
    border: 2px solid var(--bg-cream);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(74, 122, 78, 0.3);
    border: 2px solid transparent;
    display: inline-block;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 122, 78, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--secondary-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid var(--secondary-color);
    display: inline-block;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(160, 98, 53, 0.2);
}

/* Header & Navigation */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
    background: transparent;
}

#main-header.scrolled {
    padding: 1rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(53, 34, 25, 0.05);
    border-bottom: 1px solid var(--glass-border);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 0.1rem 0.6rem;
    border-radius: 4px;
}

#navbar ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

#navbar a {
    font-weight: 600;
    color: var(--text-medium);
    padding: 0.5rem 0;
    position: relative;
}

#navbar a:not(.nav-btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-smooth);
}

#navbar a:not(.nav-btn):hover {
    color: var(--primary-color);
}

#navbar a:not(.nav-btn):hover::after {
    width: 100%;
}

.nav-btn {
    background: var(--primary-color);
    color: var(--text-light) !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(74, 122, 78, 0.2);
}

.nav-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
    background: linear-gradient(180deg, var(--bg-soft-brown) 0%, var(--bg-cream) 100%);
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge-new {
    display: inline-flex;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    gap: 0.8rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    box-shadow: var(--card-shadow);
}

.badge-new span:first-child {
    color: var(--accent-color);
    font-weight: 700;
}

.badge-new span:last-child {
    color: var(--text-medium);
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-title span {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--accent-light);
    z-index: -1;
    border-radius: 4px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-bottom: 2.5rem;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.hero-media {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(160, 98, 53, 0.15);
    border: 6px solid var(--bg-cream);
    transform: rotate(2deg);
    transition: var(--transition-smooth);
}

.hero-image-wrapper:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-image-wrapper img {
    width: 100%;
    object-fit: cover;
    height: 400px;
}

.hero-badge-float {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: var(--hover-shadow);
    z-index: 10;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.hero-badge-float.b1 {
    top: 15%;
    left: -15px;
    animation: float 4s ease-in-out infinite;
}

.hero-badge-float.b2 {
    bottom: 15%;
    right: -15px;
    animation: float 4s ease-in-out infinite 2s;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* About & Intro Section */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.section-subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

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

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.intro-media {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 6px solid var(--text-light);
    transform: rotate(-1.5deg);
    transition: var(--transition-smooth);
}

.intro-media:hover {
    transform: rotate(0deg) scale(1.02);
}

.intro-media img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

.intro-text-content p {
    margin-bottom: 1.5rem;
    color: var(--text-medium);
}

.feature-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-soft-brown);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.highlight-item:hover {
    background: var(--accent-light);
    transform: translateX(5px);
}

.highlight-icon {
    font-size: 1.5rem;
}

.highlight-title {
    font-weight: 700;
    color: var(--text-dark);
}

/* Features Grid */
.features-section {
    background: var(--bg-soft-brown);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-cream);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: var(--hover-shadow);
}

.feature-emoji {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.feature-card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-card-desc {
    font-size: 0.95rem;
    color: var(--text-medium);
}

/* Gallery Section */
.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.gallery-tab-btn {
    background: var(--bg-cream);
    color: var(--text-medium);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.gallery-tab-btn:hover, .gallery-tab-btn.active {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(74, 122, 78, 0.2);
}

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

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    border: 4px solid var(--text-light);
    transition: var(--transition-smooth);
}

.gallery-item.hide {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(53, 34, 25, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.gallery-overlay span {
    color: var(--text-light);
    font-weight: 700;
    border: 2px solid var(--text-light);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    transform: translateY(10px);
    transition: var(--transition-smooth);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(53, 34, 25, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    color: var(--text-light);
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 2010;
}

.lightbox-close:hover {
    color: var(--accent-color);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 1rem;
    transition: var(--transition-smooth);
    user-select: none;
    z-index: 2010;
}

.lightbox-arrow:hover {
    color: var(--accent-color);
}

.lightbox-arrow.prev { left: 2rem; }
.lightbox-arrow.next { right: 2rem; }

.lightbox-content {
    max-width: 85%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    border: 4px solid var(--text-light);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.iframe-container {
    width: 80vw;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    border: 4px solid var(--text-light);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
}

/* Interactive Quiz Section */
.interactive-section {
    background: linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-soft-brown) 100%);
}

.quiz-container {
    background: var(--bg-cream);
    border-radius: 24px;
    padding: 3.5rem 3rem;
    box-shadow: var(--card-shadow);
    border: 2px solid var(--border-color);
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
    transition: var(--transition-smooth);
}

.quiz-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.quiz-intro {
    color: var(--text-medium);
    margin-bottom: 2.5rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.quiz-option-btn {
    background: var(--bg-soft-brown);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: left;
}

.quiz-option-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent-color);
    transform: scale(1.02);
}

.quiz-option-btn .emoji {
    font-size: 1.8rem;
    background: var(--bg-cream);
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.quiz-result {
    display: none;
    animation: fadeIn 0.5s ease;
}

.quiz-result-emoji {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.quiz-result-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.quiz-result-desc {
    color: var(--text-medium);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.btn-restart {
    background: var(--secondary-color);
    color: var(--text-light);
    border: none;
    padding: 0.8rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(160, 98, 53, 0.3);
    transition: var(--transition-smooth);
}

.btn-restart:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

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

/* Call to Action Section */
.cta-section {
    background: linear-gradient(rgba(74, 122, 78, 0.9), rgba(50, 90, 54, 0.95)), url('assets/images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-light);
    text-align: center;
    padding: 7rem 0;
}

.cta-title {
    color: var(--text-light);
    font-size: 2.6rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-desc {
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto 3.5rem auto;
    opacity: 0.9;
}

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

.cta-buttons a {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
}

.cta-buttons .btn-primary {
    background: var(--accent-color);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(226, 155, 53, 0.4);
}

.cta-buttons .btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 6px 20px rgba(226, 155, 53, 0.6);
}

.cta-buttons .btn-secondary {
    border-color: var(--text-light);
    color: var(--text-light);
}

.cta-buttons .btn-secondary:hover {
    background: var(--text-light);
    color: var(--text-dark);
}

/* Footer Section */
#main-footer {
    background: #2D1A10; /* Dark cacao */
    color: #DECAB5;
    padding: 5rem 0 2rem 0;
    border-top: 4px solid var(--accent-color);
}

#main-footer h4 {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

#main-footer a {
    color: #DECAB5;
}

#main-footer a:hover {
    color: var(--accent-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-about .logo {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.footer-about p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-col a {
    font-size: 0.95rem;
}

.footer-bottom {
    border-top: 1px solid rgba(222, 202, 181, 0.15);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-bottom p {
    font-size: 0.85rem;
}

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

.social-icon {
    width: 38px;
    height: 38px;
    background: rgba(222, 202, 181, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.social-icon:hover {
    background: var(--accent-color);
    color: var(--text-dark) !important;
    transform: translateY(-3px);
}

/* Responsive Styling */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-media {
        order: -1;
    }
    
    .hero-image-wrapper img {
        height: 300px;
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .intro-media {
        order: -1;
    }
    
    .intro-media img {
        height: 300px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
    
    #navbar ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-cream);
        flex-direction: column;
        justify-content: center;
        gap: 2.5rem;
        box-shadow: -10px 0 30px rgba(53, 34, 25, 0.15);
        border-left: 2px solid var(--border-color);
        transition: var(--transition-smooth);
        z-index: 999;
    }
    
    #navbar ul.active {
        right: 0;
    }
    
    .hero-title {
        font-size: 2.6rem;
    }
    
    .quiz-container {
        padding: 2.5rem 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .hero-actions a {
        width: 100%;
        text-align: center;
    }
    
    .feature-highlights {
        grid-template-columns: 1fr;
    }
    
    .gallery-tab-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
}
