/* ============================================================
   Safar Mehfil — Global Stylesheet
   Aesthetic: Editorial / Warm Luxury / Organic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=DM+Sans:wght@300;400;500;600&family=Cormorant+Garamond:ital,wght@0,300;0,500;1,300;1,500&display=swap');

/* ── CSS Variables ── */
:root {
  --sand:       #f5ede0;
  --cream:      #faf7f2;
  --terracotta: #c1440e;
  --rust:       #e05c2a;
  --gold:       #c9963b;
  --moss:       #4a6741;
  --slate:      #2d3436;
  --warm-gray:  #7c7269;
  --light-gray: #e8e2da;
  --white:      #ffffff;
  --shadow-sm:  0 2px 12px rgba(45,52,54,.08);
  --shadow-md:  0 8px 32px rgba(45,52,54,.14);
  --shadow-lg:  0 20px 60px rgba(45,52,54,.18);
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  28px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-accent:  'Cormorant Garamond', Georgia, serif;
  --transition:   0.3s cubic-bezier(0.4,0,0.2,1);
}

/* Dark mode */
[data-theme="dark"] {
  --sand:       #1e1a17;
  --cream:      #13110e;
  --terracotta: #e05c2a;
  --gold:       #d4a84b;
  --moss:       #6a9461;
  --slate:      #f5ede0;
  --warm-gray:  #a09690;
  --light-gray: #2e2822;
  --white:      #1e1a17;
  --shadow-sm:  0 2px 12px rgba(0,0,0,.3);
  --shadow-md:  0 8px 32px rgba(0,0,0,.4);
  --shadow-lg:  0 20px 60px rgba(0,0,0,.5);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--slate);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, textarea, select { font-family: var(--font-body); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ── Utility Classes ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--slate);
  line-height: 1.15;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--terracotta);
  color: #fff;
  box-shadow: 0 4px 20px rgba(193,68,14,.35);
}
.btn-primary:hover { background: var(--rust); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(193,68,14,.45); }
.btn-outline {
  background: transparent;
  color: var(--slate);
  border: 1.5px solid var(--light-gray);
}
.btn-outline:hover { border-color: var(--terracotta); color: var(--terracotta); transform: translateY(-2px); }
.btn-ghost {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.4);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,.25); }
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--sand);
  color: var(--warm-gray);
}
.tag-terracotta { background: rgba(193,68,14,.12); color: var(--terracotta); }
.tag-moss { background: rgba(74,103,65,.12); color: var(--moss); }
.tag-gold { background: rgba(201,150,59,.15); color: var(--gold); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition);
}
.navbar.scrolled {
  background: var(--cream);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--light-gray);
}
.navbar.transparent { background: transparent; }
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--slate);
  z-index: 1001;
}
.navbar.transparent .navbar-logo,
.navbar.transparent .nav-link { color: #fff; }
.navbar.transparent .nav-link::after { background: #fff; }
.logo-icon {
  width: 36px; height: 36px;
  background: var(--terracotta);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 14px; right: 14px;
  height: 2px;
  background: var(--terracotta);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link:hover { color: var(--terracotta); }
.nav-link.active { color: var(--terracotta); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-btn-login {
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  background: var(--terracotta);
  color: #fff;
  transition: all var(--transition);
}
.nav-btn-login:hover { background: var(--rust); transform: translateY(-1px); }
.dark-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: var(--sand);
  color: var(--slate);
  transition: all var(--transition);
}
.dark-toggle:hover { background: var(--light-gray); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--slate);
  border-radius: 2px;
  transition: all var(--transition);
}
.navbar.transparent .hamburger span { background: #fff; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--cream);
  padding: 100px 32px 40px;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--slate);
  padding: 12px 0;
  border-bottom: 1px solid var(--light-gray);
  transition: color var(--transition);
}
.mobile-nav-link:hover { color: var(--terracotta); }
.mobile-nav-actions { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1600&q=80') center/cover no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20,15,10,.72) 0%, rgba(45,30,20,.35) 60%, rgba(15,10,5,.5) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 24px;
}
.hero-eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero-title em { font-style: italic; color: var(--gold); }
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.8);
  font-weight: 300;
  max-width: 520px;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats {
  display: flex;
  gap: 40px;
}
.hero-stat { color: #fff; }
.hero-stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.hero-stat-label { font-size: 12px; opacity: 0.7; margin-top: 4px; }
.hero-scroll {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,.6);
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  z-index: 2;
  animation: bounce 2s infinite;
}
.hero-scroll span { font-size: 20px; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ── Search Bar ── */
.search-section {
  padding: 40px 0;
  background: var(--cream);
}
.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--light-gray);
  border-radius: var(--radius-lg);
  padding: 6px 8px 6px 24px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  max-width: 680px;
  margin: 0 auto;
}
.search-bar:focus-within { border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(193,68,14,.1), var(--shadow-md); }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--slate);
}
.search-bar input::placeholder { color: var(--warm-gray); }
.search-icon { font-size: 18px; color: var(--warm-gray); flex-shrink: 0; }
.search-divider { width: 1px; height: 28px; background: var(--light-gray); }
.search-select {
  border: none; outline: none; background: transparent;
  font-size: 13px; color: var(--warm-gray); padding: 4px 8px;
  cursor: pointer;
}
.search-btn {
  padding: 10px 24px;
  background: var(--terracotta);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.search-btn:hover { background: var(--rust); }

/* ── Section Spacing ── */
.section { padding: 80px 0; }
.section-header { margin-bottom: 48px; }
.section-header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.view-all { font-size: 13px; font-weight: 600; color: var(--terracotta); display: flex; align-items: center; gap: 4px; }
.view-all:hover { gap: 8px; }

/* ============================================================
   CARDS
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.destination-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
}
.destination-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}
.card-image img { transition: transform 0.5s ease; }
.destination-card:hover .card-image img { transform: scale(1.07); }
.card-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--terracotta);
  letter-spacing: 0.5px;
}
.card-wishlist-btn {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
  color: var(--warm-gray);
}
.card-wishlist-btn:hover, .card-wishlist-btn.active { color: #e74c3c; background: #fff; transform: scale(1.1); }
.card-body { padding: 20px; }
.card-rating {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--warm-gray);
  margin-bottom: 8px;
}
.card-rating .stars { color: var(--gold); font-size: 12px; }
.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 4px;
  line-height: 1.2;
}
.card-location { font-size: 13px; color: var(--warm-gray); margin-bottom: 14px; display: flex; align-items: center; gap: 4px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.card-actions { display: flex; gap: 10px; }
.card-action-btn {
  flex: 1;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
}
.card-action-btn.primary { background: var(--terracotta); color: #fff; }
.card-action-btn.primary:hover { background: var(--rust); }
.card-action-btn.secondary { background: var(--sand); color: var(--slate); }
.card-action-btn.secondary:hover { background: var(--light-gray); }
.card-action-btn.visited { background: var(--moss); color: #fff; }

/* ── Categories ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.category-card {
  position: relative;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition);
}
.category-card:hover { transform: scale(1.03); }
.category-card img { transition: transform 0.5s ease; }
.category-card:hover img { transform: scale(1.08); }
.category-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,15,10,.75) 40%, transparent);
  display: flex; align-items: flex-end; padding: 20px;
}
.category-info { color: #fff; }
.category-icon { font-size: 24px; margin-bottom: 6px; }
.category-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.category-count { font-size: 12px; opacity: 0.75; }

/* ── Trending Horizontal Scroll ── */
.trending-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.trending-scroll::-webkit-scrollbar { height: 3px; }
.trending-scroll::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
.trending-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  height: 340px;
  cursor: pointer;
  transition: transform var(--transition);
}
.trending-card:hover { transform: scale(1.02); }
.trending-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,12,5,.85) 50%, transparent);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px;
  color: #fff;
}
.trending-rank {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(255,255,255,.15);
  position: absolute;
  top: 12px; left: 16px;
  line-height: 1;
}
.trending-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.trending-location { font-size: 12px; opacity: 0.75; margin-top: 4px; }

