/* --- RESET Y ESTILOS GLOBALES --- */
:root {
    --primary-color: #2a6df5;
    --dark-color: #1a202c;
    --gray-color: #4a5568;
    --light-gray-color: #f7fafc;
    --white-color: #ffffff;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.7; color: var(--gray-color); background-color: var(--white-color); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { color: var(--dark-color); line-height: 1.3; margin-bottom: 1rem; font-weight: 700; }
h1 { font-size: 3.2rem; }
h2 { font-size: 2.8rem; text-align: center; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1.5rem; }
section { padding: 100px 0; overflow: hidden; }
.section-subtitle { text-align: center; color: var(--primary-color); font-weight: 600; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; }

/* --- HEADER Y NAVEGACIÓN --- */
.header { background: var(--white-color); padding: 15px 0; position: fixed; width: 100%; top: 0; left: 0; z-index: 1000; box-shadow: 0 2px 15px rgba(0,0,0,0.08); transition: padding var(--transition-speed); }
.header.scrolled { padding: 10px 0; }
.header .container { display: flex; justify-content: space-between; align-items: center; }
.logo img { max-height: 40px; }
.nav-links { display: flex; align-items: center; gap: 25px; }
.nav-links a { color: var(--gray-color); text-decoration: none; font-weight: 600; position: relative; padding-bottom: 5px; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary-color); transition: width var(--transition-speed); }
.nav-links a:hover::after { width: 100%; }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; z-index: 1001; }
.hamburger .bar { width: 25px; height: 3px; background-color: var(--dark-color); border-radius: 5px; transition: all var(--transition-speed) ease; }

/* --- SELECTOR DE IDIOMA (MÉTODO CDN) --- */
.language-selector { display: flex; align-items: center; gap: 8px; border-left: 1px solid #e2e8f0; padding-left: 25px; margin-left: 10px; }
.language-selector button {
    background: none;
    border: 2px solid transparent;
    border-radius: 50%; /* Círculos para un look moderno */
    cursor: pointer;
    line-height: 0; /* Clave para alinear bien la bandera */
    padding: 3px;
    transition: all 0.3s;
}
.language-selector .fi {
    font-size: 24px; /* Tamaño de la bandera */
    border-radius: 50%;
    display: block;
}
.language-selector button:hover { background-color: #f0f0f0; }
.language-selector button.active { border-color: var(--primary-color); }

/* --- SECCIONES PRINCIPALES Y FOOTER (SIN CAMBIOS) --- */
.hero { padding-top: 220px; padding-bottom: 200px; text-align: center; color: var(--white-color); background-image: linear-gradient(rgba(26, 32, 44, 0.75), rgba(26, 32, 44, 0.6)), url('images/image-hero.jpg'); background-size: cover; background-position: center center; background-repeat: no-repeat; background-attachment: fixed; }
.hero-content { max-width: 800px; margin: 0 auto; }
.hero h1, .hero p { color: var(--white-color); }
.about .container { display: flex; align-items: center; gap: 60px; }
.about-image, .about-content { flex: 1; }
.about-image img { width: 100%; border-radius: var(--border-radius); box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
.about h2 { text-align: left; }
.features { background: var(--light-gray-color); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 4rem; }
.feature-card { background: var(--white-color); padding: 35px; border-radius: var(--border-radius); border: 1px solid #e2e8f0; text-align: center; transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease; }
.feature-card:hover { transform: translateY(-8px); box-shadow: 0 12px 35px rgba(42, 109, 245, 0.1); }
.feature-card .icon { font-size: 3rem; margin-bottom: 1.5rem; color: var(--primary-color); }
.faq { background: var(--light-gray-color); }
.faq .container { max-width: 800px; }
.faq-item { background: var(--white-color); margin-bottom: 15px; border-radius: var(--border-radius); border: 1px solid #e2e8f0; }
.faq-question { padding: 20px 25px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--dark-color); }
.faq-question .toggle-icon { font-size: 1.5rem; transition: transform var(--transition-speed); color: var(--primary-color); }
.faq-item.active .toggle-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; padding: 0 25px; transition: max-height 0.4s ease-out, padding 0.4s ease-out; }
.faq-item.active .faq-answer { max-height: 300px; padding-bottom: 20px; }
.footer { background: var(--dark-color); color: #a0aec0; padding: 50px 0; text-align: center; }
.footer p { margin: 0; }
.footer .logo-footer { font-size: 1.5rem; font-weight: 800; color: var(--white-color); text-decoration: none; margin-bottom: 1rem; display: inline-block; }
.fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- RESPONSIVE DESIGN --- */
@media(max-width: 992px) {
    .about .container { flex-direction: column; text-align: center; }
    .about-content { order: 2; }
    .about-image { order: 1; margin-bottom: 40px; max-width: 100%; }
    h1 { font-size: 2.8rem; } h2 { font-size: 2.4rem; }
    .hero { padding-top: 150px; padding-bottom: 100px; }
    .about h2 { text-align: center; }
}

@media(max-width: 820px) {
    .nav-links { position: fixed; top: 0; left: 0; width: 100%; height: 100%; padding-top: 100px; flex-direction: column; align-items: center; gap: 30px; background-color: rgba(255, 255, 255, 0.98); backdrop-filter: blur(5px); transform: translateX(100%); transition: transform 0.4s ease-in-out; }
    .nav-links.active { transform: translateX(0); }
    .nav-links a { font-size: 1.8rem; }
    .language-selector { border: none; padding: 0; margin: 20px 0 0 0; }
    .hamburger { display: flex; }
    .hamburger.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
    h1 { font-size: 2.5rem; } h2 { font-size: 2.2rem; }
    section { padding: 80px 0; }
}