@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Colors - Brand (Official Long COVID Teal) */
    --primary: #1f9094; 
    --primary-light: #28b1b6;
    --primary-dark: #176f72;
    --secondary: #978e88;
    --secondary-light: #b0a8a3;
    --secondary-dark: #7a716c;
    
    /* Neutrals */
    --bg-light: #e2e2e2;
    --text-main: #1f1c1f;
    --text-muted: #4a454a;
    --white: #ffffff; /* Mantengo blanco puro para contrastes extremos si hace falta */
    --surface: #e2e2e2; /* El blanco corporativo solicitado */
    --border: #c8c8c8;

    /* Dark Mode Defaults */
    --bg-dark: #0f172a;
    --text-dark: #f1f5f9;
    --surface-dark: #1e293b;

    /* Animations & Transitions */
    --transition-fast: 0.2s ease;
    --transition-standard: 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Un poco más de margen para el header fijo */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6; /* Aumentado para mejor legibilidad */
    margin: 0;
    overflow-x: hidden;
}

/* Accessibility: Skip to Content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 3000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Accessibility: Focus States */
:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Classes */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary-light);
    z-index: 10001; /* Por encima de todo */
    transition: width 0.1s ease-out;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-standard);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition-fast);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-socio-icon {
    display: none;
    text-decoration: none;
    padding: 0.5rem;
    background: var(--primary); /* Cambiado a verde corporativo */
    border-radius: 50%;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

/* Burger Button */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 10px;
    transition: var(--transition-standard);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(226, 226, 226, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    transition: right 0.4s ease-in-out;
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    height: 100%;
}

.close-menu {
    align-self: flex-end;
    font-size: 3rem;
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    margin-bottom: 2rem;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-links a {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition-fast);
}

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

/* Hero Base Style */
.hero {
    width: 100%;
    padding: 180px 0 100px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
}

/* Section Specific Backgrounds */
#inicio.hero {
    background: linear-gradient(rgba(226, 226, 226, 0.4), rgba(226, 226, 226, 0.4)), 
                url('../img/contact-bg.png');
    background-size: cover;
    background-position: center;
}

#contacto.hero {
    padding: 100px 0;
    background: linear-gradient(rgba(226, 226, 226, 0.8), rgba(226, 226, 226, 0.8)), 
                url('../img/hero-v3.png');
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-top: 2rem; /* Espacio superior para compensar el header */
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-standard);
    cursor: pointer;
    border: none;
    text-align: center;
    min-width: 180px; /* Asegura un tamaño consistente */
}

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

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

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

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-light);
}

/* Sections Differentiation */
section {
    padding: 100px 0; /* Espaciado generoso para desktop */
    position: relative;
}

#nosotros {
    background: var(--white);
    overflow: hidden;
}

/* Decoración para Nosotros */
#nosotros::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(17, 138, 103, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

#objetivos {
    background-color: #edf7f2; /* Verde menta suave para diferenciar de Nosotros */
    border-top: 1px solid rgba(17, 138, 103, 0.1);
    border-bottom: 1px solid rgba(17, 138, 103, 0.1);
}

#sintomas {
    position: relative;
    background: url('../img/symptoms_bg_abstract_1778427059395.png') no-repeat center center/cover;
    background-attachment: fixed;
}

/* Overlay para asegurar legibilidad */
#sintomas::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75); /* Bajamos opacidad para que se vea la imagen */
    z-index: 0;
}

#sintomas .container {
    position: relative;
    z-index: 1;
}

#sintomas .card {
    border-top: 4px solid var(--primary);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

#faq {
    background-color: #f1f3f5; /* Gris un pelín más profundo */
    padding-bottom: 140px;
}

#faq::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to top, var(--white), transparent);
    z-index: 1;
    pointer-events: none; /* No interfiere con clics */
}

.faq-accordion {
    position: relative;
    z-index: 5; /* Por encima del degradado */
}

