/* ============================
   СТОРІНКА: ФОТОАЛЬБОМ
   (світлий стиль як /cases/)
============================ */

/* Обгортка сторінки */
.aw-page-foto {
    margin-top: 36px;
    margin-bottom: 32px;
}

/* ============================
   ХЕДЕР + ФІЛЬТР
============================ */

.aw-foto-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding: 18px 20px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.aw-foto-header__text {
    max-width: 720px;
}

.aw-foto-header__side {
    margin-left: auto;
    min-width: 230px;
    max-width: 280px;
    align-self: center;
}

/* "ФОТО СПІЛЬНОТИ..." */
.aw-foto-eyebrow {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    margin-bottom: 4px;
}

/* H1 */
.aw-foto-title {
    margin: 0 0 6px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.aw-foto-title span {
    color: var(--aw-bg-header, #022F3B);
}

/* підзаголовок — ховаємо на мобілці */
.aw-foto-subtitle {
    margin: 0;
    font-size: .9rem;
    color: #475569;
    line-height: 1.6;
}

/* підпис з кількістю фото / фільтром */
.aw-foto-summary {
    margin-top: 8px;
    font-size: .82rem;
    color: #6b7280;
}

.aw-foto-summary strong {
    font-weight: 700;
    color: #111827;
}

.aw-foto-summary span {
    font-weight: 500;
    color: #0f172a;
}

.aw-foto-summary--empty {
    color: #9ca3af;
}

@media (max-width: 768px) {
    .aw-foto-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .aw-foto-header__side {
        width: 100%;
        max-width: none;
        margin-left: 0;
        align-self: stretch;
        margin-top: 8px;
    }

    /* як ти просив — без довгого тексту на мобілці */
    .aw-foto-subtitle {
        display: none;
    }
}

/* ============================
   ФІЛЬТР (всередині хедера)
============================ */

.aw-foto-filters {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.aw-foto-filters__group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aw-foto-filters__label {
    font-size: .78rem;
    color: #64748b;
    font-weight: 500;
}

/* обгортка select + іконка */
.aw-foto-select-wrap {
    position: relative;
    width: 100%;
}

.aw-foto-filters__select {
    width: 100%;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    padding: 5px 32px 5px 12px;
    font-size: .85rem;
    color: #0f172a;
    background: #ffffff;
    min-height: 30px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.aw-foto-filters__select:focus {
    outline: none;
    border-color: var(--aw-bg-header, #022F3B);
    box-shadow: 0 0 0 1px rgba(2, 47, 59, 0.14);
}

/* іконка стрілочки */
.aw-foto-select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: .8rem;
    color: #9ca3af;
}

/* блок з кнопками */
.aw-foto-filters__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

/* "Скинути" як у /cases/ */
.aw-foto-filters__reset {
    font-size: .8rem;
}

@media (max-width: 768px) {
    .aw-foto-filters__actions {
        justify-content: flex-start;
    }
}

/* ============================
   ГАЛЕРЕЯ
============================ */

.aw-photo-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

@media (min-width: 768px) {
    .aw-photo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .aw-photo-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* картка фото – світлий варіант як у /cases/ */
.aw-photo-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
    animation: aw-photo-fade-in 0.35s ease-out both;
}

/* fade-in для нових карток */
@keyframes aw-photo-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aw-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

/* легкий зум по hover */
.aw-photo-card:hover img {
    transform: scale(1.04);
}

/* підпис внизу фото */
.aw-photo-card__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 12px 10px;
    font-size: 0.82rem;
    color: #f7f9fb;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75),
        rgba(0, 0, 0, 0.25),
        transparent
    );
}

/* текст про відсутність фото */
.aw-no-photos {
    color: #4b5563;
    font-size: 0.95rem;
}

/* ============================
   ЛОАДЕР ДЛЯ INFINITE SCROLL
============================ */

.aw-photo-loader {
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    padding: 8px 0 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

/* ============================
   ЛАЙТБОКС (темний фон)
============================ */

.aw-photo-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.aw-photo-lightbox--visible {
    opacity: 1;
    visibility: visible;
}

.aw-photo-lightbox__figure {
    max-width: 90vw;
    max-height: 80vh;
    margin: 0;
    text-align: center;
}

.aw-photo-lightbox__img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

.aw-photo-lightbox__caption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #d7e3ee;
}

/* кнопка закриття */
.aw-photo-lightbox__close {
    position: absolute;
    top: 18px;
    right: 22px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    cursor: pointer;
}

/* навігаційні стрілки */
.aw-photo-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
}

.aw-photo-lightbox__nav--prev {
    left: 20px;
}

.aw-photo-lightbox__nav--next {
    right: 20px;
}

/* трохи менше на мобілці */
@media (max-width: 575.98px) {
    .aw-photo-lightbox__nav {
        width: 34px;
        height: 34px;
        font-size: 1.3rem;
    }

    .aw-photo-lightbox__close {
        width: 34px;
        height: 34px;
        font-size: 1.4rem;
    }
}
