/* =========================================
   VARIABLES GLOBALES
   ========================================= */

:root {
    --primary-color: #003366;
    --primary-light: #004d99;
    --secondary-color: #6c757d;
    --accent-color: #00bcd4;

    --text-color: #333333;
    --text-light: #f8f9fa;

    --bg-color: #ffffff;
    --bg-light: #f4f6f8;

    --border-color: #e0e0e0;

    --font-main: 'Inter', sans-serif;
    --container-width: 1200px;

    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}


/* =========================================
   RESET Y ESTILOS BASE
   ========================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);

    /* Sticky footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.page-container {
    flex: 1;
}

h1,
h2,
h3,
h4 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}


/* =========================================
   CONTENEDORES Y SECCIONES GENERALES
   ========================================= */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.page-section {
    padding: 60px 0;
}

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

.bg-light-rounded {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 40px;
    margin: 40px 0;
}


/* =========================================
   BOTONES
   ========================================= */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #008ba3;
}

.btn-outline {
    border-color: #fff;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background-color: #fff;
    color: var(--primary-color);
}


/* =========================================
   NAVBAR
   ========================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    background-color: #ffffff;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-light);
    font-weight: 700;
}

.nav-link.button-primary {
    padding: 8px 18px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 4px;
}

.nav-link.button-primary:hover {
    background-color: var(--primary-light);
}


/* =========================================
   MENÚ HAMBURGUESA
   ========================================= */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;

    width: 100%;
    height: 3px;
    background-color: var(--text-color);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}


/* =========================================
   HERO DE LA PÁGINA PRINCIPAL
   ========================================= */

.hero-section {
    height: 100vh;
    background-image: url('img/eventos/ilunion_25/Ilunion-presentacion.webp');
    background-size: cover;
    background-position: center;

    position: relative;
    display: flex;
    align-items: center;

    color: #fff;
    text-align: center;
    margin-bottom: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: linear-gradient(
        135deg,
        rgba(0, 51, 102, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 100%
    );

    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #fff;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}


/* =========================================
   CABECERAS DE PÁGINAS INTERNAS
   ========================================= */

.page-header {
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--primary-light) 100%
    );

    color: #fff;
    padding: 120px 0 60px;
    text-align: center;
}

.page-header h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}


/* =========================================
   TÍTULOS DE SECCIÓN
   ========================================= */

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.section-title {
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}


/* =========================================
   SISTEMAS DE GRID
   ========================================= */

.grid {
    display: grid;
    gap: 30px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.careers-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}


/* =========================================
   TARJETAS GENERALES
   ========================================= */

.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;

    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 25px;
}

.card h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}


/* =========================================
   ETIQUETAS
   ========================================= */

.tag {
    display: inline-block;

    padding: 4px 10px;
    margin-bottom: 15px;

    background-color: var(--bg-light);
    color: var(--secondary-color);
    border-radius: 20px;

    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
}

.tag.active {
    background-color: #e3f2fd;
    color: #1976d2;
}

.tag.completed {
    background-color: #e8f5e9;
    color: #388e3c;
}


/* =========================================
   ENLACES DE LECTURA
   ========================================= */

.read-more {
    display: inline-block;
    margin-top: 15px;

    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more:hover {
    color: var(--accent-color);
}


/* =========================================
   LISTAS TIPO ARTÍCULO / ÍNDICE
   ========================================= */

.list-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
}

.list-item:hover {
    background-color: #fafafa;
    border-color: #ccc;
}

.list-link {
    display: block;
    padding: 20px;
}

.list-link h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.list-link .meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
}


/* =========================================
   CARRERAS
   ========================================= */

.career-item {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;

    border-top: 4px solid var(--primary-color);
    box-shadow: var(--box-shadow);
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 20px;
}


/* =========================================
   EVENTOS
   ========================================= */

