/* ─── Header Section ─── */

/* Section Background */
.section-header {
    background-color: transparent;
}

/* Las estrellas animadas se renderizan via canvas (background-stars.js + stars.css) */

.section-header .container {
    position: relative;
    z-index: 2;
}

/* Header */
header {
    text-align: center;
    padding: 20px 0;
}

/* Header Description */
.header-description {
    max-width: 600px;
    margin: 20px auto 0;
    padding: 0 20px;
    font-size: 0.85rem;
    color: #b8b8b8;
    line-height: 1.6;
    text-align: center;
}

.header-description a {
    color: #5cb85c;
    text-decoration: none;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

.header-description a:hover {
    color: #6ccf6c;
    text-decoration: underline;
}

@supports (font-size: clamp(1rem, 2vw, 3rem)) {
    .header-description {
        font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    }
}

/* Banner */
.banner {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

/* Fallback para navegadores sin aspect-ratio */
.banner-img {
    width: 100%;
    height: auto;
    display: block;
    /* Fallback: padding-bottom trick para aspect-ratio */
}

/* Contenedor para el fallback de aspect-ratio del banner */
.banner {
    position: relative;
}

.banner::before {
    content: "";
    display: block;
    padding-bottom: calc(1300 / 4096 * 100%); /* ~31.74% */
}

.banner .banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Navegadores modernos con soporte de aspect-ratio */
@supports (aspect-ratio: 1) {
    .banner::before {
        display: none;
        padding-bottom: 0;
    }
    
    .banner .banner-img {
        position: static;
        height: auto;
        object-fit: cover;
        aspect-ratio: 4096 / 1300;
    }
}

.main-title {
    /* Fallback para navegadores sin clamp() */
    font-family: 'minecraft_seven_v2', cursive;
    font-size: 2rem;
    letter-spacing: 4px;
    color: #ffffff;
    text-shadow:
        4px 4px 0px rgba(0, 0, 0, 0.8),
        -2px -2px 0px rgba(255, 255, 255, 0.1);
}

/* Mejora progresiva: renderizado pixelado para estética Minecraft */
@supports (image-rendering: pixelated) {
    .main-title {
        image-rendering: pixelated;
    }
}

@supports (font-size: clamp(1rem, 2vw, 3rem)) {
    .main-title {
        font-size: clamp(1.5rem, 4vw, 3rem);
    }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    header {
        padding: 15px 0;
    }

    .header-description {
        max-width: 500px;
        margin-top: 15px;
        padding: 0 15px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 0;
    }

    .header-description {
        max-width: 100%;
        margin-top: 12px;
        padding: 0 10px;
        font-size: 0.65rem;
        line-height: 1.5;
    }
}

/* Pantallas apaisadas y de poca altura (por ejemplo, 854 x 480).
   Se conserva todo el encabezado visible antes de las descargas. */
@media (max-height: 540px) and (min-width: 769px) and (max-width: 960px) {
    header {
        padding: 6px 0;
    }

    .banner {
        max-width: 420px;
    }

    .header-description {
        max-width: 520px;
        margin-top: 5px;
        padding: 0 10px;
        font-size: 0.55rem;
        line-height: 1.25;
    }
}
