/* ========================================
   CITY FINDER – GHANA | CORE STYLES
   Theme: Forest Green & Gold
   ======================================== */

:root {
  --green: #2e7d32;
  --green-light: #388e3c;
  --green-deep: #1b5e20;
  --green-pale: #e8f5e9;
  --green-mist: #c8e6c9;
  --gold: #f57c00;
  --gold-light: #ffa726;
  --earth: #6d4c41;
  --earth-light: #a1887f;
  --cream: #f5f9f0;
  --warm-white: #fafdf7;
  --text-dark: #1a2e1b;
  --text-mid: #3d5c3e;
  --text-light: #6a8f6b;
  --shadow-sm: 0 2px 8px rgba(46,125,50,0.08);
  --shadow-md: 0 8px 24px rgba(46,125,50,0.12);
  --shadow-lg: 0 16px 48px rgba(46,125,50,0.16);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.2;
}

/* ---- UTILITIES ---- */
.hidden { display: none !important; }

/* ========================================
   SPLASH SCREEN
   ======================================== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.splash-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green) 45%, #388e3c 100%);
}

.splash-bg::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  top: -100px;
  right: -100px;
  animation: floatBubble 4s ease-in-out infinite;
}

.splash-bg::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(249,168,37,0.15);
  bottom: -80px;
  left: -60px;
  animation: floatBubble 5s ease-in-out infinite reverse;
}

.splash-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  padding: 2rem;
}

.splash-logo {
  animation: splashReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: translateY(30px) scale(0.8);
}

@keyframes splashReveal {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.logo-mark svg {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.2));
  animation: logoPulse 2s ease-in-out infinite 0.8s;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.splash-title {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0.5rem 0 0.25rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.splash-tagline {
  font-size: 1rem;
  opacity: 0.85;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.splash-loader {
  margin-top: 3rem;
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  overflow: hidden;
  margin-inline: auto;
}

.loader-bar {
  height: 100%;
  background: white;
  border-radius: 99px;
  animation: loadBar 1.8s ease forwards;
  width: 0;
}

@keyframes loadBar {
  0% { width: 0; }
  60% { width: 70%; }
  100% { width: 100%; }
}

@keyframes floatBubble {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -15px); }
}

/* ========================================
   HEADER
   ======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,248,245,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(46,125,50,0.08);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 520px;
  margin-inline: auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

.btn-create {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: white;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(46,125,50,0.3);
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-create:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(46,125,50,0.4);
}

.btn-create:active { transform: translateY(0); }

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.back-btn:hover { background: var(--green-mist); }

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  padding: 2.5rem 1rem 2rem;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--green-deep) 0%, var(--green) 55%, #388e3c 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: 
    radial-gradient(circle at 20% 20%, white 1px, transparent 1px),
    radial-gradient(circle at 60% 60%, white 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, white 0.5px, transparent 0.5px);
  background-size: 50px 50px, 80px 80px, 40px 40px;
}

.hero-bg::before {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(249,168,37,0.12);
  top: -100px;
  right: -80px;
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  bottom: -50px;
  left: 20px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  color: white;
  animation: heroSlideUp 0.6s ease both;
}

@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
  letter-spacing: 0.3px;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-subtitle {
  font-size: 0.95rem;
  opacity: 0.88;
  line-height: 1.6;
  max-width: 320px;
  font-weight: 300;
  margin-bottom: 1.5rem;
}

/* ---- Search ---- */
.search-container {
  position: relative;
  margin-bottom: 1rem;
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--radius);
  padding: 0.6rem 0.6rem 0.6rem 1rem;
  gap: 0.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.search-icon { color: var(--text-light); flex-shrink: 0; }

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  min-width: 0;
}

.search-box input::placeholder { color: var(--text-light); }

.search-submit {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: white;
  border: none;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.search-submit:hover { transform: scale(1.02); }
.search-submit:active { transform: scale(0.98); }

.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  overflow: hidden;
  animation: dropIn 0.2s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.suggestion-item {
  padding: 0.85rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(46,125,50,0.05);
  transition: background 0.15s;
}

.suggestion-item:hover { background: var(--green-pale); }
.suggestion-item:last-child { border-bottom: none; }

/* ---- Filters ---- */
.quick-filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}

.quick-filters::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  border: 1.5px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}

.filter-pill.active {
  background: white;
  color: var(--green);
  border-color: white;
  font-weight: 600;
}

.filter-pill:hover:not(.active) {
  background: rgba(255,255,255,0.25);
}

/* ========================================
   LISTINGS SECTION
   ======================================== */
.listings-section {
  padding: 1.5rem 1rem;
  max-width: 520px;
  margin-inline: auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.4rem;
  color: var(--text-dark);
  font-weight: 700;
}

.results-count {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
  background: var(--green-pale);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}

/* ---- Listing Card ---- */
.listings-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.listing-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  animation: cardReveal 0.5s ease both;
  border: 1px solid rgba(46,125,50,0.06);
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.listing-card:active { transform: scale(0.98); }

.listing-header {
  background: linear-gradient(135deg, var(--green-deep), var(--green));
  padding: 1.2rem 1.2rem 0.9rem;
  position: relative;
  overflow: hidden;
}

.listing-header::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  top: -30px;
  right: -20px;
}

.listing-event-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  font-size: 0.75rem;
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.listing-title {
  font-size: 1.2rem;
  color: white;
  font-weight: 700;
  line-height: 1.3;
}

.listing-body {
  padding: 1rem 1.2rem;
}

.listing-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.listing-creator {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.listing-tag {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-pale);
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
}

.listing-arrow {
  color: var(--green);
  opacity: 0.5;
}

/* ---- Skeleton ---- */
.listing-skeleton {
  background: white;
  border-radius: var(--radius-lg);
  height: 160px;
  animation: shimmer 1.5s ease infinite;
  border: 1px solid rgba(46,125,50,0.06);
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* ---- No Results ---- */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.no-results-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }

/* ---- Offline Banner ---- */
.offline-banner {
  background: #ff6f00;
  color: white;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 520px;
  margin-inline: auto;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.82rem;
  opacity: 0.6;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.footer-links a {
  color: var(--green-mist);
  text-decoration: none;
}

/* ========================================
   SAVED SECTION
   ======================================== */
.saved-section {
  padding: 0 1rem 1.5rem;
  max-width: 520px;
  margin-inline: auto;
}

/* ========================================
   ANIMATIONS & MICRO-INTERACTIONS
   ======================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 480px) {
  .hero-title { font-size: 3rem; }
}

@media (min-width: 640px) {
  .listings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
