@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --color-brand-red: #E11D48;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* --- 1. SCROLLBARS PERSONALIZADOS --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.dark ::-webkit-scrollbar-thumb {
    background: #374151;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* --- 2. FONDO ANIMADO (ORBES) --- */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: floatOrb infinite alternate ease-in-out;
    z-index: 0;
}

.orb-1 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--color-brand-red) 0%, transparent 70%);
    top: -50px;
    left: -50px;
    animation-duration: 15s;
}

.orb-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-duration: 20s;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    top: 30%;
    left: 40%;
    animation-duration: 18s;
    animation-delay: -2s;
    opacity: 0.4;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, 60px) scale(1.2);
    }
}

/* --- SKELETON LOADING --- */
.skeleton-box {
    background: #e5e7eb;
    background-image: linear-gradient(to right, #e5e7eb 0%, #f3f4f6 20%, #e5e7eb 40%, #e5e7eb 100%);
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear forwards;
}

.dark .skeleton-box {
    background: #1f2937;
    background-image: linear-gradient(to right, #1f2937 0%, #374151 20%, #1f2937 40%, #1f2937 100%);
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

/* --- ANIMACIONES GENERALES --- */
.animate-in {
    animation: animateIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes animateIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.zoom-in {
    animation: zoomIn 0.4s ease-out forwards;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-in-from-bottom-1 {
    animation: slideInBottom1 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInBottom1 {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse-action {
    animation: pulseAction 2s infinite;
}

@keyframes pulseAction {
    0% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(225, 29, 72, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
    }
}

/* --- COMPONENTES UI --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.dark .glass-panel {
    background: rgba(18, 18, 18, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- BARRA FLOTANTE --- */
.floating-nav {
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 680px;
    height: 70px;
    border-radius: 22px;
    z-index: 50;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 6px;
    transition: all 0.3s ease;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.floating-nav::-webkit-scrollbar { display: none; }

/* Nav-btn touch sizing */
.nav-btn {
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}


.floating-group {
    position: relative;
}

.floating-input,
.floating-select {
    width: 100%;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    padding: 1.25rem 1rem 0.5rem;
    font-weight: 700;
    outline: none;
    transition: all 0.2s;
}

.dark .floating-input,
.dark .floating-select {
    border-color: #374151;
    color: white;
}

.floating-input:focus,
.floating-select:focus {
    border-color: var(--color-brand-red);
    box-shadow: 0 0 0 1px var(--color-brand-red);
}

.floating-label {
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #9ca3af;
    pointer-events: none;
    transition: all 0.2s;
}

.floating-input:placeholder-shown+.floating-label,
.floating-select:placeholder-shown+.floating-label:not(:focus) {
    top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: none;
    color: #6b7280;
}

.floating-input:focus+.floating-label,
.floating-select:focus+.floating-label {
    color: var(--color-brand-red);
}

.floating-select option {
    color: #000000;
    background-color: #ffffff;
}

.dark .floating-select option {
    color: #ffffff;
    background-color: #1f1f1f;
}

.nav-btn {
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
}

.active-nav-glow {
    color: var(--color-brand-red) !important;
    font-weight: 900;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
}

.active-nav-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--color-brand-red);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
    border-radius: 16px;
}

.nav-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    height: 100%;
    align-items: center;
    padding: 0 5px;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

.nav-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.nav-scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 4px;
}

.input-dark {
    width: 100%;
    background-color: #1f1f1f;
    border: 1px solid #374151;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    outline: none;
    font-size: 0.875rem;
}

.input-dark:focus {
    border-color: var(--color-brand-red);
}

.input-live {
    background: transparent;
    border: none;
    border-bottom: 1px solid #374151;
    width: 100%;
    padding: 6px 0;
    border-radius: 0;
    transition: border-color 0.3s;
}

.input-live:focus {
    border-color: var(--color-brand-red);
    outline: none;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.60rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-pend {
    background-color: rgba(234, 179, 8, 0.2);
    color: #a16207;
}

.status-run {
    background-color: rgba(37, 99, 235, 0.2);
    color: #1d4ed8;
}

.status-done {
    background-color: rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.status-rech {
    background-color: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.chat-bubble {
    max-width: 75%;
    padding: 0.7rem 1rem;
    border-radius: 1.2rem;
    font-size: 0.85rem;
    line-height: 1.3;
    position: relative;
}

.chat-me {
    background-color: var(--color-brand-red);
    color: white;
    border-bottom-right-radius: 0.2rem;
}

.chat-other {
    background-color: #f3f4f6;
    color: black;
    border-bottom-left-radius: 0.2rem;
}

/* DECORACION LUCES Y EFECTOS */
.christmas-lights-container {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
    z-index: 40;
    overflow: hidden;
}

.light-bulb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: flash 1s infinite alternate;
    margin-top: 0;
    position: relative;
}

.light-bulb::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 4px;
    width: 4px;
    height: 6px;
    background: #222;
}

.light-bulb:nth-child(odd) {
    background-color: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation-delay: 0.5s;
}

.light-bulb:nth-child(even) {
    background-color: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation-delay: 0s;
}

.light-bulb:nth-child(3n) {
    background-color: #eab308;
    box-shadow: 0 0 10px #eab308;
}

@keyframes flash {
    0% {
        opacity: 0.4;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
        box-shadow: 0 0 20px currentColor;
    }
}

.snowflake {
    position: fixed;
    top: -10px;
    color: white;
    font-size: 1em;
    user-select: none;
    pointer-events: none;
    z-index: 9999;
    animation: fall linear infinite;
    opacity: 0.6;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.7;
    }

    100% {
        transform: translateY(110vh) translateX(20px) rotate(360deg);
        opacity: 0;
    }
}

.cobweb-corner {
    position: fixed;
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 40;
    opacity: 0.6;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.8));
    background-size: contain;
    background-repeat: no-repeat;
}

.cobweb-top-left {
    top: 0;
    left: 0;
    background-image: url('https://cdn-icons-png.flaticon.com/512/2061/2061988.png');
    transform: rotate(0deg);
}

.cobweb-top-right {
    top: 0;
    right: 0;
    background-image: url('https://cdn-icons-png.flaticon.com/512/2061/2061988.png');
    transform: scaleX(-1);
}

.bat-fly {
    position: fixed;
    width: 50px;
    height: 50px;
    background-image: url('https://cdn-icons-png.flaticon.com/512/1205/1205548.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 39;
    pointer-events: none;
    opacity: 0.7;
    animation: flyBat 15s linear infinite;
    top: 20%;
    left: -10%;
}

@keyframes flyBat {
    0% {
        transform: translateX(0) translateY(0) scale(0.5);
    }

    25% {
        transform: translateX(30vw) translateY(10vh) scale(0.7);
    }

    50% {
        transform: translateX(60vw) translateY(-5vh) scale(0.6);
    }

    75% {
        transform: translateX(90vw) translateY(5vh) scale(0.8);
    }

    100% {
        transform: translateX(120vw) translateY(0) scale(0.5);
    }
}

/* TEMAS */
body.theme-halloween {
    background-color: #1a0500;
    background-image: radial-gradient(circle at 50% 50%, #2a0a00 0%, #000000 100%);
}

body.theme-halloween .bg-brand-red {
    background-color: #ea580c !important;
}

body.theme-halloween .text-brand-red {
    color: #ea580c !important;
}

body.theme-halloween .border-brand-red {
    border-color: #ea580c !important;
}

body.theme-pascua {
    background-color: #fdf2f8;
    background-image: radial-gradient(circle at top right, #fce7f3 0%, #fff1f2 100%);
}

body.theme-pascua.dark {
    background-color: #381e2b;
    background-image: none;
}

body.theme-pascua .bg-brand-red {
    background-color: #db2777 !important;
}

body.theme-pascua .text-brand-red {
    color: #db2777 !important;
}

body.theme-anniversary .bg-brand-red {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
}

body.theme-anniversary .text-brand-red {
    color: #2563eb !important;
}

body.theme-newyear {
    background-color: #000;
    background-image: radial-gradient(circle at 50% 0%, #1a1a1a 0%, #000000 100%);
}

body.theme-peru {
    background-color: #f8f9fa;
}

body.theme-peru.dark {
    background-color: #18181b;
}

body.theme-peru .bg-brand-red {
    background: linear-gradient(135deg, #D90429, #EF233C) !important;
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.4);
}

body.theme-peru .text-brand-red {
    color: #D90429 !important;
}

body.theme-peru .border-brand-red {
    border-color: #D90429 !important;
}

body.theme-peru::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #D90429 33%, #FFFFFF 33%, #FFFFFF 66%, #D90429 66%);
    z-index: 200;
    pointer-events: none;
}

.minigame-item {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* ESTILOS PDF */
.pdf-hidden {
    position: fixed;
    top: 0;
    left: -9999px;
    width: 210mm;
    min-height: 297mm;
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 15mm;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
    z-index: 1000;
    display: block;
    visibility: visible;
}

.pdf-hidden * {
    color: #000000 !important;
    border-color: #000000 !important;
    background-color: transparent !important;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 3px solid #E11D48 !important;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.pdf-logo {
    height: 80px;
    object-fit: contain;
}

.pdf-title-doc {
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    color: #E11D48 !important;
    margin: 0;
    letter-spacing: 1px;
}

.pdf-meta-item {
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
    color: #444 !important;
}

.pdf-client-box {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    background-color: #f8f9fa !important;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb !important;
}

.client-col {
    flex: 1;
}

.client-label {
    font-size: 10px;
    font-weight: bold;
    color: #6b7280 !important;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.client-value {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #000 !important;
}

.client-sub {
    font-size: 12px;
    color: #374151 !important;
}

.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 11px;
}

.pdf-table thead th {
    background-color: #E11D48 !important;
    color: #ffffff !important;
    padding: 12px;
    text-transform: uppercase;
    font-weight: 800;
    text-align: left;
    letter-spacing: 0.5px;
}

.pdf-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb !important;
    color: #000 !important;
    vertical-align: middle;
}

.pdf-table tbody tr:nth-child(even) {
    background-color: #f9fafb !important;
}

.pdf-totals {
    width: 40%;
    margin-left: auto;
    background-color: #f8f9fa !important;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e5e7eb !important;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
    color: #374151 !important;
}

.total-row.final {
    font-size: 16px;
    font-weight: 900;
    color: #E11D48 !important;
    border-top: 2px solid #e5e7eb !important;
    padding-top: 10px;
    margin-top: 5px;
}

.pdf-footer {
    position: absolute;
    bottom: 15mm;
    left: 15mm;
    right: 15mm;
    text-align: center;
    font-size: 10px;
    color: #9ca3af !important;
    border-top: 1px solid #e5e7eb !important;
    padding-top: 15px;
}

.pt-safe {
    padding-top: env(safe-area-inset-top);
}

.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}

/* --- NUEVO: ESTILOS PARA LA LÍNEA DE TIEMPO (STEPPER) --- */
.step-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.step-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
    transform: translateY(-50%);
}

.dark .step-container::before {
    background: #374151;
}

.step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 33%;
}

.step-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid #fff;
    transition: all 0.3s ease;
}

.dark .step-circle {
    background: #4b5563;
    border-color: #1f2937;
}

.step-item.completed .step-circle {
    background: #10b981;
    /* Verde */
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.step-item.active .step-circle {
    background: var(--color-brand-red);
    border-color: var(--color-brand-red);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.3);
    animation: pulseStep 2s infinite;
}

.step-label {
    margin-top: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #9ca3af;
    text-align: center;
}

.step-item.completed .step-label,
.step-item.active .step-label {
    color: #111827;
}

.dark .step-item.completed .step-label,
.dark .step-item.active .step-label {
    color: #fff;
}

@keyframes pulseStep {
    0% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(225, 29, 72, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
    }
}

/* --- MODERN UI SUITE 2026 --- */

/* 1. Tipografía Moderna y Scrollbars */
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    /* Texto más nítido */
}

