@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
}

.hero-biblio {
    background-color: rgb(30 58 138 / var(--tw-bg-opacity, 1));
    position: relative;
    overflow: hidden;
}

/* --- ESTILOS DEL SISTEMA DE CARPETAS --- */
.folder-card {
    background: #ffffff;
    border: 2px solid #e2e8f0; /* Borde un poco más grueso para resaltar el hover */
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden; /* Necesario para el efecto del fondo */
}

/* Pseudo-elemento para el fondo animado que sube desde abajo */
.folder-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, #f0f9ff 0%, transparent 100%);
    transition: height 0.4s ease-out;
    z-index: 0;
}

/* Efectos al pasar el mouse por la tarjeta */
.folder-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 25px -5px rgba(0, 131, 203, 0.2), 0 8px 10px -6px rgba(0, 131, 203, 0.1);
    border-color: #3b82f6; /* Azul brillante */
}

/* Expande el fondo animado al hacer hover */
.folder-card:hover::before {
    height: 100%;
}

/* Asegura que el contenido quede por encima del fondo animado */
.folder-icon, .folder-title {
    position: relative;
    z-index: 1;
}

.folder-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    /* Usamos cubic-bezier para darle un efecto de pequeño rebote elástico */
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07));
}

/* El ícono crece, proyecta más sombra y rota levemente hacia la izquierda */
.folder-card:hover .folder-icon {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 8px 6px rgb(0 0 0 / 0.15));
}

/* Detalle extra: La carpeta de "Ver Todos" rota hacia la derecha para darle variedad */
.folder-card[data-category="todos"]:hover .folder-icon {
    transform: scale(1.15) rotate(5deg);
}

.folder-title {
    font-weight: 700;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.folder-card:hover .folder-title {
    color: #1d4ed8; /* El texto se vuelve azul oscuro */
}

/* --- TARJETAS OPTIMIZADAS --- */
.document-card {
    background: white;
    border-radius: 16px; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.document-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 131, 203, 0.15);
    border-color: #0083cb;
}

.badge-cat {
    font-size: 0.65rem; 
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 3px 8px; 
    border-radius: 99px;
}

/* Colores por categoría */
.circulares .badge-cat { background: #fee2e2; color: #991b1b; }
.guias .badge-cat { background: #dcfce7; color: #166534; }
.institucional .badge-cat { background: #f3e8ff; color: #6b21a8; }
.adultos .badge-cat { background: #e0e7ff; color: #3730a3; }
.seguras .badge-cat { background: #fef3c7; color: #b45309; }
.programa .badge-cat { background: #dcfce7; color: #166534; }
.utiles .badge-cat { background: #e0f2fe; color: #075985; }

.btn-download {
    background: #f1f5f9;
    color: #1e3a8a;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.document-card:hover .btn-download {
    background: #0083cb;
    color: white;
}