* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.1;
    background-color: rgb(1, 1, 1);
    padding: 0px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

h1 {
    color: #0c2c9f;
}

.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

input, select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#searchInput {
    flex: 1;
    min-width: 200px;
}

.book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 250fr)); /* Tarjetas más anchas */
    gap: 20px; /* Espacio entre tarjetas */
}

.book-card {
    background: rgb(16, 53, 201);
    border-radius: 15px;
    box-shadow: 0 0px 30px rgba(0, 0, 0, 0.2); /* Sombra más pronunciada */
    overflow: hidden; /* Para que los bordes redondeados se apliquen correctamente */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.book-card:hover {
    transform: translateY(-5px); /* Efecto de elevación al pasar el mouse */
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); /* Sombra más intensa al pasar el mouse */
}

.book-thumbnail {
    width: 100%; /* La imagen ocupa todo el ancho de la tarjeta */
    height: 200px; /* Altura fija para la imagen */
    object-fit: cover; /* Ajusta la imagen para cubrir el espacio */
    border-radius: 15px 15px 0 0; /* Bordes redondeados solo en la parte superior */
}

.book-card h3 {
    color: #e9e8e8;
    margin: 15px 10px 10px;
    font-size: 1.1em; /* Título más grande */
    font-weight: bold; /* Texto en negrita */
}

.book-card p {
    color: #141111;
    margin: 0 10px 10px; /* Márgenes ajustados */
    font-size: 0.6em;
    line-height: 1.2; /* Espaciado entre líneas */
    column-count: 2; /* Una sola columna */
    column-gap: 10px; /* Espacio entre columnas */
    text-align: center; /* Justificar el texto */
    display: -webkit-box;     
    align-items: stretch;
}
/* Ajuste específico para el autor */
.book-card p.author {
    text-align: center; /* Centrado del texto */
    font-size: 3px; /* Ajuste del tamaño de letra */
    margin: 4px 0; /* Espaciado superior e inferior */
    font-weight: bold; /* Resaltar el texto */
}

.book-card .category {
    display: inline-block;
    background: #007bff; /* Color de fondo más llamativo */
    color: white; /* Texto en blanco */
    padding: 5px 85px;
    font-size: 0.8em; /* Tamaño de letra más pequeño */
    text-transform: uppercase; /* Texto en mayúsculas */
    letter-spacing: 1px; /* Espaciado entre letras */
}

.book-actions {
    display: flex;
    gap: 10px;
    margin: 15px 10px;
    justify-content: center;
    width: 100%;
}

.action-button {
    background: #007bff; /* Fondo azul */
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: white; /* Iconos en blanco */
    padding: 10px 15px;
    border-radius: 50%; /* Botones circulares */
    transition: background 0.3s ease;
}

.action-button:hover {
    background: #0056b3; /* Color más oscuro al pasar el mouse */
}
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 95%;
    height: 95%;
    margin: 1% auto;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pdf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #c8d8e7;
    border-bottom: 1px solid #060606;
}

.pdf-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.toolbar-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 1.1em;
    color: #555;
    transition: color 0.2s;
}

.toolbar-button:hover {
    color: #007bff;
}

#pageInfo {
    font-size: 0.9em;
    color: #555;
}

.close-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    color: #0d38d6;
    padding: 5px;
}

.close-button:hover {
    color: #dc3545;
}

#pdfContainer {
    flex: 1;
    overflow: auto;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #161414;
    position: relative;
}

#pdfViewer {
    max-width: 80%;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2em;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .filters {
        flex-direction: column;
    }

    #searchInput {
        width: 100%;
    }

    .pdf-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .pdf-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    #pageInfo {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
}
/* Contenedor principal del visor de PDF */
#pdfModal {
    position: center;
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Botones de navegación */
#prevPage, #nextPage {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem; /* Tamaño grande */
    padding: 20px;
    cursor: pointer;
    z-index: 100;
    border-radius: 100%; /* Forma circular */
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Posicionamiento de los botones */
#prevPage {
    left: 10px;
}

#nextPage {
    right: 10px;
}

/* Efecto hover para los botones */
#prevPage:hover, #nextPage:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Full Screen Mode */
.modal.fullscreen {
    background-color: #000;
}

.modal.fullscreen .modal-content {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
}

#pdfViewer.flip-page {
    transition: transform 0.5s ease-in-out;
}

#pdfViewer.flip-page.next {
    transform: rotateY(-180deg); /* Efecto de volteo hacia la izquierda */
}

#pdfViewer.flip-page.prev {
    transform: rotateY(180deg); /* Efecto de volteo hacia la derecha */
}

/* Estilo general del contenedor */
.filter-container {
    position: relative;
    display: inline-block;
}

/* Estilo del contenedor de temas */
.topics-container {
    display: none; /* Oculto por defecto */
    position: absolute;
    top: 100%; /* Debajo del select */
    left: 0;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 10;
    width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mostrar el contenedor de temas al pasar el mouse */
.filter-container:hover .topics-container {
    display: block;
}


#topicPreview {
    font-size: 14px;
    color: #333;
}



/* Estilos adicionales para HAG Noticias */

/* Efectos de glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Animaciones de entrada */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Efectos hover mejorados */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
}

/* Efectos de botones animados */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

/* Efectos de texto gradiente */
.text-gradient {
    background: linear-gradient(45deg, #007bff, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animaciones de pulso */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Efectos de partículas */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.floating-particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.floating-particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.floating-particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.floating-particle:nth-child(5) { left: 50%; animation-delay: 4s; }

/* Mejoras para el visor PDF */
#pdfModal .modal-content {
    border-radius: 15px;
    overflow: hidden;
}

#pdfModal .modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-bottom: none;
}

#pdfModal .modal-body {
    background: #1a1a1a;
}

/* Efectos de carga */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 123, 255, 0.1);
    border-left: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mejoras para las tarjetas de ediciones */
.edition-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.edition-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

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

.edition-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Efectos de fondo para el hero */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.background-image.active {
    opacity: 0.3;
}

.background-image:nth-child(1) {
    background-image: url('../img/fondo1.jpg');
}

.background-image:nth-child(2) {
    background-image: url('../img/fondo2.jpg');
}

.background-image:nth-child(3) {
    background-image: url('../img/fondo3.jpg');
}

/* Indicadores de fondo */
.background-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #007bff;
    transform: scale(1.2);
}

/* Efectos de video hero */
.hero-video-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-video {
    width: 100%;
    height: auto;
    border-radius: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .edition-card {
        margin-bottom: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Animaciones de entrada específicas */
.animate-fadeInLeft {
    animation: fadeInLeft 1s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 1s ease-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Delays para animaciones */
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

