/* ============================================
   PADEL PRO ACADEMY - CSS v6.1
   Mobile-First | Dark Theme | WCAG AA
   ============================================ */

/* --- VARIABLES --- */
:root {
    --primary: #ccff00;
    --primary-dark: #a8d900;
    --primary-rgb: 204, 255, 0;
    --secondary: #6366f1;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --info: #3b82f6;

    --bg: #0a0a0a;
    --bg-card: #111111;
    --bg-hover: #1a1a1a;
    --border: #222222;
    --line: #333333;

    --text: #ffffff;
    --text-muted: #888888;
    --text-dim: #666666;

    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --transition: 0.2s ease;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* --- SKIP LINK (Oculto hasta focus) --- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -999;
}
.skip-link:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    overflow: visible;
    z-index: 99999;
    background: var(--primary);
    color: #000;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* --- CONTAINER --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* --- NAVEGACIÓN --- */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 16px;
}

.brand a {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 2px;
}
.brand span { color: var(--primary); }

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    padding-top: 16px;
}
.nav-links.open { display: flex; }

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
}
.nav-link:hover, .nav-link:focus {
    color: var(--text);
    background: var(--bg-hover);
}
.nav-link.active {
    color: var(--primary);
    background: rgba(204, 255, 0, 0.1);
}

/* Desktop Nav */
@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .nav-links {
        display: flex;
        flex-direction: row;
        width: auto;
        padding-top: 0;
        align-items: center;
    }
    .nav-link { padding: 8px 16px; }
}

/* --- BOTONES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    background: var(--primary);
    color: #000;
    white-space: nowrap;
}
.btn:hover, .btn:focus {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn.secondary:hover { background: var(--bg-hover); border-color: var(--text-muted); }

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

.btn.sm { padding: 8px 16px; font-size: 0.85rem; }
.btn.lg { padding: 16px 32px; font-size: 1.1rem; }

.btn.w-full { width: 100%; }

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* --- CARDS --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}
.card:not(.no-hover):hover {
    border-color: var(--line);
    box-shadow: var(--shadow);
}

/* --- FORMULARIOS --- */
label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: var(--transition);
    margin-bottom: 16px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

textarea { resize: vertical; min-height: 100px; }

/* --- ALERTAS --- */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
}
.alert.success { background: rgba(34, 197, 94, 0.15); color: var(--success); border: 1px solid var(--success); }
.alert.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid var(--danger); }
.alert.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid var(--warning); }
.alert.info { background: rgba(59, 130, 246, 0.15); color: var(--info); border: 1px solid var(--info); }

/* --- BADGES --- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 20px;
    background: var(--bg-hover);
    color: var(--text-muted);
    text-decoration: none;
}
.badge.success { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.badge.danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge.warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.badge.info { background: rgba(59, 130, 246, 0.2); color: var(--info); }

/* --- TABLAS --- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
tr:hover { background: var(--bg-hover); }

/* --- GRID --- */
.grid {
    display: grid;
    gap: 20px;
}
.grid2 { grid-template-columns: 1fr; }
.grid3 { grid-template-columns: 1fr; }
.grid4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
    .grid2 { grid-template-columns: repeat(2, 1fr); }
    .grid3 { grid-template-columns: repeat(2, 1fr); }
    .grid4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .grid3 { grid-template-columns: repeat(3, 1fr); }
    .grid4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- UTILIDADES --- */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* --- HERO SECTION --- */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
}
.hero-section h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 900;
}

/* --- FOOTER --- */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 50px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}
.footer-links {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
}
.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.85rem; }

/* --- ANIMACIONES --- */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PREFERENCIAS DE MOVIMIENTO --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- FOCUS VISIBLE (Accesibilidad) --- */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* --- HR --- */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}
