html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    padding-top: 75px;
    background-color: #030508;
    background-image: radial-gradient(circle at 20% 20%, rgba(13, 110, 253, 0.15) 0%, transparent 40%), radial-gradient(circle at 80% 80%, rgba(235, 87, 87, 0.12) 0%, transparent 45%);
    background-attachment: fixed;
    color: #e2e8f0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative;
    transition: background-color 1s ease, color 1s ease;
}

    /* --- Efecto de Fondo: Lluvia de Estrellas / Destellos de Lujo --- */
    body::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 0;
        background-image: radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)), radial-gradient(2px 2px at 40px 70px, #60a5fa, rgba(0,0,0,0)), radial-gradient(1px 1px at 90px 40px, #ffffff, rgba(0,0,0,0)), radial-gradient(2px 2px at 160px 120px, #eb5757, rgba(0,0,0,0)), radial-gradient(1.5px 1.5px at 230px 180px, #ffffff, rgba(0,0,0,0)), radial-gradient(2px 2px at 320px 250px, #60a5fa, rgba(0,0,0,0)), radial-gradient(1px 1px at 450px 350px, #ffffff, rgba(0,0,0,0)), radial-gradient(2px 2px at 550px 100px, #ffffff, rgba(0,0,0,0)), radial-gradient(1.5px 1.5px at 680px 220px, #eb5757, rgba(0,0,0,0)), radial-gradient(2px 2px at 780px 400px, #ffffff, rgba(0,0,0,0)), radial-gradient(1px 1px at 850px 150px, #60a5fa, rgba(0,0,0,0)), radial-gradient(2px 2px at 950px 300px, #ffffff, rgba(0,0,0,0));
        background-repeat: repeat;
        background-size: 500px 500px;
        opacity: 0.35;
        animation: lluviaEstrellas 25s linear infinite;
        will-change: background-position;
    }

@keyframes lluviaEstrellas {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100px 500px;
    }
}

/* --- Tipografía y Efectos de Neón de Lujo --- */
h1, h2, h3, h4, h5, .navbar-brand {
    color: #ffffff;
    letter-spacing: 0.5px;
    transition: color 0.5s ease;
}

.text-gold-silver {
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

/* --- Pantalla de Carga (Preloader) de Lujo --- */
#preloader {
    background: #030508 !important;
}

/* --- Tarjetas Estilo "Glass Luxury" con Bordes Luminosos --- */
.card-luxury {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(8, 12, 20, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #f1f5f9;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

    .card-luxury:hover {
        transform: translateY(-8px) scale(1.01);
        border-color: rgba(13, 110, 253, 0.4);
        box-shadow: -15px 15px 40px rgba(13, 110, 253, 0.25), 15px 15px 40px rgba(235, 87, 87, 0.2), 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    }

/* --- Contenedor de Iconos de Alta Gama --- */
.icon-luxury {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15) 0%, rgba(235, 87, 87, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem auto;
    color: #60a5fa;
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.15), 0 8px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.card-luxury:hover .icon-luxury {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.3) 0%, rgba(235, 87, 87, 0.25) 100%);
    border-color: rgba(13, 110, 253, 0.5);
    color: #ffffff;
    transform: scale(1.1);
}

