/* =========================================================
   CASLA - ESTILOS GLOBALES
   Solo estilos compartidos por todo el sitio
========================================================= */


/* =========================================================
   1. VARIABLES INSTITUCIONALES
========================================================= */

:root {

    /* Colores institucionales */
    --azul-casla: #0d5bd7;
    --azul-casla-claro: #2878e8;
    --azul-oscuro: #082c6c;
    --azul-noche: #091c38;

    /* Colores neutros */
    --blanco: #ffffff;
    --gris-fondo: #f5f7fa;
    --gris-claro: #eef2f7;
    --gris-borde: #dfe5ec;
    --gris-texto: #5f6b7a;
    --gris-oscuro: #263238;

    /* Estados */
    --verde: #25d366;
    --rojo: #dc3545;
    --amarillo: #ffc107;

    /* Diseño */
    --radio-pequeno: 8px;
    --radio-medio: 12px;
    --radio-grande: 20px;

    /* Sombras */
    --sombra-suave: 0 4px 15px rgba(0, 0, 0, 0.08);
    --sombra-media: 0 8px 25px rgba(0, 0, 0, 0.12);
    --sombra-fuerte: 0 15px 35px rgba(0, 0, 0, 0.18);

    /* Transición */
    --transicion: 0.3s ease;
}


/* =========================================================
   2. RESETEO GENERAL
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--blanco);
    color: var(--gris-oscuro);
    line-height: 1.6;
}


/* =========================================================
   3. ELEMENTOS GENERALES
========================================================= */

a {
    transition: var(--transicion);
}

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

button,
.btn {
    transition: var(--transicion);
}


/* =========================================================
   4. BOTONES GENERALES CASLA
========================================================= */

.btn-casla {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    background: var(--azul-casla);
    color: var(--blanco);

    border: none;
    border-radius: var(--radio-pequeno);

    padding: 10px 22px;

    font-weight: 600;
    text-decoration: none;

    cursor: pointer;

    box-shadow: 0 4px 10px rgba(13, 91, 215, 0.20);
}

.btn-casla:hover {
    background: var(--azul-oscuro);
    color: var(--blanco);

    transform: translateY(-2px);

    box-shadow: 0 7px 15px rgba(13, 91, 215, 0.25);
}


.btn-casla-secundario {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    background: var(--blanco);
    color: var(--azul-casla);

    border: 1px solid var(--azul-casla);
    border-radius: var(--radio-pequeno);

    padding: 10px 22px;

    font-weight: 600;
    text-decoration: none;

    cursor: pointer;
}

.btn-casla-secundario:hover {
    background: var(--azul-casla);
    color: var(--blanco);

    transform: translateY(-2px);
}


/* =========================================================
   5. FORMULARIOS GENERALES
========================================================= */

.form-control,
.form-select {
    border: 1px solid var(--gris-borde);
    border-radius: var(--radio-pequeno);

    padding: 10px 13px;

    transition: var(--transicion);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--azul-casla);

    box-shadow:
        0 0 0 0.2rem rgba(13, 91, 215, 0.12);
}


/* =========================================================
   6. TABLAS GENERALES
========================================================= */

.table {
    vertical-align: middle;
}

.table thead {
    background: var(--azul-oscuro);
    color: var(--blanco);
}

.table thead th {
    border: none;
}

.table tbody tr {
    transition: var(--transicion);
}

.table tbody tr:hover {
    background: #f3f7fc;
}


/* =========================================================
   7. WHATSAPP FLOTANTE
========================================================= */

.whatsapp-float {
    position: fixed;

    width: 60px;
    height: 60px;

    bottom: 25px;
    right: 25px;

    background-color: var(--verde);
    color: var(--blanco);

    border-radius: 50%;

    text-align: center;
    font-size: 32px;

    box-shadow: var(--sombra-media);

    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    transition: var(--transicion);
}

.whatsapp-float:hover {
    background-color: #1ebe5d;
    color: var(--blanco);

    transform: scale(1.1);
}

/* =========================================================
   AJUSTES VISUALES RESPONSIVOS - CASLA
   Mejoras generales sin cambiar la identidad de color
========================================================= */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

button, input, select, textarea {
    font: inherit;
}

button, .btn, a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(40, 120, 232, 0.45);
    outline-offset: 3px;
}

i.fa-solid,
i.fa-regular,
i.fa-brands {
    line-height: 1;
    vertical-align: middle;
}

.btn,
button {
    min-height: 42px;
}

img {
    max-width: 100%;
}

@media (max-width: 768px) {
    body {
        font-size: 15.5px;
    }

    .container {
        --bs-gutter-x: 1.25rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .btn,
    button {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
