/* ==========================================================================
   UTILIDADES CSS
   Solo las clases que realmente se usan en las vistas
   ========================================================================== */

/* ----------------------------------------
   RESET BÁSICO
   ---------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--fe-bg-white);
}

img, svg {
    vertical-align: middle;
    max-width: 100%;
    height: auto;
}

/* ----------------------------------------
   CONTENEDORES (complemento a Bootstrap)
   ---------------------------------------- */
.container,
.container-fluid {
    position: relative;
    z-index: 3;
}

section {
    position: relative;
    z-index: 3;
}

/* ----------------------------------------
   FONDOS
   ---------------------------------------- */
.bg-white { background-color: var(--fe-bg-white) !important; }
.bg-light { background-color: var(--fe-bg-light) !important; }
.bg-grey { background-color: var(--fe-bg-grey) !important; }
.bg-dark { background-color: var(--fe-bg-dark) !important; }
.bg-primary { background-color: var(--fe-primary) !important; }
.bg-secondary { background-color: var(--fe-secondary) !important; }

/* Clase original del Blazor */
.fondoGris {
    background-color: var(--fe-bg-light) !important;
}

/* Gradiente whitesmoke del original */
.gr--whitesmoke {
    background-image: linear-gradient(180deg, rgba(244, 244, 249, 0.8) 50%, rgba(244, 244, 249, 0.05) 100%);
}

/* ----------------------------------------
   SOMBRAS
   ---------------------------------------- */
.shadow-sm { box-shadow: var(--fe-shadow-sm) !important; }
.shadow { box-shadow: var(--fe-shadow) !important; }
.shadow-lg { box-shadow: var(--fe-shadow-lg) !important; }

.block-shadow {
    box-shadow: var(--fe-shadow);
}

/* ----------------------------------------
   BORDES
   ---------------------------------------- */
.border { border: 1px solid var(--fe-border-color) !important; }
.border-0 { border: 0 !important; }

.block-border {
    border: 1px solid var(--fe-border-color);
}

.rounded { border-radius: var(--fe-border-radius) !important; }
.rounded-lg { border-radius: var(--fe-border-radius-lg) !important; }
.rounded-pill { border-radius: var(--fe-border-radius-pill) !important; }
.rounded-circle { border-radius: 50% !important; }

/* Border radius del original (r-XX) - solo los que se usan */
.r-08 { border-radius: 8px; }
.r-10 { border-radius: 10px; }
.r-12 { border-radius: 12px; }
.r-16 { border-radius: 16px; }
.r-20 { border-radius: 20px; }

/* ----------------------------------------
   ESPACIADO ADICIONAL (complemento Bootstrap)
   El original usa py-XX con valores fijos
   ---------------------------------------- */
.py-30 { padding-top: 30px; padding-bottom: 30px; }
.py-40 { padding-top: 40px; padding-bottom: 40px; }
.py-50 { padding-top: 50px; padding-bottom: 50px; }
.py-60 { padding-top: 60px; padding-bottom: 60px; }
.py-70 { padding-top: 70px; padding-bottom: 70px; }
.py-80 { padding-top: 80px; padding-bottom: 80px; }
.py-100 { padding-top: 100px; padding-bottom: 100px; }

.pt-30 { padding-top: 30px; }
.pt-40 { padding-top: 40px; }
.pt-50 { padding-top: 50px; }
.pt-60 { padding-top: 60px; }

.pb-30 { padding-bottom: 30px; }
.pb-40 { padding-bottom: 40px; }
.pb-50 { padding-bottom: 50px; }
.pb-60 { padding-bottom: 60px; }

.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mt-50 { margin-top: 50px; }

.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-50 { margin-bottom: 50px; }

/* ----------------------------------------
   OPACIDAD (solo las que se usan)
   ---------------------------------------- */
.o-50 { opacity: 0.5 !important; }
.o-75 { opacity: 0.75 !important; }
.o-100 { opacity: 1 !important; }

/* ----------------------------------------
   DISPLAY Y FLEXBOX
   ---------------------------------------- */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }

.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }

.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }

/* Del original */
.centrarContenido {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ----------------------------------------
   POSICIÓN
   ---------------------------------------- */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

.rel { position: relative !important; }

/* ----------------------------------------
   OVERFLOW
   ---------------------------------------- */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }

.hidd { overflow: hidden; }

/* ----------------------------------------
   ACCESIBILIDAD
   ---------------------------------------- */
.visually-hidden,
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Skip link para accesibilidad */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--fe-primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top var(--fe-transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* ----------------------------------------
   IMÁGENES
   ---------------------------------------- */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.img-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* ----------------------------------------
   RESPONSIVE DISPLAY
   ---------------------------------------- */
@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
}

@media (min-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; }
}
