/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    background: linear-gradient(180deg, #000000 0%, #000244 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: white;
}

/* Reset global de links — sin margen automático */
a {
    color: white;
    text-decoration: none;
    margin: 0;
    padding: 0;
}

hr {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.25);
}

h2, h3, p { color: white; }

/* ============================================================
   NAVBAR
   ============================================================ */
nav {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#paginas {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    width: 100%;
}

/* --- Iconos perfil + carrito (izquierda) --- */
.nav-iconos {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-iconos a {
    display: flex;
    align-items: center;
    line-height: 0;
}

.nav-iconos a img {
    filter: brightness(0) invert(1);
    width: 26px;
    height: 26px;
    display: block;
    transition: opacity 0.2s;
}

.nav-iconos a:hover img { opacity: 0.65; }

/* --- Hamburger (solo mobile) --- */
.hamburger {
    display: none;           /* oculto en desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    line-height: 0;
}

.hamburger img {
    filter: brightness(0) invert(1);
    width: 26px;
    height: 26px;
    display: block;
}

/* --- Links de navegación (desktop, izquierda después de iconos) --- */
.paginas-botones {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 6px;
}

.paginas-botones a {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.87rem;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
    margin: 0;
}

.paginas-botones a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

/* --- Logo: siempre a la derecha con margin-left: auto --- */
#Tjust {
    margin-left: auto;
    color: white;
    font-size: clamp(1.1rem, 2.5vw, 1.55rem);
    white-space: nowrap;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* --- Menú desplegable mobile --- */
/* Por defecto: completamente oculto */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: rgba(0, 2, 30, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Solo se muestra cuando JS añade la clase .open */
.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin: 0;
    transition: background 0.2s, color 0.2s;
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

/* ============================================================
   HERO
   ============================================================ */
.Padre {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 4vw, 60px);
    padding: clamp(32px, 6vw, 70px) clamp(20px, 5vw, 60px);
}

#central {
    flex: 1 1 300px;
    min-width: 0;
}

#central h2 {
    font-size: clamp(1.6rem, 3.5vw, 3rem);
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 700;
    color: white;
}

.textobloom { color: #0037ff; }

#central p {
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    opacity: 0.75;
    margin-bottom: 32px;
    letter-spacing: 0.02em;
    color: white;
}

#central button {
    background: #0037ff;
    color: white;
    border: none;
    padding: 13px 32px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0, 55, 255, 0.35);
}

#central button:hover {
    background: #0029cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 55, 255, 0.5);
}

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel-wrapper {
    flex: 1 1 340px;
    max-width: min(720px, 100%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.slide.active { opacity: 1; }

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.45) 100%);
    pointer-events: none;
    z-index: 1;
}

.dots { display: flex; gap: 8px; }

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    cursor: pointer;
    transition: background 0.4s ease, transform 0.4s ease;
}

.dot.active {
    background: rgba(255,255,255,0.9);
    transform: scale(1.4);
}

.progress-track {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.1);
    border-radius: 1px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: rgba(255,255,255,0.55);
    border-radius: 1px;
    transition: width linear;
}

/* ============================================================
   FOOTER
   ============================================================ */
.creditos {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: clamp(28px, 5vw, 80px);
    padding: clamp(32px, 5vw, 52px) clamp(20px, 5vw, 60px);
}

.creditos > div { display: flex; flex-direction: column; gap: 10px; }

.creditos-brand h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: white;
}

.creditos-brand p {
    font-size: 0.88rem;
    opacity: 0.6;
    color: white;
}

.creditos-redes h3,
.creditos-contacto h3 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    color: white;
    margin: 0 0 8px 0;
}

.social-links {
    display: flex;
    gap: 14px;
    align-items: center;
}

.social-links a img {
    filter: brightness(0) invert(1);
    width: 28px;
    height: 28px;
    display: block;
    transition: opacity 0.2s, transform 0.2s;
}

.social-links a:hover img {
    opacity: 0.7;
    transform: scale(1.1);
}

.mail-link {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    word-break: break-all;
    margin: 0;
    transition: color 0.2s;
}

.mail-link:hover { color: white; }

/* ============================================================
   RESPONSIVE — TABLET  ≤ 900px
   ============================================================ */
@media (max-width: 900px) {

    /* Ocultar links de desktop, mostrar hamburger */
    .paginas-botones { display: none; }
    .hamburger { display: block; }

    /* Hero en columna */
    .Padre {
        flex-direction: column;
        align-items: stretch;
        padding: 28px 20px;
        gap: 28px;
    }

    #central { flex: none; width: 100%; }

    .carousel-wrapper {
        flex: none;
        width: 100%;
        max-width: 100%;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE  ≤ 480px
   ============================================================ */
@media (max-width: 480px) {

    #paginas { padding: 10px 14px; gap: 8px; }

    .nav-iconos a img,
    .hamburger img { width: 22px; height: 22px; }

    #Tjust { font-size: 1rem; }

    #central h2 { font-size: 1.5rem; }

    #central button {
        width: 100%;
        padding: 14px;
    }

    /* Footer columna única */
    .creditos {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        padding: 24px 16px;
    }
}

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .slide, #central button, .social-links a img { transition: none; }
}
