/* ================================================
   SPORT FRANCES - SISTEMA DE DISE�O
   Variables, Reset y Estilos Globales
   ================================================ */

/* ===== VARIABLES CSS - PALETA SPORT FRANCES ===== */
:root {
    /* Colores principales */
    --primary-blue: #4a7ba7;
    --primary-blue-dark: #3a6a97;
    --primary-blue-darker: #2d5a7b;
    --secondary-blue: #5b8fb9;
    /* Fondos y superficies */
    --bg-light: #f8f9fa;
    --bg-ultra-light: #E8F4F8;
    --dark-bg: #0a1929;
    --surface-light: rgba(255, 255, 255, 0.15);
    --surface-lighter: rgba(255, 255, 255, 0.25);
    --surface-lightest: rgba(255, 255, 255, 0.95);
    --overlay-dark: rgba(0, 0, 0, 0.2);
    --overlay-darker: rgba(0, 0, 0, 0.3);
    --overlay-modal: rgba(0, 0, 0, 0.7);
    /* Textos */
    --text-on-dark: white;
    --text-on-dark-secondary: rgba(255, 255, 255, 0.9);
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --text-muted: #999999;
    /* Bordes */
    --border-light: #e9ecef;
    --border-blue: #B8D4E6;
    --divider: #ddd;
    /* Sombras */
    --shadow-blue: 0 10px 30px rgba(74, 123, 167, 0.25);
    --shadow-blue-intense: 0 4px 15px rgba(74, 123, 167, 0.35);
    --shadow-soft: 0 4px 12px rgba(74, 123, 167, 0.2);
    --shadow-medium: 0 6px 20px rgba(74, 123, 167, 0.25);
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Color visible en safe areas Y durante rubber-band bounce */
    background-color: #f8f9fa;
    /* Compensa el shift de viewport-fit=cover + black-translucent */
    min-height: calc(100% + env(safe-area-inset-top, 0px));
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    min-height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #4a7ba7 0%, #5b8fb9 100%);
    background-attachment: fixed;
    position: relative;
    overscroll-behavior-y: contain;
}

    /* Body con bottom navigation */
    body.with-bottom-nav {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }

/* ===== FORMAS DECORATIVAS DE FONDO ===== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
}

/* Círculo superior izquierdo - oscuro */
.bg-circle-dark {
    width: 500px;
    height: 500px;
    background: #2f5578;
    opacity: 0.25;
    top: -150px;
    left: -150px;
}

/* Círculo inferior derecho - claro */
.bg-circle-light {
    width: 600px;
    height: 600px;
    background: #5b8fb9;
    opacity: 0.15;
    bottom: -150px;
    right: -200px;
}

/* Responsive - círculos más pequeños en móvil */
@media (max-width: 768px) {
    .bg-circle-dark {
        width: 350px;
        height: 350px;
        top: -100px;
        left: -100px;
    }

    .bg-circle-light {
        width: 400px;
        height: 400px;
        bottom: -100px;
        right: -120px;
    }
}

@media (max-width: 480px) {
    .bg-circle-dark {
        width: 280px;
        height: 280px;
        top: -80px;
        left: -80px;
        opacity: 0.2;
    }

    .bg-circle-light {
        width: 320px;
        height: 320px;
        bottom: -80px;
        right: -100px;
        opacity: 0.12;
    }
}

/* Asegurar que todo el contenido esté sobre los círculos decorativos */
body > *:not(.bg-decoration):not(.bottom-nav):not(.modal-overlay):not(.alert-success):not(.alert-error) {
    position: relative;
    z-index: 1;
}

/* Contenedor principal */
.container {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ===== TIPOGRAF�A ===== */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

    /* ===== ACCESIBILIDAD ===== */
    /* Focus visible para navegaci�n por teclado */
    button:focus-visible,
    a:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
        outline: 3px solid rgba(255, 255, 255, 0.8);
        outline-offset: 3px;
    }

/* Respeta preferencias de animaci�n */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== UTILIDADES ===== */
.text-center {
    text-align: center;
}

.text-white {
    color: white;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

/* ===== RESPONSIVE - TABLET/DESKTOP ===== */
@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}