/* ============================================================
   EXPLORE PAGE
   ============================================================ */
.explore-header {
  padding: 120px 0 60px;
  background: var(--sand);
  text-align: center;
}
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--light-gray);
  margin-bottom: 40px;
}
.filter-chip {
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  background: var(--sand);
  color: var(--slate);
  border: 1.5px solid var(--light-gray);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.filter-chip:hover, .filter-chip.active {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
}
.results-count { font-size: 14px; color: var(--warm-gray); margin-left: auto; }
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 28px;
}

/* ============================================================
   GUIDEBOOK PAGE
   ============================================================ */
.guidebook-header {
  padding: 120px 0 60px;
  text-align: center;
  background: linear-gradient(135deg, #2d1f14 0%, #4a3020 100%);
  color: #fff;
}
.guidebook-header .section-label { color: var(--gold); }
.guidebook-header .section-title { color: #fff; }
.book-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 24px;
  background: var(--sand);
  min-height: 600px;
}
.book {
  width: 100%;
  max-width: 900px;
  display: flex;
  box-shadow: var(--shadow-lg);
  border-radius: 4px;
  position: relative;
}
.book-page {
  flex: 1;
  min-height: 580px;
  padding: 48px 44px;
  background: #fdfaf5;
  position: relative;
  overflow: hidden;
}
.book-page.left {
  border-radius: 8px 0 0 8px;
  border-right: 2px solid rgba(0,0,0,.08);
  background: linear-gradient(to right, #f7f2ea, #fdfaf5);
}
.book-page.right {
  border-radius: 0 8px 8px 0;
  background: linear-gradient(to left, #f7f2ea, #fdfaf5);
}
.book-spine {
  width: 32px;
  background: linear-gradient(to right, #c5b49a, #d4c4ae, #c5b49a);
  flex-shrink: 0;
  box-shadow: inset 0 0 8px rgba(0,0,0,.15);
}
.book-page-number {
  position: absolute;
  bottom: 24px;
  font-size: 12px;
  color: #b0a090;
  font-family: var(--font-accent);
  font-style: italic;
}
.book-page.left .book-page-number { left: 44px; }
.book-page.right .book-page-number { right: 44px; }
.book-page-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 700;
  margin-bottom: 20px;
}
.book-destination-name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--slate);
  line-height: 1.1;
  margin-bottom: 8px;
}
.book-location {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1rem;
  color: var(--warm-gray);
  margin-bottom: 20px;
}
.book-divider {
  width: 48px; height: 2px;
  background: var(--terracotta);
  margin-bottom: 20px;
  border-radius: 1px;
}
.book-description {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.8;
  margin-bottom: 24px;
  font-family: var(--font-accent);
  font-size: 1rem;
}
.book-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.book-spots-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 12px;
}
.book-spots-list { display: flex; flex-direction: column; gap: 8px; }
.book-spot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate); }
.book-spot::before { content: '↝'; color: var(--terracotta); flex-shrink: 0; }
.book-image {
  width: 100%;
  height: 260px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.book-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 32px 0;
  background: var(--sand);
}
.book-nav-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: var(--slate);
  color: #fff;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.book-nav-btn:hover { background: var(--terracotta); transform: translateY(-2px); }
