/**
 * BP Poster - Frontend Styles
 *
 * Responsive grid layout for poster display
 */

/* =============================================
   Grid Layout
   ============================================= */
.bp-poster-grid {
    display: grid;
    grid-template-columns: repeat(var(--bp-poster-columns, 3), 1fr);
    gap: 24px;
    padding: 10px 20px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tablet: 2 columns */
@media (max-width: 768px) {
    .bp-poster-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 10px 20px 50px;
        gap: 16px;
    }
}

/* Mobile: 1 column */
@media (max-width: 480px) {
    .bp-poster-grid {
        grid-template-columns: 1fr;
        padding: 10px 20px 50px;
        gap: 14px;
    }
}

/* =============================================
   Poster Card
   ============================================= */
.bp-poster-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bp-poster-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12),
        0 4px 10px rgba(0, 0, 0, 0.08);
}

/* =============================================
   Card Image
   ============================================= */
.bp-poster-card__link {
    display: block;
    text-decoration: none;
    overflow: hidden;
}

.bp-poster-card__image-wrap {
    position: relative;
    width: 100%;
    padding-top: 141.4%;
    /* ~A4 ratio (1:1.414) */
    overflow: hidden;
    background: #f0f2f5;
}

.bp-poster-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bp-poster-card:hover .bp-poster-card__image {
    transform: scale(1.04);
}

/* Placeholder when no image */
.bp-poster-card__placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #b0b8c4;
    font-size: 14px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

/* =============================================
   Card Info
   ============================================= */
.bp-poster-card__info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Title */
.bp-poster-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #1a1a2e;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bp-poster-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bp-poster-card:hover .bp-poster-card__title a {
    color: #007D3D;
}

/* View Count */
.bp-poster-card__views {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    margin-top: auto;
}

.bp-poster-card__views-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

/* =============================================
   Card Download Button
   ============================================= */
.bp-poster-card__download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #007D3D, #00a550);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 125, 61, 0.3);
    margin-top: 8px;
}

.bp-poster-card__download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 125, 61, 0.45);
}

.bp-poster-card__download-btn:active {
    transform: translateY(0);
}

.bp-poster-card__download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.bp-poster-card__download-btn svg {
    flex-shrink: 0;
}

/* =============================================
   Empty State
   ============================================= */
.bp-poster-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}


.navigation.pagination{
    justify-content: center;
    margin: 10px 0 30px;
    .nav-links{
        display: flex;
        gap: 20px;
    }
}

.bp-poster-archive__header{
    background-image: url(/wp-content/uploads/2026/01/bg-all.png);
    margin-bottom: 47px;
}

.bp-poster-archive__title{
    font-family: "Poppins", Noto Sans Thai, Sans-serif;
    font-size: 3rem;
    font-weight: 600;
    color: var(--e-global-color-f880d9e);
    padding: 48px 0 48px;
    text-align: center;
}