/* Scrollbar invisible pero funcional (Estilo móvil nativo) */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.6);
}

/* 2. Glassmorphism Avanzado (Cristal) */
.glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.dark .glass {
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 3. Sombras Suaves y Elevación (Neumorphism sutil) */
.modern-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modern-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.dark .modern-card:hover {
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.5);
    border-color: rgba(225, 29, 72, 0.4);
    /* Brillo rojo sutil */
}

/* 4. Botones con Feedback Táctil */
button:active {
    transform: scale(0.96) !important;
}

/* 5. Transiciones de Página (View Transitions simuladas) */
.page-transition-enter {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.page-transition-exit {
    opacity: 1;
    transform: scale(1);
}

.page-transition-exit-active {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

/* 6. Animación en Cascada (Stagger) para Listas */
.stagger-item {
    opacity: 0;
    animation: slideUpFade 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Retrasos automáticos para los primeros 10 elementos */
.stagger-item:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.10s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.20s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.25s;
}

.stagger-item:nth-child(6) {
    animation-delay: 0.30s;
}

.stagger-item:nth-child(7) {
    animation-delay: 0.35s;
}

.stagger-item:nth-child(8) {
    animation-delay: 0.40s;
}

.stagger-item:nth-child(9) {
    animation-delay: 0.45s;
}

.stagger-item:nth-child(10) {
    animation-delay: 0.50s;
}

/* 7. Inputs Modernos (Floating Label mejorado) */
.floating-input:focus {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: var(--color-brand-red);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.15);
    /* Anillo de foco suave */
}

.dark .floating-input:focus {
    background-color: rgba(30, 30, 30, 0.9);
}

/* 8. Animaciones de Marquesina (Marcas) */
.marquee-container {
    overflow: hidden;
    width: 100%;
    position: relative;
}
.marquee-container::before, .marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, #000, transparent);
}
.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, #000, transparent);
}
.marquee-wrapper {
    display: flex;
    width: max-content;
    animation: scrollX 18s linear infinite;
}
.marquee-wrapper:hover {
    animation-play-state: paused;
}
.marquee-content {
    display: inline-flex;
    align-items: center;
    gap: 4rem;
    padding: 0 4rem;
    flex-shrink: 0;
}
.marquee-item {
    height: 3rem;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(100%) opacity(60%);
    transition: all 0.3s ease;
}
.marquee-item:hover {
    filter: grayscale(0%) opacity(100%);
    transform: scale(1.1);
}
@keyframes scrollX {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Modern Card Enhancements */
.modern-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
}
.dark .modern-card:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 10px 15px -5px rgba(0, 0, 0, 0.3);
}

/* Page Transitions for Fluidity */
.page-transition-enter {
    opacity: 0;
    transform: translateY(15px);
}
.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.page-transition-exit {
    opacity: 1;
    transform: scale(1);
}
.page-transition-exit-active {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

/* Stagger Animations */
.stagger-item {
    opacity: 1;
    transform: translateY(0);
    animation: fadeUpIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes fadeUpIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}