/* ==========================================================================
   CARUSEL FOTO — „Proiectele în imagini” (index.html, secțiunea #galerie)
   Marcajul (fotografiile și miniaturile) este generat de scripts/carusel_pro2026.py
   ========================================================================== */
.pc-label {
    background: rgba(123, 199, 77, 0.14);
    color: var(--color-green-accent, #7BC74D);
    border-color: rgba(123, 199, 77, 0.35);
}
.pc-section .section-header-center { margin-bottom: 2.25rem; }

/* lățimea urmează și înălțimea ecranului, ca fotografia să încapă întreagă (3:2, max. 70vh) */
.pc { max-width: min(980px, 105vh); margin: 0 auto; }

/* --- Scena principală --- */
.pc-stage {
    position: relative;
    aspect-ratio: 3 / 2;
    max-height: 70vh;
    background: #08121f;
    border-radius: var(--radius-card, 12px);
    overflow: hidden;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
    outline: 1px solid rgba(255, 255, 255, 0.08);
}

.pc-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.pc-track::-webkit-scrollbar { display: none; }
.pc-track:focus-visible { outline: 3px solid var(--color-green-accent, #7BC74D); outline-offset: -3px; }

.pc-slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    margin: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    overflow: hidden;
}
/* fundal estompat din aceeași fotografie, pentru cadrele verticale sau panoramice */
.pc-slide::before {
    content: "";
    position: absolute;
    inset: -8%;
    background: var(--bg) center / cover no-repeat;
    filter: blur(26px) saturate(1.15) brightness(0.55);
}
.pc-slide img {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
}
.pc--js .pc-slide img { cursor: zoom-in; }

/* --- Săgeți --- */
.pc-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    padding: 0 0 4px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-navy, #1B2A4A);
    font: 400 2rem/1 'Montserrat', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: background 0.2s, transform 0.2s;
}
.pc-prev { left: 14px; }
.pc-next { right: 14px; }
.pc-nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }

/* --- Bara de jos: contor + butoane --- */
.pc-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 2.5rem 1rem 0.85rem;
    background: linear-gradient(to top, rgba(4, 10, 20, 0.78), rgba(4, 10, 20, 0));
    color: #fff;
    pointer-events: none;
}
.pc-bar > * { pointer-events: auto; }
.pc-count {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.8);
}
.pc-count b { color: #fff; font-size: 1.05rem; }
.pc-actions { display: flex; gap: 0.5rem; }
.pc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font: 600 0.78rem/1.2 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}
.pc-btn:hover { background: rgba(255, 255, 255, 0.24); }

/* --- Bara de progres a derulării automate --- */
.pc-progress {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    height: 3px;
    background: var(--gradient-green, linear-gradient(135deg, #2A6B24, #5FAD41));
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}
.pc-progress.run { animation: pc-progress var(--pc-delay, 5000ms) linear forwards; }
@keyframes pc-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --- Miniaturi --- */
.pc-thumbs {
    position: relative;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.9rem 0.15rem 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.pc-thumb {
    flex: 0 0 auto;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #0b1626;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s, border-color 0.2s;
}
.pc-thumb img { height: 100%; width: auto; max-width: none; }
.pc-thumb:hover { opacity: 0.85; }
.pc-thumb[aria-current="true"] { opacity: 1; border-color: var(--color-green-accent, #7BC74D); }

.pc-nav:focus-visible,
.pc-btn:focus-visible,
.pc-thumb:focus-visible,
.pc-lb-close:focus-visible { outline: 3px solid var(--color-green-accent, #7BC74D); outline-offset: 2px; }

/* fără JavaScript rămâne o galerie derulabilă */
.pc:not(.pc--js) .pc-nav,
.pc:not(.pc--js) .pc-bar,
.pc:not(.pc--js) .pc-thumbs { display: none; }
.pc:not(.pc--js) .pc-track { scrollbar-width: thin; }

/* --- Fotografia mărită --- */
.pc-lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    overflow: hidden;
}
.pc-lightbox[open] { display: grid; place-items: center; }
.pc-lightbox::backdrop { background: rgba(4, 9, 18, 0.94); }
.pc-lightbox img {
    width: auto;
    height: auto;
    max-width: 94vw;
    max-height: 86vh;
    max-height: 86dvh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    user-select: none;
    -webkit-user-drag: none;
}
.pc-lb-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: 600 1.1rem/1 'Inter', sans-serif;
    cursor: pointer;
}
.pc-lb-close:hover { background: rgba(255, 255, 255, 0.25); }
.pc-lb-count {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font: 600 0.85rem 'Montserrat', sans-serif;
    letter-spacing: 0.06em;
}
html:has(.pc-lightbox[open]) { overflow: hidden; }

/* --- Ecrane mici --- */
@media (max-width: 640px) {
    .pc { max-width: none; }
    .pc-section { padding-left: 1rem; padding-right: 1rem; }
    .pc-section .container-main { padding: 0; }
    .pc-stage { aspect-ratio: 4 / 5; max-height: 72vh; border-radius: 10px; }
    .pc-nav { width: 38px; height: 38px; font-size: 1.6rem; }
    .pc-prev { left: 8px; }
    .pc-next { right: 8px; }
    .pc-btn { padding: 0.45rem 0.6rem; }
    .pc-btn span { display: none; }
    .pc-thumb { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
    .pc-progress { display: none; }
    .pc-nav, .pc-thumb, .pc-btn { transition: none; }
}
