/* ─────────────────────────────────────────────────────────────────
   components.css — Reusable UI components.
   Buttons, cards, grids, badges, gallery, lightbox, etc.
   ───────────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--dur-fast) var(--ease);
    line-height: 1;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--color-honey);
    color: var(--color-ink);
}
.btn-primary:hover {
    background: var(--color-honey-dark);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--color-ink);
    border-color: var(--color-border);
}
.btn-ghost:hover {
    background: var(--color-cream);
}

.btn-dark {
    background: var(--color-ink);
    color: #fff;
}
.btn-dark:hover {
    background: var(--color-honey-dark);
}

.btn-sm { padding: 10px 16px; font-size: 0.9rem; }
.btn-lg { padding: 18px 32px; font-size: 1.1rem; }

/* ─────────────────────────────────────────
   SECTION HEADS
   ───────────────────────────────────────── */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}
.section-head h2 { margin: 0; }

.eyebrow {
    color: var(--color-honey-dark);
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.link-arrow { font-weight: 600; }
.link-arrow::after { content: ' →'; }

/* ─────────────────────────────────────────
   GENERIC GRIDS
   ───────────────────────────────────────── */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 800px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────
   CARDS — generic content cards
   ───────────────────────────────────────── */
.card {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    color: var(--color-ink);
    transition: transform var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-pop);
    text-decoration: none;
}
.card-img {
    aspect-ratio: 4/3;
    background: var(--color-cream) center/cover no-repeat;
}
.card-body { padding: 16px 18px 20px; }
.card-body h3 { font-size: 1.1rem; margin: 0 0 4px; }
.card-body p { font-size: 0.85rem; color: var(--color-mute); margin: 0; line-height: 1.4; }

/* Community card variant (used on home page featured grid) */
.community-card {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
    color: var(--color-ink);
}
.community-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-pop);
    text-decoration: none;
}
.community-card-img {
    aspect-ratio: 4/3;
    background: var(--color-line) center/cover no-repeat;
}
.community-card h3 {
    padding: 16px 20px 18px;
    margin: 0;
    font-size: 1.15rem;
}

/* ─────────────────────────────────────────
   PLACEHOLDER (IDX widget slots, etc.)
   ───────────────────────────────────────── */
.placeholder {
    padding: 48px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--color-mute);
    background: var(--color-bg);
}

/* ─────────────────────────────────────────
   BADGES / PILLS
   ───────────────────────────────────────── */
.badge {
    display: inline-block;
    background: var(--color-cream);
    color: var(--color-ink);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.badge-dark { background: rgba(0, 0, 0, 0.55); color: #fff; }
.badge-honey { background: var(--color-honey); color: var(--color-ink); }

/* ─────────────────────────────────────────
   JUMP NAV (sticky pill bar — used on the hub page)
   ───────────────────────────────────────── */
.jump-nav {
    background: var(--color-bg);
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: var(--header-h);
    z-index: 10;
}
.jump-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.jump-nav-list a {
    background: var(--color-cream);
    color: var(--color-ink);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
}
.jump-nav-list a:hover {
    background: var(--color-honey);
    text-decoration: none;
}
.jump-nav-list strong {
    font-size: 0.85rem;
    color: var(--color-mute);
    margin-right: 4px;
}

/* ─────────────────────────────────────────
   GALLERY GRID + LIGHTBOX
   Used on community pages (and reusable elsewhere).
   ───────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 720px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

.gallery-thumb {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius-md);
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease);
    position: relative;
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--dur-mid) var(--ease);
}
.gallery-thumb:hover {
    box-shadow: var(--shadow-pop);
    transform: translateY(-2px);
}
.gallery-thumb:hover img { transform: scale(1.04); }
.gallery-thumb .cap {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 24px 14px 10px;
    color: #fff;
    font-size: 0.8rem;
    text-align: left;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease);
}
.gallery-thumb:hover .cap { opacity: 1; }

/* Lightbox dialog */
.lightbox::backdrop { background: rgba(0, 0, 0, 0.88); }
.lightbox {
    padding: 0;
    border: 0;
    background: transparent;
    max-width: 92vw;
    max-height: 92vh;
    margin: auto;
    color: #fff;
}
.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-md);
    display: block;
    margin: 0 auto;
}
.lightbox .caption {
    text-align: center;
    margin: 12px 0 0;
    font-size: 0.95rem;
    min-height: 1.2em;
}
.lightbox .close {
    position: fixed;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease);
}
.lightbox .close:hover { background: rgba(255, 255, 255, 0.25); }

/* ─────────────────────────────────────────
   BREADCRUMBS
   ───────────────────────────────────────── */
.crumbs {
    font-size: 0.85rem;
    color: var(--color-mute);
    margin-bottom: 12px;
}
.crumbs a { color: inherit; }
.crumbs span.sep { opacity: 0.5; margin: 0 6px; }
.crumbs.crumbs-light { color: rgba(255, 255, 255, 0.85); }
.crumbs.crumbs-light a { color: #fff; }