/* Botones de Lujo */
.btn-luxury {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

    .btn-luxury:hover {
        background: linear-gradient(135deg, #0d6efd 0%, #084298 100%);
        border-color: rgba(13, 110, 253, 0.6);
        color: #ffffff;
        box-shadow: 0 6px 25px rgba(13, 110, 253, 0.5), 0 0 15px rgba(235, 87, 87, 0.3);
        transform: translateY(-2px);
    }

@keyframes pulseLogo {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

.logo-pulse {
    animation: pulseLogo 1.5s infinite ease-in-out;
}

/* --- Estilo "Expediente / Archivo Contable" Adaptado a Lujo Oscuro --- */
.card-expediente {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(8, 12, 20, 0.95) 100%) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: 6px solid #0d6efd !important;
    border-radius: 16px;
    overflow: hidden;
    color: #f1f5f9 !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
}

    .card-expediente::before {
        content: "";
        position: absolute;
        top: 0;
        right: 20px;
        width: 45px;
        height: 5px;
        background: linear-gradient(90deg, #0d6efd, #eb5757);
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
    }

    .card-expediente .icon-box-archivo {
        width: 68px;
        height: 68px;
        background: rgba(13, 110, 253, 0.15) !important;
        border: 2px dashed rgba(13, 110, 253, 0.4) !important;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 1.25rem auto;
        color: #60a5fa !important;
        transition: all 0.3s ease;
    }

    .card-expediente h4, .card-expediente h3 {
        color: #ffffff !important;
        text-shadow: 0 0 10px rgba(13, 110, 253, 0.3);
    }

    .card-expediente p {
        color: #94a3b8 !important;
    }

    .card-expediente:hover {
        transform: translateY(-8px);
        border-color: rgba(13, 110, 253, 0.5) !important;
        border-left-color: #eb5757 !important;
        box-shadow: -20px 15px 45px rgba(13, 110, 253, 0.35), 20px 15px 45px rgba(235, 87, 87, 0.35), 0 30px 60px rgba(0, 0, 0, 0.8) !important;
    }

        .card-expediente:hover .icon-box-archivo {
            background: rgba(13, 110, 253, 0.25) !important;
            border-color: #0d6efd !important;
            color: #ffffff !important;
            transform: scale(1.08);
        }

/* --- Animación de Entrada "Caída / Revelación Espacial" para los Servicios --- */
.card-animada {
    opacity: 0;
    transform: translateY(-60px) perspective(1000px) rotateX(15deg);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    will-change: opacity, transform;
}

    .card-animada.visible {
        opacity: 1;
        transform: translateY(0) perspective(1000px) rotateX(0deg);
    }

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.25s;
}

.delay-3 {
    transition-delay: 0.4s;
}

.delay-4 {
    transition-delay: 0.55s;
}

/* --- Pantalla de Carga Cinematográfica de Lujo --- */
#cinematic-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #030508;
    background-image:
        linear-gradient(180deg, rgba(1, 6, 14, 0.08), rgba(1, 6, 14, 0.18)),
        url('/images/cargador-contable-lam.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease-out, visibility 0.45s ease-out;
}

    #cinematic-loader.fade-out {
        opacity: 0;
        visibility: hidden;
    }

    /* El mismo fondo se utiliza en los dos temas. */
    body.tema-dia #cinematic-loader,
    body.tema-noche #cinematic-loader {
        background-color: #030508 !important;
        background-image:
            linear-gradient(180deg, rgba(1, 6, 14, 0.08), rgba(1, 6, 14, 0.18)),
            url('/images/cargador-contable-lam.jpg') !important;
    }

    @media (max-width: 767.98px) {
        #cinematic-loader,
        body.tema-dia #cinematic-loader,
        body.tema-noche #cinematic-loader {
            background-position: 54% center;
        }

        .loader-content {
            width: min(88vw, 520px);
            padding: 1.25rem;
            border-radius: 1rem;
            background: rgba(2, 8, 18, 0.2);
            backdrop-filter: blur(2px);
        }
    }

