body {
    background: var(--bg-light);
}

/* ============================================================
     HERO DESIGN — Syncing with layout system
  ============================================================ */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #c8d8c0 0%, #a8c8b0 50%, #8ab49a 100%);
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    background: url('/img/gallery_hero.jpg') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(26, 58, 42, 0.35) 0%, rgba(26, 58, 42, 0.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 700px;
    padding: 0 24px;
}

.hero-eyebrow {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 20px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.8rem;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.05rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 36px;
    line-height: 1.7;
}

.btn-primary {
    display: inline-block;
    background: var(--teal);
    color: #fff;
    padding: 14px 36px;
    border-radius: 3px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
}

/* ============================================================
     GALLERY GRID — 3-column Layout Rules
  ============================================================ */
.gallery-section {
    max-width: 935px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    background: #efefef;
}

.gallery-item-bg {
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease;
}

.gallery-item:hover .gallery-item-bg {
    transform: scale(1.04);
}

.gallery-hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    transition: opacity 0.25s, background 0.25s;
}

.gallery-item:hover .gallery-hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.32);
}

.gallery-hover-stat {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}

.gallery-hover-stat i {
    font-size: 1.05rem;
}

.gallery-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

/* ============================================================
     LIGHTBOX POST MODAL
  ============================================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.lightbox-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-modal {
    background: #fff;
    border-radius: 4px;
    display: flex;
    max-width: 900px;
    width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.25s;
}

.lightbox-overlay.open .lightbox-modal {
    transform: scale(1);
}

.lb-image-wrap {
    flex: 0 0 58%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.lb-image-wrap .lb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lb-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-img-placeholder i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.2);
}

.lb-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #dbdbdb;
    min-height: 520px;
}

.lb-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #dbdbdb;
}

.lb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--teal), var(--salmon));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lb-avatar i {
    font-size: 0.9rem;
    color: #fff;
}

.lb-handle {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    flex: 1;
}

.lb-more {
    color: var(--text-mid);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
}

.lb-caption-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.lb-caption-area::-webkit-scrollbar {
    width: 4px;
}

.lb-caption-area::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.lb-caption-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.lb-cap-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(45deg, var(--teal), var(--salmon));
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-cap-avatar i {
    font-size: 0.9rem;
    color: #fff;
}

.lb-cap-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-dark);
}

.lb-cap-text strong {
    font-weight: 700;
    margin-right: 4px;
}

.lb-cap-time {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 4px;
}

.lb-divider {
    border: none;
    border-top: 1px solid #dbdbdb;
    margin: 0;
}

.lb-actions {
    padding: 10px 16px 6px;
}

.lb-action-btns {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.lb-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--text-dark);
    padding: 4px;
    transition: color 0.2s, transform 0.15s;
}

.lb-action-btn:hover {
    color: var(--salmon);
}

.lb-action-btn.heart.liked {
    color: #ed4956;
}

.lb-action-btn:active {
    transform: scale(1.2);
}

.lb-action-btn.share-right {
    margin-left: auto;
}

.lb-likes {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.lb-timestamp {
    font-size: 0.72rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.lb-comment-row {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #dbdbdb;
    padding: 10px 16px;
}

.lb-comment-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.85rem;
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    background: transparent;
}

.lb-comment-input::placeholder {
    color: var(--text-light);
}

.lb-comment-post {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--teal);
    opacity: 0.4;
    transition: opacity 0.2s;
}

.lb-comment-input:not(:placeholder-shown)~.lb-comment-post {
    opacity: 1;
}

.lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 1001;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.lb-close:hover {
    opacity: 1;
}

.lb-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: background 0.2s;
}

.lb-nav-btn:hover {
    background: #fff;
}

.lb-nav-btn.prev {
    left: 10px;
}

.lb-nav-btn.next {
    right: 10px;
}

@media (max-width: 720px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .lightbox-modal {
        flex-direction: column;
    }

    .lb-image-wrap {
        flex: 0 0 280px;
    }

    .lb-info {
        min-height: 260px;
    }
}