:root {
    --primary: hsl(142, 45%, 45%);
    --primary-light: hsl(142, 45%, 65%);
    --secondary: hsl(45, 95%, 60%);
    --accent: hsl(25, 90%, 55%);
    --bg: hsl(0, 0%, 98%);
    --bg-dark: hsl(160, 30%, 8%);
    --text: hsl(220, 20%, 15%);
    --text-light: hsl(0, 0%, 98%);
    --glass: rgba(255, 255, 255, 0.75);
    --glass-dark: rgba(0, 0, 0, 0.4);
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    line-height: 1.7;
    font-size: 16px;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.1;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Space between flag and text */
}

.lang-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    opacity: 1;
}

.lang-btn.active {
    background: var(--primary);
    color: white;
    opacity: 1;
    /* Ensure active state is fully visible */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.flag-icon {
    width: 24px;
    height: auto;
    border-radius: 2px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .language-selector {
        top: 1rem;
        right: 1rem;
        padding: 0.3rem;
    }

    .lang-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* Version Switcher Navigation */
.version-nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.5rem;
    border-radius: 50px;
    display: flex;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-version {
    padding: 0.6rem 1.6rem;
    border-radius: 25px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-version:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-version.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.4);
}

/* Shared Section Styles */
.section {
    min-height: 100vh;
    padding: 6rem 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 2rem;
}

.hero-tagline {
    font-size: 1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-weight: 600;
}

.hero h1 {
    font-size: clamp(3.5rem, 12vw, 8rem);
    margin-bottom: 1rem;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    background: linear-gradient(to right, #fff, #e0f2f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 2rem auto 3rem;
    line-height: 1.6;
}

.hero-theme {
    font-size: 3rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-top: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 2px 5px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* Organizer Logos */
.organizer-logos {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.org-logo {
    height: 60px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.8);
    transition: all 0.3s ease;
}

.org-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* FAQ Section */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 8px 25px rgba(34, 139, 34, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(34, 139, 34, 0.5);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: 2px solid white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: white;
    color: var(--text);
}

/* Cards */
.card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.card p {
    opacity: 0.7;
    line-height: 1.6;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
}

/* Version-specific: FLOW */
.version-flow .hero {
    background-image: url('assets/PORTADA.jpeg');
}

.version-flow .section-title {
    color: var(--primary);
}

/* Version-specific: JOURNEY */
.version-journey {
    background: var(--bg-dark);
    color: var(--text-light);
}

.version-journey .hero {
    background-image: url('assets/lake.png');
}

.version-journey .card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.version-journey .btn-version {
    color: var(--text-light);
}

.version-journey .version-nav {
    background: var(--glass-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Version-specific: CONNECTION */
.version-connection .hero {
    background-image: url('assets/CONECTIONPM.jpeg');
}

.version-connection {
    --primary: hsl(35, 92%, 50%);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    width: 100%;
    padding: 2rem;
}

.bento-item {
    border-radius: var(--radius);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    position: relative;
}

.bento-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.bento-item>* {
    position: relative;
    z-index: 1;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 4rem 5%;
    text-align: center;
}

.footer a {
    color: var(--secondary);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .version-nav {
        bottom: 2rem;
        top: auto;
        padding: 0.4rem;
    }

    .btn-version {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 5rem);
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item {
        grid-column: span 1 !important;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 650px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-header {
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
    z-index: 10;
    color: var(--text);
}

.modal-close:hover {
    transform: scale(1.1) rotate(90deg);
}

.modal-body {
    padding: 2.5rem;
}

.modal-body h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.modal-body p {
    line-height: 1.8;
    color: var(--text);
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

/* FAQ Section */
/* Gallery */
.gallery-section {
    padding: 4rem 2rem;
    background: var(--bg);
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.4s ease;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    padding-bottom: 1.5rem;
}

.faq-answer p {
    line-height: 1.6;
    opacity: 0.8;
}