/* --- ESTÉTICA BASE --- */
:root {
    --bg-body: #ffffff;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --erya-blue: #005eb8;
    --erya-green: #00a651;
    --erya-gradient: linear-gradient(135deg, var(--erya-blue) 0%, var(--erya-green) 100%);
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --shadow-soft: 0 10px 40px -10px rgba(0, 94, 184, 0.15);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-primary);
    margin: 0; padding: 0; overflow-x: hidden;
}

/* MODIFICADO: Añadido font-weight: 800 para igualar a Index Erya */
h1, h2, h3 { 
    font-family: var(--font-title); 
    font-weight: 800;
}

/* --- NAV --- */
nav {
    position: fixed; top: 0; width: 100%; padding: 20px 0; z-index: 100;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.logo-nav { margin-left: 5%; }

.nav-links { display: flex; gap: 40px; }
.nav-links a {
    text-decoration: none; color: var(--text-primary);
    font-weight: 600; font-size: 0.95rem; position: relative; transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--erya-blue); }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 0; background: var(--erya-gradient); transition: width 0.3s;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.lang-switch { margin-right: 5%; display: flex; gap: 15px; }
.lang-btn {
    background: none; border: none; cursor: pointer;
    font-family: var(--font-title); font-size: 0.85rem; color: var(--text-secondary);
    font-weight: 600; padding: 5px 10px; border-radius: 20px; transition: all 0.3s;
}
.lang-btn:hover, .lang-btn.active { background: var(--erya-gradient); color: white; }

/* --- HEADER --- */
.page-header {
    padding: 180px 20px 80px 20px; text-align: center;
}
.page-header h1 {
    font-size: 3.5rem; margin: 0; margin-bottom: 20px;
    background: var(--erya-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.lead-text {
    max-width: 800px; margin: 0 auto; font-size: 1.2rem; line-height: 1.8; color: var(--text-secondary);
}

/* --- SECCIÓN HISTORIA --- */
.story-section {
    max-width: 1200px; margin: 50px auto; padding: 0 20px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
}
.story-text h2 { font-size: 2.5rem; margin-bottom: 20px; color: var(--erya-blue); }
.story-text p { line-height: 1.7; color: var(--text-secondary); margin-bottom: 20px; }

.story-image {
    height: 400px; background: #f0f0f0; border-radius: 30px;
    display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.story-image::before {
    content: ''; position: absolute; width: 150%; height: 150%;
    background: conic-gradient(from 180deg at 50% 50%, #00a651 0deg, #005eb8 180deg, #00a651 360deg);
    opacity: 0.1; animation: spin 10s linear infinite;
}
.story-logo-center { width: 100px; z-index: 2; }

/* --- GRID DE VALORES --- */
.values-section { background: #f9fafb; padding: 100px 20px; margin-top: 100px; }
.values-container { max-width: 1200px; margin: 0 auto; }
.values-title { text-align: center; margin-bottom: 60px; font-size: 2.5rem; }

.values-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}
.value-card {
    background: white; padding: 40px; border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s;
}
.value-card:hover { transform: translateY(-5px); }

.value-icon { font-size: 2.5rem; display: block; margin-bottom: 20px; }
.value-card h3 { color: var(--erya-blue); margin-bottom: 15px; }
.value-card p { color: var(--text-secondary); line-height: 1.6; }

/* --- SECCIÓN EQUIPO (CARRUSEL) --- */
.team-section { padding: 100px 0; background: #ffffff; overflow: hidden; }

.carousel-viewport {
    width: 100%;
    overflow-x: hidden; /* Oculta la barra de scroll nativa */
    padding: 20px 0;
    cursor: grab;
}

.team-carousel {
    display: flex;
    gap: 30px;
    width: max-content; /* Deja que el contenido se estire horizontalmente */
    padding-left: 20px; /* Un poco de margen al inicio */
}

.team-card {
    width: 320px;
    background: white;
    padding: 40px 30px;
    border-radius: 25px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.02);
}
.team-card:hover { transform: translateY(-10px); border-color: var(--erya-blue); }

.member-img-container {
    width: 120px; height: 120px; margin: 0 auto 25px;
    border-radius: 50%; overflow: hidden; 
    border: 3px solid #f1f5f9; transition: 0.3s;
}
.team-card:hover .member-img-container { border-color: var(--erya-green); }
.member-img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.team-card h3 { margin: 10px 0 5px; font-family: var(--font-title); font-size: 1.3rem; }
.team-card h4 { color: var(--erya-blue); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; font-weight: 800; }
.team-card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.5; margin: 0; }

/* FOOTER */
footer { text-align: center; padding: 60px; color: var(--text-secondary); font-size: 0.9rem; border-top: 1px solid #f0f0f0; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .story-section { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 2.5rem; }
}

@keyframes spin { 100% { transform: rotate(360deg); } }