/* ============================================
   BIBLIOTECA - Rediseño Moderno
   Estética con colores institucionales granate/dorado
   ============================================ */

/* Page Header Específico */
.biblioteca-header {
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 100%);
    padding: 140px 20px 80px;
    position: relative;
    overflow: hidden;
}

.biblioteca-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

/* Buscador de Biblioteca - Glassmorphism */
.library-search {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    margin-bottom: 50px;
    border: 1px solid rgba(139, 21, 56, 0.1);
    transition: all 0.4s ease;
}

.library-search:hover {
    box-shadow: 0 25px 70px rgba(139, 21, 56, 0.12);
    transform: translateY(-2px);
}

.search-header {
    text-align: center;
    margin-bottom: 35px;
}

.search-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 12px;
}

.search-header p {
    font-size: 1.1rem;
    color: #6c757d;
}

.search-boxx {
    display: flex;
    align-items: center;
    gap: 18px;
    background: white;
    padding: 18px 30px;
    border-radius: 50px;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(139, 21, 56, 0.1);
    transition: all 0.3s ease;
}

.search-boxx:focus-within {
    border-color: #8b1538;
    box-shadow: 0 10px 40px rgba(139, 21, 56, 0.15);
    transform: translateY(-2px);
}

.search-boxx i {
    color: #8b1538;
    font-size: 1.4rem;
}

.search-boxx input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.15rem;
    outline: none;
    color: #2c3e50;
    font-weight: 500;
}

.search-boxx input::placeholder {
    color: #9ca3af;
}

.search-boxx button {
    padding: 12px 28px;
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(139, 21, 56, 0.3);
}

.search-boxx button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(139, 21, 56, 0.4);
}

.search-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-chip {
    padding: 10px 22px;
    background: white;
    border: 2px solid rgba(139, 21, 56, 0.2);
    border-radius: 50px;
    color: #8b1538;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.filter-chip:hover {
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 100%);
    color: white;
    border-color: #8b1538;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 21, 56, 0.3);
}

.filter-chip.active {
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 100%);
    color: white;
    border-color: #8b1538;
    box-shadow: 0 4px 15px rgba(139, 21, 56, 0.3);
}

.filter-chip i {
    font-size: 0.85rem;
}

.filter-select {
    padding: 10px 18px;
    border: 2px solid rgba(139, 21, 56, 0.15);
    border-radius: 50px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-select:focus {
    border-color: #8b1538;
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1);
}

/* Categorías de Biblioteca - Cards Mejoradas */
.library-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-bottom: 60px;
}

.category-card {
    background: white;
    padding: 45px 35px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
    color: inherit;
}

.category-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(139, 21, 56, 0.05) 0%,
        rgba(201, 169, 97, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 60px rgba(139, 21, 56, 0.15);
    border-color: rgba(139, 21, 56, 0.2);
}

.category-card.active-cat {
    border-color: #8b1538;
    box-shadow: 0 15px 50px rgba(139, 21, 56, 0.2);
}

.category-card:hover::before {
    opacity: 1;
}

.category-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 28px;
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 15px 40px rgba(139, 21, 56, 0.3);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.category-card:hover .category-icon {
    transform: rotateY(360deg);
}

.category-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.category-card p {
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.7;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

.category-count {
    display: inline-block;
    padding: 8px 18px;
    background: linear-gradient(
        135deg,
        rgba(139, 21, 56, 0.1) 0%,
        rgba(201, 169, 97, 0.1) 100%
    );
    border-radius: 50px;
    color: #8b1538;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.category-card .btn-text {
    position: relative;
    z-index: 1;
}

/* Grid de Recursos Mejorado */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 35px;
}

/* Resource Card Enhancements */
.resources-grid .resource-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.resources-grid .resource-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 60px rgba(139, 21, 56, 0.15);
    border-color: rgba(139, 21, 56, 0.2);
}

/* Resource Thumbnail */
.resource-thumbnail {
    position: relative;
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 100%);
    border-radius: 16px 16px 0 0;
    padding: 40px;
    text-align: center;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.resource-thumbnail i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.resource-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.resource-type {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.95);
    color: #8b1538;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

