/* 0. Variables globales ---------------------------- */
:root {
    /* colores */
    --c-bg-top: #000;
    --c-bg-bottom: #0f0f0f;
    --c-accent: #ff0033;
    --c-accent-2: #cc00ff;

    /* tipografía fluida (h2 hero) */
    --fs-h2-max: 3.5rem;
    --fs-h2-min: 2rem;
}

/* 1. Reset y base ---------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(180deg, var(--c-bg-top), var(--c-bg-bottom));
    color: #fff;
    overflow-x: hidden;
}

/* 2. Header ---------------------------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #0a0a0a;
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 2px solid var(--c-accent);
    box-shadow: 0 0 20px var(--c-accent);
    z-index: 100;
}

header h1 {
    color: #fff;
    font-size: 3rem;
    letter-spacing: 2px;
    text-shadow: 0 0 15px var(--c-accent);
}

@media(max-width:767px) {
    header h1 {
        font-size: 2rem;
    }
}

/* 3. Hero ------------------------------------------ */
.hero {
    position: relative;
    background: url('/img/simracing-punk.webp') no-repeat center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
}

.hero h2 {
    position: relative;
    font-size: clamp(var(--fs-h2-min), 6vw, var(--fs-h2-max));
    /* << tipografía fluida */
    max-width: 800px;
    text-align: center;
    text-shadow: 0 0 15px var(--c-accent);
    animation: fadeInUp 0.8s ease-in-out;
    z-index: 99;
    color: rgba(255, 255, 255, 0.8);

}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 4. Secciones genéricas --------------------------- */
.section {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--c-accent);
    text-shadow: 0 0 10px var(--c-accent);
}

.section p {
    font-size: 1.2rem;
    color: #ddd;
    line-height: 1.6;
}

/* 5. Beneficios ------------------------------------ */
.benefits {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.benefits div {
    background: #191919;
    padding: 2rem;
    border-left: 5px solid var(--c-accent);
    box-shadow: 0 0 15px rgba(255, 0, 51, .4);
    transition: transform .3s;
}

.benefits div:hover {
    transform: scale(1.03);
}

@media(min-width:768px) {
    .benefits {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* 6. Call-to-Action -------------------------------- */
.cta {
    margin-top: 3rem;
}

.cta a {
    display: inline-block;
    background: linear-gradient(90deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    padding: 1rem 2.5rem;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 0 15px var(--c-accent);
    transition: transform .2s, background .4s;
}

.cta a:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, var(--c-accent-2), var(--c-accent));
}

/* 7. Planes ---------------------------------------- */
.plans {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2.5rem;
}

.plan-card {
    background: #101010;
    border: 1px solid #222;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(204, 0, 255, .25);
    transition: transform .3s, box-shadow .3s;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255, 0, 51, .5);
}

.plan-card h4 {
    font-size: 1.8rem;
    margin-bottom: .5rem;
    color: #fff;
}

.plan-card .price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--c-accent);
}

.plan-card .old-price {
    font-size: 1rem;
    text-decoration: line-through;
    color: #888;
    margin-left: .5rem;
}

.plan-card p {
    font-size: 1rem;
    color: #ccc;
    margin: 1rem 0 2rem;
    line-height: 1.4;
}

.plan-card a {
    background: var(--c-accent);
    color: #fff;
    padding: .8rem 2rem;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 0 10px var(--c-accent);
    transition: background .3s;
}

.plan-card a:hover {
    background: var(--c-accent-2);
}

@media(min-width:768px) {
    .plans {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .plan-card {
        width: calc(50% - 1rem);
    }
}

@media(min-width:1024px) {
    .plan-card {
        width: calc(33.333% - 1rem);
    }
}

/* 8. Footer ---------------------------------------- */
.footer {
    background: #0f0f0f;
    padding: 2rem 1rem;
    text-align: center;
    color: #aaa;
    border-top: 1px solid #222;
}

.footer a {
    color: var(--c-accent);
    margin: 0 1rem;
    text-decoration: none;
}

/* 9. Hero logo + slogan ---------------------------- */

.hero-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* 2 columnas en escritorio */
    align-items: center;
    gap: 2rem;
    padding: 0 1rem;
}

.hero-content h2 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.15;
}

/* Tablet + móvil: se apila */
@media (max-width:1023px) {

    /* < 1024px = stack */
    .hero-content {
        grid-template-columns: 1fr;
        /* 1 columna */
        text-align: center;
    }

    .hero-logo {
        width: 180px;
        margin: 0 auto;
        /* centra el logo */
    }

    .hero-content h2 {
        font-size: clamp(1.8rem, 8vw, 2.8rem);
    }
}

/* ---------- Catálogo ---------- */
.catalog-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 2rem;
}

.game-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .35s;
}

.game-card:hover {
    transform: translateY(-4px);
}

.game-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform .4s;
}

.game-card:hover img {
    transform: scale(1.08);
}

.game-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .85));
    transition: background .4s;
}

.game-card:hover::after {
    background: linear-gradient(180deg, transparent 30%, rgba(204, 0, 255, .65));
}

.game-title {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 8px var(--c-accent);
}

/* Animación de aparición futurista */
.reveal {
    opacity: 0;
    transform: translateY(40px);
}

.reveal.visible {
    animation: slideUp .8s ease forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botón flotante WhatsApp */
.whatsapp-float {
    position: fixed;
    right: 2.5rem;
    bottom: 2.5rem;
    width: 60px;
    height: 60px;
    z-index: 200;
    cursor: pointer;
    border-radius: 18%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-float img {
    width: 100%;
    /* deja espacio para el borde */
    height: 100%;
    border-radius: 20%;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--c-accent);
}

/* Ajustes responsive */
@media (max-width: 480px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        right: 1rem;
        bottom: 1rem;
        border-width: 2px;
    }
}