/* -----------------------------------------------------------
   style.css  —  Soft, elegant wedding theme
   Light, simple, responsive. No frameworks.
   ----------------------------------------------------------- */

/* Colour + font variables for easy tweaking */
:root {
    --blush:      #f7eef0;   /* page background */
    --cream:      #fffdfb;   /* cards */
    --rose:       #c98b96;   /* accent */
    --rose-dark:  #a86b77;   /* accent hover */
    --gold:       #c9a86a;   /* small ornaments */
    --ink:        #4a3f42;   /* main text */
    --muted:      #8b7d81;   /* secondary text */
    --border:     #ecdfe2;
    --shadow:     0 4px 14px rgba(120, 80, 90, 0.10);
    --radius:     12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: var(--blush);
    color: var(--ink);
    line-height: 1.6;
}

/* ---------- Header ---------- */
.site-header {
    text-align: center;
    padding: 42px 20px 30px;
    background: linear-gradient(180deg, var(--cream), var(--blush));
    border-bottom: 1px solid var(--border);
}

.header-sub {
    margin: 0;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--muted);
}

.header-title {
    margin: 6px 0 4px;
    font-family: "Georgia", "Times New Roman", serif;
    font-weight: 500;
    font-size: 2.6rem;
    color: var(--rose-dark);
}

.header-ornament {
    margin: 0;
    color: var(--gold);
    letter-spacing: 2px;
}

/* ---------- Layout ---------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 50px;
}

.section-title {
    text-align: center;
    font-family: "Georgia", serif;
    font-weight: 500;
    color: var(--rose-dark);
    font-size: 1.6rem;
    margin: 0 0 8px;
}

/* ---------- Upload card ---------- */
.upload-section {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    text-align: center;
    margin-bottom: 40px;
}

.section-note {
    color: var(--muted);
    margin: 0 0 18px;
    font-size: 0.95rem;
}

.upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-block;
    cursor: pointer;
    border: none;
    border-radius: 40px;
    padding: 11px 26px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-choose {
    background: #fff;
    color: var(--rose-dark);
    border: 1.5px solid var(--rose);
}

.btn-choose:hover {
    background: var(--blush);
}

.btn-upload {
    background: var(--rose);
    color: #fff;
}

.btn-upload:hover:not(:disabled) {
    background: var(--rose-dark);
}

.btn-upload:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.file-count {
    color: var(--muted);
    font-size: 0.9rem;
    min-width: 140px;
}

/* Upload feedback messages */
.upload-message {
    margin-top: 16px;
    font-size: 0.95rem;
    min-height: 1.2em;
}

.upload-message.success { color: #4b8b5f; }
.upload-message.error   { color: #b5545f; }
.upload-message.info    { color: var(--muted); }

/* ---------- Gallery ---------- */
.empty-note {
    text-align: center;
    color: var(--muted);
    font-style: italic;
    margin-top: 20px;
}

/* 5 columns on desktop using CSS Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 20px;
}

/* Each thumbnail is a button for accessibility */
.thumb {
    padding: 0;
    border: 1px solid var(--border);
    background: var(--cream);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;      /* consistent square tiles */
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.thumb:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(120, 80, 90, 0.18);
}

.thumb img {
    width: 100%;
    height: 100%;
    /* 'contain' avoids harsh cropping; padding keeps a soft frame */
    object-fit: cover;
    display: block;
}

/* ---------- Responsive columns ---------- */
@media (max-width: 992px) {
    .gallery { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .header-title { font-size: 2.1rem; }
}

@media (max-width: 520px) {
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ---------- Lightbox / full-size viewer ---------- */
.lightbox {
    display: none;              /* hidden until a thumb is clicked */
    position: fixed;
    inset: 0;
    background: rgba(40, 28, 32, 0.92);
    z-index: 1000;
}

.lightbox.open {
    display: block;
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1002;
    background: var(--rose);
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.lightbox-close:hover {
    background: var(--rose-dark);
}

/* The scroll container: if the image is larger than the window,
   the user can scroll horizontally and vertically to inspect it. */
.lightbox-scroll {
    position: absolute;
    inset: 0;
    overflow: auto;             /* manual scrollbars appear when needed */
    padding: 60px 20px 20px;
    text-align: center;
    -webkit-overflow-scrolling: touch;
}

/* Show the image at its natural size so users see real resolution.
   'max-width: none' stops the browser from shrinking large photos. */
.lightbox-img {
    display: inline-block;
    max-width: none;
    height: auto;
}
