/* Koinonia Media Hub 1.0.0 — photo archive only */
.kmh-photo-archive {
    --kmh-text: #1b1b1b;
    --kmh-muted: #6b6b6b;
    --kmh-line: #e6e6e6;
    --kmh-soft: #f7f7f5;
    --kmh-white: #ffffff;
    color: var(--kmh-text);
    background: var(--kmh-white);
}

.kmh-preview-bar {
    background: #fff8d8;
    border-bottom: 1px solid #eadb87;
    color: #514612;
    font-size: 13px;
    line-height: 1.5;
    padding: 10px 0;
}

.kmh-photo-intro {
    padding: 0 0 24px;
    background: #fff;
    border-bottom: 1px solid var(--kmh-line);
}

.kmh-photo-intro__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.kmh-photo-intro p {
    margin: 0;
    max-width: 760px;
    color: var(--kmh-muted);
    font-size: 17px;
    line-height: 1.55;
}

.kmh-photo-intro__count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 0 0 auto;
    white-space: nowrap;
    color: var(--kmh-muted);
}

.kmh-photo-intro__count strong {
    color: var(--kmh-text);
    font-size: 28px;
    line-height: 1;
    font-weight: 600;
}

.kmh-photo-browser {
    padding: 34px 0 80px;
}

.kmh-photo-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.kmh-topic-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kmh-topic-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid var(--kmh-line);
    border-radius: 999px;
    background: var(--kmh-white);
    color: #383838;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.kmh-topic-tab span {
    color: #929292;
    font-size: 11px;
}

.kmh-topic-tab:hover,
.kmh-topic-tab.is-active {
    background: #1e1e1e;
    border-color: #1e1e1e;
    color: #fff;
}

.kmh-topic-tab:hover span,
.kmh-topic-tab.is-active span {
    color: #cfcfcf;
}

.kmh-year-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.kmh-year-filter label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.kmh-year-filter select,
.kmh-year-filter button {
    height: 40px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
}

.kmh-year-filter select {
    min-width: 142px;
    padding: 0 36px 0 14px;
    border: 1px solid var(--kmh-line);
    background: #fff;
    color: #333;
}

.kmh-year-filter button {
    padding: 0 16px;
    border: 1px solid #d6d6d6;
    background: var(--kmh-soft);
    color: #303030;
    cursor: pointer;
}

.kmh-year-filter button:hover {
    border-color: #a8a8a8;
}

.kmh-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px 26px;
}

.kmh-photo-card {
    min-width: 0;
    margin: 0;
    background: transparent;
}

.kmh-photo-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.kmh-photo-card__media {
    position: relative;
    height: 0;
    padding-top: 75%;
    overflow: hidden;
    border-radius: 4px;
    background: #ededeb;
}

.kmh-photo-card__image,
.kmh-photo-card__media > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .45s cubic-bezier(.2,.7,.2,1), filter .25s ease;
}

.kmh-photo-card__link:hover .kmh-photo-card__image,
.kmh-photo-card__link:hover .kmh-photo-card__media > img {
    transform: scale(1.035);
    filter: brightness(.94);
}

.kmh-photo-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 32px;
}

.kmh-photo-card__photo-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(20,20,20,.76);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.kmh-camera-icon {
    width: 13px;
    height: 10px;
    display: inline-block;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    position: relative;
    box-sizing: border-box;
}

.kmh-camera-icon:before {
    content: '';
    position: absolute;
    width: 5px;
    height: 2px;
    left: 1px;
    top: -4px;
    border: 1.5px solid currentColor;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
    box-sizing: border-box;
}

.kmh-camera-icon:after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    border: 1.3px solid currentColor;
    border-radius: 50%;
    left: 4px;
    top: 2px;
    box-sizing: border-box;
}

.kmh-photo-card__content {
    padding: 16px 2px 0;
}

.kmh-photo-card__topic {
    margin-bottom: 7px;
    color: #858585;
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.kmh-photo-card h2 {
    margin: 0 0 8px;
    color: var(--kmh-text);
    font-size: 20px;
    line-height: 1.28;
    font-weight: 500;
    letter-spacing: -0.015em;
    text-transform: none;
    transition: color .2s ease;
}

.kmh-photo-card__link:hover h2 {
    color: #555;
}

.kmh-photo-card time {
    display: block;
    color: #9a9a9a;
    font-size: 12px;
    line-height: 1.4;
}

.kmh-pagination {
    margin-top: 58px;
}

.kmh-pagination .page-numbers {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 0;
}

.kmh-pagination .page-numbers li {
    margin: 0;
    padding: 0;
}

.kmh-pagination a.page-numbers,
.kmh-pagination span.page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid var(--kmh-line);
    border-radius: 999px;
    background: #fff;
    color: #464646;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
}

.kmh-pagination span.page-numbers.current,
.kmh-pagination a.page-numbers:hover {
    background: #1e1e1e;
    border-color: #1e1e1e;
    color: #fff;
}

.kmh-empty-state {
    padding: 80px 20px;
    text-align: center;
    background: var(--kmh-soft);
    border-radius: 6px;
}

.kmh-empty-state h2 {
    margin: 0 0 10px;
    font-size: 28px;
    text-transform: none;
}

.kmh-empty-state p {
    margin: 0 0 20px;
    color: var(--kmh-muted);
}

.kmh-empty-state a {
    display: inline-flex;
    min-height: 40px;
    padding: 0 18px;
    align-items: center;
    border-radius: 999px;
    background: #1e1e1e;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 1000px) {
    .kmh-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kmh-photo-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .kmh-photo-intro {
        padding: 0 0 20px;
    }

    .kmh-photo-intro__inner {
        display: block;
    }

    .kmh-photo-intro p {
        font-size: 15px;
    }

    .kmh-photo-intro__count {
        margin-top: 12px;
    }

    .kmh-photo-browser {
        padding-top: 24px;
        padding-bottom: 56px;
    }

    .kmh-topic-tabs {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .kmh-topic-tab {
        flex: 0 0 auto;
    }

    .kmh-year-filter {
        width: 100%;
    }

    .kmh-year-filter select {
        flex: 1 1 auto;
        min-width: 0;
    }

    .kmh-photo-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .kmh-photo-card h2 {
        font-size: 21px;
    }

    .kmh-pagination .page-numbers {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kmh-photo-card__image,
    .kmh-photo-card__media > img,
    .kmh-topic-tab {
        transition: none;
    }
}
