/*
 * IRON PULSE Gym - Modern Premium Dark CSS Framework
 * Core styling, variables, layout, components and utilities.
 * 
 * @author Senior Full Stack Architect
 */

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1f1f1f;
    --bg-navbar: #050505;
    
    --primary: #ff5400; /* Naranja Energético */
    --primary-hover: #e04a00;
    --secondary: #00ff88; /* Verde Neón */
    --text-main: #f0f0f0;
    --text-muted: #999999;
    --border-color: #262626;
    
    --font-primary: 'Outfit', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 4px 20px rgba(255, 84, 0, 0.15);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 84, 0, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--border-color);
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* Navigation Bar */
.main-header {
    background-color: var(--bg-navbar);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #ffffff;
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-link {
    font-weight: 800;
    color: var(--text-muted);
    font-size: 13px;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 4px;
}

.lang-link:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--bg-card);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 6px;
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease forwards;
}

.toast-success {
    border-left-color: var(--secondary);
}

.toast-error {
    border-left-color: #ff3333;
}

.toast-icon {
    font-size: 18px;
}

.toast-success .toast-icon { color: var(--secondary); }
.toast-error .toast-icon { color: #ff3333; }
.toast-warning .toast-icon { color: var(--primary); }

.toast-body {
    flex-grow: 1;
    font-size: 14px;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1);
    animation: kenBurnsSlide 25s linear infinite;
}

/* Retrasos de pase para lograr cascada en 5 diapositivas */
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 5s; }
.hero-slide:nth-child(3) { animation-delay: 10s; }
.hero-slide:nth-child(4) { animation-delay: 15s; }
.hero-slide:nth-child(5) { animation-delay: 20s; }

@keyframes kenBurnsSlide {
    0% {
        opacity: 0;
        transform: scale(1);
    }
    2% {
        opacity: 0.75;
    }
    20% {
        opacity: 0.75;
    }
    22% {
        opacity: 0;
        transform: scale(1.08);
    }
    100% {
        opacity: 0;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(7,7,7,0.95) 45%, rgba(255,84,0,0.15) 100%);
    z-index: 2;
}

.hero-container {
    position: relative;
    z-index: 3;
}

.hero-content {
    max-width: 650px;
}

.hero h1 {
    font-size: 64px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 35px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Feature grid / Cards */
.features-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 38px;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.premium-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 8px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.premium-card:hover {
    background-color: var(--bg-card-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(255, 84, 0, 0.3);
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background-color: var(--primary);
    transition: var(--transition-smooth);
}

.premium-card:hover::before {
    height: 100%;
}

.card-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 25px;
}

/* Membership Tables */
.pricing-section {
    padding: 100px 0;
    background-color: #070707;
}

.pricing-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 45px 35px;
    text-align: center;
    background-color: var(--bg-card);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: var(--shadow-accent);
}

.pricing-card.popular::after {
    content: 'POPULAR';
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.pricing-price {
    font-size: 48px;
    font-weight: 900;
    margin: 25px 0;
}

.pricing-price span {
    font-size: 16px;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    margin-bottom: 40px;
    text-align: left;
    flex-grow: 1;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.pricing-features i {
    color: var(--primary);
    margin-right: 10px;
}

/* Contact Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 6px;
    font-family: var(--font-primary);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-accent);
}

/* Dashboard Layout */
.dashboard-body {
    background-color: #080808;
}

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.dashboard-sidebar {
    width: 280px;
    background-color: #0b0b0b;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    z-index: 999;
}

.sidebar-brand {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-user {
    padding: 25px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar-placeholder {
    width: 50px;
    height: 50px;
    background-color: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
}

.sidebar-nav {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-muted);
}

.sidebar-link:hover, .sidebar-link.active {
    color: #ffffff;
    background-color: #141414;
}

.sidebar-link.active {
    border-left: 3px solid var(--primary);
}

.sidebar-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 15px 0;
}

.dashboard-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    height: 80px;
    background-color: #0b0b0b;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
}

.dashboard-content {
    padding: 40px;
    flex-grow: 1;
    overflow-y: auto;
}

/* Widgets & KPIs */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kpi-info h3 {
    font-size: 28px;
    margin-bottom: 5px;
}

.kpi-info span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.kpi-icon {
    font-size: 32px;
    color: var(--primary);
}

.dashboard-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.dashboard-card h3 {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* Tables style */
.table-responsive {
    overflow-x: auto;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th, .premium-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.premium-table th {
    background-color: rgba(255,255,255,0.01);
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.premium-table tbody tr:hover {
    background-color: rgba(255,255,255,0.01);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background-color: rgba(0, 255, 136, 0.1); color: var(--secondary); }
.badge-warning { background-color: rgba(255, 84, 0, 0.1); color: var(--primary); }
.badge-danger { background-color: rgba(255, 51, 51, 0.1); color: #ff3333; }
.badge-admin { background-color: var(--primary); color: #fff; margin-left: 8px; font-size: 9px; }

/* Footers */
.main-footer {
    background-color: #050505;
    border-top: 1px solid var(--border-color);
    padding: 80px 0 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    padding-bottom: 60px;
}

.footer-col h3 {
    font-size: 16px;
    margin-bottom: 25px;
    color: #ffffff;
}

.brand-desc {
    color: var(--text-muted);
    margin: 20px 0;
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: #111;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    background-color: #111;
    border: 1px solid var(--border-color);
    border-right: none;
    color: #fff;
    padding: 10px 15px;
    border-radius: 4px 0 0 4px;
    flex-grow: 1;
}

.newsletter-form button {
    border-radius: 0 4px 4px 0;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 13px;
}

/* Embed messages */
.toast-container-embed {
    margin-bottom: 25px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
