/* ========================================================
   PUBLICATIONS PAGE — Premium Card Styles
   Coherent with publications-section.css design system
   ======================================================== */

/* ----- Page Hero ----- */
.hero-section {
    overflow: visible;
    position: relative;
    padding-bottom: 0;

    &::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background-image:
            linear-gradient(rgba(197, 168, 128, .04) 1px, transparent 1px),
            linear-gradient(90deg, rgba(197, 168, 128, .04) 1px, transparent 1px);
        background-size: 60px 60px;
    }

    & .container {
        grid-template-columns: 1fr 2fr;
        position: relative;
    }

    & .section-title [data-lang="en"] {
        display: inline-block;
        max-width: 23ch;
    }
}

.hero-orb-1 {
    position: absolute;
    top: 20%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: rgba(197, 168, 128, 0.15);
    filter: blur(100px);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* ----- Category Nav ----- */
.expertise-nav-section {
    border-bottom: 1px solid rgba(197, 168, 128, 0.2);
    background: var(--bg-white);
}

.expertise-nav {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid rgba(197, 168, 128, 0.2);
}

.expertise-nav::-webkit-scrollbar {
    display: none;
}

.expertise-nav-btn {
    padding: 0 0 4px;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.25s, border-color 0.25s;
    text-transform: uppercase;
    text-decoration: none;
    display: flex;
    gap: 8px;
    align-items: center;
}

.expertise-nav-btn:hover {
    color: var(--primary-color);
}

.expertise-nav-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-gold);
}

/* ----- Controls Bar ----- */
.insights-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 36px;
}

.pub-date-filter {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--bg-white);
    border: 1px solid rgba(13, 27, 42, 0.15);
    border-radius: 6px;
    padding: 8px 36px 8px 14px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%230d1b2a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
    min-width: 200px;
}

.pub-date-filter:hover,
.pub-date-filter:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(232, 197, 106, 0.12);
    outline: none;
}

/* ----- Publications Grid ----- */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ----- Publication Card ----- */
.pub-page-card {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid rgba(13, 27, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    position: relative;

    /* entrance animation */
    opacity: 0;
    transform: translateY(16px);
    animation: pubCardIn 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes pubCardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pub-page-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 32px rgba(13, 27, 42, 0.10),
        0 2px 8px rgba(13, 27, 42, 0.05);
    border-color: rgba(232, 197, 106, 0.35);
}

/* Top accent bar (matches section card design) */
.pub-page-card .pub-card-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), rgba(232, 197, 106, 0.3));
    border-radius: 0 3px 0 0;
    transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pub-page-card:hover .pub-card-accent-bar {
    width: 100%;
}

/* PDF Preview Thumbnail */
.pub-page-preview {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #f0f2f5;
    flex-shrink: 0;
}

.pub-page-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.4s ease;
}

.pub-page-card:hover .pub-page-preview img {
    transform: scale(1.03);
}

/* Skeleton shimmer for thumbnails */
.pub-page-preview-skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #e8ecf0 0%, #f4f6f8 100%);
    z-index: 1;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.pub-page-preview-skeleton.hidden {
    opacity: 0;
    pointer-events: none;
}

.pub-page-preview-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
            transparent 30%,
            rgba(255, 255, 255, 0.6) 50%,
            transparent 70%);
    background-size: 200% 100%;
    animation: pubShimmer 1.6s infinite ease-in-out;
}

@keyframes pubShimmer {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

/* Download button on preview */
.pub-page-dl-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    z-index: 2;
}

.pub-page-dl-btn:hover {
    background: var(--accent-gold);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(232, 197, 106, 0.4);
}

/* Card Body */
.pub-page-body {
    padding: 16px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

/* Badge — reused from publications-section */
.pub-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    width: fit-content;
    transition: opacity 0.2s ease;
}

.pub-card-badge:hover {
    opacity: 0.8;
}

.pub-card-badge i {
    font-size: 12px;
}

/* Badge color variants — identical to publications-section */
.pub-badge-guides {
    background: rgba(168, 192, 80, 0.12);
    color: #7ca030;
    border: 1px solid rgba(168, 192, 80, 0.25);
}

.pub-badge-mib {
    background: rgba(100, 160, 220, 0.10);
    color: #3d87c0;
    border: 1px solid rgba(100, 160, 220, 0.20);
}

.pub-badge-insights {
    background: rgba(232, 197, 106, 0.12);
    color: #b8922a;
    border: 1px solid rgba(232, 197, 106, 0.25);
}

.pub-badge-reports {
    background: rgba(200, 140, 100, 0.10);
    color: #c07040;
    border: 1px solid rgba(200, 140, 100, 0.20);
}

/* Card title */
.pub-page-title {
    font-family: var(--font-heading);
    font-size: 1.0rem;
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.4;
    margin: 0;
    transition: color 0.25s ease;
    min-height: 1.4em;
}

.pub-page-card:hover .pub-page-title {
    color: var(--secondary-color);
}

/* Gold rule under title */
.pub-page-title::after {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--accent-gold);
    border-radius: 1px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Date chip */
.pub-page-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: auto;
}

.pub-page-date i {
    font-size: 0.8rem;
    color: var(--accent-gold);
    flex-shrink: 0;
}

/* ----- Empty state ----- */
.pub-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    color: var(--text-secondary);
}

.pub-empty-state i {
    font-size: 3rem;
    color: rgba(13, 27, 42, 0.15);
    display: block;
    margin-bottom: 12px;
}

.pub-empty-state p {
    font-size: 0.95rem;
}

/* ----- Pagination ----- */
.pub-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.pub-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(13, 27, 42, 0.15);
    background: var(--bg-white);
    color: var(--primary-color);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pub-page-btn:hover:not(:disabled) {
    border-color: var(--accent-gold);
    background: rgba(232, 197, 106, 0.06);
}

.pub-page-btn.active {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.pub-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pub-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }

    .pub-page-preview {
        height: 200px;
    }
}