/* Importar fuente Inter si no carga por CDN */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/*
=============================================================
====================== COLORES Y TEMAS ======================
=============================================================
*/
:root {
    /* === TEMA POR DEFECTO: NOCHE (CYBERPUNK NEÓN: MORADO ELÉCTRICO, AZUL ELÉCTRICO & TURQUESA) === */
    /* MORADOS ELÉCTRICOS (Identidad de marca en modo noche) */
    --c-purple-400: 192 132 252; /* #c084fc */
    --c-purple-500: 147 51 234;  /* #9333ea (Principal) */
    --c-purple-600: 126 34 206;  /* #7e22ce */
    --c-purple-800: 88 28 135;   /* #581c87 */
    --c-purple-900: 59 7 95;     /* #3b075f */

    /* ACENTO AZUL ELÉCTRICO (Sustituye al cian original, eliminando tonos rojos) */
    --c-cyan-400: 56 189 248;    /* #38bdf8 (Azul eléctrico claro) */
    --c-cyan-500: 14 165 233;    /* #0ea5e9 (Azul eléctrico principal) */

    /* ACENTO TURQUESA VIBRANTE (Sustituye al menta original) */
    --c-yellow-400: 45 212 191;  /* #2dd4bf (Turquesa claro hover) */
    --c-yellow-500: 20 184 166;  /* #14b8a6 (Turquesa principal) */
    --c-yellow-600: 13 148 136;  /* #0d9488 */
    --c-yellow-800: 17 94 89;    /* #115e59 */
    --c-yellow-900: 19 78 74;    /* #134e4a */

    /* FONDOS OSCUROS PREMIUM (TONOS MORADOS PROFUNDOS) */
    --c-gray-400: 243 244 246;   /* #f3f4f6 (Gris claro para textos) */
    --c-gray-500: 167 139 250;   /* #a78bfa (Gris morado para subtítulos) */
    --c-gray-800: 30 20 64;      /* #1e1440 */
    --c-gray-900: 22 14 46;      /* #160e2e (Fondo principal secundario) */
    --c-gray-950: 14 9 32;       /* #0e0920 (Tarjetas oscuras) */
    --c-gray-980: 10 6 24;       /* #0a0618 (Fondo vanta oscuro) */

    /* === TEMA ALTERNATIVO: DÍA (ATARDECER CÁLIDO Y TEKA: MORADO REAL, NARANJA ATARDECER & DEEP TEAL) === */
    body.theme-blue {
        /* MORADOS REALES (Identidad de marca adaptada para contraste en día) */
        --c-purple-400: 196 181 253; /* #c4b5fd */
        --c-purple-500: 109 40 217;  /* #6d28d9 (Morado real principal) */
        --c-purple-600: 91 33 182;   /* #5b21b6 */
        --c-purple-800: 76 29 149;   /* #4c1d95 */
        --c-purple-900: 46 16 102;   /* #2e1066 */

        /* ACENTO DORADO CÁLIDO/ÁMBAR (Sustituye al cian, libre de rojo) */
        --c-cyan-400: 250 204 21;    /* #facc15 (Dorado brillante) */
        --c-cyan-500: 234 179 8;     /* #eab308 (Ámbar principal) */

        /* ACENTO DEEP TEAL (Sustituye al rosa/rojo) */
        --c-yellow-400: 45 212 191;  /* #2dd4bf (Teal claro hover) */
        --c-yellow-500: 13 148 136;  /* #0d9488 (Teal principal) */
        --c-yellow-600: 17 94 89;    /* #115e59 */
        --c-yellow-800: 19 78 74;    /* #134e4a */
        --c-yellow-900: 15 23 42;    /* #0f172a */

        /* FONDOS CLAROS LILAS (MÁXIMA ELEGANCIA Y CONTRASTE) */
        --c-gray-400: 15 23 42;      /* #0f172a (Slate oscuro para texto principal) */
        --c-gray-500: 51 65 85;      /* #334155 (Slate medio para texto secundario) */
        --c-gray-800: 224 204 250;   /* #e0ccfa */
        --c-gray-900: 237 219 253;   /* #eddbfd */
        --c-gray-950: 243 232 255;   /* #f3e8ff (Fondo tarjetas claras) */
        --c-gray-980: 250 245 255;   /* #faf5ff (Fondo vanta claro) */
    }
}

