@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@1,300;1,400&display=swap');

/* ════════════════════════════════════════
   GALLERY PAGE — Views
════════════════════════════════════════ */

.gallery-detail-view { display: none; }
.gallery-grid-view   { display: block; }

.gallery-grid-view.hidden  { display: none; }
.gallery-detail-view.active { display: block; }

/* ════════════════════════════════════════
   HERO BAND
════════════════════════════════════════ */
.gallery-hero {
    background-color: var(--color-accent);
    text-align: center;
    padding: 80px var(--section-pad-x) 90px;
}
.gallery-hero .eyebrow {
    color: var(--color-rose);
    margin-bottom: 16px;
}

.gallery-hero.hidden {
    display: none;          /* ← ADD THIS */
}

.gallery-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    color: var(--color-fg-alt);
    line-height: 1.2;
    margin-bottom: 16px;
}
.gallery-hero h1 em {
    color: var(--color-fg-alt);
    font-style: italic;
}
.gallery-hero__sub {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-fg-alt-muted);
    max-width: 480px;
    margin: 0 auto;
}

/* ════════════════════════════════════════
   PINTEREST GRID
════════════════════════════════════════ */
.gallery-grid-wrap {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--section-pad-y) var(--section-pad-x);
}

.pinterest-gallery {
    columns: 3;
    column-gap: 20px;
}

.gallery-pin {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-white);
    box-shadow: 0 2px 12px rgba(44, 44, 42, 0.08);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.gallery-pin:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(44, 44, 42, 0.14);
}
.gallery-pin img {
    width: 100%;
    height: auto;
    display: block;
}
.gallery-pin__desc {
    display: none;
}
.gallery-empty {
    text-align: center;
    color: var(--color-fg-muted);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    padding: 60px 20px;
}

/* ════════════════════════════════════════
   ZONE 1 — MAIN CONTENT
════════════════════════════════════════ */

/* Outer wrapper handles the page-level padding + scroll anchor */
.detail-main-wrap {
    padding: 40px var(--section-pad-x);
}

.detail-main {
    display: grid;
    grid-template-columns: 42% 58%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 40px 40px 48px;
    gap: 48px;
    align-items: stretch;
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-lg);
}

/* ── Left: Image ── */
.detail-image-col {
    position: sticky;
    top: 40px;
}
.detail-img-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(44, 44, 42, 0.16);
}
.detail-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
    object-fit: cover;
}

/* ── Back Button — overlaid top-left of image ── */
.detail-back {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-fg);
    transition: background var(--transition);
    backdrop-filter: blur(4px);
    z-index: 10;
    flex-shrink: 0;
}
.detail-back:hover {  background: var(--color-accent); color: var(--color-bg-alt); }

.detail-expand-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-fg);
    transition: background var(--transition);
    backdrop-filter: blur(4px);
}
.detail-expand-btn:hover { background: var(--color-accent); color: var(--color-bg-alt); }

/* ── Right: Info Panel ── */
.detail-info-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 32px 40px 32px 16px;
    height: 100%;
}

/* Arrow-down CTA — navigate to more section */
.detail-arrow-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: auto;
    padding-top: 24px;
}
.detail-arrow-cta__label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-fg-muted);
}
.detail-arrow-cta__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 114px;
    height: 56px;
    background: var(--color-bg-alt);
    transition: transform var(--transition);
    text-decoration: none;
}
.detail-arrow-cta__link:hover {
    transform: translateY(3px);
}
.detail-arrow-cta__img {
    width: 52px;
    height: 52px;
    display: block;
    /*filter: brightness(0) saturate(100%) invert(44%) sepia(72%) saturate(400%) hue-rotate(90deg) brightness(95%);*/
}



/* Author */
.detail-author {
    display: flex;
    align-items: center;
    gap: 12px;
}
.detail-author__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-accent-light);
    border: 2px solid var(--color-accent);
    flex-shrink: 0;
    overflow: hidden;
}
.detail-author__name {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-fg);
}

/* Title & Desc */
.detail-desc {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(14px, 30px, 50px);
    font-weight: 100;
    font-style: italic;
    line-height: 1;
    color: var(--color-fg);
    letter-spacing: 0.015em;
    max-width: 56ch;
}

/* Comment Bar */
.detail-comment-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid var(--color-fg-subtle);
    border-radius: var(--radius-pill);
    padding: 10px 18px;
    margin-top: 8px;
}
.detail-comment-emoji {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
}
.detail-comment-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-fg);
    background: transparent;
}
.detail-comment-input::placeholder { color: var(--color-fg-muted); }

/* ════════════════════════════════════════
   ZONE 2 — MORE MASONRY GRID
════════════════════════════════════════ */
.detail-more-section {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--section-pad-x) var(--section-pad-y);
    border-top: 1px solid var(--color-fg-subtle);
    padding-top: 40px;
}
.detail-more-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-fg-muted);
    margin-bottom: 24px;
}
.detail-more-grid {
    columns: 4;
    column-gap: 16px;
}
.detail-more-card {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(44,44,42,0.08);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}
.detail-more-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(44,44,42,0.14);
}
.detail-more-card img {
    width: 100%;
    height: auto;
    display: block;
}
.detail-more-card__label {
    padding: 10px 12px 12px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-fg);
    line-height: 1.4;
}


/* ════════════════════════════════════════
   FULL SCREEN EXPAND OVERLAY
════════════════════════════════════════ */
.img-expand-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.img-expand-overlay.active { display: flex; }
.img-expand-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}
.img-expand-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.img-expand-close:hover { background: rgba(255,255,255,0.28); }

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 1024px) {
    .detail-more-grid { columns: 3; }
}

@media (max-width: 860px) {
    .detail-main-wrap { padding: 24px 20px; }
    .detail-main {
        grid-template-columns: 1fr;
        padding: 24px 20px;
        gap: 24px;
    }
    .detail-image-col { position: static; }
    .detail-more-grid { columns: 2; }
    .pinterest-gallery { columns: 2; }
    .gallery-hero { padding: 60px 20px 70px; }
    .gallery-grid-wrap { padding: 40px 20px; }
}

@media (max-width: 540px) {
    .detail-more-grid { columns: 2; }
    .pinterest-gallery { columns: 1; }
    .detail-main { padding: 20px 16px; }
}
