/*
 * Hoja de Estilos para Gourmet Talks
 * Version: 5.1 (Con animaciones dinámicas)
 */

/* ==================
   VARIABLES Y ESTILOS GLOBALES
   ================== */
:root {
    --primary-color: #ecf0f1;
    --secondary-color: #34495e; /* Color base para gradientes */
    --accent-color: #e74c3c;
    --accent-color-hover: #c0392b;
    --base-bg-color: #2c3e50; /* Fondo principal oscuro */
    --gradient-end-color: #232d3a; /* Color final para gradientes */
    --border-color: #4a617a;
    --font-family: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    color: var(--primary-color);
    line-height: 1.6;
    background-color: var(--base-bg-color);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.2; margin-bottom: 20px; color: var(--primary-color); }
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 60px; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 20px; color: #bdc3c7; }
section { padding: 100px 0; }
section[id] { scroll-margin-top: 85px; }

/* ==================
   COMPONENTES
   ================== */
.btn { display: inline-block; padding: 12px 24px; text-decoration: none; border-radius: 5px; font-weight: 600; transition: background-color 0.3s ease, transform 0.3s ease; text-align: center; cursor: pointer; }
.btn-primary { background-color: var(--accent-color); color: #ffffff; border: 2px solid var(--accent-color); }
.btn-primary:hover { background-color: var(--accent-color-hover); border-color: var(--accent-color-hover); transform: translateY(-2px); }
.btn-secondary { background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-secondary:hover { background-color: var(--primary-color); color: var(--base-bg-color); transform: translateY(-2px); }

/* ==================
   NAVEGACIÓN (VERSIÓN FINAL)
   ================== */
header {
    background-color: rgba(44, 62, 80, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1001;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
}

.nav-links ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    white-space: nowrap;
}

.nav-links ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links ul li a:hover::after {
    width: 100%;
}


/* ==================
   SECCIONES
   ================== */
.hero { min-height: 85vh; display: flex; align-items: center; justify-content: center; position: relative; text-align: center; background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('img/fondo.png'); background-size: cover; background-position: center center; background-repeat: no-repeat; background-attachment: fixed; overflow: hidden; /* CAMBIO: Evita barras de scroll por animación */ }
.hero-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; color: var(--primary-color); }
.features { background-color: var(--base-bg-color); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; text-align: center; }
.feature-card { background-color: var(--secondary-color); padding: 40px; border-radius: 10px; border: 1px solid var(--border-color); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.feature-card:hover { transform: translateY(-10px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.feature-card i { font-size: 3rem; color: var(--accent-color); margin-bottom: 20px; }
.benefits, .testimonials, .contact-section { background: linear-gradient(160deg, var(--secondary-color) 0%, var(--gradient-end-color) 100%); border-top: 1px solid var(--border-color); }
.benefits-list { max-width: 800px; margin: 0 auto; }
.benefit-item { display: flex; align-items: flex-start; gap: 30px; margin-bottom: 40px; }
.benefit-item i { font-size: 2.5rem; color: var(--accent-color); flex-shrink: 0; margin-top: 5px; }
.faq-section { background-color: var(--base-bg-color); border-top: 1px solid var(--border-color); }
.faq-container { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: flex-start; }
.faq-header h2 { text-align: left; font-size: 2.8rem; margin-bottom: 15px; }
.faq-header p { font-size: 1.1rem; }
.faq-contact-link { color: var(--accent-color); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; transition: border-bottom 0.3s ease; }
.faq-contact-link:hover { border-bottom-color: var(--accent-color); }
.faq-list { width: 100%; }
.faq-item { border-bottom: 1px solid var(--border-color); }
.faq-item:first-child { border-top: 1px solid var(--border-color); }
.faq-question { background: none; border: none; padding: 25px 0; font-family: var(--font-family); display: flex; justify-content: space-between; align-items: center; width: 100%; cursor: pointer; text-align: left; }
.faq-question span { font-size: 1.2rem; font-weight: 600; color: var(--primary-color); padding-right: 20px; }
.faq-icon { font-size: 1.2rem; color: var(--accent-color); transition: transform 0.3s ease; flex-shrink: 0; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding-bottom 0.4s ease-out; line-height: 1.7; }
.faq-answer p { padding-top: 0; margin-bottom: 0; }
.faq-item.active .faq-answer { max-height: 300px; padding-bottom: 25px; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 40px; }
.testimonial-card { background-color: var(--base-bg-color); padding: 30px; border-left: 5px solid var(--accent-color); border-radius: 5px; }
.testimonial-card p { font-style: italic; margin-bottom: 15px; color: #ecf0f1; }
.testimonial-card span { font-weight: 600; color: #bdc3c7; }
.contact-section { text-align: center; }
.contact-form { max-width: 700px; margin: 40px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { width: 100%; }
.form-group-full-width { grid-column: 1 / -1; }
.form-group input, .form-group textarea { width: 100%; padding: 15px; border-radius: 5px; border: 1px solid var(--border-color); font-family: var(--font-family); font-size: 1rem; background-color: var(--base-bg-color); color: var(--primary-color); }
.form-group input::placeholder, .form-group textarea::placeholder { color: #bdc3c7; }
.contact-form .btn { grid-column: 1 / -1; width: auto; max-width: 300px; justify-self: center; }
#form-status { grid-column: 1 / -1; margin-top: 10px; font-weight: 600; min-height: 24px; }

/* ==================
   FOOTER
   ================== */
footer { background-color: var(--gradient-end-color); color: #bdc3c7; padding: 40px 0 20px; border-top: 1px solid var(--border-color); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
footer .footer-info .logo img { 
    height: 50px;
    margin-bottom: 10px; 
}
.footer-info p { color: #bdc3c7; margin-bottom: 0; }
.footer-social a { color: var(--primary-color); font-size: 1.5rem; margin-left: 20px; transition: color 0.3s ease; }
.footer-social a:hover { color: var(--accent-color); }
.footer-links a { color: #bdc3c7; text-decoration: none; margin-left: 20px; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--accent-color); }
.footer-bottom { text-align: center; border-top: 1px solid var(--border-color); padding-top: 20px; font-size: 0.9rem; }

/* ==================
   RESPONSIVE DESIGN
   ================== */
@media (max-width: 820px) {
    header { padding: 10px 0; }
    .logo img { height: 40px; }
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        position: fixed;
        top: 65px;
        left: 0;
        width: 100%;
        background-color: var(--base-bg-color);
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
    }
    .nav-links.active { display: flex; max-height: 500px; border-bottom: 1px solid var(--border-color); }
    .nav-links ul { flex-direction: column; width: 100%; text-align: center; gap: 0; }
    .nav-links ul li { width: 100%; }
    .nav-links ul li a { display: block; padding: 20px; border-bottom: 1px solid var(--border-color); }
    .nav-links ul li a::after { display: none; }
    .nav-cta { margin: 20px 0; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .hero { min-height: 70vh; background-attachment: scroll; }
    .faq-container { grid-template-columns: 1fr; gap: 40px; }
    .faq-header h2, .faq-header p { text-align: center; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .contact-form { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; text-align: center; gap: 30px; }
    .footer-social a, .footer-links a { margin: 0 10px; }
}

/* ==================================
   CAMBIO: ANIMACIONES DINÁMICAS
   ================================== */
.fade-in-element {
    /* Estado inicial: invisible y ligeramente desplazado */
    opacity: 0;
    transform: translateY(30px);
    
    /* Transición suave para cuando se añada la clase 'visible' */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;

    /* Leer la variable --delay para la animación escalonada */
    transition-delay: calc(var(--delay, 0) * 150ms);
}

.fade-in-element.visible {
    /* Estado final: totalmente visible y en su posición original */
    opacity: 1;
    transform: translateY(0);
}