/* GRACIAS DIOS, MAMÁ, PAPÁ Y TODAS LAS PERSONAS QUE HACEN ESTO POSIBLE COMO MIS MAYORES INVERSORES. Dios NOS BENDIGA. */

@import url('https://fonts.googleapis.com/css2?family=Pangolin&display=swap');

/* ==========================================================================
   1. BANNER DE CARGA (PRELOADER)
   ========================================================================== */
body.loading-active {
    overflow: hidden;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #111111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top: 6px solid #3831E6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 25px;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 1px;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   2. CONFIGURACIÓN BASE Y LAYOUT
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body#mm {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: url(../images/background.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    font-family: 'Pangolin', cursive;
}

div.principal {
    flex: 1;
    display: flex;
    flex-direction: column;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 20px;
}

/* ==========================================================================
   3. COMPONENTES Y TIPOGRAFÍA (VISTA DESKTOP/GENERAL)
   ========================================================================== */
h1.name {
    color: blue;
    background-color: pink;
    text-align: center;
}

p.labor {
    color: blue;
    background-color: pink;
    text-decoration: underline;
    margin-top: 0;
}

h2.enl {
    text-decoration: underline;
    background-color: white;
    color: blue;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Enlaces e Interacciones */
a {
    cursor: pointer;
    text-decoration: none;
}

/* Redes Sociales */
ul.rr {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 15px;
}

img.iconr {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

/* Enlaces de Contenido Principal (Estilo Linktree) */
.enlaces-contenedor ul {
    list-style: none;
    padding: 0;
    width: 100%;
    max-width: 450px;
}

.enlaces-contenedor li {
    padding: 8px 0;
    width: 100%;
}

a.Nenl {
    display: block;
    text-align: center;
    font-size: 1.8em;
    font-weight: bold;
    background-color: cornflowerblue;
    text-decoration: underline;
    color: gainsboro;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a.Nenl:hover {
    color: azure;
    background-color: blue;
}

/* Navegación Legal y Footer */
.legal-nav {
    margin-top: auto;
    width: 100%;
}

.legal-nav a.navv {
    background-color: black;
    color: white;
    font-size: 1.2em;
    padding: 10px;
    display: flex;
    justify-content: center;
    text-align: center;
}

.legal-nav a.navv:hover {
    background-color: gray;
    color: blue;
}

footer {
    width: 100%;
    font-size: 1.8em;
    background-color: blue;
    font-weight: bold;
    display: flex;
    justify-content: center;
    padding: 15px 0;
    color: pink;
}

/* ==========================================================================
   4. SISTEMA DE COOKIES (POSICIONADO A LA IZQUIERDA CON ANIMACIÓN IN/OUT)
   ========================================================================== */
.fondo-aviso-cookies {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.40);
    z-index: 9998; /* Justo debajo del preloader */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Clase inyectada por JS si no se han aceptado las cookies */
.fondo-aviso-cookies.activo {
    opacity: 1;
    visibility: visible;
}

.aviso-cookies {
    position: fixed;
    bottom: 20px;
    left: 20px; /* Anclado firmemente a la izquierda */
    background: #F2F3F4;
    padding: 45px 20px 20px 20px;
    width: calc(100% - 40px);
    max-width: 280px; 
    line-height: 150%;
    border-radius: 10px;
    border: 3px solid blue;
    z-index: 9999;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    
    /* Configuración para animación de subida fluida */
    transform: translateY(150%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, visibility 0.6s ease;
}

/* Clase inyectada por JS si no se han aceptado las cookies */
.aviso-cookies.activo {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.aviso-cookies .galletag {
    width: 70px;
    height: 70px;
    position: absolute;
    top: -35px;
    left: calc(50% - 35px);
}

.aviso-cookies .titulog {
    color: blue;
    margin: 10px 0;
}

.aviso-cookies .parrafog {
    font-size: 0.95rem;
    font-weight: bold;
    color: black;
    margin-bottom: 15px;
}

.aviso-cookies .botong {
    width: 100%;
    background: #595959;
    border: none;
    color: #fff;
    font-weight: bold;
    text-align: center;
    text-decoration: underline;
    padding: 12px 20px;
    cursor: pointer;
    transition: .3s ease all;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

.aviso-cookies .botong:hover {
    background: black;
}

.aviso-cookies .enlaceg {
    font-size: 0.85rem;
    color: blue;
}

.aviso-cookies .enlaceg:hover {
    text-decoration: underline;
}

/* ==========================================================================
   5. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Ajustes generales para Celulares estándar */
@media screen and (max-width: 572px) {
    body#mm {
        background-image: url(../images/hd-pacman-XR.jpg);
    }

    h1.name {
    color: white;
    background-color: #0070f3;
    text-align: center;
}

p.labor {
    color:white ;
    background-color: #0070f3;
    text-decoration: underline;
    margin-top: 0;
}

    img.CEOn {
        width: 180px;
        height: 180px;
    }

    a.Nenl {
        font-size: 1.4em;
        background-color: black;
        color: white;
        padding: 10px;
    }

    img.iconr {
        width: 28px;
        height: 28px;
    }

    .legal-nav a.navv {
        font-size: 1rem;
    }

    footer {
        font-size: 1.3em;
    }
}

/* Ajuste extremo para las pantallas más pequeñas del mercado (360px o menos) */
@media screen and (max-width: 360px) {
    body#mm {
        background-image: url(../images/mini.jpg); 
    }

    .aviso-cookies {
        max-width: 230px; 
        left: 15px;       
        bottom: 15px;
        padding: 35px 15px 15px 15px;
    }
    
    .aviso-cookies .galletag {
        width: 55px;
        height: 55px;
        top: -28px;
        left: calc(50% - 28px);
    }

    .aviso-cookies .titulog {
        font-size: 1.1rem;
        margin: 5px 0;
    }

    .aviso-cookies .parrafog {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .aviso-cookies .botong {
        padding: 10px 15px;
        font-size: 12px;
        margin-bottom: 10px;
    }
}
