* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #151515;
    --bg-light: #1e1e1e;
    --text: #e0e0e0;
    --text-muted: #aaaaaa;
    --accent: #affe00;
    --accent-hover: #b3ff00;
    --accent-glow: rgba(175, 254, 0, 0.4);
    /* para sombras del logo */
    --white: #ffffff;
    --border: #2a2a2a;
    --radius: 12px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== UTILIDADES ========== */
.gym-container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.4rem;
    color: var(--white);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

/* ========== BOTONES ========== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform 0.2s, box-shadow 0.2s;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
    margin-top: 2rem;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--bg-dark);
}

.btn-accent {
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 700;
}

.btn-accent:hover {
    background: var(--accent-hover);
}

.btn-full {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
}

/* ========== ANIMACIONES ========== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== NAVEGACIÓN ========== */
.gym-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-img {
    height: 45px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text);
    font-weight: 500;
    position: relative;
    padding: 0.3rem 0;
    transition: color var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Clase para botones destacados (tipo CTA) */
.cta-link,
.btn-schedule {
    background: var(--accent);
    color: var(--bg-dark) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 4px;
    font-weight: 600;
    transition: background var(--transition), transform 0.2s;
}

.cta-link:hover,
.btn-schedule:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Para el botón de "Agenda visita" que antes era gris */
.btn-ghost {
    background: var(--bg-light);
    color: var(--text) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 4px;
}

.btn-ghost:hover {
    background: #2a2a2a;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
}

.social-icons a {
    font-size: 1.2rem;
    opacity: 0.8;
    transition: opacity 0.3s, color 0.3s;
}

.social-icons a:hover {
    opacity: 1;
    color: var(--accent);
}

/* Menú hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        display: none;
        backdrop-filter: blur(15px);
    }

    .main-nav.active {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .social-icons {
        margin: 1.5rem 0 0;
    }
}

/* ========== HERO ========== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
    position: relative;
    background-color: #111;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 1;
    padding: 1rem;
}

.hero-slogan {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.hero-logo {
    max-width: 280px;
    margin: 1.5rem auto;
    filter: drop-shadow(0 0 15px var(--accent-glow));
}

/* ========== CONTENEDOR DE VIDEO (global) ========== */
.video-fit-container {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    background: #111;
    aspect-ratio: 16 / 9;
    /* Mantiene la proporción */
    margin: 0 auto;
    /* Centrado si se usa dentro de un grid */
}

.video-fit-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    filter: brightness(0.95) contrast(1.05);
    transition: filter 0.3s ease;
}

.video-fit-container:hover iframe {
    filter: brightness(1) contrast(1.1);
}

/* ========== FEATURE ========== */
.feature {
    background: linear-gradient(135deg, #111, #1a1a1a);
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.feature-text h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.feature-text .subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.schedule-box {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.schedule-box h3 {
    margin-bottom: 1.5rem;
    color: white;
}

.schedule-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.day {
    font-weight: 600;
    color: var(--accent);
}

.time {
    color: #ddd;
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== ABOUT ========== */
.about {
    background: #0d0d0d;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.about-grid h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
}

.address {
    margin: 1rem 0 1.5rem;
    font-size: 1.1rem;
}

.address i {
    margin-right: 0.5rem;
    color: var(--accent);
}

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.map-container iframe {
    width: 100%;
    height: 250px;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== GALERÍA ========== */
.gallery {
    background: #111;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

/* ========== PRODUCTOS ========== */
.products {
    background: #0a0a0a;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.product-card {
    perspective: 1000px;
    height: 300px;
    cursor: pointer;
}

.flip-container {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.product-card:hover .flip-container {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.flip-front {
    background: #222;
}

.flip-back {
    transform: rotateY(180deg);
    background: #2a2a2a;
}

.flip-front img,
.flip-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== PLANES ========== */
.planes {
    background: #0d0d0d;
}

.planes-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.plan-item {
    width: 100%;
    text-align: center;
}

.plan-title {
    font-size: 1.6rem;
    color: var(--white);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

/* Botones móviles: ocultos por defecto, visibles solo en pantallas pequeñas */
.plan-mobile-btn {
    display: none;
}

.plan-video {
    display: block;
}

@media (max-width: 768px) {
    .planes-stack {
        gap: 3rem;
        padding: 0 1rem;
    }

    .plan-title {
        font-size: 1.3rem;
    }

    /* Oculta los videos y muestra los botones */
    .plan-video {
        display: none;
    }

    .plan-mobile-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
        font-size: 1.1rem;
        padding: 1rem 2rem;
        width: auto;
        min-width: 220px;
    }
}

/* ========== FOOTER ========== */
.site-footer {
    background: #000;
    padding: 2.5rem 0;
    border-top: 1px solid #222;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: #888;
    font-size: 0.9rem;
}

.copyright a {
    color: var(--accent);
}

.contact-info {
    display: flex;
    gap: 2rem;
    color: #ccc;
}

.contact-info i {
    margin-right: 0.4rem;
    color: var(--accent);
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
}

.modal-dialog {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    color: white;
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 1;
}

.plan-select {
    margin-bottom: 2rem;
}

.plan-select h3 {
    color: #ccc;
    margin-bottom: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #ddd;
    cursor: pointer;
    padding: 0.5rem 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    display: inline-block;
    position: relative;
}

input[type="radio"]:checked+.radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.client-fields h3 {
    color: #ccc;
    margin-bottom: 1rem;
}

input[type="text"],
input[type="tel"],
input[type="email"] {
    width: 100%;
    padding: 0.9rem;
    margin-bottom: 1rem;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--accent);
}

/* Ajustes responsivos finales */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-logo {
        max-width: 200px;
    }
}