/* LimageCMS v0.2 — F10/F12 gallery cards */

/* Верхний отступ страницы галереи: шапка не должна «висеть» далеко от края. */
.gallery-page.f10-gallery-page { padding-top: 20px; }

.f10-gallery-page .gallery-header { margin-bottom: 18px; }

.f10-gallery-page .gallery-header h1 { margin: 4px 0 10px; }

/* --- Хлебные крошки: главная → категория → текущая галерея --- */
.f10-gallery-page .gallery-breadcrumbs { margin: 0; }

.f10-gallery-page .gallery-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted, #687586);
    font-size: .86rem;
    line-height: 1.4;
}

.f10-gallery-page .gallery-breadcrumbs__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.f10-gallery-page .gallery-breadcrumbs__item + .gallery-breadcrumbs__item::before {
    content: "›";
    color: #a4aebc;
    font-size: 1rem;
    line-height: 1;
}

.f10-gallery-page .gallery-breadcrumbs__item a {
    color: var(--muted, #687586);
    text-decoration: none;
}

.f10-gallery-page .gallery-breadcrumbs__item a:hover { color: var(--accent, #1f5eff); }

.f10-gallery-page .gallery-breadcrumbs__item--current {
    max-width: 60ch;
    overflow: hidden;
    color: var(--text, #18202a);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Компактная строка параметров с иконками --- */
.f10-gallery-page .gallery-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-bottom: 14px;
}

.f10-gallery-page .gallery-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.f10-gallery-page .gallery-meta__icon {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    color: var(--muted, #687586);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Блок модели: аватар + ссылка на страницу модели --- */
.f10-gallery-page .gallery-model {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    margin-top: 12px;
    padding: 6px 14px 6px 6px;
    border: 1px solid #e2e7ee;
    border-radius: 999px;
    background: #f7f9fc;
}

.f10-gallery-page .gallery-model__avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 1px solid #dde3ea;
    border-radius: 50%;
    background: #e9edf2;
    object-fit: cover;
}

.f10-gallery-page .gallery-model__avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #1f5eff);
    font-size: 1.05rem;
    font-weight: 700;
}

.f10-gallery-page .gallery-model__body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.f10-gallery-page .gallery-model__caption {
    color: var(--muted, #687586);
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.f10-gallery-page .gallery-model__link {
    color: var(--text, #18202a);
    font-size: .95rem;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
    overflow-wrap: anywhere;
}

a.gallery-model__link:hover { color: var(--accent, #1f5eff); }

.f10-gallery-page .gallery-taxonomy-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.f10-gallery-page .gallery-taxonomy-row__label {
    color: var(--muted, #687586);
    font-size: .92rem;
}

.f10-gallery-page .gallery-taxonomy-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.f10-gallery-page .gallery-taxonomy-chip,
.f10-gallery-page .gallery-taxonomy-row > a,
.f10-gallery-page .gallery-taxonomy-row > span:not(.gallery-taxonomy-row__label) {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 11px;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    background: #fff;
    color: var(--text, #18202a);
    text-decoration: none;
    line-height: 1.25;
    box-shadow: 0 1px 3px rgba(20,31,45,.04);
}

.f10-gallery-page .gallery-taxonomy-chip:hover,
.f10-gallery-page .gallery-taxonomy-row > a:hover {
    border-color: var(--accent, #1f5eff);
    background: rgba(31, 94, 255, .08);
    color: var(--accent, #1f5eff);
    text-decoration: none;
}

/* Теги — компактные серые метки вида «#Кино». */
.f10-gallery-page .gallery-taxonomy-chip--tag {
    min-height: 28px;
    padding: 3px 10px;
    border-color: #e3e7ec;
    background: #f2f4f7;
    color: #5b6675;
    font-size: .88rem;
}

.f10-gallery-page .gallery-taxonomy-chip--tag > span {
    margin-right: 1px;
    color: #98a2b1;
    font-weight: 600;
}

.f10-gallery-page .gallery-taxonomy-chip--tag:hover {
    border-color: var(--accent, #1f5eff);
    background: rgba(31, 94, 255, .08);
    color: var(--accent, #1f5eff);
}

.f10-gallery-page .gallery-taxonomy-chip--tag:hover > span { color: inherit; }

/* --- Сетка фотографий: 4 колонки на десктопе, 3 на планшете, 2 на телефоне --- */
.gallery-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
    width: 100%;
    margin-top: 18px;
}

/*
 * Плитка с одинаковыми пропорциями: изображение заполняет её целиком.
 * Кадрирование убирает пустые полосы вокруг снимков разной ориентации.
 */
.photo-card {
    position: relative;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid #dfe4e8;
    border-radius: 12px;
    background: #eef1f4;
    box-shadow: 0 1px 2px rgba(20, 31, 45, .05), 0 10px 22px rgba(20, 31, 45, .06);
    line-height: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.photo-card__link {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}

.photo-card__image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    margin: 0;
    background: #eef1f4;
    object-fit: contain;
    object-position: center;
    transition: transform .35s ease;
}

.photo-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 17, 21, .3);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

.photo-card__zoom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .93);
    color: #18202a;
    box-shadow: 0 6px 18px rgba(15, 17, 21, .3);
    transform: scale(.86);
    transition: transform .22s ease;
}

.photo-card__zoom svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.photo-card:hover,
.photo-card:focus-within {
    border-color: #cbd5e1;
    box-shadow: 0 4px 10px rgba(20, 31, 45, .1), 0 18px 36px rgba(20, 31, 45, .14);
}

.photo-card:hover .photo-card__image,
.photo-card:focus-within .photo-card__image {
    transform: scale(1.03);
}

.photo-card:hover .photo-card__overlay,
.photo-card:focus-within .photo-card__overlay {
    opacity: 1;
}

.photo-card:hover .photo-card__zoom,
.photo-card:focus-within .photo-card__zoom {
    transform: none;
}

.photo-card__link:focus-visible {
    outline: 3px solid var(--accent, #1f5eff);
    outline-offset: 3px;
}

/* На сенсорных экранах hover-эффекты не нужны: плитка остаётся удобной. */
@media (hover: none) {
    .photo-card__overlay { display: none; }

    .photo-card:hover .photo-card__image,
    .photo-card:focus-within .photo-card__image { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .photo-card,
    .photo-card__image,
    .photo-card__overlay,
    .photo-card__zoom { transition: none; }
}

@media (max-width: 1100px) {
    .gallery-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 767px) {
    .gallery-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
    .photo-card { border-radius: 10px; }

    .f10-gallery-page .gallery-model { width: 100%; }
}

@media (max-width: 720px) {
    .gallery-page.f10-gallery-page { padding-top: 0; }
}

@media (max-width: 600px) {
    .photo-card { border-radius: 8px; }

    .f10-gallery-page .gallery-breadcrumbs__item--current { max-width: 100%; }
}