.bg-alt {
    /* Eliminamos la clase genérica para usar IDs específicos */
    background-color: transparent;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-title .divider {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto 2rem; /* Añadido margen inferior de 2rem */
    border-radius: 2px;
}

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

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: var(--transition-standard);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

/* Footer Redesign */
footer {
    padding: 80px 0 40px;
    background-color: #1f1c1f; /* Gris Carbón Profundo solicitado */
    color: #e2e2e2;
    text-align: left; /* Alineación a la izquierda para columnas */
}

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

footer .footer-brand img {
    height: 100px; /* Logo más grande solicitado */
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

footer h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

footer .footer-links {
    list-style: none;
    padding: 0;
}

footer .footer-links li {
    margin-bottom: 0.75rem;
}

footer .footer-links a {
    color: #978e88;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

footer .footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
    color: #978e88;
}

@media (max-width: 768px) {
    footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    footer .footer-brand img {
        margin: 0 auto 1.5rem;
    }
}

/* Responsive - BREAKPOINT 1000px */
@media (max-width: 1024px) {
    .nav-links, .btn-header {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    nav {
        justify-content: space-between;
        height: 80px;
    }

    .hero h1 {
        font-size: 2.4rem;
        margin-top: 0.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .mobile-socio-icon {
        display: flex;
    }

    .mobile-menu-content {
        justify-content: space-between;
    }

    .btn {
        width: 100%;
        max-width: 320px;
    }

    section {
        padding: 60px 0;
    }
}

/* Ultra-Mobile Optimizations (< 400px) */
@media (max-width: 450px) {
    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 70px;
        gap: 0.5rem;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-right: auto;
    }

    .logo span {
        display: block;
        font-size: 0.9rem;
        line-height: 1.1;
        font-weight: 700;
        max-width: 140px;
    }

    .logo img {
        height: 40px !important;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mobile-socio-icon {
        width: 36px;
        height: 36px;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-top: 0;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .section-title p {
        font-size: 0.95rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .cta-group {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centrar botones */
        width: 100%;
        gap: 0.75rem;
    }

    .btn {
        width: auto !important; /* Ajuste al contenido para poder centrar */
        min-width: 200px !important;
        padding: 0.8rem 1.5rem;
    }

    .container {
        padding: 0 1rem !important;
    }

    .card {
        padding: 1.25rem;
    }
}

/* Eliminado bloque redundante */

/* Cookie Settings Button */
.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-standard);
}

.cookie-settings-btn:hover {
    transform: scale(1.1) rotate(10deg);
    background: var(--white);
}

@media (max-width: 768px) {
    .cookie-settings-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* FAQ Accordion */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    transition: var(--transition-standard);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    text-align: left;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
    content: '×'; /* O simplemente rotar el + */
}

.faq-item.active {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background: #f9f9f9;
}

.faq-item.active .faq-answer {
    max-height: 500px; /* Suficiente para el texto */
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem; /* Reducido según petición */
    text-align: justify;
}

/* Social Media Section */
#comunidad {
    background-color: var(--white); /* Pasamos a blanco para contrastar con FAQ */
    border-top: 1px solid var(--border);
}

#comunidad .flex-center {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: nowrap; /* Forzamos una sola fila en desktop */
    margin-top: 3rem;
}

#comunidad .social-card {
    display: flex;
    flex-direction: row; /* Horizontal */
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    background: var(--white);
    padding: 1rem 2rem;
    border-radius: 50px; /* Estilo cápsula */
    border: 1px solid var(--border);
    transition: var(--transition-standard);
    flex: 1;
    max-width: 300px; /* Evitamos que crezcan demasiado */
    justify-content: center;
}

@media (max-width: 992px) {
    #comunidad .flex-center {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* Cuadrícula de 3 elementos */
        gap: 1rem;
    }
    #comunidad .social-card {
        flex-direction: column; /* Icono arriba, texto abajo */
        padding: 1rem 0.5rem;
        gap: 0.5rem;
        max-width: 100%;
    }
    #comunidad .social-label {
        font-size: 0.7rem; /* Texto más pequeño para que quepa */
    }
    #comunidad .social-icon-wrapper {
        width: 40px;
        height: 40px;
    }
}

.social-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.social-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: rgba(17, 138, 103, 0.05); /* Fondo muy suave del color principal */
    transition: var(--transition-standard);
}

.social-label {
    font-size: 1.1rem;
    font-weight: 600;
}

.social-card:hover .social-icon-wrapper {
    background: var(--primary);
    color: var(--white);
}

/* Footer Social Icons */
.footer-social-icons {
    display: flex;
    justify-content: center; /* Centrado solicitado */
    gap: 1.5rem;
    margin-top: 2rem;
}

.footer-social-icons a {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-social-icons a:hover {
    color: var(--primary-light);
    transform: scale(1.1);
}

/* Contact Section */
.contact-wrapper {
    display: flex;
    justify-content: center; /* Centramos el formulario */
    margin-top: 3rem;
}

.contact-form-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 800px; /* Ancho ampliado */
}

.contact-form {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrar botón y campos si es necesario */
    gap: 1.5rem;
}

.contact-form .form-group {
    width: 100%; /* Asegurar que los inputs sigan ocupando todo el ancho */
}

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

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
    background-color: #fcfcfc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(17, 138, 103, 0.1);
    background-color: var(--white);
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    cursor: pointer;
}

@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #edf7f2 !important; /* Verde menta sólido exacto */
    z-index: 1000;
    transition: var(--transition-standard);
    border-bottom: 1px solid rgba(17, 138, 103, 0.1);
    box-shadow: var(--shadow-sm);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(31, 28, 31, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 20px 0;
    z-index: 5000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
}

.cookie-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-banner a {
    color: var(--primary-light);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cookie-banner .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Form Status Messages */
.form-status-hidden {
    display: none;
}

.form-status-visible {
    display: block !important;
    text-align: center;
    padding: 2rem 0;
    animation: formFadeIn 0.5s ease;
}

#form-status .status-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#form-status h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

#form-status p {
    color: var(--text-muted);
}

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