/* Explain: Styles for the retro album grid, thumbnails, count badges, and lightbox viewer. */
/* ---------- Pictures page — retro album grid ---------- */
.page-banner-flush {
    background: var(--avocado-dark);
    border-bottom: none;
}

.album-page {
    position: relative;
    overflow: hidden;
    padding-block: 0 4rem;
    background-color: var(--retro-yellow, #ffee5c);
}

.album-head {
    position: relative;
    z-index: 1;
    max-width: 62rem;
    margin-block: 2.75rem;
}

.album-head h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5.5vw, 3.4rem);
    line-height: 1.05;
    margin: 0 0 1.1rem;
    color: var(--text-color);
}

.album-intro {
    max-width: 46rem;
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0 0 1.1rem;
}

.album-cta-line {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.album-cta-line a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.album-cta-line a:hover {
    color: var(--primary-hover);
}

.album-copy {
    font-size: 1rem;
    font-style: italic;
    color: var(--text-muted);
    opacity: 0.85;
    margin: 0;
}

/* ---------- Card grid ---------- */
.album-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background-color: var(--retro-yellow, #ffee5c);
}

@media (min-width: 640px) {
    .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.album-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 1.1rem 1rem 1.1rem;
    text-align: center;
    background: #fffdf7;
    border: 3px solid var(--text-color);
    border-radius: var(--radius-lg);
    box-shadow: 4px 4px 0 var(--text-color);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.album-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--text-color);
}

.album-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 6px;
    background: var(--surface-alt);
}

.album-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-color);
    margin: 0 0 0.5rem;
}

.album-note {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}

.album-by {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.album-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: auto;
    padding: 0.55rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #fff;
    background: var(--primary-color);
    border: 3px solid var(--text-color);
    border-radius: var(--radius-pill);
    box-shadow: 3px 3px 0 var(--text-color);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.album-link i {
    font-size: 0.72rem;
}

.album-link:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 var(--text-color);
}

/* ---------- Inline document button inside captions ---------- */
.retro-inline-btn {
    display: inline-flex;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

/* ---------- Lightbox viewer ---------- */
.album-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(30, 22, 12, 0.85);
}

.album-lightbox[hidden] {
    display: none;
}

.album-lightbox-panel {
    position: relative;
    max-width: min(70rem, 94vw);
    max-height: 90vh;
}

.album-lightbox-panel img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 90vh;
    border: 4px solid var(--text-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
}

.album-lightbox-close {
    position: absolute;
    top: -1.1rem;
    right: -1.1rem;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 3px solid var(--text-color);
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
}

body.album-lightbox-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .album-card,
    .album-link { transition: none; }
}

/* ---------- Clickable thumbnails + picture count ---------- */
.album-thumb-btn {
    position: relative;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.album-thumb-btn img {
    transition: transform 0.3s ease;
}

.album-thumb-btn:hover img {
    transform: scale(1.05);
}

.album-count {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border: 2px solid var(--text-color);
    border-radius: var(--radius-pill);
    background: var(--accent-color);
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 700;
}

/* ---------- Lightbox navigation controls ---------- */
.album-lightbox-panel {
    display: flex;
    flex-direction: column;
}

.album-lightbox-panel img {
    max-height: 76vh;
}

.album-lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1rem;
}

.album-lightbox-nav {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 3px solid var(--text-color);
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
}

.album-lightbox-nav:hover {
    background: var(--accent-hover);
}

.album-lightbox-nav[hidden] {
    display: none;
}

.album-lightbox-counter {
    min-width: 4.5rem;
    text-align: center;
    font-family: var(--font-body);
    font-weight: 700;
    color: #fff;
}