/* Efecto de desenfoque para modales */
.modal-backdrop {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.3) !important;
}

/* Mejorar la visibilidad del modal */
.modal-content {
    border: none;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.125);
}

/* Transición suave para la aparición del modal */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: translate(0, -50px);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
    opacity: 1;
}

/* Ajustar el padding del contenido del modal */
.modal-body {
    padding: 1.5rem;
}

/* Estilo para el encabezado del modal */
.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Estilo para el pie del modal */
.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Asegurar que el backdrop ocupe toda la pantalla */
.modal-backdrop.show {
    opacity: 1 !important;
}

/* Color Variables */
:root {
    --cosmic-latte: #FDF6E4;
    --dim-gray: #6C6B6C;
    --safety-orange: #E8730C;
    --battleship-gray: #929191;
    --almond: #F8E4CE;
    
    /* Theme colors */
    --primary: var(--safety-orange);
    --secondary: var(--dim-gray);
    --light: var(--cosmic-latte);
    --light-bg: var(--almond);
    --muted: var(--battleship-gray);
}

/* Custom Timeline Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--muted);
}

.timeline-date {
    position: relative;
    margin: 1.5rem 0;
    text-align: center;
}

.timeline-date .badge {
    position: relative;
    z-index: 1;
    padding: 0.5rem 1rem;
    font-weight: 600;
    box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.1);
    background-color: var(--primary);
    color: var(--light);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -0.5rem;
    top: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    border: 2px solid var(--primary);
}

.timeline-marker i {
    font-size: 0.75rem;
    color: var(--primary);
}

.timeline-content {
    background: var(--light);
    border-radius: 0.35rem;
    padding: 1rem;
    position: relative;
    box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--muted);
}

.timeline-content:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.timeline-content h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--secondary);
}

.timeline-content h6 a {
    color: var(--primary);
    text-decoration: none;
}

.timeline-content h6 a:hover {
    text-decoration: underline;
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
}

/* Stats Cards */
.card-stats .card-body {
    position: relative;
    overflow: hidden;
}

.card-stats .card-body::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    font-size: 5rem;
    line-height: 1;
    opacity: 0.1;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.card-stats.border-left-primary .card-body::after {
    content: '\f15c'; /* File Alt Icon */
    color: var(--primary);
}

.card-stats.border-left-success .card-body::after {
    content: '\f0c0'; /* Users Icon */
    color: var(--secondary);
}

.card-stats.border-left-info .card-body::after {
    content: '\f0ce'; /* Clipboard List Icon */
    color: var(--muted);
}

.card-stats.border-left-warning .card-body::after {
    content: '\f1da'; /* History Icon */
    color: var(--light-bg);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline::before {
        left: 0.75rem;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -0.25rem;
    }
}

/* Animation for stats counter */
@keyframes countUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.counter {
    animation: countUp 0.6s ease-out forwards;
}

/* Smooth page load */
#wrapper {
    opacity: 1;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