/* Transición suave de colores al cambiar de tema + Tipografia  URWGothic-Book */ 
body {
    font-family: Telespania, sans-serif;
    transition: color 0.5s ease, background-color 0.5s ease, border-color 0.5s ease;
}

/* Asegurar que todos los elementos hereden la transición de color */
div, span, a, button, h1, h2, h3, p, i, section, header, footer {
    transition: color 0.5s ease, background-color 0.5s ease, border-color 0.5s ease;
}

/* Efectos de la animación de fondo */
@keyframes pulse-light {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}
.animate-pulse-light {
    animation: pulse-light 6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.animation-delay-2000 {
    animation-delay: 2s;
}

/* Ajuste de selección de texto */
::selection {
    background-color: rgb(var(--c-yellow-500) / 0.85); 
    color: rgb(var(--c-purple-800));
}



/*
================================================================
=================== CORRECION DEL MENU MOVIL ===================
================================================================
*/
/* Los estilos base deben estar en el ID, no en la clase .mobile-menu-closed */
#mobile-menu {
    position: fixed;
    inset: 0; /* top:0, right:0, bottom:0, left:0 */
    z-index: 60; /* Mayor que el header (z-50) para cubrirlo */
    background-color: rgba(3, 7, 18, 0.7); /* Fondo oscuro casi opaco */
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Forzar que el menú móvil (que siempre tiene fondo oscuro) mantenga texto claro en ambos temas */
#mobile-menu a,
#mobile-menu button {
    color: rgba(255, 255, 255, 0.7) !important;
}
#mobile-menu a:hover,
#mobile-menu button:hover {
    color: rgb(var(--c-purple-400)) !important;
}

/* Clases de estado (solo controlan la posición) */
.mobile-menu-closed {
    transform: translateX(100%);
}

.mobile-menu-open {
    transform: translateX(0);
}



/*
==============================================
=========== BOTONES DE LA PAGINA =============
==============================================
*/
/* === Botón Volver Arriba === */
#back-to-top-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 2rem;
    background-color: rgb(var(--c-purple-500));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 9999px;
    padding: 0.75rem;
    z-index: 99999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

#back-to-top-btn:hover{
    background-color: rgb(var(--c-purple-600));
    box-shadow: 0 0 15px rgb(var(--c-cyan-400) / 0.5);
    transform: scale(1.1);
    cursor: pointer;
}

#back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* === Botón Cambiar Tema === */
#theme-toggle-btn {
    position: fixed;
    bottom: 1.5rem;
    left: 2rem;
    /*azul por defecto*/
    background-color: rgb(var(--c-cyan-400)); 
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 9999px;
    padding: 0.75rem;
    z-index: 40;
    cursor: pointer;
    transition: all 0.3s ease;
}

#theme-toggle-btn:hover { 
    background-color: rgb(var(--c-cyan-400));
    color: white; /* El texto se vuelve blanco al hacer hover */
    transform: scale(1.1);
    box-shadow: 0 0 15px rgb(var(--c-cyan-400) / 0.5);
}

/* === Botón Cambiar Tipo de Letra === */
#fontFamily-toggle-btn {
    position: fixed;
    bottom: 1.5rem;
    left: 6rem;
    /*azul por defecto*/
    background-color: rgb(var(--c-yellow-500)); 
    color: rgb(var(--c-cyan-400));
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 9999px;
    padding: 0.75rem;
    z-index: 40;
    cursor: pointer;
    transition: all 0.3s ease;
}

