/**
 * FITPRO TRAINER - Design System & Base CSS
 * Paleta de alto rendimiento, componentes responsivos y tipografía moderna
 */

:root {
    --bg-dark: #0f1115;
    --bg-surface: #171a21;
    --bg-surface-elevated: #20242e;
    --bg-surface-hover: #292e3b;
    --border-color: #2b303c;
    --border-subtle: #212530;
    
    --primary: #ff5500;
    --primary-hover: #ff6e26;
    --primary-glow: rgba(255, 85, 0, 0.25);
    --secondary: #00e5ff;
    --accent: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-subtle: #6b7280;
    --text-inverse: #0f1115;

    --font-heading: 'Cabinet Grotesk', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px var(--primary-glow);
    
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #ffffff;
    font-weight: 800;
    line-height: 1.2;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Contenedores */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #e04400 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #ff5500 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-surface-hover);
    color: #ffffff;
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border-color);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 85, 0, 0.05);
}

.btn-danger {
    background: var(--danger);
    color: #fff !important;
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--accent);
    color: #fff !important;
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Tarjetas y Paneles */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card:hover {
    border-color: rgba(255, 85, 0, 0.3);
}

/* Formularios */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}
.form-control, .form-select, textarea.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: #222733;
}
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}
.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Badges e Insignias */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-primary { background: rgba(255, 85, 0, 0.15); color: var(--primary); border: 1px solid var(--primary); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--accent); border: 1px solid var(--accent); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid var(--danger); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid var(--warning); }
.badge-secondary { background: var(--bg-surface-elevated); color: var(--text-muted); border: 1px solid var(--border-color); }

/* Alertas Flash */
.flash-container {
    margin: 1.5rem auto;
    max-width: 1200px;
    padding: 0 1.25rem;
}
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-weight: 500;
}
.alert-success { background: rgba(16, 185, 129, 0.12); border: 1px solid var(--accent); color: #34d399; }
.alert-error, .alert-danger { background: rgba(239, 68, 68, 0.12); border: 1px solid var(--danger); color: #f87171; }
.alert-warning { background: rgba(245, 158, 11, 0.12); border: 1px solid var(--warning); color: #fbbf24; }
.alert-info { background: rgba(59, 130, 246, 0.12); border: 1px solid var(--info); color: #60a5fa; }
.alert-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
}
.alert-close:hover { opacity: 1; }

/* Grid Utilitarios */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content-between; }
.justify-content-center { justify-content-center; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--accent); }
.text-warning { color: var(--warning); }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-5 { padding-top: 4rem; padding-bottom: 4rem; }

/* NAVBAR PÚBLICO */
.public-header {
    background-color: rgba(15, 17, 21, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
}
.brand-icon {
    color: var(--primary);
    font-size: 1.5rem;
}
.public-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}
.nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
}
.nav-link:hover {
    color: #ffffff;
}
.nav-auth-buttons {
    display: flex;
    gap: 0.75rem;
    margin-left: 1rem;
}
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: #ffffff;
    font-size: 1.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* SECCIONES PÚBLICAS */
.hero-section {
    padding: 6rem 0 5rem;
    background: radial-gradient(circle at 80% 20%, rgba(255, 85, 0, 0.12) 0%, transparent 60%);
    position: relative;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 3.5rem;
}
.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(255, 85, 0, 0.12);
    border: 1px solid rgba(255, 85, 0, 0.3);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}
.hero-title {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}
.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-image-box {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}
.hero-image-box img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}

/* SOBRE MÍ */
.about-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-subtle);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}
.about-image-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}
.about-image-card img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}
.stat-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 0.4rem;
}

/* SERVICIOS */
.services-section {
    padding: 5rem 0;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem;
}
.section-tag {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}
.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 2rem;
}
.service-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.service-price {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 800;
    margin: 1rem 0;
}
.service-features-list {
    list-style: none;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}
.service-features-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.4rem;
}
.service-features-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* PLANES Y PRECIOS */
.plans-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-subtle);
}
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: stretch;
}
.plan-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}
.plan-card.featured {
    border: 2px solid var(--primary);
    background: radial-gradient(circle at top right, rgba(255, 85, 0, 0.08) 0%, var(--bg-surface) 70%);
    box-shadow: 0 12px 35px rgba(255, 85, 0, 0.15);
    transform: scale(1.03);
}
.plan-badge-featured {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 0.3rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    box-shadow: var(--shadow-sm);
}
.plan-header {
    text-align: center;
    margin-bottom: 2rem;
}
.plan-price-wrap {
    margin: 1.25rem 0;
}
.plan-currency {
    font-size: 1.8rem;
    font-weight: 800;
    vertical-align: top;
    color: var(--text-main);
}
.plan-amount {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}
.plan-period {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.plan-features {
    list-style: none;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}
.plan-features li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.plan-features li::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
}

/* GALERÍA */
.gallery-section {
    padding: 5rem 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    aspect-ratio: 4 / 3;
    group: hover;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1rem 0.8rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* TESTIMONIOS */
.testimonials-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-subtle);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.testimonial-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}
.testimonial-stars {
    color: #f59e0b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.testimonial-quote {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
    flex-grow: 1;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* FAQ */
.faq-section {
    padding: 5rem 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}
.faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.faq-question:hover {
    color: var(--primary);
}
.faq-toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.25s ease;
}
.faq-answer {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: none;
    line-height: 1.6;
}
.faq-item.active .faq-answer {
    display: block;
}
.faq-item.active .faq-toggle-icon {
    transform: rotate(45deg);
    color: var(--primary);
}

/* CONTACTO */
.contact-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-subtle);
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3.5rem;
}

/* FOOTER PÚBLICO */
.public-footer {
    background: #090a0d;
    border-top: 1px solid var(--border-color);
    padding: 4.5rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
}
.footer-title {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: #fff;
}
.footer-links, .footer-contact-info {
    list-style: none;
}
.footer-links li, .footer-contact-info li {
    margin-bottom: 0.7rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.footer-links a {
    color: var(--text-muted);
}
.footer-links a:hover {
    color: var(--primary);
}
.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.social-link {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}
.social-link:hover {
    color: #fff;
    border-color: var(--primary);
}
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    color: var(--text-subtle);
    font-size: 0.85rem;
}

/* PÁGINA DE LOGIN */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: radial-gradient(circle at center, #1b202a 0%, #0c0d12 100%);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .hero-grid, .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .hero-title {
        font-size: 2.6rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    .public-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: var(--shadow-lg);
    }
    .public-nav.show {
        display: flex;
    }
    .nav-auth-buttons {
        margin-left: 0;
        flex-direction: column;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.2rem;
    }
}
