/* ============================================
   Rohan & Aditi — Wedding Invitation Site
   Palette: Maroon #6E1E3A, Gold #C9A24B, Cream #FBF5EC
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,500&family=Great+Vibes&family=Jost:wght@300;400;500;600&display=swap');

:root {
    --maroon: #6E1E3A;
    --maroon-dark: #4E1329;
    --gold: #C9A24B;
    --gold-light: #E8D2A0;
    --cream: #FBF5EC;
    --cream-deep: #F3E9DA;
    --ink: #2B1B22;
    --ink-soft: #6b5a63;
    --white: #FFFFFF;
    --radius-lg: 18px;
    --radius-md: 10px;
    --shadow-soft: 0 10px 30px rgba(110, 30, 58, 0.12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Jost', sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
}

h1, h2, h3, .script {
    font-family: 'Cormorant Garamond', serif;
    margin: 0;
    color: var(--maroon-dark);
    font-weight: 600;
}

.script-name {
    font-family: 'Great Vibes', cursive;
    color: var(--gold);
    font-weight: 400;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 999px;
    font-size: 15px;
    letter-spacing: .3px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-maroon { background: var(--maroon); color: var(--white); }
.btn-maroon:hover { box-shadow: 0 8px 20px rgba(110,30,58,.35); }
.btn-outline { background: transparent; border-color: var(--maroon); color: var(--maroon); }
.btn-outline:hover { background: var(--maroon); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--maroon-dark); }
.btn-gold:hover { box-shadow: 0 8px 20px rgba(201,162,75,.4); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
    background: var(--cream);
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(110,30,58,.08);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { font-family: 'Cormorant Garamond', serif; font-size: 26px; color: var(--maroon-dark); display: flex; align-items: center; gap: 8px; font-style: italic; }
.brand .heart { color: var(--gold); }

.main-nav { display: flex; gap: 34px; }
.main-nav a { font-size: 15px; color: var(--ink-soft); position: relative; padding-bottom: 4px; }
.main-nav a.active, .main-nav a:hover { color: var(--maroon); }
.main-nav a.active::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--gold);
}
.share-btn { display: flex; }
.menu-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--maroon); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    margin: 20px auto 0;
    max-width: 1180px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
}
.hero img.hero-bg {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(20,10,15,.72) 0%, rgba(20,10,15,.35) 55%, rgba(20,10,15,.15) 100%);
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; color: var(--white); padding: 60px; max-width: 560px; }
.hero-eyebrow { font-style: italic; font-size: 17px; opacity: .9; margin-bottom: 4px; }
.hero-sub { font-size: 22px; margin-bottom: 10px; }
.hero-names { font-family: 'Great Vibes', cursive; font-size: 68px; color: var(--gold-light); line-height: 1.1; margin-bottom: 14px; }
.hero-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--gold-light); }
.hero-divider .line { flex: 1; height: 1px; background: rgba(255,255,255,.4); max-width: 60px; }
.hero-date { font-size: 22px; letter-spacing: .5px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; }
.sound-toggle {
    position: absolute; bottom: 24px; right: 24px; z-index: 2;
    width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff;
    display: flex; align-items: center; justify-content: center; border: none; cursor: pointer;
}

/* ---------- Section headings ---------- */
.section { padding: 70px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: 38px; }
.section-head .rule { width: 70px; height: 1px; background: var(--gold); margin: 14px auto 0; position: relative; }
.section-head .rule::after {
    content: '♥'; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
    color: var(--gold); font-size: 14px; background: var(--cream); padding: 0 6px;
}

/* ---------- Our Story ---------- */
.story {
    display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center;
}
.story-photo {
    border-radius: 200px 200px 24px 24px;
    overflow: hidden;
    border: 6px solid var(--white);
    box-shadow: var(--shadow-soft);
}
.story-text .together { font-style: italic; color: var(--ink-soft); margin-bottom: 6px; }
.story-text h2 { font-size: 34px; margin-bottom: 18px; }
.countdown { display: flex; gap: 14px; margin: 22px 0; }
.countdown .unit {
    background: var(--white); border: 1px solid var(--gold-light);
    border-radius: var(--radius-md); padding: 14px 18px; text-align: center; min-width: 78px;
    box-shadow: var(--shadow-soft);
}
.countdown .unit .num { font-family: 'Cormorant Garamond', serif; font-size: 30px; color: var(--maroon); font-weight: 600; }
.countdown .unit .label { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; }
.story-text p.msg { font-style: italic; color: var(--ink-soft); }

