/**
 * Pinterest Boards Archive Grid
 * Clean, modern grid with category filtering
 */

/* ==========================================================================
   Filter Buttons
   ========================================================================== */

.pinterest-archive-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    border-color: #333;
    color: #333;
}

.filter-btn.active {
    background: #333;
    border-color: #333;
    color: #fff;
}

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.pinterest-archive-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

@media (max-width: 816px) {
    .pinterest-archive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .pinterest-archive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pinterest-archive-filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Post Cards
   ========================================================================== */

.board-card {
    position: relative;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.board-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.board-card > a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card Embed Area - Auto height */
.board-card-embed {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 0 !important;
}

.board-card-embed-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0 !important;
}

/* Pinterest embed - align left, natural height */
.board-card-embed-inner > span,
.board-card-embed-inner > a {
    display: block !important;
    width: 100% !important;
    border-radius: 0 !important;
}

.board-card-embed-inner span[data-pin-log="embed_board"],
.board-card-embed-inner span[data-pin-href] {
    max-width: none !important;
    border-radius: 0 !important;
}

.board-card-embed-inner iframe {
    width: 100% !important;
    border-radius: 0 !important;
}

/* Override Pinterest's default rounded corners */
.board-card-embed-inner span,
.board-card-embed-inner span *,
.board-card-embed-inner iframe {
    border-radius: 0 !important;
}

/* Override Pinterest's embed_grid class border-radius */
.board-card-embed-inner span[class*="embed_grid"] {
    border-radius: 0 !important;
}

/* Hover overlay for clicking through */
.board-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
    cursor: pointer;
    transition: background 0.2s ease;
}

.board-card-embed {
    position: relative;
}

.board-card:hover .board-card-overlay {
    background: rgba(255, 255, 255, 0.1);
}

/* Card Content - Above embed */
.board-card-content {
    padding: 16px 16px 20px 16px;
    background: #fff;
    text-align: left;
}

.board-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-align: left;
}

.board-card-title a {
    text-decoration: none;
    color: inherit;
}

.board-card-title a:hover {
    color: #555;
}

.board-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

/* Hide Pinterest branding header in archive cards */
.board-card-embed-inner > span > span:first-child {
    display: none !important;
}

.board-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 0;
    font-size: 11px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    text-decoration: none;
}

a.board-card-category:hover {
    background: #333;
    color: #fff;
}

.board-card:hover .board-card-category {
    background: #333;
    color: #fff;
}

/* ==========================================================================
   Back Link (for single post pages)
   ========================================================================== */

.pinterest-back-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pinterest-back-link a {
    text-decoration: none;
    color: inherit;
}

.pinterest-back-link .back-arrow {
    font-size: 18px;
    color: #666;
    transition: color 0.2s ease;
}

.pinterest-back-link .back-arrow:hover {
    color: #333;
}

/* ==========================================================================
   Filter Animation
   ========================================================================== */

.board-card {
    animation: fadeInUp 0.4s ease forwards;
}

.board-card.hidden {
    display: none;
}

.board-card.fade-out {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.2s ease;
}

.board-card.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

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

/* ==========================================================================
   Archive Header
   ========================================================================== */

.pinterest-archive-header {
    text-align: center;
    margin-bottom: 50px;
}

.pinterest-archive-title {
    font-size: 42px;
    font-weight: 300;
    color: #222;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

.pinterest-archive-description {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   No Posts Message
   ========================================================================== */

.no-posts-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

/* ==========================================================================
   Page Container
   ========================================================================== */

.pinterest-archive-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
}

@media (max-width: 768px) {
    .pinterest-archive-title {
        font-size: 32px;
    }
    
    .pinterest-archive-header {
        margin-bottom: 30px;
    }
}
