/**
 * Biblioteca PDF - Frontend Styles
 * Creative and modern design with animations
 */

.bpdf-container {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.bpdf-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 16px;
}

/* Grid Layout */
.bpdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Card */
.bpdf-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease backwards;
}

.bpdf-card:nth-child(1) { animation-delay: 0.1s; }
.bpdf-card:nth-child(2) { animation-delay: 0.2s; }
.bpdf-card:nth-child(3) { animation-delay: 0.3s; }
.bpdf-card:nth-child(4) { animation-delay: 0.4s; }
.bpdf-card:nth-child(5) { animation-delay: 0.5s; }
.bpdf-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bpdf-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(214, 48, 128, 0.2);
}

.bpdf-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card Image */
.bpdf-card-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bpdf-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bpdf-card:hover .bpdf-card-image img {
    transform: scale(1.08);
}

.bpdf-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
}

.bpdf-card-placeholder svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* Badge */
.bpdf-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(214, 48, 128, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Card Content */
.bpdf-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bpdf-card-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 12px;
}

.bpdf-card-date svg {
    flex-shrink: 0;
}

.bpdf-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bpdf-card-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 12px 0;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bpdf-card-description {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex: 1;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footer */
.bpdf-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
    margin-top: auto;
}

.bpdf-card-downloads {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

.bpdf-card-downloads svg {
    flex-shrink: 0;
}

/* Download Button */
.bpdf-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #d63080 0%, #e6007d 100%);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(214, 48, 128, 0.3);
    position: relative;
    overflow: hidden;
}

.bpdf-download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.bpdf-download-btn:hover::before {
    left: 100%;
}

.bpdf-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(214, 48, 128, 0.4);
    color: white;
}

.bpdf-download-btn:active {
    transform: translateY(0);
}

.bpdf-download-btn svg {
    flex-shrink: 0;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Hover Effects */
.bpdf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(214, 48, 128, 0.1) 0%, rgba(230, 0, 125, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.bpdf-card:hover::before {
    opacity: 1;
}

/* Responsive */
@media screen and (max-width: 1200px) {
    .bpdf-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media screen and (max-width: 768px) {
    .bpdf-container {
        padding: 30px 15px;
    }
    
    .bpdf-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .bpdf-card-image {
        height: 350px;
    }
    
    .bpdf-card-content {
        padding: 20px;
    }
    
    .bpdf-card-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .bpdf-download-btn {
        justify-content: center;
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .bpdf-card-image {
        height: 300px;
    }
    
    .bpdf-card-title {
        font-size: 18px;
    }
}

/* Loading Animation */
.bpdf-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(214, 48, 128, 0.3);
    border-radius: 50%;
    border-top-color: #d63080;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    .bpdf-download-btn {
        display: none;
    }
}