#fontFamily-toggle-btn:hover { 
    box-shadow: 0 0 15px rgb(var(--c-cyan-400) / 0.5);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgb(var(--c-yellow-500) / 0.5);
}



/*
=================================================================
====================== PARTES DE LA PÁGINA ======================
=================================================================
*/
/* === BODY === */
body {
    background-color: rgb(var(--c-gray-900)); /* Fondo oscuro por defecto */
    color: rgb(var(--c-gray-800));            /* Texto gris claro por defecto */
    -webkit-font-smoothing: antialiased;      /* antialiased */
    -moz-osx-font-smoothing: grayscale;
}


/* === CLASE LOGOTIPO === */
.logotipoRSSmall{
    font-family: Ethnocentric, sans-serif;
    color: rgb(var(--c-purple-500));
    text-shadow: 0.5px  0px 0px rgb(var(--c-cyan-400)),
                 0px  0.5px 0px rgb(var(--c-cyan-400)),
                 -0.5px  0px 0px rgb(var(--c-cyan-400)),               
                 0px -0.5px 0px rgb(var(--c-cyan-400));
    font-size: clamp(0.95rem, 5vw, 1.25rem);
    font-style: italic;
    font-weight: bolder;
    letter-spacing: clamp(0em, 1vw, 0.11em);
}

.logotipoRS, .logotipoRSBig {
    font-family: Ethnocentric, sans-serif;
    color: rgb(var(--c-purple-500));
    text-shadow: 1px 0px 0px rgb(var(--c-cyan-400)),
        0px 1px 0px rgb(var(--c-cyan-400)),
        -1px 0px 0px rgb(var(--c-cyan-400)),
        0px -1px 0px rgb(var(--c-cyan-400));
    font-size: 1.7rem;
    font-style: italic;
    font-weight: bolder;
    letter-spacing: 0.11em;
}