.events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-item {
    display: flex;
    align-items: center;

    background: #fff;
    border-radius: 8px;
    overflow: hidden;

    border: 1px solid var(--border-color);
}

.date-badge {
    min-width: 100px;
    padding: 20px;

    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
}

.date-badge .day {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.date-badge .month {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.event-details {
    padding: 20px;
    flex: 1;
}

.location {
    display: block;
    margin-top: 10px;

    font-size: 0.9rem;
    color: var(--secondary-color);
}


/* =========================================
   EQUIPO
   ========================================= */

.recruitment-section {
    max-width: 900px;
    margin: 0 auto;
}

.recruitment-intro {
    margin-bottom: 30px;
    text-align: center;
}

.recruitment-intro h2 {
    margin-bottom: 12px;
}

.open-positions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.position-item {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: 6px;
    box-shadow: var(--box-shadow);
}

.position-item summary {
    padding: 20px 24px;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    list-style-position: inside;
}

.position-item summary::marker {
    color: var(--accent-color);
}

.position-content {
    padding: 0 24px 24px 42px;
    color: var(--text-color);
}

.position-content p {
    margin-bottom: 14px;
}

.recruitment-form-link {
    display: block;
    width: fit-content;
    margin: 24px auto 0;
    margin-right: auto;
    margin-left: auto;
    font-size: 0.9rem;
}

.grid.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    padding: 40px 0;
}

.team-member {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);

    overflow: hidden;
    padding: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-avatar {
    width: 100%;
    height: 320px;

    border-radius: 0;
    object-fit: cover;
    object-position: center top;

    display: block;
}

.team-member h3 {
    padding: 0 20px;
    margin-top: 15px;
    margin-bottom: 5px;

    color: #1a1a1a;
    font-weight: 700;
    white-space: nowrap;
}

.team-member .role {
    color: #00bcd4;
    font-weight: 600;

    margin-bottom: 15px;
    padding: 0 20px;
}

.team-member .bio {
    font-size: 0.9rem;
    line-height: 1.6;

    padding: 0 25px 25px 25px;

    color: #555;
    font-weight: 300;
}


/* =========================================
   VÍDEOS RESPONSIVE
   ========================================= */

.video-container {
    position: relative;
    padding-bottom: 125%;
    height: 0;

    overflow: hidden;
    margin: 20px 0;
    border-radius: 12px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    border: none;
}


/* =========================================
   ARTÍCULOS ESPECÍFICOS
   ========================================= */

.article-niebla p {
    margin-bottom: 25px;
}


/* =========================================
   ELEMENTOS EXTRA / UTILIDADES
   ========================================= */

#extra-items {
    width: 100%;
}


/* =========================================
   FOOTER
   ========================================= */

footer {
    background-color: #000000;
    color: #fff;

    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: #fff;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: #aaa;
    margin-bottom: 15px;

    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-links li {
    margin-bottom: 10px;
}

.social-links a {
    color: #fff;
    opacity: 0.8;
}

.social-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;

    padding-top: 20px;
    border-top: 1px solid #333;

    font-size: 0.9rem;
    color: #777;
}


/* =========================================
   ANIMACIONES
   ========================================= */

.fade-in {
    opacity: 0;
    transform: translateY(20px);

    animation: fadeIn 1s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   RESPONSIVE - TABLET Y MÓVIL
   ========================================= */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;

        width: 100%;
        min-height: calc(100vh - 70px);

        background-color: #fff;
        flex-direction: column;
        justify-content: flex-start;

        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

        display: none;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
        z-index: 1001;
        pointer-events: auto;
    }

    .nav-menu.active {
        display: flex;
        visibility: visible;
        opacity: 1;
    }

    .nav-toggle {
        display: block;
        z-index: 1002;
        pointer-events: auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .event-item {
        flex-direction: column;
        align-items: stretch;
    }

    .date-badge {
        width: 100%;
    }

    .team-member h3 {
        white-space: normal;
    }
}