/* 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: MORADO & GRIS === */
    /* MORADOS (Originales de la marca) */
    --c-purple-400: 167 139 250; /* #a78bfa */
    --c-purple-500: 139 92 246;  /* #8b5cf6 (Principal) */
    --c-purple-600: 124 58 237;  /* #7c3aed */
    --c-purple-800: 91 33 182;   /* #5b21b6 */
    --c-purple-900: 76 29 149;   /* #4c1d95 */
    
    /* AZULES (Sustituyen al azul secundario) */
    --c-cyan-400: 92 182 255;  /* #5cb6ff azul general del otro tema*/
    --c-cyan-500: 23 117 194;  /* #1775c2 un poco mas oscuro*/

    /* AMARILLOS */
    --c-yellow-400: 254 255 171;  /* #feffab (Amarillo oscuro) */
    --c-yellow-500: 247 255 92;   /* #f7ff5c (Amarillo principal) */
    --c-yellow-600: 234 236 82;   /* #eaec52 un poco mas oscuro */
    --c-yellow-800: 185 187 46;   /* #b9bb2e un poco mas oscuro */
    --c-yellow-900: 122 123 26;   /* #7a7b1a un poco mas oscuro */
    
    /* GRIS AZULADO DEL FONDO */
        --c-gray-400: 255 255 255; /* #ffffff */
        --c-gray-500: 123 166 202; /* #7ba6ca */
        --c-gray-800: 7 89 133;    /* #075985 */
        --c-gray-900: 30 41 59;    /* #1e293b */
        --c-gray-950: 11 17 32;    /* #0b1120 */  
        --c-gray-980: 11 17 32;    /* #000000 */

/* === TEMA ALTERNATIVO: AZUL & AMARILLO (Se activa con la clase .theme-blue) === */
    body.theme-blue{
        /* AZUL (Sustituyen a la variable 'purple' original) */
        --c-purple-400: 143 205 255; /* #8fcdff claro*/
        --c-purple-500: 92 182 255;  /* #5cb6ff (Azul Principal) */
        --c-purple-600: 23 117 194;  /* #1775c2 un poco mas oscuro*/
        --c-purple-800: 32 97 150;   /* #206196 menos saturado (tirando a oscuro)*/
        --c-purple-900: 11 72 122;   /* #0b487a mas oscuro*/
        
        /* MORADOS (Sustituyen a la variable 'cyan' original) */
        --c-cyan-400: 167 139 250; /* #a78bfa */
        --c-cyan-500: 139 92 246;  /* #8b5cf6 (Principal) */

        /* BLANCOS DEL FONDO (sustituyen a "gray"*/
        --c-gray-400: 0, 76, 148;    /* #004c94 */
        --c-gray-980: 255 255 255;   /* #ffffff */
        --c-gray-800: 237 245 255;   /* #edf5ff */
        --c-gray-900: 214 233 255;   /* #d6e9ff */
        --c-gray-950: 114 164 224;   /* #72a4e0 */
        --c-gray-500: 114 164 224;   /* #1e395e */
        
        /* AMARILLOS */
        --c-yellow-400: 254 255 171;  /* #feffab (Amarillo oscuro) */
        --c-yellow-500: 247 255 92;   /* #f7ff5c (Amarillo principal) */
        --c-yellow-600: 234 236 82;   /* #eaec52 un poco mas oscuro */
        --c-yellow-800: 185 187 46;   /* #b9bb2e un poco mas oscuro */
        --c-yellow-900: 122 123 26;   /* #7a7b1a un poco mas oscuro */
    }
}

/* Transición suave de colores al cambiar de tema + Tipografia */
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;
}

