/* ==========================================================================
   Photo gallery
   The gallery pages sit inside the main site layout, so colours, fonts and
   the header/footer come from site.css and harrow.css. Only the album cards
   and photo grid are defined here.
   ========================================================================== */

.gallery-content { --gallery-cover: 205px; }

/* ---------- album grid ---------- */
.album-card {
    display: block;
    height: 100%;
    color: var(--ink);
    text-decoration: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.album-card:hover,
.album-card:focus-visible {
    color: var(--ink);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.album-cover {
    position: relative;
    height: var(--gallery-cover);
    background: var(--tint);
    overflow: hidden;
}
.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.album-card:hover .album-cover img { transform: scale(1.04); }
.photo-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: #fff;
    background: rgba(11, 31, 58, .82);
    padding: 5px 11px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .01em;
}
.album-info { padding: 17px 20px 20px; }
.album-info h2 {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
    margin: 0 0 6px;
}
.album-info p {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.55;
    margin: 0;
}
.cover-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: .9rem;
}
.gallery-note {
    margin: 30px 0 0;
    color: var(--muted);
    font-size: .88rem;
}

/* ---------- album page ---------- */
.album-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--link);
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
}
.back-link:hover { text-decoration: underline; }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 15px;
}
.photo-tile {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: var(--tint);
    box-shadow: var(--shadow);
}
.photo-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.photo-tile:hover img { transform: scale(1.06); }
.photo-caption {
    position: absolute;
    inset: auto 0 0;
    padding: 28px 12px 11px;
    color: #fff;
    font-size: .85rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, .72));
    opacity: 0;
    transition: opacity .2s ease;
}
.photo-tile:hover .photo-caption,
.photo-tile:focus-visible .photo-caption { opacity: 1; }

/* Pagination follows the site palette instead of Bootstrap blue. */
.gallery-content .page-link {
    color: var(--ink);
    background: var(--card);
    border-color: var(--line);
}
.gallery-content .page-link:hover { background: var(--tint); color: var(--ink); }
.gallery-content .page-item.active .page-link { background: var(--navy); border-color: var(--navy); color: #fff; }
.gallery-content .page-item.disabled .page-link { color: var(--muted); background: var(--card); }

@media (max-width: 575px) {
    .gallery-content { --gallery-cover: 180px; }
    .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .photo-tile { border-radius: 10px; }
    .album-info { padding: 14px 16px 17px; }
    .album-info h2 { font-size: 1rem; }
}
