/* Estilos para Normatividad - Diseño de Tarjetas */

/* Estilos generales */
body {
    background-color: #f8f8f8;
}

/* Header principal */
.display-4 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.text-danger {
    color: #8b0000 !important;
}

.lead {
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 800px;
    margin: 0 auto;
    color: #4a4a4a;
}

/* Tarjetas de normatividad */
.normatividad-card {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 2rem;
    height: 280px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.normatividad-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Icono de la tarjeta - Diseño como calendario de la imagen */
.card-icon {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.card-icon::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 70px;
    background: transparent;
    border: 2px solid #b8a78d;
    border-radius: 8px;
    transform: rotate(-2deg);
    box-shadow: none;
    z-index: 1;
}

.card-icon::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 70px;
    background: transparent;
    border: 2px solid #b8a78d;
    border-radius: 8px;
    transform: rotate(1deg) translate(2px, 2px);
    box-shadow: none;
    z-index: 0;
}

/* Efecto de esquina doblada como en la imagen */
.card-icon {
    position: relative;
}

.card-icon::before {
    position: relative;
}

.card-icon::before::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background: linear-gradient(-45deg, transparent 50%, #e6e6e6 50%);
    border-radius: 0 0 0 8px;
    z-index: 3;
}

.card-icon i {
    font-size: 2.5rem;
    color: #b8a78d;
    opacity: 1;
    position: relative;
    z-index: 2;
    text-shadow: none;
}

/* Líneas horizontales como en un documento */
.card-icon::before {
    background-image: 
        linear-gradient(to bottom, transparent 0%, transparent 45%, #b8a78d 45%, #b8a78d 46%, transparent 46%, transparent 55%, #b8a78d 55%, #b8a78d 56%, transparent 56%, transparent 65%, #b8a78d 65%, #b8a78d 66%, transparent 66%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.normatividad-card:hover .card-icon::before {
    transform: rotate(-2deg) scale(1.05);
    border-color: #8b0000;
    transition: all 0.3s ease;
}

.normatividad-card:hover .card-icon::after {
    transform: rotate(1deg) translate(2px, 2px) scale(1.05);
    border-color: #8b0000;
    transition: all 0.3s ease;
}

.normatividad-card:hover .card-icon i {
    color: #8b0000;
    opacity: 1;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* Contenido de la tarjeta */
.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #8b0000;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-align: center;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-description {
    font-size: 0.9rem;
    color: #4a4a4a;
    line-height: 1.4;
    text-align: center;
    margin: 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Flecha de la tarjeta */
.card-arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background-color: #555555;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.card-arrow i {
    color: white;
    font-size: 0.8rem;
}

.normatividad-card:hover .card-arrow {
    background-color: #8b0000;
    transform: scale(1.1);
}

/* Estado vacío */
.text-muted {
    color: #6c757d !important;
}

.fa-4x {
    font-size: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .normatividad-card {
        height: 250px;
        padding: 1.5rem;
    }
    
    .card-icon i {
        font-size: 2.5rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .normatividad-card {
        height: 220px;
        padding: 1.25rem;
    }
    
    .card-icon i {
        font-size: 2rem;
    }
    
    .card-title {
        font-size: 0.95rem;
        min-height: 2.4rem;
    }
    
    .card-description {
        font-size: 0.8rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.normatividad-card {
    animation: fadeInUp 0.6s ease-out;
}

.normatividad-card:nth-child(1) { animation-delay: 0.1s; }
.normatividad-card:nth-child(2) { animation-delay: 0.2s; }
.normatividad-card:nth-child(3) { animation-delay: 0.3s; }
.normatividad-card:nth-child(4) { animation-delay: 0.4s; }
.normatividad-card:nth-child(5) { animation-delay: 0.5s; }
.normatividad-card:nth-child(6) { animation-delay: 0.6s; }

/* Efectos de hover mejorados */
.normatividad-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 53, 69, 0.1), transparent);
    transition: left 0.5s;
}

.normatividad-card:hover::before {
    left: 100%;
}

/* Modal personalizado */
.modal-xl {
    max-width: 95%;
}

.modal-header {
    background: linear-gradient(135deg, #8b0000 0%, #6b0000 100%);
    color: white;
    border-bottom: none;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

/* Spinner personalizado */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Mejoras en el iframe */
#documentoFrame {
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Botón de cerrar modal */
.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-1px);
}
