/* Reset y Variables Globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0f172a; 
    --accent-color: #0ea5e9; 
    --text-light: #f1f5f9;
    --text-dark: #334155;
    --bg-light: #ffffff;
    --bg-gray: #f8fafc;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
}

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

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
}

.btn {
    display: inline-block;
    padding: 10px 30px;
    background: var(--accent-color);
    color: white;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 20px;
    transition: background 0.3s;
    cursor: pointer;
}

.btn:hover {
    background: #0284c7;
}

/* Navbar */
.navbar {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s;
}

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

/* Language Switcher */
.lang-switch {
    border-left: 1px solid #475569;
    padding-left: 20px;
    margin-left: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 0 2px;
}

.lang-btn:hover {
    color: white;
}

.lang-btn.active {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background-color: var(--primary-color);
    position: relative; /* Necesario para contener los absolutos */
    height: 80vh;
    color: white;
    text-align: center;
    overflow: hidden; /* Corta las imágenes si se salen */
}

/* Contenedor del Slideshow */
#hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Al fondo */
}

/* Estilos de cada diapositiva (imagen) */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Hace que la img se comporte como background-size: cover */
    opacity: 0;
    transition: opacity 1.5s ease-in-out; /* Transición suave de 1.5s */
}

.slide.active {
    opacity: 1;
}

/* Overlay y Contenido */
.hero-overlay {
    position: relative;
    z-index: 1; /* Encima de las fotos */
    background: rgba(15, 23, 42, 0.7); /* Capa oscura semitransparente para leer el texto */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
    font-weight: 300;
}

.affiliation {
    display: block;
    font-size: 0.9rem;
    font-weight: 300;
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* Secciones Generales */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 10px auto 0;
}

.section-light {
    background: var(--bg-light);
}

.section-dark {
    background: var(--primary-color);
    color: var(--text-light);
}

.section-dark .section-title {
    color: var(--text-light);
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

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

.stat-box {
    background: var(--bg-gray);
    color: var(--primary-color);
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-box h3 {
    font-size: 2.5rem;
    color: var(--accent-color);
}

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

.card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    background: rgba(255,255,255,0.08);
}

.card h3 {
    margin-bottom: 10px;
    color: var(--accent-color);
    font-size: 1.25rem;
}

.card p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Team Grid */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.team-member {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 15px 25px;
    border-radius: 50px;
    text-align: center;
    min-width: 220px;
    transition: shadow 0.3s;
}

.team-member:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.team-member h4 {
    font-size: 1rem;
    margin-bottom: 2px;
    color: var(--primary-color);
}

.team-member span {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
}

.team-member.director {
    background: var(--bg-gray);
    border-color: #cbd5e1;
}

.team-member.director h4 {
    color: #000;
}

.team-member.main-director {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.team-member.main-director h4 {
    color: white;
}

.team-member.main-director span {
    color: #cbd5e1;
}


/* Footer */
footer {
    background: #000;
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.contact-info h3 {
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 5px;
    opacity: 0.7;
}

.credits {
    margin-top: 40px;
    font-size: 0.8rem;
    opacity: 0.4;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2rem; }
    .about-grid { grid-template-columns: 1fr; }
    .nav-links { 
        flex-direction: column;
        display: none; 
    }
}