/* VARIABLES & RESET */
:root {
    --primary-color: #00acc1;
    --primary-light: #4dd0e1;
    --primary-gradient: linear-gradient(135deg, #29b6f6 0%, #26c6da 100%);
    --bg-light: #f9fafb;
    --text-main: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
    --transition-fast: 0.3s ease;
    --border-radius: 16px;
    --nav-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

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

/* UTILITIES */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.section-padding {
    padding: 80px 0;
}

.mt-large {
    margin-top: 60px;
}

.mb-large {
    margin-bottom: 60px;
}

.max-w-600 {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary,
.btn-secondary,
.btn-white {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    /* Espacio superior para separar del texto */
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(38, 198, 218, 0.4);
}

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

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

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

.btn-white:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* ANIMATIONS (Scroll Reveal) */
.hidden-element {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.show {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

/* NAVBAR */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition-fast);
}

.logo img:hover {
    transform: scale(1.05);
}

/* HERO LOGO */
.hero-logo {
    max-width: 180px;
    margin-bottom: 25px;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    position: relative;
}

.nav-links a:not(.btn-nav)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

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

.nav-links .btn-nav {
    padding: 8px 24px;
    background: var(--text-main);
    color: var(--white);
    border-radius: 50px;
}

.nav-links .btn-nav:hover {
    background: var(--primary-color);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background-image: url('assets/hero/temuco.jpg');
    /* Food texture placeholder */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(234, 253, 255, 0.85) 0%, rgba(128, 222, 234, 0.7) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-text p {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 30px;
    max-width: 500px;
}

/* HERO PHONE MOCKUP */
.phone-mockup {
    width: 300px;
    height: 580px;
    background: #000;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    position: relative;
    border: 4px solid #333;
    z-index: 10;
    /* Crear contexto de apilamiento */
    transform-style: preserve-3d;
    /* Importante para z-index negativos en hijos */
}

/* Floating Images Behind Mockup (Fan Composition) */
.floating-img {
    position: absolute;
    z-index: -1;
    /* Esto ahora funcionará relativo al padre preserve-3d */
    transform: translateZ(-10px);
    /* Empujarlos físicamente atrás en 3D */
    width: 260px;
    /* Tamaño similar al mockup pero un poco más pequeño visualmente por perspectiva */
    height: auto;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
    /* Aumenté opacidad para que se vean mejor las imagenes reales */
    transition: all 0.5s ease;
    top: 20px;
    /* Alineación base */
}

/* Fan Left */
.img-1 {
    left: -120px;
    /* Desplazado a la izquierda */
    transform: rotate(-15deg) scale(0.9);
    animation: float-left 6s ease-in-out infinite;
}

/* Fan Right */
.img-2 {
    right: -120px;
    /* Desplazado a la derecha */
    top: 20px;
    /* Reset top overrides if any */
    bottom: auto;
    /* Reset bottom */
    transform: rotate(15deg) scale(0.9);
    animation: float-right 6s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes float-left {

    0%,
    100% {
        transform: translateZ(-10px) translateY(0) rotate(-15deg) scale(0.9);
    }

    50% {
        transform: translateZ(-10px) translateY(-15px) rotate(-12deg) scale(0.9);
    }
}

@keyframes float-right {

    0%,
    100% {
        transform: translateZ(-10px) translateY(0) rotate(15deg) scale(0.9);
    }

    50% {
        transform: translateZ(-10px) translateY(-15px) rotate(12deg) scale(0.9);
    }
}

.screen-content {
    background: #000;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.instagram-header {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.reel-placeholder span {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.play-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin: 0 auto 10px;
}

/* QUIÉNES SOMOS */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.rounded-img {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    margin-top: 10px;
    border-radius: 2px;
}

.text-center .section-title::after {
    margin: 10px auto 0;
}

/* MISION CARDS */
.bg-gradient-light {
    background: linear-gradient(180deg, #ffffff 0%, #e0f7fa 100%);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition-fast);
    text-align: center;
}

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

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    background: rgba(38, 198, 218, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

/* QUÉ HACEMOS - CAROUSEL STYLE */
.grid-2-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
}

.event-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: var(--transition-fast);
}

.event-card:hover {
    box-shadow: var(--hover-shadow);
}

.event-visual {
    width: 100%;
    overflow: hidden;
}

.event-visual img {
    width: 100%;
    height: auto;
    /* Muestra la imagen completa en su proporción natural */
    display: block;
    transition: transform 0.5s ease;
}

.event-card:hover .event-visual img {
    transform: scale(1.05);
}

.event-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.event-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.event-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* COMUNIDAD */
.bg-light {
    background: var(--bg-light);
}

/* INSTAGRAM CAROUSEL */
.insta-carousel-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    /* Más angosto para formato vertical/rectangular */
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.insta-carousel-track-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.insta-carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    list-style: none;
    padding: 0;
    margin: 0;
}

.insta-slide {
    min-width: 100%;
    /* Cada slide ocupa el 100% del contenedor visible */
    padding: 0 5px;
    /* Espacio entre slides si fuera necesario */
}

.insta-slide iframe {
    width: 100%;
    min-height: 750px;
    /* Altura aumentada considerablemente para formato vertical */
    border-radius: 12px;
    display: block;
}

.carousel-btn {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: absolute;
    z-index: 10;
    transition: transform 0.2s;
}

.carousel-btn:hover {
    transform: scale(1.1);
    color: var(--primary-light);
}

.prev-btn {
    left: -20px;
}

.next-btn {
    right: -20px;
}

@media (max-width: 768px) {
    .insta-carousel-container {
        max-width: 100%;
        padding: 0 10px;
    }

    .prev-btn {
        left: 0;
    }

    .next-btn {
        right: 0;
    }
}

/* IMPACTO */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.impact-item {
    padding: 30px;
    text-align: center;
}

.impact-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.impact-item p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* CTA FINAL */
.cta-section-full {
    background-image: url('https://images.unsplash.com/photo-1543353071-873f17a7a088?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 120px 0;
    color: var(--white);
    background-attachment: fixed;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 172, 193, 0.9) 0%, rgba(26, 43, 60, 0.8) 100%);
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--white);
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* FOOTER */
footer {
    background: var(--text-main);
    color: var(--white);
    padding: 40px 0;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
}

.social-links a:hover {
    color: var(--primary-light);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .hero {
        height: auto;
        padding-top: 120px;
        /* Nav height + extra space */
        padding-bottom: 60px;
        align-items: flex-start;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        margin-bottom: 0;
    }

    .hero-text p {
        margin: 0 auto 30px;
    }

    .phone-mockup {
        margin: 0 auto;
        transform: scale(0.9);
    }

    .floating-img {
        display: none;
    }

    /* Ocultar en móvil para evitar scroll horizontal */

    .split-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .reverse-mobile {
        display: flex;
        flex-direction: column-reverse;
    }

    .max-w-600 {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

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

    .grid-2-large {
        grid-template-columns: 1fr;
    }

    .logo img {
        height: 40px;
    }

    .hero-logo {
        max-width: 140px;
        margin: 0 auto 20px;
    }

    .phone-mockup {
        width: 280px;
        height: 540px;
    }
}

/* PRÓXIMOS EVENTOS */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.upcoming-event-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.upcoming-event-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
    border-color: rgba(38, 198, 218, 0.3);
}

.event-header {
    margin-bottom: 20px;
}

.event-icon-large {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.upcoming-event-card h3 {
    font-size: 1.35rem;
    color: var(--text-main);
    margin: 0;
    line-height: 1.3;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
    margin-top: 3px;
}

.meta-content strong {
    display: block;
    color: var(--text-main);
    font-weight: 600;
}

.event-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 0;
    flex-grow: 1;
}

/* Decoration line on top */
.upcoming-event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upcoming-event-card:hover::before {
    opacity: 1;
}

/* CONTACT FORM */
.contact-section {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1543353071-873f17a7a088?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
}

.relative-z {
    position: relative;
    z-index: 2;
}

.form-wrapper {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    margin: 0 auto;
}

.text-white {
    color: var(--white) !important;
}

.contact-form {
    margin-top: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input,
.form-group textarea,
.form-group select {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 172, 193, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select[multiple] {
    height: auto;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
}

.form-select option {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    border-radius: 6px;
    color: var(--text-main);
}

.form-select option:checked {
    background-color: var(--primary-light);
    color: white;
}

.form-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.btn-submit {
    min-width: 200px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-wrapper {
        padding: 25px;
    }
}