/* ---------- Events ---------- */
.events { background: var(--white); }
.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-bottom: 34px; }
.event-card {
    background: var(--cream); border-radius: var(--radius-lg); padding: 30px 22px; text-align: center;
    border: 1px solid rgba(110,30,58,.08);
}
.event-icon {
    width: 62px; height: 62px; border-radius: 50%; background: var(--maroon); color: var(--gold-light);
    display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 16px;
}
.event-card h3 { font-size: 22px; margin-bottom: 6px; }
.event-card .date { color: var(--ink-soft); font-size: 14px; }
.event-card .time { color: var(--ink-soft); font-size: 14px; }
.center-btn { text-align: center; }

/* ---------- Gallery ---------- */
.gallery-section { background: var(--maroon); color: var(--white); border-radius: var(--radius-lg); margin: 0 24px; padding: 50px 40px; }
.gallery-section .section-head h2 { color: var(--white); }
.gallery-section .section-head .rule { background: var(--gold); }
.gallery-section .section-head .rule::after { background: var(--maroon); }
.gallery-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-tabs button {
    background: transparent; border: 1px solid rgba(255,255,255,.35); color: var(--gold-light);
    padding: 8px 18px; border-radius: 999px; cursor: pointer; font-family: 'Jost'; font-size: 14px;
}
.filter-tabs button.active { background: var(--gold); color: var(--maroon-dark); border-color: var(--gold); }
.gallery-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.gallery-grid .g-item { border-radius: 14px; overflow: hidden; aspect-ratio: 1/1; background: rgba(255,255,255,.08); cursor: pointer; }
.gallery-grid .g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-grid .g-item:hover img { transform: scale(1.06); }
.gallery-grid .g-empty { grid-column: 1/-1; text-align: center; padding: 40px; color: var(--gold-light); font-style: italic; }
.gallery-footer-btn { text-align: center; margin-top: 30px; }

/* ---------- Feature strip ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; padding: 60px 0; }
.feature .ficon {
    width: 60px; height: 60px; border-radius: 50%; background: var(--gold-light); color: var(--maroon);
    display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 14px;
}
.feature h4 { font-family: 'Jost'; font-size: 16px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--ink-soft); margin: 0; }

/* ---------- Sidebar cards (Location / RSVP / Upload) used on mobile stacked layout ---------- */
.side-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}
.side-card h3 { font-size: 24px; text-align: center; margin-bottom: 4px; }
.side-card .rule-sm { width: 46px; height: 1px; background: var(--gold); margin: 8px auto 18px; }
.venue-name { text-align: center; font-weight: 500; margin-bottom: 4px; }
.venue-addr { text-align: center; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 18px; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; height: 180px; margin-top: 16px; }
.rsvp-options { display: flex; flex-direction: column; gap: 10px; }

/* Upload card (maroon, matches "Share Your Memories") */
.upload-card { background: var(--maroon); color: var(--white); text-align: center; }
.upload-card h3 { color: var(--white); }
.upload-card p { font-size: 13.5px; color: var(--gold-light); margin: 6px 0 18px; }

.sidebar-stack { display: flex; flex-direction: column; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--maroon-dark); color: var(--gold-light); padding: 26px 0; margin-top: 40px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.site-footer .brand { color: var(--gold-light); font-size: 20px; }
.site-footer .tagline { font-style: italic; font-size: 14px; }
.site-footer .made-with { font-size: 13px; }

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed; inset: 0; background: rgba(20,10,15,.92); z-index: 999;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 10px; }
.lightbox .close-btn {
    position: absolute; top: 20px; right: 26px; color: #fff; font-size: 30px; background: none; border: none; cursor: pointer;
}

