/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BASE ===== */
body {
    font-family: system-ui, Arial, sans-serif;
    background-color: #0b0b0b;
    color: #ffffff;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================================
   HEADER STICKY – INTACSEP (FUNCIONAL)
   ========================================================= */

/* Evita que los anchors queden tapados por el header */
html {
    scroll-padding-top: 90px;
}

/* Header sticky */
.header {
    position: sticky;
    position: -webkit-sticky; /* Safari */
    top: 0;
    z-index: 1000;

    background-color: #000;
    border-bottom: 2px solid #1e90ff;

    padding: 0.8rem 1.5rem;

    display: flex;
    justify-content: space-between;
    align-items: center;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* LADO IZQUIERDO */
.header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 2px;
}

/* MENU */
.menu {
    display: flex;
    gap: 1.5rem;
}

.menu a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.menu a:hover {
    color: #1e90ff;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo-text {
        font-size: 1.2rem;
    }
}

/* ===== HERO ===== */
.hero {
    min-height: 90vh;
    padding: 2rem;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    background:
        linear-gradient(rgba(0,0,0,.75), rgba(0,0,0,.75)),
        url("https://images.unsplash.com/photo-1614064641938-3bbee52942c7")
        center/cover;

    animation: fadeIn 1.5s ease;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: #1e90ff;
}

.hero p {
    max-width: 600px;
    margin-top: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

/* ===== BOTÓN ===== */
.btn {
    margin-top: 2rem;
    background: #1e90ff;
    color: #000;
    padding: .9rem 1.8rem;
    border-radius: 6px;
    font-weight: bold;

    display: inline-flex;
    align-items: center;
    gap: .5rem;

    transition: transform .3s, background .3s;
}

.btn:hover {
    background: #0b5ed7;
    transform: scale(1.05);
}

/* ===== SECCIONES ===== */
section {
    padding: clamp(3rem, 8vw, 5rem) 2rem;
    text-align: center;
}

section h2 {
    color: #1e90ff;
    margin-bottom: 2rem;
    font-size: clamp(1.6rem, 4vw, 2rem);
}

/* ===== SERVICIOS ===== */
.servicios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: #111;
    border: 1px solid #1e90ff;
    border-radius: 10px;
    padding: 2rem;

    transition: transform .3s, box-shadow .3s;
}

.card i {
    font-size: 2.5rem;
    color: #1e90ff;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 15px #1e90ff;
}

/* ===== NOSOTROS ===== */
.oscuro {
    background: #000;
}

