/* =====================================================================
   Wedding Gallery — Hannah & Dan
   Shared stylesheet for public + admin pages
   ===================================================================== */

:root {
    --wg-blush: #f6ece8;
    --wg-rose: #c98b83;
    --wg-rose-dark: #a8655d;
    --wg-ink: #33302e;
    --wg-cream: #fffaf6;
    --wg-gold: #b89468;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--wg-ink);
    background-color: var(--wg-cream);
}

h1, h2, h3, h4, .display-font {
    font-family: 'Playfair Display', serif;
}

a {
    color: var(--wg-rose-dark);
}
a:hover {
    color: var(--wg-ink);
}

/* ---- Navbar ---------------------------------------------------- */
.wg-navbar {
    background-color: var(--wg-cream);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.wg-navbar .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--wg-ink);
}
.wg-navbar .nav-link {
    color: var(--wg-ink);
}
.wg-navbar .nav-link.active,
.wg-navbar .nav-link:hover {
    color: var(--wg-rose-dark);
}

/* ---- Hero -------------------------------------------------------- */
.wg-hero {
    position: relative;
    width: 100%;
    min-height: 46vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background-color: var(--wg-rose-dark);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.wg-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(51, 48, 46, 0.35) 0%, rgba(51, 48, 46, 0.55) 100%);
}
.wg-hero-content {
    position: relative;
    z-index: 1;
    padding: 2.5rem 1rem;
}
.wg-hero-kicker {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}
.wg-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.wg-hero-date {
    font-size: 1.15rem;
    opacity: 0.95;
}

/* ---- Masonry gallery grid ----------------------------------------- */
.wg-masonry {
    column-count: 1;
    column-gap: 0.75rem;
}
@media (min-width: 576px) {
    .wg-masonry { column-count: 2; }
}
@media (min-width: 900px) {
    .wg-masonry { column-count: 3; }
}
@media (min-width: 1300px) {
    .wg-masonry { column-count: 4; }
}
.wg-masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 0.75rem;
    break-inside: avoid;
}
.wg-thumb {
    display: block;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    background-color: #eee;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
}
.wg-thumb img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.25s ease;
}
.wg-thumb:hover img {
    transform: scale(1.03);
}
.wg-thumb-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    color: #fff;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.55));
    text-align: left;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.wg-thumb:hover .wg-thumb-caption {
    opacity: 1;
}

.wg-empty-state {
    padding: 4rem 1rem;
    text-align: center;
    color: #8a8480;
}

/* ---- Lightbox ------------------------------------------------------ */
.wg-lightbox-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1055;
    background: rgba(20, 18, 17, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.wg-lightbox-backdrop.show {
    display: flex;
}
.wg-lightbox-inner {
    max-width: min(92vw, 1100px);
    max-height: 88vh;
    text-align: center;
}
.wg-lightbox-inner img {
    max-width: 100%;
    max-height: 72vh;
    border-radius: 0.4rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.wg-lightbox-meta {
    color: #f0eae7;
    margin-top: 0.9rem;
    font-size: 0.9rem;
}
.wg-lightbox-close,
.wg-lightbox-prev,
.wg-lightbox-next {
    position: fixed;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.wg-lightbox-close:hover,
.wg-lightbox-prev:hover,
.wg-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.28);
}
.wg-lightbox-close { top: 1.25rem; right: 1.25rem; }
.wg-lightbox-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.wg-lightbox-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 576px) {
    .wg-lightbox-prev, .wg-lightbox-next { width: 38px; height: 38px; font-size: 1.1rem; }
}

/* ---- Upload page ---------------------------------------------------- */
.wg-upload-card {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}
.wg-drop-zone {
    border: 2px dashed #d9c6bd;
    border-radius: 0.6rem;
    padding: 2rem 1rem;
    text-align: center;
    color: #8a8480;
    background-color: var(--wg-blush);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.wg-drop-zone.dragover {
    border-color: var(--wg-rose-dark);
    background-color: #f0dcd4;
}
.wg-preview-thumb {
    max-width: 100%;
    max-height: 220px;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

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

/* ---- Admin ------------------------------------------------------- */
.wg-admin-shell {
    min-height: 100vh;
    background-color: #f4f1ee;
}
.wg-admin-card {
    background: #fff;
    border-radius: 0.6rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
.wg-stat {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--wg-rose-dark);
}
.wg-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--wg-blush), var(--wg-cream));
    padding: 1.5rem;
}
.wg-login-card {
    max-width: 400px;
    width: 100%;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.wg-thumb-admin {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 0.4rem;
}
