/* Estilos generales mejorados */
.manuales-section {
    min-height: 100vh;
    padding: 1rem 0;
}

/* Mejoras en el breadcrumb */
.breadcrumb {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

/* Contenedor principal mejorado */
.content-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 1rem 0;
    border: 1px solid #f0f0f0;
    display: none; /* Oculto inicialmente */
}

/* Header de sección mejorado */
.section-header {
    background: linear-gradient(135deg, #25282a 0%, #2c3e50 100%);
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.section-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(225,6,0,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.section-divider {
    height: 4px;
    width: 80px;
    background: linear-gradient(90deg, #E10600, #ff5252);
    margin: 0 auto;
    border-radius: 2px;
    position: relative;
    z-index: 2;
}

/* Contenido de sección mejorado */
.section-content {
    padding: 2.5rem;
    background: white;
}

.section-description {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ESTILOS PARA LOS BOTONES DEL CATÁLOGO */
.flipbook-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255,255,255,0.95);
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 80px;
    z-index: 1000;
}

.flipbook-controls button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #E10600 0%, #c00500 100%);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(225, 6, 0, 0.3);
}

.flipbook-controls button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(225, 6, 0, 0.4);
}

.flipbook-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-counter {
    font-weight: bold;
    color: #E10600;
    font-size: 1.1rem;
    min-width: 80px;
    text-align: center;
}

/* Mejoras específicas para el catálogo */
.catalog-container {
    background: #fafafa;
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
}

/* Tarjetas de navegación con imágenes */
.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.nav-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    cursor: pointer;
    position: relative;
}

.nav-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.nav-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border-color: #E10600;
}

.nav-card:hover .nav-card-overlay {
    background: linear-gradient(transparent, #E10600);
}

.nav-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #E10600;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-card-content {
    padding: 1.5rem;
}

.nav-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e10913;
    margin-bottom: 0.5rem;
    text-shadow: 
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white;
}

.nav-card-description {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Tabla mejorada */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 2rem 0;
}

.table-header {
    background: linear-gradient(135deg, #25282a 0%, #2c3e50 100%);
    color: white;
    padding: 1.2rem;
}

.table {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
}

.table th {
    background: #f8f9fa;
    color: #25282a;
    font-weight: 600;
    padding: 1.2rem;
    border-bottom: 2px solid #E10600;
}

.table td {
    padding: 1.2rem;
    vertical-align: middle;
    border-color: #f0f0f0;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    transform: translateX(4px);
}

/* Botones de descarga */
.download-btn {
    background: linear-gradient(135deg, #E10600 0%, #c00500 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225,6,0,0.3);
    color: white;
}

/* Estados de desarrollo */
.development-state {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.development-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Loading para el flipbook */
.flipbook-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    font-size: 1.2rem;
    color: #E10600;
    flex-direction: column;
}

.progress {
    width: 80%;
    max-width: 400px;
    height: 12px;
    margin-top: 15px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #E10600 0%, #c00500 100%);
    transition: width 0.3s ease;
}

/* Estilos para la lista de PDFs */
.pdf-list-container {
    margin: 2rem 0;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Estilo para el nombre del archivo */
.file-name {
    background: #f8f9fa;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    color: #495057;
    word-break: break-all;
    border: 1px solid #e9ecef;
}

/* Icono de PDF */
.pdf-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #E10600 0%, #c00500 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Botón de descarga */
.download-btn {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(225, 6, 0, 0.3);
}

/* Hover effects */
.table tbody tr:hover .file-name {
    background: white;
    color: #E10600;
    border-color: #E10600;
}

/* Responsive design */
@media (max-width: 768px) {
    .section-header {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-content {
        padding: 1.5rem;
    }
    
    .nav-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav-card-image {
        height: 160px;
    }
    
    .flipbook-controls {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }
    
    .flipbook-controls button {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .page-counter {
        order: -1;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .table th, .table td {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .pdf-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .download-btn {
        width: 40px;
        height: 40px;
    }
    
    .file-name {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
    
    .pdf-list-container {
        padding: 1rem;
        margin: 1rem 0;
    }
}

/* Animaciones suaves */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-div {
    display: none;
    animation: fadeInUp 0.6s ease;
}

/* Estilos para el spinner de carga */
.spinner-border.text-danger {
    color: #E10600 !important;
    width: 3rem;
    height: 3rem;
}

/* Asegurar que la sección de fichas tenga posición relativa para el overlay */
#fichasDiv {
    position: relative;
}

/* Estilos para la paginación personalizada */
.pagination-custom {
    display: flex;
    justify-content: center;
    margin: 25px 0;
    padding: 0;
}

.page-item {
    margin: 0 5px;
    border-radius: 50%;
    overflow: hidden;
}

.page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    color: #2c3e50;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.page-item.active .page-link {
    background: #3498db;
    color: white;
}

.page-item:not(.active):not(.disabled) .page-link:hover {
    background: #f8f9fa;
    color: #3498db;
}

.page-item.disabled .page-link {
    opacity: 0.6;
    background: #f8f9fa;
}

/* Estilos para el mensaje de bienvenida con imagen de fondo */
.welcome-message {
    text-align: center;
    padding: 4rem 2rem;
    margin: 2rem 0;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 40, 42, 0.85) 0%, rgba(44, 62, 80, 0.9) 100%);
    z-index: 1;
}

.welcome-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.welcome-icon {
    font-size: 4rem;
    color: #E10600;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.welcome-text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 90%;
}

.welcome-cta {
    font-size: 1.1rem;
    font-weight: 500;
    color: #E10600;
    animation: bounce 2s infinite;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-message {
        padding: 2.5rem 1.5rem;
        min-height: 350px;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-text {
        font-size: 1.1rem;
    }
    
    .welcome-icon {
        font-size: 3rem;
    }
}