/* ================================
   ABARSOL - Estilos Principales
   ================================ */

/* Reset y Variables */
:root {
    --primary-blue: #003d7a;
    --secondary-blue: #0066cc;
    --light-blue: #e8f4ff;
    --dark-gray: #1a1a1a;
    --medium-gray: #666;
    --light-gray: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #333;
    line-height: 1.6;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader p {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Root Container */
#root:empty::before {
    content: "Cargando...";
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-size: 2rem;
    color: var(--primary-blue);
    font-weight: bold;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Selection */
::selection {
    background: var(--secondary-blue);
    color: white;
}

/* Utilidades */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Focus Styles */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 2px;
}

/* Disabled States */
button:disabled,
input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Print Styles */
@media print {

    header,
    footer,
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }

    button,
    a {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}