/**
 * Digital Brochure Sidebar Styles
 * RS Melati - Medical Clinic Child Theme
 * Displayed alongside News & Articles
 */

/* Two Column Layout */
.news-brochure-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}

@media (min-width: 1024px) {
    .news-brochure-layout {
        grid-template-columns: 2fr 1fr;
        gap: 48px;
    }
}

/* Sidebar Container */
.digital-brochure-sidebar {
    position: relative;
}

/* Header */
.brochure-header {
    margin-bottom: 24px;
}

.brochure-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.brochure-subtitle {
    font-size: 14px;
    color: #4a5565;
    margin: 0;
    line-height: 1.5;
}

/* List */
.brochure-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Card */
.brochure-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.brochure-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.brochure-card-inner {
    display: flex;
    gap: 12px;
    padding: 12px;
    min-height: 120px;
}

/* Thumbnail */
.brochure-thumbnail {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
}

.brochure-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.brochure-card:hover .brochure-thumbnail img {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.pdf-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #1a1a1a;
}

.pdf-badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Content */
.brochure-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.brochure-card-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.brochure-card:hover .brochure-card-title {
    color: #008c45;
}

.brochure-description {
    font-size: 12px;
    color: #4a5565;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Footer */
.brochure-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.brochure-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6a7282;
    min-width: 0;
    flex: 1;
}

.brochure-meta span {
    white-space: nowrap;
}

.meta-separator {
    opacity: 0.5;
}

/* Action Buttons Container */
.brochure-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* View Button */
.view-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #4a90e2;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    text-decoration: none;
}

.view-button:hover {
    background: #357abd;
    transform: scale(1.05);
}

.view-button svg {
    width: 14px;
    height: 14px;
}

/* Download Button */
.download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #008c45;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    text-decoration: none;
}

.download-button:hover {
    background: #007038;
    transform: scale(1.05);
}

.download-button svg {
    width: 14px;
    height: 14px;
}

/* View All Button */
.view-all-brochures-btn {
    width: 100%;
    padding: 12px 24px;
    background: #008c45;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.view-all-brochures-btn:hover {
    background: #007038;
}

/* Responsive */
@media (min-width: 768px) {
    .brochure-title {
        font-size: 28px;
    }
    
    .view-all-brochures-btn {
        font-size: 16px;
        padding: 14px 28px;
    }
}

@media (min-width: 1024px) {
    .brochure-header {
        margin-bottom: 32px;
    }
    
    /* Sticky sidebar on desktop */
    .digital-brochure-sidebar {
        position: sticky;
        top: 100px;
    }
}

/* Animation on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brochure-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.brochure-card:nth-child(1) { animation-delay: 0.05s; }
.brochure-card:nth-child(2) { animation-delay: 0.1s; }
.brochure-card:nth-child(3) { animation-delay: 0.15s; }
.brochure-card:nth-child(4) { animation-delay: 0.2s; }
.brochure-card:nth-child(5) { animation-delay: 0.25s; }
.brochure-card:nth-child(6) { animation-delay: 0.3s; }