.book-nav-btn:disabled { background: var(--light-gray); color: var(--warm-gray); cursor: not-allowed; transform: none; }
.book-progress {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--warm-gray);
  font-size: 15px;
}
/* Page flip animation */
.book-page { transition: opacity 0.35s ease; }
.book-page.flipping { opacity: 0; }

/* ============================================================
   WISHLIST PAGE
   ============================================================ */
.wishlist-header {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 100%);
}
.wishlist-empty {
  text-align: center;
  padding: 100px 24px;
  color: var(--warm-gray);
}
.wishlist-empty-icon { font-size: 64px; margin-bottom: 20px; }
.wishlist-empty-title { font-family: var(--font-display); font-size: 1.8rem; color: var(--slate); margin-bottom: 12px; }
.wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }

/* ============================================================
   MEMORIES PAGE
   ============================================================ */
.memories-header {
  padding: 120px 0 60px;
  background: #1a1208;
  color: #fff;
  text-align: center;
}
.memories-header .section-title { color: #fff; }
.memories-header .section-label { color: var(--gold); }
.memories-section { padding: 60px 0; }
.add-memory-btn-fab {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 500;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff;
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(193,68,14,.45);
  transition: all var(--transition);
}
.add-memory-btn-fab:hover { transform: scale(1.1) rotate(15deg); background: var(--rust); }
/* Masonry grid */
.memories-masonry {
  columns: 3;
  column-gap: 24px;
}
.memory-card {
  break-inside: avoid;
  margin-bottom: 24px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transform: rotate(var(--rotation, 0deg));
  transition: transform var(--transition), box-shadow var(--transition);
}
.memory-card:nth-child(odd) { --rotation: -1.2deg; }
.memory-card:nth-child(3n) { --rotation: 1deg; }
.memory-card:nth-child(4n) { --rotation: -0.6deg; }
.memory-card:hover { transform: rotate(0deg) scale(1.02); box-shadow: var(--shadow-md); z-index: 2; }
.memory-photo {
  width: 100%; aspect-ratio: 4/3;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--sand);
  display: flex; align-items: center; justify-content: center;
  color: var(--warm-gray);
  font-size: 32px;
}
.memory-photo img { width: 100%; height: 100%; object-fit: cover; }
.memory-place { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--slate); margin-bottom: 2px; }
.memory-location { font-size: 12px; color: var(--warm-gray); margin-bottom: 8px; }
.memory-date { font-size: 11px; color: var(--gold); font-weight: 600; letter-spacing: 0.5px; margin-bottom: 8px; }
.memory-note { font-size: 13px; color: var(--warm-gray); font-style: italic; line-height: 1.5; }
.memory-delete {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px;
  border-radius: 50%; background: #fee; color: #e74c3c;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
}
.memory-card:hover .memory-delete { opacity: 1; }
.memory-delete:hover { background: #e74c3c; color: #fff; }

/* ── Add Memory Modal ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 40px;
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.modal-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--warm-gray); margin-bottom: 8px; }
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--light-gray);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--slate);
  background: var(--cream);
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--terracotta); }
.form-textarea { resize: vertical; min-height: 80px; }
.file-upload {
  border: 2px dashed var(--light-gray);
  border-radius: var(--radius-sm);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.file-upload:hover { border-color: var(--terracotta); background: rgba(193,68,14,.04); }
.file-upload input { display: none; }
.file-upload-icon { font-size: 32px; margin-bottom: 8px; }
.file-upload-text { font-size: 14px; color: var(--warm-gray); }
.modal-actions { display: flex; gap: 12px; margin-top: 24px; }
.modal-close { position: absolute; top: 20px; right: 20px; font-size: 20px; color: var(--warm-gray); transition: color var(--transition); }
.modal-close:hover { color: var(--terracotta); }

/* ============================================================
   AUTH PAGE
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
}
.auth-left {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: none;
}
.auth-left img { position: absolute; inset: 0; }
.auth-left-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,15,10,.8) 30%, rgba(20,15,10,.2));
  padding: 48px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
}
.auth-left-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
}
.auth-right {
  width: 100%;
  max-width: 520px;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--cream);
}
.auth-logo { margin-bottom: 48px; }
.auth-title { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; margin-bottom: 8px; }
.auth-subtitle { color: var(--warm-gray); margin-bottom: 40px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 32px; border-radius: var(--radius-sm); overflow: hidden; border: 1.5px solid var(--light-gray); }
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--warm-gray);
  background: transparent;
  transition: all var(--transition);
}
.auth-tab.active { background: var(--terracotta); color: #fff; }
.auth-form { display: none; flex-direction: column; gap: 20px; }
.auth-form.active { display: flex; }
.auth-divider { text-align: center; color: var(--warm-gray); font-size: 13px; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%;
  width: 42%; height: 1px; background: var(--light-gray);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--light-gray);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--slate);
  transition: all var(--transition);
  background: var(--white);
}
.social-btn:hover { border-color: var(--terracotta); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--slate);
  color: rgba(255,255,255,.7);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .navbar-logo { color: #fff; margin-bottom: 16px; }
.footer-desc { font-size: 14px; line-height: 1.7; max-width: 280px; }
.footer-heading { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #fff; margin-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: 14px; transition: color var(--transition); }
.footer-link:hover { color: var(--gold); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 13px;
}
.footer-social { display: flex; gap: 12px; }
.footer-social-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: all var(--transition);
}
.footer-social-btn:hover { background: var(--terracotta); color: #fff; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 90px; right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--slate);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 300px;
}
.toast.success { border-left: 3px solid #27ae60; }
.toast.error { border-left: 3px solid #e74c3c; }
.toast.info { border-left: 3px solid var(--gold); }
@keyframes toastIn { from{opacity:0;transform:translateX(100%)} to{opacity:1;transform:translateX(0)} }
@keyframes toastOut { from{opacity:1;transform:translateX(0)} to{opacity:0;transform:translateX(100%)} }

/* ============================================================
   PROGRESS TRACKER
   ============================================================ */
.progress-tracker {
  position: fixed;
  top: 50%;
  left: 24px;
  transform: translateY(-50%);
  z-index: 100;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-md);
  min-width: 140px;
  display: none;
}
.progress-tracker.visible { display: block; }
.progress-tracker-title { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--warm-gray); margin-bottom: 10px; }
.progress-tracker-count { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--terracotta); line-height: 1; }
.progress-tracker-label { font-size: 12px; color: var(--warm-gray); }
.progress-bar { height: 4px; background: var(--light-gray); border-radius: 2px; margin-top: 10px; }
.progress-fill { height: 100%; background: var(--terracotta); border-radius: 2px; transition: width 0.5s ease; }

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .book { flex-direction: column; }
  .book-spine { display: none; }
  .book-page { min-height: auto; }
  .book-page.left { border-radius: var(--radius-md) var(--radius-md) 0 0; border-right: none; border-bottom: 2px solid rgba(0,0,0,.08); }
  .book-page.right { border-radius: 0 0 var(--radius-md) var(--radius-md); }
  .auth-left { display: none; }
  .memories-masonry { columns: 2; }
  .progress-tracker { display: none !important; }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: flex; }
  .hero-stats { gap: 24px; }
  .hero-stat-number { font-size: 1.5rem; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-card { height: 160px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .memories-masonry { columns: 1; }
  .search-bar { flex-wrap: wrap; border-radius: var(--radius-md); }
  .search-divider { display: none; }
  .search-select { display: none; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 2.4rem; }
  .hero-actions { flex-direction: column; }
  .hero-stats { gap: 16px; }
  .cards-grid, .explore-grid, .wishlist-grid { grid-template-columns: 1fr; }
  .modal { padding: 24px; }
  .auth-right { padding: 32px 24px; }
  .add-memory-btn-fab { bottom: 16px; right: 16px; }
  .toast-container { right: 12px; left: 12px; bottom: 80px; }
  .toast { max-width: 100%; }
}