/* =========================================
   Colores base
========================================= */
:root {
    --color1: #20dbcf;   /* turquesa brillante */
    --color2: #20daaa;   /* verde agua */
    --color3: #121816;   /* casi negro */
    --color4: #7a7a76;   /* gris neutro */
    --color5: #f3eae8;   /* beige claro */
}

/* =========================================
   Estilos globales
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--color5);
    color: var(--color3);
}

/* =========================================
   Navegación
========================================= */
.site-nav {
    background-color: var(--color1);
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.site-nav ul li a {
    text-decoration: none;
    color: var(--color3);
    font-weight: bold;
    padding: 8px 14px;
    border-radius: 6px;
    transition: 0.3s;
}

.site-nav ul li a:hover {
    background-color: var(--color2);
    color: var(--color5);
}

/* =========================================
   Header
========================================= */
.site-header {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--color1), var(--color2));
    color: var(--color5);
}

.site-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.site-header .subtitle {
    font-size: 1.2rem;
    font-weight: 500;
}

/* =========================================
   Barra de carga animada
========================================= */
.loading-bar-container {
    width: 280px;
    height: 12px;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px auto 0;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #4caf50;
    animation: fillSteps 3s steps(100) infinite;
}

@keyframes fillSteps {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* =========================================
   Contenido principal
========================================= */
.container {
    margin: 0 auto;
    padding: 40px 20px;
}

section {
    margin-bottom: 60px;
}

h2 {
    margin-bottom: 15px;
    font-size: 2rem;
    color: var(--color1);
    border-bottom: 3px solid var(--color2);
    display: inline-block;
    padding-bottom: 5px;
}

/* Presentación */
.presentacion p {
    font-size: 1.1rem;
    color: var(--color4);
}

/* =========================================
   Tarjetas del equipo
========================================= */

.team-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.team-card {
    background-color: var(--color1);
    border-radius: 10px;
    width: 150px;
    text-align: center;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    background-position: center center;
    background-size: contain;
    background-repeat: no-repeat;
    background-blend-mode: color-burn;
    cursor: pointer;
    opacity: 1;
    transition: box-shadow 0.3s;
}

.team-card:hover {
    box-shadow: 0 0 30px 10px rgba(100, 100, 255, 0.6);
}

.team-card img {
    width: 100%;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.team-card a {
    display: block;
    font-weight: bold;
    color: #000000;
    text-decoration: none;
}

.team-card a:hover {
    text-decoration: underline;
}

/* =========================================
   Contacto
========================================= */
.contacto a {
    color: var(--color1);
    font-weight: bold;
    text-decoration: none;
}

.contacto a:hover {
    text-decoration: underline;
}

/* =========================================
   Footer
========================================= */
.site-footer {
    text-align: center;
    background-color: var(--color3);
    color: var(--color5);
    padding: 20px;
    margin-top: 40px;
    font-size: 0.9rem;
}

/*==========================================
    Modo Oscuro
==========================================*/
#filtro {
      position: fixed;
      inset: 0; 
      background: rgba(0, 0, 0, 0.5);
      display: none; 
      z-index: 9998;
    }

#filtroButton {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: rgb(249, 247, 247);
    border-radius: 100%;
    margin: 1%;
    padding: 1%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 5px;
}

#lightswitch {
    height: 48px;
    width: 48px;
    border-radius: 50%;
}

.on {
    background-color: yellow;
}

/* =========================================
   Media Queries (Responsivo)
========================================= */

/* Pantallas medianas / tablets ≤900px */
@media only screen and (max-width: 900px) {
    .container {
        width: 100%;
        margin: 0 auto;
        padding: 30px 15px;
    }

    h2 {
        display: block;
        text-align: center;
    }

    .site-nav ul {
        flex-wrap: wrap;
        gap: 20px;
    }

    .team-card {
        width: 120px;
        font-size: 0.95rem;
    }
    .team-cards {
        gap: 14px;
    }
}

/* Móviles pequeños ≤400px */
@media only screen and (max-width: 400px) {
    .site-nav ul {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    h2 {
        font-size: 1.8rem;
        text-align: center;
    }

    .team-card {
        width: 95vw;
        max-width: 340px;
        margin: 0 auto;
        font-size: 0.93rem;
    }
    .team-cards {
        flex-direction: column;
        gap: 10px;
    }
/* Escritorio grande ≥1200px */
@media only screen and (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    .team-card {
        width: 180px;
        font-size: 1.08rem;
    }
    .team-cards {
        gap: 28px;
    }
}

    .loading-bar-container {
        width: 80%;
    }

    /* Desactivar perspectiva y transformaciones 3D en móviles */
    .team-cards {
        perspective: none !important;
        transform: none !important;
    }
    .team-card {
        opacity: 1 !important;
        transform: none !important;
        transition-delay: 0s !important;
    }

    /* Mostrar siempre la carta especial (karta-card) en móviles */
    .group1-front {
        display: none !important;
    }
    .karta-card {
        opacity: 1 !important;
        pointer-events: auto !important;
        position: static !important;
        background: var(--color1) !important;
    }
}
