
/* ==============================
   1. CONFIGURACIÓN GENERAL
============================== */

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

:root {
    scroll-padding-top: 76px;
}


/* ==============================
   2. ANIMACIÓN DE FONDOS
============================== */

@keyframes miAnimacion {
    0% {
        opacity: 1;
    }

    16% {
        opacity: 1;
    }

    20% {
        opacity: 0;
    }

    96% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.fondo {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    background-color: #030714;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    animation: miAnimacion 20s linear infinite;
}

#fondo1 {
    background-image: url("../img/imagen1.webp");
    animation-delay: 0s;
}

#fondo2 {
    background-image: url("../img/imagen2.webp");
    animation-delay: -4s;
}

#fondo3 {
    background-image: url("../img/imagen3.webp");
    animation-delay: -8s;
}

#fondo4 {
    background-image: url("../img/imagen4.webp");
    animation-delay: -12s;
}

#fondo5 {
    background-image: url("../img/imagen5.webp");
    animation-delay: -16s;
}


/* ==============================
   3. ENCABEZADO
============================== */

.encabezado {
    position: sticky;
    top: 0;
    z-index: 10;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 30px;

    background-color: rgba(4, 12, 32, 0.96);
    color: white;
}


/* ==============================
   4. LOGO Y NOMBRE
============================== */

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.logo img {
    width: 45px;
    height: 45px;
    object-fit: contain;

    transition:
        transform 0.3s ease,
        filter 0.3s ease;
}

/* Animación del logo */
.logo:hover img {
    transform: scale(1.1);

    filter: drop-shadow(
        0 0 10px rgba(140, 80, 255, 0.8)
    );
}

/* Nombre de la web */
.logo span {
    display: inline-block;

    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 1px;

    transition:
        color 0.3s ease,
        text-shadow 0.3s ease,
        transform 0.3s ease;
}

/* Animación del nombre */
.logo:hover span {
    color: #d9a7ff;

    text-shadow:
        0 0 8px rgba(0, 234, 255, 0.9),
        0 0 20px rgba(150, 70, 255, 0.8);

    transform: translateY(-2px);
}


/* ==============================
   5. TÍTULOS PRINCIPALES
============================== */

.titulo-principal {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: 2px;
    color: white;
}


/* ==============================
   6. ENLACES DE NAVEGACIÓN
============================== */

nav {
    display: flex;
    gap: 25px;
}

nav a {
    color: white;
    text-decoration: none;

    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    font-weight: 500;

    transition:
        color 0.3s ease,
        text-shadow 0.3s ease;
}

nav a:hover {
    color: #d9a7ff;

    text-shadow:
        0 0 8px rgba(140, 80, 255, 0.5);
}

.menu-desplegable nav a[aria-current="page"] {
    color: #d9a7ff;
    background-color: rgba(255, 255, 255, 0.1);
}


/* ==============================
   7. MENÚ HAMBURGUESA
============================== */

.menu-desplegable {
    position: relative;
    margin-left: 20px;
}

.menu-desplegable summary {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    cursor: pointer;
    list-style: none;
    color: white;
    font-size: 28px;
}

.menu-desplegable summary::-webkit-details-marker {
    display: none;
}

.menu-desplegable nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;

    width: 190px;
    padding: 8px;

    background-color: rgba(15, 18, 27, 0.95);
    border-radius: 12px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3);
}

.menu-desplegable nav a {
    display: block;
    padding: 12px 14px;

    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;

    border-radius: 8px;
}

.menu-desplegable nav a:hover {
    color: #d9a7ff;
    background-color: rgba(255, 255, 255, 0.12);
}


/* ==============================
   8. ADAPTACIÓN MÓVIL
============================== */

@media (max-width: 767px) {
    :root {
        scroll-padding-top: 66px;
    }

    .encabezado {
        flex-direction: row;
        padding: 12px 16px;
    }

    .logo img {
        width: 38px;
        height: 38px;
    }

    .logo span {
        font-size: 18px;
    }

    .menu-desplegable nav {
        width: 170px;
    }

    /* Imagen adaptada a móvil */
    #fondo1 {
        background-image:
            url("../img/imagen1-movil.webp");
    }
}
body {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    background-color: #030714;

    display: flex;
    flex-direction: column;
}


/* SECCIÓN PRINCIPAL */

.hero {
    position: relative;
    z-index: 1;

    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 50px 20px;

    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.50) 0%,
        rgba(0, 0, 0, 0.22) 45%,
        transparent 80%
    );
}

/* Bloque central */

/* Bloque central sin tarjeta */

.hero-contenido {
    width: 100%;
    max-width: 560px;
    padding: 0;

    text-align: left;
    color: white;

    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;

    animation: aparecerHero 4.3s ease-out both;
}

/* Etiqueta superior */

.hero-etiqueta {
    font-family: 'Rajdhani', sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #c5a3ff;
    margin-bottom: 20px;
         text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.50),
        0 4px 14px rgba(0, 0, 0, 0.65),
        0 8px 28px rgba(0, 0, 0, 0.50);
}

/* Título principal */

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(26px, 3.5vw, 44px);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 25px;
    color: white;

    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.90),
        0 4px 14px rgba(0, 0, 0, 0.90),
        0 8px 28px rgba(0, 0, 0, 0.90);
}

/* Descripción */

.hero-descripcion {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.5;
    margin-bottom: 30px;
    color: white;

    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.90),
        0 4px 14px rgba(0, 0, 0, 0.90),
        0 8px 28px rgba(0, 0, 0, 0.90);
}

/* Botón */

