/* ═══════════════════════════════════════════════════════════════════════
   Publications Carousel Widget — Styles
═══════════════════════════════════════════════════════════════════════ */

/* ── Wrapper ──────────────────────────────────────────────────────── */
.pcw-wrap {
    width:      100%;
    box-sizing: border-box;
    font-family: inherit;
}

/* ── Header ───────────────────────────────────────────────────────── */
.pcw-header {
    display:         flex;
    align-items:     flex-start;
    justify-content: space-between;
    margin-bottom:   24px;
    gap:             16px;
}

.pcw-header-left {
    position:    relative;
}

.pcw-title {
    margin:      0 0 6px;
    font-size:   28px;
    font-weight: 700;
    line-height: 1.2;
    color:       #111111;
}

.pcw-subtitle {
    margin:    0;
    font-size: 14px;
    color:     #555555;
}

/* Right block: navigation arrows */
.pcw-nav {
    display:     flex;
    align-items: center;
    gap:         10px;
    flex-shrink: 0;
    padding-top: 4px;
}

.pcw-nav-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:           44px;
    height:          44px;
    border-radius:   50%;
    border:          1.5px solid #cc0000;
    color:           #cc0000;
    background:      transparent;
    cursor:          pointer;
    /* Reset Elementor global button styles */
    padding:         0 !important;
    margin:          0;
    line-height:     1;
    transition:      background 0.2s ease, color 0.2s ease;
    outline:         none;
}

.pcw-nav-btn:hover {
    background: #cc0000;
    color:      #ffffff;
}

.pcw-nav-btn:disabled {
    opacity: 0.35;
    cursor:  default;
}

.pcw-nav-btn:focus-visible {
    outline:        2px solid #cc0000;
    outline-offset: 3px;
}

/* ── Carousel outer (clips overflow) ──────────────────────────────── */
.pcw-carousel-outer {
    overflow: hidden;
    width:    100%;
}

/* Red Active Line */
.pcw-active-line {
    height: 4px;
    background: #cc0000;
    margin-bottom: 12px;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ── Track (flex row of cards) ────────────────────────────────────── */
.pcw-track {
    display:    flex;
    gap:        20px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ── Individual card ──────────────────────────────────────────────── */
.pcw-card {
    flex:        0 0 auto; /* width set by JS based on visible count */
    box-sizing:  border-box;
    display:     flex;
    flex-direction: column;
}

/* Cover image */
.pcw-card-image {
    width:     100%;
    height:    300px;
    overflow:  hidden;
    background: #e8e8e8;
    flex-shrink: 0;
}

.pcw-card-image img {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
    transition: transform 0.35s ease;
}

.pcw-card:hover .pcw-card-image img {
    transform: scale(1.04);
}

/* Card body */
.pcw-card-body {
    display:        flex;
    flex-direction: column;
    flex:           1;
    padding-top:    14px;
    gap:            6px;
}

/* Year / label — bold, large */
.pcw-card-year {
    font-size:   26px;
    font-weight: 700;
    line-height: 1;
    color:       #111111;
    margin:      0;
}

/* Card title / description */
.pcw-card-title {
    margin:      0;
    font-size:   14px;
    line-height: 1.45;
    color:       #333333;
    flex:        1;
}

/* Download button container */
.pcw-btn-wrap {
    margin-top: 10px;
    display: flex;
}

.pcw-download-btn {
    display:         inline-block;
    box-sizing:      border-box;
    padding:         12px 20px;
    background:      #cc0000;
    color:           #ffffff;
    font-size:       12px;
    font-weight:     700;
    letter-spacing:  1px;
    text-decoration: none;
    border-radius:   6px;
    text-align:      center;
    transition:      background 0.2s ease, transform 0.15s ease;
    width:           100%; /* controlled via elementor if changed */
    max-width:       100%;
}

.pcw-download-btn:hover {
    background: #aa0000;
    transform:  translateY(-1px);
    color:      #fff;
}

/* ── Footer counter & Scrollbar ───────────────────────────────────── */
.pcw-footer {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.pcw-counter {
    font-size: 13px;
    color:     #555555;
    white-space: nowrap;
}

.pcw-scrollbar {
    flex-grow: 1;
    max-width: 100px; /* limits scrollbar track length */
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.pcw-scrollbar-thumb {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #cc0000;
    border-radius: 2px;
    transition: transform 0.45s ease;
    /* width updated dynamically via JS */
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media ( max-width: 900px ) {
    .pcw-title { font-size: 22px; }
}

@media ( max-width: 640px ) {
    .pcw-nav-btn { width: 38px; height: 38px; }
    .pcw-card-year { font-size: 22px; }
    .pcw-card-image { height: 220px; }
}