.loader-content {
    text-align: center;
    animation: fadeInScale 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.loader-title {
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: 6px;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

.loader-subtitle {
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.loader-bar-container {
    width: 220px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto;
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #ffffff, #eb5757);
    animation: loadingProgress 0.9s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes loadingProgress {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Efecto 3D de entrada para la imagen del edificio --- */
.hero-edificio-container {
    position: relative;
    min-height: 550px;
    perspective: 1200px;
}

.edificio-3d-wrapper {
    overflow: hidden;
}

.img-edificio-efecto {
    animation: zoomIn3DEdificio 2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    will-change: transform, filter;
}

@keyframes zoomIn3DEdificio {
    0% {
        transform: scale(1.25) translateZ(60px);
        filter: brightness(1.4) contrast(1.1);
    }

    100% {
        transform: scale(1) translateZ(0);
        filter: brightness(1) contrast(1);
    }
}

/* --- Burbuja Estática "Conócenos más" al final de la página --- */
.burbuja-conocenos-seccion {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0d6efd 0%, #084298 100%);
    color: #ffffff;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: flotarBurbuja 3s ease-in-out infinite;
}

    .burbuja-conocenos-seccion:hover {
        transform: translateY(-4px) scale(1.03);
        background: linear-gradient(135deg, #1d4ed8 0%, #0d6efd 100%);
        color: #ffffff;
        box-shadow: 0 15px 30px rgba(13, 110, 253, 0.6);
    }

@keyframes flotarBurbuja {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* --- Estilos para Iconos de Redes Sociales en Footer --- */
.social-icons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: #a0aab5;
    font-size: 1.2rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .social-icon-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.3);
    }

/* --- Contenedor general del Carrusel de Servicios --- */
.carrusel-servicios-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 10px 0;
}

.carrusel-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scrollCarrusel 25s linear infinite;
}

.carrusel-servicios-wrapper:hover .carrusel-track {
    animation-play-state: paused;
}

@keyframes scrollCarrusel {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.tarjeta-carrusel-item {
    flex: 0 0 280px;
}

/* =========================================================================
   SISTEMA GLOBAL DE CAMBIO DINÁMICO DE TEMA (DÍA / NOCHE)
   ========================================================================= */

/* --- TEMA DÍA (Abierto / Horario Laboral) --- */
body.tema-dia {
    background-color: #f1f5f9 !important;
    background-image: radial-gradient(circle at 20% 20%, rgba(13, 110, 253, 0.08) 0%, transparent 40%), radial-gradient(circle at 80% 80%, rgba(30, 41, 59, 0.05) 0%, transparent 45%) !important;
    color: #0f172a !important;
}

    body.tema-dia h1,
    body.tema-dia h2,
    body.tema-dia h3,
    body.tema-dia h4,
    body.tema-dia h5,
    body.tema-dia h6,
    body.tema-dia .text-white,
    body.tema-dia .navbar-brand {
        color: #0f172a !important;
    }

    body.tema-dia .text-muted {
        color: #475569 !important;
    }

    body.tema-dia .card-luxury,
    body.tema-dia .card,
    body.tema-dia .card-expediente {
        background: #ffffff !important;
        color: #0f172a !important;
        border-color: rgba(0, 0, 0, 0.1) !important;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
    }

        body.tema-dia .card-luxury h3,
        body.tema-dia .card-luxury h4,
        body.tema-dia .card-luxury h5,
        body.tema-dia .card-expediente h4,
        body.tema-dia .card-expediente h3 {
            color: #0f172a !important;
            text-shadow: none !important;
        }

        body.tema-dia .card-expediente p,
        body.tema-dia .card-luxury p {
            color: #475569 !important;
        }

    body.tema-dia .accordion-button,
    body.tema-dia .accordion-body {
        background-color: #ffffff !important;
        color: #0f172a !important;
    }

    /* Soporte específico para la sección de Jurídico en Modo Día */
    body.tema-dia #seccion-juridico .card-luxury {
        background: #ffffff !important;
        color: #0f172a !important;
    }

    body.tema-dia #seccion-juridico li span {
        color: #0f172a !important;
    }

/* --- TEMA NOCHE (Cerrado / Fuera de Horario) --- */
body.tema-noche {
    background-color: #030508 !important;
    color: #f8fafc !important;
}

    body.tema-noche h1,
    body.tema-noche h2,
    body.tema-noche h3,
    body.tema-noche h4,
    body.tema-noche h5,
    body.tema-noche h6,
    body.tema-noche .text-white {
        color: #ffffff !important;
    }

    body.tema-noche .text-muted {
        color: #94a3b8 !important;
    }

    body.tema-noche #seccion-juridico li span {
        color: #f1f5f9 !important;
    }
+