/* 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 === */
.contenedorHeader{
    max-width: 100%;
    margin-left: auto;       
    margin-right: auto;      
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.logotipoRS{
    font-family: Ethnocentric, sans-serif;
    color: #8b5cf6;
    text-shadow: 0.5px  0px 0px rgb(0, 204, 255),
                 0px  0.5px 0px rgb(0, 204, 255),
                 -0.5px  0px 0px rgb(0, 204, 255),               
                 0px -0.5px 0px rgb(0, 204, 255);
    font-size: 1.7rem;
    font-style: italic;
    font-weight: bolder;
    letter-spacing: 0.11em;
    margin-right: 15px;
}

/* 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 {
    position: sticky;
    top: 0;
    z-index: 5000;
    width: 100%;
    background-color: rgba(3, 7, 18, 0.9); /* gray-950/80 */
    backdrop-filter: blur(16px); /* backdrop-blur-lg */
    border-bottom: 1px solid rgba(0, 204, 255); /* border-b border-gray-800/50 */
}
header a:hover img {
    transform: rotate(360deg);
}

/* 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);
}

/* === PROYECTOS === */
.team{
    padding-top: 5rem;                  
    padding-bottom: 5rem;   
    background-image: url('../assets/images/items\ web/fondoBlur.png');
    background-position: center;
    background-size: cover;      
}

/*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: left; 
    width: 100%;
    height: auto;
    overflow: hidden; 
}
.marco:hover{
    cursor: pointer;
    border-color: rgb(var(--c-cyan-400));
    position: relative;
    /*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*/
    .portada{
        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*/
    .titulo{
        color: rgb(var(--c-purple-400));
    }
}
.titulo{
    color: rgb(var(--c-cyan-400));
    margin-bottom: 1rem;        
    font-size: 23px;
}
.portada {
    position: relative;
    width: 40%;                /* Ancho relativo al marco */
    aspect-ratio: 1 / 1;       /* Mantiene la imagen cuadrada */
    object-fit: cover;                 
    border: 2px solid rgb(var(--c-cyan-400));   
    margin-right: 3em;         
    flex-shrink: 0; 
    float: left;           
}

/* 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*/

}


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



/*
=====================================================
================= 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 160px rgba(0, 0, 0, 0.8);
}

.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 === */
/* -- Descripcion -- */
.desc1{
    background-image: url("../assets/images/juegosWeb/imagenFondoDesc.png");
    background-position: center;
    background-size: cover;
    padding-left: 5%;
    padding-right: 5%;
    padding-top: 2%;
    margin-bottom: 3%;
    height: 350px;       /* sm:flex-row */
}
@media (max-width: 640px) {
    .desc1 {
        height: auto;       /* sm:flex-row */
  }
}

.desc1 p{
    font-size: 20px;
}

/* -- Caracteristicas Generales -- */
.caract2{
    padding-left: 5%;
    padding-right: 5%;
    margin-bottom: 1.7rem;           
}
.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;
}
.marcoCar:hover{
    background-color: rgb(var(--c-cyan-400) / 0.65);
    transform: scale(1.02);         
    transition: transform 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;

    .marcoCarH3{
        color: rgb(var(--c-gray-980) / 0.97);
    }
}
.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-400));
}
.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(2, 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: 1.7rem; 
}
.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(2, 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);
}


/* -- Contacto --*/
.contact5{
    background-color: rgb(var(--c-gray-900));
    display: inline-block;     
    justify-content: center;     
    gap: 1rem;
    width: 100%;
}
@media (min-width: 640px) {    /* sm breakpoint en Tailwind es 640px */
  .contact5 {
    flex-direction: row;       /* sm:flex-row */
  }
}
.contact5 h2{
    text-align: center;
    font-size: 2.15rem;               
    font-weight: 700; 
    margin-top: 2em;           
    margin-bottom: 1rem;           
    color: rgb(var(--c-cyan-480) / 0.8);
    text-shadow: 0px 0px 10px rgb(var(--c-cyan-480) / 0.5);
}

/* Botón "contactanos" */
.contactanosB{      
    width: 50%;
    height: auto;
    right: 0;
    margin: 0 auto;                   
    transition-property: transform;
    transition-duration: 300ms;
    transition-timing-function: ease;
    margin-bottom: 2em;
}
.contactanosB:hover {
    transform: scale(1.03);            
}



/*
=====================================================
====================== 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");
}

