/* ============================================
   Nadia & Rohan Wedding - Stylesheet
   Theme: Ivory/White + Soft Gold
   Fonts: Cormorant Garamond (serif) + Montserrat (sans)
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #C9A96E;
    --gold-light: #E8D5B0;
    --gold-dark: #A38344;
    --ivory: #FFFEF9;
    --ivory-warm: #FBF8F1;
    --text-dark: #2C2C2C;
    --text-light: #6B6B6B;
    --text-muted: #999999;
    --white: #FFFFFF;
    --border: #EDE8DF;
    --shadow: rgba(0, 0, 0, 0.06);
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', -apple-system, sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--text-dark);
    background-color: var(--ivory);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* --- Wedding Logo --- */
.landing-logo {
    margin-bottom: 2rem;
}

.wedding-logo {
    width: 180px;
    height: auto;
    opacity: 0.9;
}

.header-logo {
    display: inline-block;
    margin-bottom: 1rem;
}

.wedding-logo-small {
    width: 80px;
    height: auto;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.wedding-logo-small:hover {
    opacity: 1;
}

/* --- Landing Page --- */
.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 3rem 1.5rem;
    text-align: center;
}

.landing-content {
    max-width: 600px;
}

/* Ornaments */
.ornament-top,
.ornament-bottom {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 400px;
}

.ornament-bottom {
    margin-bottom: 0;
    margin-top: 3rem;
}

.ornament-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.cross-icon {
    width: 36px;
    height: 42px;
    opacity: 0.8;
}

.ornament-diamond {
    width: 8px;
    height: 8px;
    background: var(--gold);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* Verse */
.verse {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-light);
    margin-bottom: 3rem;
    letter-spacing: 0.02em;
    line-height: 1.8;
}

/* Names */
.names {
    margin-bottom: 2rem;
}

.name {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--text-dark);
    letter-spacing: 0.08em;
    display: block;
    line-height: 1.2;
}

.ampersand {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    color: var(--gold);
    display: block;
    margin: 0.5rem 0;
    letter-spacing: 0;
}

/* Date */
.date-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.date-line {
    flex: 1;
    height: 1px;
    background: var(--gold-light);
}

.date {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Gallery Button */
.btn-gallery {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-dark);
    background: transparent;
    border: 1px solid var(--gold);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-gallery:hover {
    background: var(--gold);
    color: var(--white);
}

/* --- Wedding Teaser --- */
.teaser-section {
    width: 100%;
    max-width: 700px;
    margin-top: 2rem;
    text-align: center;
}

.teaser-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-dark);
    letter-spacing: 0.06em;
    margin-bottom: 1.5rem;
}

.teaser-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: var(--ivory-warm);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.teaser-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Gallery Page --- */
.gallery-header {
    text-align: center;
    padding: 2.5rem 1.5rem 1.5rem;
    position: relative;
}

.back-home {
    position: absolute;
    left: 1.5rem;
    top: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.back-home:hover {
    color: var(--gold);
}

.gallery-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--text-dark);
    letter-spacing: 0.04em;
}

.gallery-subtitle {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Tabs */
.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.tab {
    padding: 0.5rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--gold);
}

.tab.active {
    color: var(--gold-dark);
    border-color: var(--gold);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
    background: var(--ivory-warm);
    aspect-ratio: 1;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}

.gallery-item.video-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.gallery-item.video-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-42%, -50%);
    z-index: 1;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent var(--gold);
}

.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1rem 0.8rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
    color: white;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-caption {
    opacity: 1;
}

/* Empty & Loading States */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-muted);
}

.empty-icon {
    width: 48px;
    height: 56px;
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.empty-state p {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
}

.empty-sub {
    font-family: var(--font-sans) !important;
    font-size: 0.8rem !important;
    margin-top: 0.5rem;
}

.loading {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-muted);
}

.loading p {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    margin-top: 1rem;
    letter-spacing: 0.1em;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    z-index: 10;
}

.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-content video {
    max-width: 100%;
    max-height: 80vh;
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-top: 1rem;
    text-align: center;
}

/* --- Admin Page --- */
.admin-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 1.5rem 4rem;
}

.admin-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2rem;
}

.admin-card h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.4rem;
}

.input-field {
    width: 100%;
    padding: 0.7rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-dark);
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: 2px;
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--gold);
}

select.input-field {
    cursor: pointer;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--gold-light);
    border-radius: 4px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--gold);
    background: rgba(201, 169, 110, 0.04);
}

.drop-zone p {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.8rem;
}

.drop-sub {
    font-size: 0.7rem !important;
    color: var(--text-muted) !important;
    margin-top: 0.3rem !important;
}

/* File List */
.file-list {
    margin-bottom: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-light);
}

.file-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 1rem;
}

.file-item-size {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-right: 1rem;
    white-space: nowrap;
}

.file-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 0.3rem;
    transition: color 0.2s;
}

.file-item-remove:hover {
    color: #c0392b;
}

/* Upload Button */
.btn-upload {
    display: block;
    width: 100%;
    padding: 0.8rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--gold);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-upload:hover {
    background: var(--gold-dark);
}

.btn-upload:disabled {
    background: var(--border);
    cursor: not-allowed;
}

/* Progress */
.progress-section {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

/* Error / Success messages */
.error-msg {
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 0.8rem;
}

.success-msg {
    color: #27ae60;
    font-size: 0.8rem;
    margin-top: 0.8rem;
    padding: 0.6rem;
    background: #eafaf1;
    border-radius: 2px;
    text-align: center;
}

/* Media list in admin */
.media-list {
    max-height: 400px;
    overflow-y: auto;
}

.media-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
}

.media-list-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 2px;
}

.media-list-info {
    flex: 1;
}

.media-list-info p {
    font-size: 0.8rem;
    color: var(--text-dark);
}

.media-list-info span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.media-list-delete {
    background: none;
    border: 1px solid #e0e0e0;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    border-radius: 2px;
    transition: all 0.2s;
}

.media-list-delete:hover {
    border-color: #c0392b;
    color: #c0392b;
}

.loading-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 2rem;
}

/* --- Navigation Footer --- */
.nav-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.8rem;
    background: rgba(255, 254, 249, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 100;
}

.nav-footer a {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-footer a:hover,
.nav-footer a.active {
    color: var(--gold);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .wedding-logo {
        width: 140px;
    }

    .wedding-logo-small {
        width: 60px;
    }

    .name {
        font-size: 2.5rem;
    }

    .verse {
        font-size: 1.1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
        padding: 0 0.75rem 4rem;
    }

    .back-home {
        position: static;
        display: inline-flex;
        margin-bottom: 1rem;
    }

    .gallery-header {
        padding: 1.5rem 1rem 1rem;
    }

    .gallery-title {
        font-size: 1.6rem;
    }

    .admin-section {
        padding: 1rem 0.75rem 4rem;
    }

    .admin-card {
        padding: 1.5rem;
    }

    .lightbox-prev { left: 0; padding: 0.5rem; }
    .lightbox-next { right: 0; padding: 0.5rem; }
}

@media (max-width: 400px) {
    .name {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