/* Resource Content */
.resource-content {
    padding: 24px;
}

.resource-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
}

.resource-author,
.resource-year {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 6px;
}

.resource-author i,
.resource-year i {
    margin-right: 6px;
    color: #c9a961;
}

.resource-description {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Copyright Badge on Resource Card */
.resource-copyright {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: #96792e;
    border-top: 1px solid rgba(201, 169, 97, 0.2);
}

.resource-copyright i {
    color: #c9a961;
}

.copyright-lock {
    margin-left: auto;
    color: #8b1538;
    font-weight: 600;
    font-size: 0.75rem;
}

.copyright-lock i {
    color: #8b1538;
    margin-right: 3px;
}

/* Resource Actions */
.resource-actions {
    display: flex;
    gap: 10px;
}

.resource-actions .btn-outline {
    flex: 1;
    padding: 8px 14px;
    border: 2px solid rgba(139, 21, 56, 0.2);
    background: transparent;
    color: #8b1538;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.resource-actions .btn-outline:hover {
    background: #8b1538;
    color: white;
    border-color: #8b1538;
}

.resource-actions .btn-primary {
    flex: 1;
    padding: 8px 14px;
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 21, 56, 0.25);
}

.resource-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 21, 56, 0.35);
}

/* Featured Resource Highlight */
.resource-card.featured {
    background: linear-gradient(
        135deg,
        rgba(139, 21, 56, 0.03) 0%,
        rgba(201, 169, 97, 0.03) 100%
    );
    border: 2px solid #c9a961;
    position: relative;
    overflow: hidden;
}

.resource-card.featured::before {
    content: "DESTACADO";
    position: absolute;
    top: 20px;
    right: -35px;
    background: linear-gradient(135deg, #c9a961 0%, #d4af37 100%);
    color: white;
    padding: 6px 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    transform: rotate(45deg);
    box-shadow: 0 4px 15px rgba(201, 169, 97, 0.4);
    z-index: 2;
}

/* Stats Bar */
.library-stats {
    display: flex;
    justify-content: space-around;
    padding: 40px;
    background: linear-gradient(
        135deg,
        rgba(139, 21, 56, 0.06) 0%,
        rgba(201, 169, 97, 0.06) 100%
    );
    border-radius: 20px;
    margin-bottom: 50px;
    border: 2px solid rgba(139, 21, 56, 0.1);
}

.library-stat-item {
    text-align: center;
}

.library-stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: #8b1538;
    margin-bottom: 8px;
    line-height: 1;
}

.library-stat-label {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 600;
}

/* ================================
   FORMATO TABS (Físico / Virtual)
   ================================ */
.formato-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.formato-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: white;
    border: 2px solid rgba(139, 21, 56, 0.15);
    border-radius: 50px;
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.formato-tab i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.formato-tab:hover {
    border-color: #8b1538;
    color: #8b1538;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 21, 56, 0.15);
}

.formato-tab:hover i {
    transform: scale(1.15);
}

.formato-tab.active {
    background: linear-gradient(135deg, #8b1538 0%, #a91d45 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(139, 21, 56, 0.3);
}

.formato-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: rgba(139, 21, 56, 0.1);
    color: #8b1538;
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.formato-tab.active .formato-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ================================
   FORMATO BADGE (en resource cards)
   ================================ */
.resource-formato {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 14px;
    font-size: 0.73rem;
    font-weight: 700;
    border-radius: 8px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

.resource-formato i {
    font-size: 0.7rem;
}

.resource-formato.fisico {
    background: linear-gradient(
        135deg,
        rgba(201, 169, 97, 0.95),
        rgba(180, 148, 76, 0.95)
    );
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.resource-formato.digital {
    background: linear-gradient(
        135deg,
        rgba(139, 21, 56, 0.92),
        rgba(169, 29, 69, 0.92)
    );
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Info Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.info-card {
    background: white;
    padding: 35px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(139, 21, 56, 0.1);
}

.info-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(
        135deg,
        rgba(139, 21, 56, 0.1) 0%,
        rgba(201, 169, 97, 0.1) 100%
    );
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #8b1538;
}

.info-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.7;
}

/* Empty State */
.library-empty {
    text-align: center;
    padding: 80px 20px;
}

.library-empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: linear-gradient(
        135deg,
        rgba(139, 21, 56, 0.1) 0%,
        rgba(201, 169, 97, 0.1) 100%
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: #8b1538;
}

.library-empty h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 800;
}

.library-empty p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 30px;
}

