/* ==========================================================================
   ANUNȚURI — stiluri specifice paginilor din meniul „Anunțuri"
   (Anunțuri, Comunicate de presă, Noutăți, Informări, Galerie foto,
   Galerie video). Fișier separat, încărcat DOAR pe aceste pagini,
   împreună cu informatii-interes-public.css (breadcrumb, carduri,
   notă „fără conținut").
   ========================================================================== */

/* --- Ascunde nota „nu există conținut" imediat ce lista are elemente --- */
.doc-list:has(li) ~ .iip-empty-note,
.press-list:has(.press-item) ~ .iip-empty-note,
.news-grid:has(.news-card) ~ .iip-empty-note,
.notice-list:has(.notice-item) ~ .iip-empty-note,
.ann-list:has(.ann-item) ~ .iip-empty-note,
.video-grid:has(.video-card) ~ .iip-empty-note {
    display: none;
}

/* --- Grila de carduri de legătură: 2 coloane (4 carduri = 2×2) --- */
.subpage-grid.subpage-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subpage-grid-2 .subpage-card-text {
    text-align: left;
}

@media (max-width: 700px) {
    .subpage-grid.subpage-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* --- Dată afișată deasupra titlului într-un element de listă --- */
.ann-date {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #f59e0b;
}

.ann-date i {
    font-size: 11px;
}

/* ==========================================================================
   COMUNICATE DE PRESĂ
   ========================================================================== */
.press-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.press-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 20px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.press-item:hover {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.25);
}

.press-date {
    flex-shrink: 0;
    width: 64px;
    text-align: center;
    padding: 8px 4px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    line-height: 1.1;
}

.press-date .d {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.press-date .m {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #f59e0b;
}

.press-body {
    flex: 1;
    min-width: 0;
}

.press-body h3 {
    margin: 0 0 6px;
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}

.press-body p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.press-item .btn-download-compact {
    flex-shrink: 0;
    align-self: center;
}

/* ==========================================================================
   NOUTĂȚI
   ========================================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.3);
}

.news-card-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.news-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    padding: 18px 20px 20px;
}

.news-card-body h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}

.news-card-body p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.news-card-link {
    margin-top: auto;
    padding-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #f59e0b;
    text-decoration: none;
}

.news-card-link:hover {
    text-decoration: underline;
}

.news-card-link i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.news-card-link:hover i {
    transform: translateX(3px);
}

/* ==========================================================================
   INFORMĂRI (lucrări / restricții de circulație, informări cetățeni)
   ========================================================================== */
.notice-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.notice-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 20px;
}

.notice-item.is-ongoing  { border-left-color: #ef4444; }
.notice-item.is-planned  { border-left-color: #f59e0b; }
.notice-item.is-finished { border-left-color: #10b981; }

.notice-body {
    flex: 1;
    min-width: 0;
}

.notice-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.notice-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.is-ongoing  .notice-status { background: rgba(239, 68, 68, 0.15);  color: #fca5a5; }
.is-finished .notice-status { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

.notice-period {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.notice-body h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}

.notice-body p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.notice-item .btn-download-compact {
    flex-shrink: 0;
    align-self: center;
}

/* ==========================================================================
   GALERIE FOTO
   ========================================================================== */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.gallery-filter {
    appearance: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.gallery-filter:hover {
    border-color: rgba(245, 158, 11, 0.5);
    color: #fff;
}

.gallery-filter.active {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-color: transparent;
    color: #fff;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.photo-item {
    position: relative;
    display: block;
    padding: 0;
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.photo-item[hidden] {
    display: none;
}

.photo-item:hover,
.photo-item:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.5);
    outline: none;
}

.photo-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 14px 12px;
    text-align: left;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}

/* --- Lightbox (fereastra de vizualizare mărită) --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 8, 20, 0.92);
}

.lightbox.open {
    display: flex;
}

.lightbox-figure {
    margin: 0;
    max-width: min(1100px, 100%);
    text-align: center;
}

.lightbox-figure img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-figure figcaption {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.lightbox-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
    background: rgba(245, 158, 11, 0.6);
    outline: none;
}

.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev  { left: 18px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 18px; top: 50%; transform: translateY(-50%); }

body.lightbox-open {
    overflow: hidden;
}

/* ==========================================================================
   GALERIE VIDEO
   ========================================================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.video-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame iframe,
.video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-card-body {
    padding: 16px 20px 20px;
}

.video-card-body h3 {
    margin: 0 0 6px;
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}

.video-card-body p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 600px) {
    .press-item {
        flex-wrap: wrap;
        padding: 16px;
    }
    .press-body {
        flex-basis: calc(100% - 82px);
    }
    .press-item .btn-download-compact {
        align-self: flex-start;
        margin-left: 82px;
    }

    .notice-item {
        flex-direction: column;
        padding: 14px 16px;
    }
    .notice-item .btn-download-compact {
        align-self: flex-start;
    }

    .news-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .photo-caption {
        padding: 22px 10px 8px;
        font-size: 12px;
    }

    .lightbox {
        padding: 12px;
    }
    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-close { top: 10px; right: 10px; }
}

/* ==========================================================================
   ANUNȚURI (dată + titlu + text, document PDF opțional)
   ========================================================================== */
.ann-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ann-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 20px;
}

.ann-body {
    flex: 1;
    min-width: 0;
}

.ann-body .ann-date {
    margin-bottom: 6px;
}

.ann-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}

.ann-body p {
    margin: 0 0 8px;
    font-size: 14.5px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
}

.ann-body p:last-child {
    margin-bottom: 0;
}

.ann-item .btn-download-compact {
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 600px) {
    .ann-item {
        flex-direction: column;
        padding: 14px 16px;
    }
    .ann-item .btn-download-compact {
        align-self: flex-start;
    }
}