/* ---------- Upload page ---------- */
.upload-page-wrap { max-width: 560px; margin: 60px auto; padding: 0 20px; }
.upload-form-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 36px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--ink-soft); }
.field input[type=text], .field select {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-md); border: 1.5px solid var(--gold-light);
    font-family: 'Jost'; font-size: 15px; background: var(--cream);
}
.dropzone {
    border: 2px dashed var(--gold); border-radius: var(--radius-md); padding: 30px; text-align: center;
    color: var(--ink-soft); cursor: pointer; background: var(--cream);
}
.dropzone.drag { background: var(--gold-light); }
.file-list { margin-top: 14px; font-size: 13.5px; color: var(--ink-soft); }
.form-msg { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-md); font-size: 14px; display: none; }
.form-msg.success { background: #e6f4ea; color: #1e6b3a; display: block; }
.form-msg.error { background: #fbe7e9; color: #a3273a; display: block; }

/* ---------- Admin ---------- */
.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 30px 20px 70px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px;}
.admin-tabs { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-tabs a {
    padding: 9px 18px; border-radius: 999px; border: 1px solid var(--gold-light); font-size: 14px; color: var(--maroon);
}
.admin-tabs a.active { background: var(--maroon); color: var(--white); border-color: var(--maroon); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.admin-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-soft); }
.admin-card img { width: 100%; height: 160px; object-fit: cover; }
.admin-card .meta { padding: 12px 14px; }
.admin-card .meta .name { font-weight: 500; font-size: 14px; }
.admin-card .meta .cat { font-size: 12px; color: var(--ink-soft); text-transform: capitalize; }
.admin-card .actions { display: flex; gap: 8px; padding: 0 14px 14px; }
.admin-card .actions button {
    flex: 1; padding: 8px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px;
}
.btn-approve { background: #2e8b57; color: #fff; }
.btn-reject { background: #c0392b; color: #fff; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); font-style: italic; }
.login-box { max-width: 380px; margin: 100px auto; background: #fff; padding: 34px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); text-align: center; }
.login-box input { width: 100%; padding: 12px; margin: 16px 0; border-radius: var(--radius-md); border: 1.5px solid var(--gold-light); }

/* ---------- Admin Sidebar Dashboard ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 230px; flex-shrink: 0; background: var(--maroon-dark); color: var(--gold-light);
    padding: 22px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .brand { color: #fff; padding: 0 22px 20px; font-size: 20px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 14px; }
.admin-nav a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 22px; font-size: 14px; color: var(--gold-light); border-left: 3px solid transparent;
}
.admin-nav a .label { display:flex; align-items:center; gap:10px; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.06); color: #fff; border-left-color: var(--gold); }
.admin-nav .badge { background: var(--gold); color: var(--maroon-dark); font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.admin-main { flex: 1; padding: 30px 34px; background: var(--cream-deep); min-height: 100vh; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.admin-topbar h2 { font-size: 26px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.stat-card { background: #fff; border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-soft); }
.stat-card .num { font-family: 'Cormorant Garamond', serif; font-size: 30px; color: var(--maroon); font-weight: 600; }
.stat-card .label { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.panel-block { background: #fff; border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-soft); margin-bottom: 24px; }
.panel-block .panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-block .panel-head h3 { font-size: 19px; }
.panel-block .panel-head a { font-size: 13px; color: var(--maroon); }
.admin-form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-form-row input, .admin-form-row select { padding: 10px 12px; border-radius: var(--radius-md); border: 1.5px solid var(--gold-light); font-family: 'Jost'; font-size: 14px; flex: 1; min-width: 140px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-soft); padding: 10px 12px; border-bottom: 1px solid var(--cream-deep); }
.admin-table td { padding: 12px; font-size: 14px; border-bottom: 1px solid var(--cream-deep); }
.admin-table .del-btn { color: #c0392b; font-size: 13px; cursor: pointer; background: none; border: none; }
.mobile-sidebar-toggle { display: none; }
@media (max-width: 900px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: relative; padding: 14px 0; }
    .admin-nav { display: flex; overflow-x: auto; }
    .admin-nav a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
    .admin-nav a:hover, .admin-nav a.active { border-left-color: transparent; border-bottom-color: var(--gold); }
    .admin-main { padding: 20px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
    .story { grid-template-columns: 1fr; }
    .story-photo { max-width: 420px; margin: 0 auto; }
    .events-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .main-nav { display: none; }
    .menu-toggle { display: block; }
    .share-btn { display: none; }
    .hero { min-height: auto; border-radius: 14px; margin-top: 0; }
    .hero-content { padding: 30px 20px; max-width: 100%; text-align: center; margin: 0 auto; }
    .hero-names { font-size: 44px; }
    .hero-sub { font-size: 17px; }
    .hero-date { font-size: 18px; }
    .hero-divider { justify-content: center; }
    .hero-actions { justify-content: center; flex-wrap: wrap; }
    .section { padding: 46px 0; }
    .section-head h2 { font-size: 28px; }
    .countdown { justify-content: center; flex-wrap: wrap; }
    .countdown .unit { min-width: 64px; padding: 10px 12px; }
    .gallery-section { margin: 0 12px; padding: 34px 18px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 40px 0; }
    .site-footer { flex-direction: column; text-align: center; }
    .container { padding: 0 16px; }
}