/* Loading State */
.library-loading {
    text-align: center;
    padding: 60px 20px;
}

.library-loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    border: 4px solid rgba(139, 21, 56, 0.1);
    border-top-color: #8b1538;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Popular Tags */
.popular-tags {
    margin-top: 50px;
    padding: 40px;
    background: linear-gradient(
        135deg,
        rgba(139, 21, 56, 0.05) 0%,
        rgba(201, 169, 97, 0.05) 100%
    );
    border-radius: 20px;
    text-align: center;
}

.popular-tags h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tag {
    padding: 10px 20px;
    background: white;
    border: 2px solid rgba(139, 21, 56, 0.2);
    border-radius: 50px;
    color: #8b1538;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag:hover {
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 100%);
    color: white;
    border-color: #8b1538;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 21, 56, 0.3);
}

/* ============================================
   DETALLE DE RECURSO
   ============================================ */

.recurso-detalle {
    max-width: 1100px;
    margin: 0 auto;
}

.recurso-detalle-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: start;
}

/* Portada */
.recurso-portada-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    margin-bottom: 20px;
}

.recurso-portada-img {
    width: 100%;
    height: auto;
    display: block;
}

.recurso-portada-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.recurso-portada-placeholder i {
    font-size: 4rem;
}

.recurso-portada-placeholder span {
    font-size: 1rem;
    font-weight: 600;
}

/* Acciones */
.recurso-acciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.recurso-acciones .btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.recurso-acciones .btn-primary {
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 100%);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(139, 21, 56, 0.3);
}

.recurso-acciones .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 21, 56, 0.4);
}

.recurso-acciones .btn-outline {
    border: 2px solid rgba(139, 21, 56, 0.2);
    background: transparent;
    color: #8b1538;
}

.recurso-acciones .btn-outline:hover {
    background: #8b1538;
    color: white;
    border-color: #8b1538;
}

.recurso-acciones .btn-text {
    background: transparent;
    color: #6c757d;
    border: none;
}

.recurso-acciones .btn-text:hover {
    color: #8b1538;
}

/* Mini Stats */
.recurso-mini-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #6c757d;
}

.mini-stat i {
    color: #c9a961;
}

/* Info Column */
.recurso-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.recurso-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

.recurso-badge.tipo {
    background: rgba(139, 21, 56, 0.1);
    color: #8b1538;
}

.recurso-badge.area {
    background: rgba(201, 169, 97, 0.15);
    color: #96792e;
}