.texto {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* =====================================
   CONTACTO: FORMULARIO + MAPA
   ===================================== */

.contacto-contenedor {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}

/* Formulario */
.contacto-formulario {
    width: 100%;
}

/* Mapa */
.contacto-mapa {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #1e90ff;
    box-shadow: 0 0 20px rgba(30,144,255,0.3);
}

.contacto-mapa iframe {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .contacto-contenedor {
        grid-template-columns: 1fr;
    }

    .contacto-mapa iframe {
        min-height: 280px;
    }
}

/* ===== FOOTER ===== */
footer {
    background: #000;
    padding: 1rem;
    text-align: center;
    border-top: 2px solid #1e90ff;
    font-size: .9rem;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    nav {
        width: 100%;
        justify-content: center;
        margin-top: .8rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== ✅ FORMULARIO ===== */
.formulario {
    max-width: 600px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.formulario input,
.formulario textarea {
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid #1e90ff;
    background: #0b0b0b;
    color: white;
    font-size: 1rem;
}

.formulario input::placeholder,
.formulario textarea::placeholder {
    color: #aaa;
}

.formulario input:focus,
.formulario textarea:focus {
    outline: none;
    border-color: #0b5ed7;
    box-shadow: 0 0 6px #1e90ff;
}

.formulario button {
    align-self: center;
    cursor: pointer;
}

/* ===== ✅ VALIDACIÓN ===== */
.error {
    color: #ff4d4d;
    font-size: 0.85rem;
    text-align: left;
    min-height: 1rem;
}

input.error-input,
textarea.error-input {
    border-color: #ff4d4d;
    box-shadow: 0 0 5px #ff4d4d;
}
``
/* ===== ✅ MENSAJE DE ÉXITO ===== */
.mensaje-exito {
    max-width: 600px;
    margin: 1.5rem auto 0;
    padding: 1rem;
    border-radius: 8px;

    background: #0f2d1f;
    border: 1px solid #00ff99;
    color: #00ff99;

    display: flex;
    align-items: center;
    gap: 0.75rem;

    opacity: 0;
    transform: translateY(20px);
    transition: opacity .4s ease, transform .4s ease;
}

.mensaje-exito i {
    font-size: 1.5rem;
}

/*  Oculto por defecto */
.oculto {
    display: none;
}

/* Visible */
.mensaje-exito.mostrar {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* ===== LOADER GPS ===== */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;

    display: none;
    justify-content: center;
    align-items: center;
}

.gps-loader {
    position: relative;
    width: 160px;
    height: 160px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    animation: fadeInLoader 0.4s ease;
}

/* LOGO */
.gps-loader img {
    width: 70px;
    z-index: 2;
}

/* TEXTO */
.gps-loader p {
    margin-top: 90px;
    font-size: 0.9rem;
    color: #1e90ff;
    font-weight: bold;
    letter-spacing: 1px;
}

/* CONTENEDOR DE PUNTOS */
.gps-points {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
}

/* PUNTOS GPS */
.gps-points span {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #1e90ff;
    border-radius: 50%;

    top: 50%;
    left: 50%;
    transform-origin: -40px center;

    animation: orbit 1.8s linear infinite;
    box-shadow: 0 0 10px #1e90ff;
}

/* DELAYS PARA ÓRBITA */
.gps-points span:nth-child(1) { animation-delay: 0s; }
.gps-points span:nth-child(2) { animation-delay: 0.3s; }
.gps-points span:nth-child(3) { animation-delay: 0.6s; }
.gps-points span:nth-child(4) { animation-delay: 0.9s; }
.gps-points span:nth-child(5) { animation-delay: 1.2s; }

/* ANIMACIONES */
@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(55px);
        opacity: 1;
    }
    to {
        transform: rotate(360deg) translateX(55px);
        opacity: 0.7;
    }
}

@keyframes fadeInLoader {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== GOOGLE MAPS ===== */
.mapa {
    max-width: 900px;
    margin: 3rem auto 0;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #1e90ff;
    box-shadow: 0 0 20px rgba(30,144,255,0.3);
}

.mapa iframe {
    width: 100%;
    height: 350px;
    border: 0;
}

/* Ajuste móvil */
@media (max-width: 480px) {
    .mapa iframe {
        height: 280px;
    }
}
.titulo-mapa {
    color: #1e90ff;
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* ===== VINCULOS SECUNDARIOS ===== */
.links-secundarios {
    background: #000;
    border-top: 1px solid #1e90ff;
    padding: 3rem 2rem;
}

.links-contenedor {
    max-width: 1100px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.links-columna h4 {
    color: #1e90ff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.links-columna ul {
    list-style: none;
}

.links-columna ul li {
    margin-bottom: 0.6rem;
}

.links-columna ul li a {
    color: #ffffff;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.links-columna ul li a:hover {
    color: #1e90ff;
    text-decoration: underline;
}

/* ===== PAGINAS LEGALES ===== */
.legal {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
    line-height: 1.7;
}

.legal h1 {
    color: #1e90ff;
    margin-bottom: 2rem;
}

.legal h2 {
    margin-top: 2rem;
    color: #1e90ff;
    font-size: 1.2rem;
}

.legal p {
    margin-top: 0.8rem;
    font-size: 1rem;
}

/* ===== AVISO DE COOKIES (DISCRETO) ===== */
.cookies-banner {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    max-width: 360px;

    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #1e90ff;
    border-radius: 10px;

    padding: 0.8rem 1rem;
    font-size: 0.8rem;
    z-index: 9999;

    display: flex;
    align-items: center;
    gap: 0.8rem;

    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    animation: slideUp 0.4s ease;
}

.cookies-banner p {
    margin: 0;
    color: #eaeaea;
    line-height: 1.4;
    flex: 1;
}

.cookies-banner i {
    color: #1e90ff;
}

.cookies-banner a {
    color: #1e90ff;
    text-decoration: none;
}

.cookies-banner a:hover {
    text-decoration: underline;
}

.btn-cookies {
    background: #1e90ff;
    color: #000;
    border: none;
    padding: 0.35rem 0.7rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-cookies:hover {
    background: #0b5ed7;
}

/* Animación sutil */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile: ancho completo */
@media (max-width: 480px) {
    .cookies-banner {
        right: 0.8rem;
        left: 0.8rem;
        max-width: unset;
    }
}

/* ==========================================
   HEADER QUE SE ENCOGE AL HACER SCROLL
   ========================================== */

/* Estado normal */
.header {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 1000;

    background-color: #000;
    border-bottom: 2px solid #1e90ff;

    padding: 0.9rem 1.6rem;
    height: 80px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    transition:
        padding 0.3s ease,
        height 0.3s ease,
        box-shadow 0.3s ease;
}

/* Logo normal */
.logo-img {
    height: 40px;
    transition: height 0.3s ease;
}

.logo-text {
    font-size: 1.4rem;
    transition: font-size 0.3s ease;
}

/* ===== ESTADO ENCOGIDO ===== */
.header.shrink {
    height: 60px;
    padding: 0.4rem 1.6rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header.shrink .logo-img {
    height: 28px;
}

.header.shrink .logo-text {
    font-size: 1.1rem;
}

/* ==========================================
   MENÚ HAMBURGUESA MÓVIL
   ========================================== */

/* Botón hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: #1e90ff;
    border-radius: 3px;
    transition: 0.3s ease;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .hamburger {
        display: flex;
    }

    /* Ocultar menú normal */
    .menu {
        position: absolute;
        top: 100%;
        right: 0;

        background: #000;
        border-top: 2px solid #1e90ff;
        width: 100%;

        flex-direction: column;
        align-items: center;
        gap: 1.2rem;

        padding: 1.5rem 0;

        display: none;
    }

    .menu a {
        font-size: 1.1rem;
    }

    /* Mostrar menú activo */
    .menu.activo {
        display: flex;
    }

    /* Animación hamburguesa → X */
    .hamburger.activo span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.activo span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.activo span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}