/* Animacion Logo Header (Giro 360) --- */
header a img {
    /* Transición suave para el giro */
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === HEADER === */
header a:hover img {
    transform: rotate(360deg);
}

/* Corrección de contraste para links del navbar en escritorio */
header nav.hidden a {
    color: rgb(var(--c-gray-400)) !important;
    transition: color 0.3s ease;
}
header nav.hidden a:hover {
    color: rgb(var(--c-purple-500)) !important;
}
body.theme-blue header nav.hidden a:hover {
    color: rgb(var(--c-purple-600)) !important;
}

/* Clases de utilidad para animaciones al hacer scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === NUESTRO EQUIPO  === */
.team{
    padding-top: 4rem;                  
    padding-bottom: 6rem;                
    background-image: url('../assets/images/items\ web/fondoBlur.png');
    background-position: center;
    background-size: cover;           
    height: 100%;
    width: 100%;
    position: fixed;  
    overflow: hidden;
}
.team h2{
    text-align: center;
    font-size: 2.25rem;               /* text-4xl */
    font-weight: 700;                 /* font-bold */
    margin-bottom: 2.5rem;           /* mb-6 */
    color: rgb(var(--c-yellow-500));                 
}
/*marco team*/
.marco{
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid rgb(var(--c-purple-400)); 
    color: #fff;
    padding: 2rem; 
    text-align: center; 
    border-radius: 1.5rem;
    animation: float 6s ease-in-out infinite;
    transition: scale 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, translate 0.3s ease;
}

/* Forzar que las descripciones en tarjetas oscuras mantengan texto claro */
.marco p:not(.cargos) {
    color: rgba(255, 255, 255, 0.7) !important;
}
.marco:hover{
    cursor: pointer;
    border-color: rgb(var(--c-cyan-400));
    position: relative;
    scale: 1.02;
    /*Grupos de animaciones*/
    -webkit-animation:
    glitch 1s cubic-bezier(0, 0, 0, 0) infinite,
    glitchMotion 3s cubic-bezier(0, 0, 0, 0) infinite;

    animation:
    glitch 1s cubic-bezier(0, 0, 0, 0) infinite,
    glitchMotion 3s cubic-bezier(0, 0, 0, 0) infinite;

    /*Luz detras de imagen*/
    .imagenIntegrante{
        box-shadow: 0px 0px 20px rgb(var(--c-purple-400) / 0.3); 
        border-color: rgb(var(--c-purple-400));                                
        transition-property: box-shadow;
        transition-duration: 0.2s;
    }

    /*Cambio texto cargos*/
    cargos{
        color: rgb(var(--c-purple-400));
    }
}

.cargos{
    color: rgb(var(--c-cyan-400));      
    font-weight: 500;     
    margin-bottom: 1rem;   
}
.imagenIntegrante {
    position: relative;                   
    width: 100%;                         
    height: 100%;                        
    object-fit: cover;        
    border-radius: 9999px;            
    border-width: 2px;  
    border-color: rgb(var(--c-cyan-400));                                
}

/* Efecto Glitch */      
@keyframes glitch { /*animacion glitch por frames*/
    0%  {
        box-shadow: -2px 0 rgba(255, 0, 157, 0.7),   2px 0 cyan;
        text-shadow:-0.5px 0 rgba(255, 0, 157, 0.7), 0.5px 0 cyan;
    }
    20% {
        box-shadow: -3px 0 rgba(255, 0, 157, 0.7),   3px 0 cyan;
        text-shadow:-0.6px 0 rgba(255, 0, 157, 0.7), 0.6px 0 cyan;
    }
    40% {
        box-shadow: -2px 0 rgba(255, 0, 157, 0.7),   2px 0 cyan;
        text-shadow: 0.5px 0 rgba(255, 0, 157, 0.7), 0.5px 0 cyan;
    }
    60% {
        box-shadow: -2px 0 rgba(255, 0, 157, 0.7),   2px 0 cyan;
        text-shadow: 0.3px 0 rgba(255, 0, 157, 0.7), 0.3px 0 cyan;
    }
    80% {
        box-shadow: -2px 0 rgba(255, 0, 157, 0.7),   2px 0 cyan;
         text-shadow:0.8px 0 rgba(255, 0, 157, 0.7), 0.8px 0 cyan;
    }
    100%{
        box-shadow: -4px 0 rgba(255, 0, 157, 0.7),   4px 0 cyan;
        text-shadow:-0.5px 0 rgba(255, 0, 157, 0.7), 0.5px 0 cyan;
    }
}
@keyframes glitchMotion { /*animacion movimiento glitch por frames*/
    7%    {transform: translateX(-3px);}
    7.5%  {transform: translateX(0) translateY(0);}
    40%   {transform: translateX(1px);}
    40.5% {transform: translateX(-1px) translateY(0);}
    40.9% {transform: translateX(0) translateY(0);}
    70%   {transform: translateX(0);}
    70.5% {transform: translateX(2px) translateY(0);}
    70.9% {transform: translateX(0) translateY(0);}
}
@-webkit-keyframes glitchMotion { /*animacion movimiento glitch por frames*/

}

/*
=====================================================
================= VENTANA EMERGENTE =================
=====================================================
*/
/* === VENTANA DESCRIPCION PROYECTO === */
.ventana {
    display: none;    
    margin-left: auto;
    margin-right: auto;
    margin-top: 2%;
    left: 0;
    right: 0;
    position: fixed;
    z-index: 99999;
    width: 68%;
    height: 82%;
    box-shadow: 0 0 260px rgba(0, 0, 0, 0.8);
    border-radius: 1.5rem;
    overflow: hidden;
}

.barraTitulo {
    font-size: 23px;
    background: rgb(var(--c-yellow-500) / 0.96); 
    color: black;
    padding: 1.6%;
    font-style: italic;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.barraTitulo button {
    background: transparent;
    border: none;
    color: black;
    font-weight: bold;
    cursor: pointer;
    float: right;
}

.contenido {
    background: rgb(var(--c-gray-980) / 0.96);
    height: 91%;
    color: rgb(var(--c-gray-400));
    overflow-y: auto;   
}



/* === PARTES DE LA VENTANA === */
/* -- Caracteristicas Generales de sus Servicios -- */
.desc1{
    background-color: rgb(var(--c-purple-400) / 0.55);
    padding-left: 10%;
    padding-right: 10%;
    padding-top: 3%;
    padding-bottom: 5em;
}
.desc1 h2{
    text-align: center;
    font-size: 2.15rem;               
    font-weight: 700;            
    margin-bottom: 2.3rem;           
    color: rgb(var(--c-gray-400));
    text-shadow: 0px 0px 10px rgb(var(--c-gray-500) / 0.9);
}
.desc1 p{
    text-align: center;
}

.caract2{
    padding-left: 5%;
    padding-right: 5%;
    margin-bottom: 4rem;  
    margin-top: 2.7em;         
}
.caract2 h2{
    text-align: center;
    font-size: 2.15rem;               
    font-weight: 700;            
    margin-bottom: 1.7rem;           
    color: rgb(var(--c-purple-600) / 0.8);
    text-shadow: 0px 0px 10px rgb(var(--c-purple-600) / 0.5);
}

.caract2grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 768px) { /* md breakpoint en Tailwind es 768px */
    .caract2grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.marcoCar{
    background-color: rgb(var(--c-gray-500) / 0.3);
    box-shadow: 0 0 15px 10px rgb(var(--c-cyan-500) / 0.3) inset;
    border: 1px solid rgb(var(--c-purple-400)); 
    padding: 2rem;
    width: 100%;
    text-align: center;
    justify-self: end;
    border-radius: 1.5rem;
    animation: float 6s ease-in-out infinite;
    transition: scale 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, translate 0.3s ease;
}
.marcoCar:hover{
    background-color: rgb(var(--c-purple-500) / 0.25);
    border-color: rgb(var(--c-cyan-400));
    box-shadow: 0 0 25px rgb(var(--c-cyan-400) / 0.3), 0 0 15px 5px rgb(var(--c-cyan-500) / 0.2) inset;
    scale: 1.02;         
    transition: scale 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, translate 0.3s ease;
    /*Grupos de animaciones*/
    -webkit-animation:
    glitch 1s cubic-bezier(0, 0, 0, 0) infinite,
    glitchMotion 3s cubic-bezier(0, 0, 0, 0) infinite;

    animation:
    glitch 1s cubic-bezier(0, 0, 0, 0) infinite,
    glitchMotion 3s cubic-bezier(0, 0, 0, 0) infinite;
}
.marcoCar:hover .marcoCarH3{
    color: rgb(var(--c-cyan-400));
}
.marcoCarH3{
    font-size: 1.15rem;     
    font-weight: 700;       
    margin-bottom: 0.75rem; 
    color: rgb(var(--c-purple-500));
}
.marcoCarP{
    color: rgb(var(--c-gray-400) / 0.95);
    text-align: justify;
}

.iconoMarcoSer{
    display: inline-block;
    width: 3rem;            
    height: 3rem;           
    color: rgb(var(--c-yellow-500));         
    margin-bottom: 1rem;
    
}


/* -- Galeria de Imagenes -- */
.galer3{
    background-color: rgb(var(--c-cyan-400) / 0.55);
    padding-left: 10%;
    padding-right: 10%;
    padding-top: 3%;
    margin-top: 2.7em;
    padding-bottom: 5em;
}
.galer3 h2{
    text-align: center;
    font-size: 2.15rem;               
    font-weight: 700;            
    margin-bottom: 2.3rem;           
    color: rgb(var(--c-gray-400));
    text-shadow: 0px 0px 10px rgb(var(--c-gray-500) / 0.9);
}
.galer3grid{
    display: grid;
    grid-template-columns: 2fr;
    gap: 2.5rem;
    position: relative;
}
@media (min-width: 768px) { /* md breakpoint en Tailwind es 768px */
    .galer3grid {
        grid-template-columns: repeat(3, 2fr);
    }
}
.galer3grid img{
    left: 0;
    right: 0;
    margin: auto;
    width: 33em;
    height: 19em;
    box-shadow: 0px 0px 35px rgb(var(--c-cyan-500));
}
.galer3grid img:hover{
    transition: 300ms;
    z-index: 9999;
    cursor: pointer;
    transform: scale(1.11);
}


/* -- Enlaces  -- */
.enl4{
    padding-left: 5%;
    padding-right: 5%;
    padding-top: 2%;
    margin-bottom: 0.6em; 
}
.enl4 h2{
    text-align: center;
    font-size: 2.15rem;               
    font-weight: 700;            
    margin-bottom: 1.7rem;           
    color: rgb(var(--c-purple-500) / 0.8);
    text-shadow: 0px 0px 10px rgb(var(--c-purple-500) / 0.5);
}

.enl4grid{
    display: grid;
    grid-template-columns: 2fr;
    gap: 2.5rem;
    position: relative;
}
@media (min-width: 768px) { /* md breakpoint en Tailwind es 768px */
    .enl4grid {
        grid-template-columns: repeat(3, 2fr);
    }
}
.enl4grid a{
    width: 5em;
}
.enl4grid img{
    width: 5.5em;
    left: 0;
    right: 0;
    margin: auto;
    float: none;
}
.enl4grid h3{
    text-align: center;
    font-size: 1.45rem;     
    font-weight: 700;     
    margin-top: 1em;  
    margin-bottom: 0.75rem; 
    color: rgb(var(--c-gray-400) / 0.8);
}
.enl4Texto{
    color: rgb(var(--c-cyan-400) / 0.7);
    font-size: 1.2em;
    padding-top: 2em;
    padding-bottom: 2em;
    text-align: center;
}
.correo{
    color: rgb(var(--c-cyan-400))
}

.imagenPorfolio{
    position: relative;
    width: 60%;
    height:  32em;
    padding-bottom: 4em;
    right: 0;
    left: 0;
    margin: auto;
}

/* === FOORTER === */
footer{
    position: fixed;
    width: 100%;
    bottom: 0;
    background-color: rgba(3, 7, 18, 0.7); 
    border-bottom: 1px solid rgba(31, 41, 55, 0.7); 
    padding-top: 2rem;      
    padding-bottom: 2rem;  
}



/*
=====================================================
====================== FUENTES ======================
=====================================================
*/
/* Fuente importada del Logotipo */
@font-face {
  font-family: "Ethnocentric";
  src: url("../assets/fonts/Ethnocentric-Regular.otf") format("truetype");
}

/* Fuente general para la web */
@font-face { /*una opcion pero no es la puesta*/
  font-family: "URWGothic-Book";
  src: url("../assets/fonts/URWGothic-Book.otf") format("truetype");
}

@font-face {
  font-family: "Telespania";
  src: url("../assets/fonts/Telespania.ttf") format("truetype");
}

/* === ANIMACIÓN DE FLOTACIÓN E INTERACCIONES EN 3D === */
@keyframes float {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -8px;
    }
}

/* Desfase de animación flotante para las tarjetas dentro de los grids */
.grid > div:nth-child(2n) .marco,
.grid > div:nth-child(2n) .marcoCar {
    animation-delay: -1.5s;
}
.grid > div:nth-child(3n) .marco,
.grid > div:nth-child(3n) .marcoCar {
    animation-delay: -3s;
}
.grid > div:nth-child(3n+1) .marco,
.grid > div:nth-child(3n+1) .marcoCar {
    animation-delay: -4.5s;
}
