/* =============================================
   Publicația Filialei – Page-Flip Magazine
   by BIG-MEDIA  v1.1.0 – minimal clean style
   ============================================= */

.pf-magazine-wrap {
    font-family: inherit;
    color: #1a1a1a;
    max-width: 100%;
}

/* ── Stage ─────────────────────────────────── */
.pf-stage {
    position: relative;
    background: #f5f5f5;
    padding: 48px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
}

/* ── Loader ─────────────────────────────────── */
.pf-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    z-index: 20;
    background: #f5f5f5;
    color: #555;
    font-size: 13px;
}

.pf-loader__book {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
}
.pf-loader__page {
    width: 7px;
    background: #bbb;
    border-radius: 2px;
    animation: pf-page-bounce .9s ease-in-out infinite;
}
.pf-loader__page:nth-child(1) { height: 24px; animation-delay: 0s; }
.pf-loader__page:nth-child(2) { height: 40px; animation-delay: .15s; }
.pf-loader__page:nth-child(3) { height: 24px; animation-delay: .3s; }
@keyframes pf-page-bounce {
    0%,100% { transform: scaleY(1); opacity: .5; }
    50%      { transform: scaleY(1.25); opacity: 1; }
}

.pf-loader__text { color: #777; letter-spacing: .3px; }

.pf-loader__bar {
    width: 160px;
    height: 2px;
    background: #ddd;
    border-radius: 99px;
    overflow: hidden;
}
.pf-loader__fill {
    height: 100%;
    background: #555;
    border-radius: 99px;
    transition: width .3s ease;
    width: 0%;
}

/* ── Flipbook ───────────────────────────────── */
.pf-flipbook-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.pf-flipbook {
    box-shadow: 0 4px 32px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.08);
    border-radius: 2px;
}

.pf-flipbook canvas {
    display: block;
    max-width: 100%;
}

/* ── Nav arrows – simple black/dark-grey ─────── */
.pf-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s, transform .15s;
    z-index: 10;
    line-height: 0;
}
.pf-nav:hover {
    color: #000;
    transform: translateY(-50%) scale(1.12);
}
.pf-nav:disabled { opacity: .25; cursor: default; }
.pf-nav--prev { left: 14px; }
.pf-nav--next { right: 14px; }

/* ── Controls bar ───────────────────────────── */
.pf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px 20px;
    border-top: 1px solid #e0e0e0;
}
.pf-page-counter {
    font-size: 12px;
    color: #888;
    letter-spacing: .6px;
    min-width: 60px;
    text-align: center;
}
.pf-btn-dl {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #555;
    text-decoration: none;
    padding: 4px 0;
    transition: color .15s;
}
.pf-btn-dl:hover { color: #000; text-decoration: none; }
.pf-zoom-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color .15s;
}
.pf-zoom-btn:hover { color: #333; }

/* ── Editions ───────────────────────────────── */
.pf-editions {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}
.pf-editions__header {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.pf-editions__header svg { color: #888; }

.pf-editions__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.pf-ed-card {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.09);
    transition: border-color .2s, transform .18s, box-shadow .18s;
    outline: none;
}
.pf-ed-card:hover, .pf-ed-card:focus {
    border-color: #999;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,.13);
}
.pf-ed-card.pf-active {
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}

.pf-ed-card__img {
    position: relative;
    aspect-ratio: 3/4;
    background: #f0f0f0;
    overflow: hidden;
}
.pf-ed-card__img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.pf-ed-card:hover .pf-ed-card__img img { transform: scale(1.04); }
.pf-ed-card__hover {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.5);
    color: #fff;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 6px;
    font-size: 11px; font-weight: 600;
    opacity: 0;
    transition: opacity .2s;
}
.pf-ed-card:hover .pf-ed-card__hover,
.pf-ed-card:focus .pf-ed-card__hover { opacity: 1; }

.pf-ed-card__label {
    padding: 7px 9px;
    display: flex; flex-direction: column; gap: 2px;
}
.pf-ed-card__label strong { font-size: 11px; line-height: 1.3; display: block; }
.pf-ed-card__label small { font-size: 10px; color: #999; }

/* ── Fullscreen ─────────────────────────────── */
.pf-magazine-wrap:fullscreen .pf-stage,
.pf-magazine-wrap:-webkit-full-screen .pf-stage {
    min-height: calc(100vh - 80px);
    padding: 40px 80px;
    background: #f0f0f0;
}
.pf-magazine-wrap:fullscreen .pf-editions,
.pf-magazine-wrap:-webkit-full-screen .pf-editions { display: none; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 640px) {
    .pf-stage { padding: 32px 16px; min-height: 380px; }
    .pf-nav--prev { left: 4px; }
    .pf-nav--next { right: 4px; }
    .pf-editions__grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .pf-loader__page { animation: none; }
    .pf-ed-card, .pf-ed-card__img img { transition: none; }
}