.hero-boton {
    display: inline-block;
    padding: 14px 28px;

    background: #8055d7;
    color: white;
    text-decoration: none;

    font-family: 'Rajdhani', sans-serif;
    font-size: 20px;
    font-weight: 600;

    border-radius: 10px;

    transition: transform 0.3s ease,
                background-color 0.3s ease;
}

.hero-boton:hover {
    background: #a274ff;
    transform: translateY(-3px);
}

/* PÁGINAS INTERNAS */

.pagina-interna {
    justify-content: center;
    padding: clamp(36px, 5vw, 64px) clamp(20px, 5vw, 64px);
    background: linear-gradient(180deg, rgba(3, 7, 20, 0.72), rgba(3, 7, 20, 0.86));
}

.pagina-interna-contenido {
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
    color: white;

    animation: aparecerHero 4s ease-out both;
}

.pagina-interna .hero-etiqueta {
    margin-bottom: 12px;
}

.pagina-interna h1 {
    max-width: 900px;
    margin-bottom: 14px;
    font-size: clamp(28px, 4vw, 46px);
}

.pagina-lead {
    margin-bottom: 12px;
    color: #d6c8ff;
    font: 600 clamp(20px, 2.5vw, 27px)/1.35 'Rajdhani', sans-serif;
}

.pagina-texto {
    max-width: 820px;
    margin-bottom: 18px;
    color: #f1f3ff;
    font: 500 18px/1.5 'Rajdhani', sans-serif;
}

.pagina-seccion-titulo {
    margin: 28px 0 14px;
    color: white;
    font: 600 clamp(22px, 3vw, 28px)/1.3 'Orbitron', sans-serif;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.servicio-item {
    padding: 16px 18px;
    border: 1px solid rgba(173, 169, 220, 0.32);
    border-radius: 12px;
    background: rgba(10, 15, 34, 0.62);
    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        background-color 0.28s ease,
        box-shadow 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {
    .servicio-item:hover {
        transform: translateY(-4px);
        border-color: rgba(197, 163, 255, 0.75);
        background: rgba(21, 25, 52, 0.82);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    }
}

.servicio-item h3 {
    margin-bottom: 5px;
    color: #e3d8ff;
    font: 600 20px/1.3 'Rajdhani', sans-serif;
}

.servicio-item p {
    color: #e1e5f2;
    font: 500 16px/1.45 'Rajdhani', sans-serif;
}

.pagina-cierre {
    margin: 22px 0 14px;
    color: white;
    font: 600 22px/1.35 'Rajdhani', sans-serif;
}

.contacto-contenido {
    max-width: 900px;
}

.contacto-bloque {
    margin-top: 26px;
    padding: 20px 22px;
    border: 1px solid rgba(173, 169, 220, 0.32);
    border-radius: 14px;
    background: rgba(10, 15, 34, 0.68);
}

.contacto-bloque .pagina-seccion-titulo {
    margin-top: 0;
}

.contacto-whatsapp {
    margin: 8px 0 16px;
    color: #e1e5f2;
    font: 600 19px 'Rajdhani', sans-serif;
}

.contacto-whatsapp a {
    color: #c5a3ff;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.pagina-acciones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.boton-secundario {
    display: inline-block;
    padding: 14px 22px;
    border: 1px solid rgba(204, 195, 255, 0.55);
    border-radius: 10px;
    color: white;
    font: 600 19px 'Rajdhani', sans-serif;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.boton-secundario:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.12);
}

.pagina-interna a:focus-visible {
    outline: 3px solid #53e6ff;
    outline-offset: 3px;
}

/* Animación de entrada */

@keyframes aparecerHero {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

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

/* FOOTER */

.pie {
    position: relative;
    z-index: 1;

    display: flex;
    justify-content: space-between;
    gap: 15px;

    padding: 20px 30px;

    background: rgba(0, 0, 0, 0.75);
    color: white;

    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
}

/* MÓVIL */

@media (max-width: 767px) {

    .hero {
        padding: 30px 16px;
    }

.hero-contenido {
    width: 100%;
    max-width: 560px;
    padding: 0;
    margin-left: clamp(0px, 4vw, 60px);

    text-align: left;
    color: white;

    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;

    animation: aparecerHero 1.2s ease-out both;
}

    .hero-etiqueta {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .pie {
        flex-direction: column;
        text-align: center;
        padding: 18px;
    }

    .pagina-interna {
        padding: 36px 16px;
        text-align: left;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
    }

    .contacto-bloque {
        padding: 18px 16px;
    }

    .pagina-acciones {
        align-items: stretch;
        flex-direction: column;
    }

    .pagina-acciones .hero-boton,
    .pagina-acciones .boton-secundario {
        width: 100%;
        text-align: center;
    }
}

/* Accesibilidad */

@media (max-width: 767px) {

    .hero {
        justify-content: center;
        padding: 30px 16px;
    }

    .hero-contenido {
        max-width: 100%;
        text-align: center;
    }

    .hero-etiqueta {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .pie {
        flex-direction: column;
        text-align: center;
        padding: 18px;
    }
}

.pie-creditos a {
    font-size: inherit;
    font-weight: 600;
    color: #bfa5ff;
    text-decoration: none;
    transition: color 0.3s ease,
        text-shadow 0.3s ease;
}

.pie-creditos a:hover {
    color: #00eaff;

    text-shadow:
        0 0 8px rgba(0, 234, 255, 0.9),
        0 0 18px rgba(140, 80, 255, 0.7);
}

@media (prefers-reduced-motion: reduce) {
    .pagina-interna-contenido {
        animation: none;
    }

    .servicio-item {
        transition: none;
    }

    .servicio-item:hover {
        transform: none;
    }
}