.recurso-badge.destacado {
    background: linear-gradient(135deg, #c9a961, #d4af37);
    color: white;
}

.recurso-badge.restringido {
    background: rgba(139, 21, 56, 0.08);
    color: #8b1538;
}

.recurso-titulo {
    font-size: 2rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 24px;
    line-height: 1.3;
}

/* Meta info */
.recurso-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
    padding: 24px;
    background: rgba(139, 21, 56, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(139, 21, 56, 0.08);
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.meta-item > i {
    font-size: 1rem;
    color: #c9a961;
    margin-top: 3px;
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.meta-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Descripción */
.recurso-descripcion {
    margin-bottom: 30px;
}

.recurso-descripcion h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
}

.recurso-descripcion p {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.8;
    white-space: pre-line;
}

/* Copyright Section en Detalle */
.recurso-copyright-section {
    margin-top: 10px;
}

.recurso-copyright-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recurso-copyright-section h3 i {
    color: #c9a961;
}

.copyright-card {
    background: linear-gradient(
        135deg,
        rgba(201, 169, 97, 0.06) 0%,
        rgba(139, 21, 56, 0.03) 100%
    );
    border: 2px solid rgba(201, 169, 97, 0.2);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.copyright-badge-large {
    flex-shrink: 0;
    padding: 12px 20px;
    background: linear-gradient(135deg, #c9a961, #d4af37);
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(201, 169, 97, 0.3);
}

.copyright-details {
    flex: 1;
}

.copyright-license {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.copyright-holder {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 8px;
}

.copyright-notes {
    font-size: 0.85rem;
    color: #4a5568;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(201, 169, 97, 0.15);
}

.copyright-notes p {
    margin-top: 4px;
}

.copyright-warning {
    font-size: 0.85rem;
    color: #8b1538;
    font-weight: 600;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copyright-warning i {
    color: #c9a961;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .library-categories {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }

    .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }

    .recurso-detalle-grid {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .biblioteca-header {
        padding: 100px 20px 60px;
    }

    .library-search {
        padding: 30px;
    }

    .search-header h2 {
        font-size: 1.8rem;
    }

    .search-boxx {
        flex-direction: column;
        padding: 20px;
        border-radius: 20px;
    }

    .search-boxx button {
        width: 100%;
        padding: 14px 28px;
    }

    .library-categories {
        grid-template-columns: 1fr;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .library-stats {
        flex-direction: column;
        gap: 30px;
        padding: 30px;
    }

    .formato-tabs {
        gap: 10px;
    }

    .formato-tab {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .search-filters {
        gap: 8px;
    }

    .filter-chip {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

    .recurso-detalle-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .recurso-portada-col {
        max-width: 300px;
        margin: 0 auto;
    }

    .recurso-meta {
        grid-template-columns: 1fr;
    }

    .copyright-card {
        flex-direction: column;
    }

    .recurso-titulo {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .library-search {
        padding: 25px;
    }

    .search-header h2 {
        font-size: 1.5rem;
    }

    .search-header p {
        font-size: 1rem;
    }

    .search-boxx input {
        font-size: 1rem;
    }

    .category-card {
        padding: 30px 25px;
    }

    .category-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .category-card h3 {
        font-size: 1.4rem;
    }

    .library-empty-icon {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }

    .library-empty h3 {
        font-size: 1.5rem;
    }

    .library-stat-number {
        font-size: 2.5rem;
    }

    .popular-tags {
        padding: 30px 20px;
    }

    .popular-tags h3 {
        font-size: 1.5rem;
    }

    .recurso-titulo {
        font-size: 1.4rem;
    }
}

/* ============================================
   CTA SECTION - Call to Action
   ============================================ */

.cta-section {
    position: relative;
    padding: 100px 20px;
    background: linear-gradient(135deg, #8b1538 0%, #6b0f2a 50%, #4a0a1c 100%);
    overflow: hidden;
    margin-top: 80px;
}

.cta-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(
            circle at 20% 50%,
            rgba(201, 169, 97, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 50%,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 50%
        );
    animation: ctaGlow 8s ease-in-out infinite;
}

@keyframes ctaGlow {
    0%,
    100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    padding: 60px 50px;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-content:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(201, 169, 97, 0.4);
}

.cta-content h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.cta-content p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 35px;
    line-height: 1.6;
    font-weight: 400;
}

.cta-content .btn {
    padding: 18px 48px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #8b1538;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 0 0 rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cta-content .btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(201, 169, 97, 0.2);
    transform: translate(-50%, -50%);
    transition:
        width 0.6s,
        height 0.6s;
}

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

.cta-content .btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 0 8px rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #c9a961 100%);
}

.cta-content .btn:active {
    transform: translateY(-2px) scale(1.02);
}

.cta-content .btn i {
    margin-right: 12px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.cta-content .btn:hover i {
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    .cta-section {
        padding: 60px 20px;
    }

    .cta-content {
        padding: 40px 30px;
        border-radius: 20px;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-content p {
        font-size: 1.1rem;
    }

    .cta-content .btn {
        padding: 16px 36px;
        font-size: 1rem;
    }
}
