@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Inter:wght@400;500;600&display=swap');

/* ============================================
   Camping Trips — Magazin-Journal-Design
   ============================================ */

:root {
  /* Backgrounds — dark forest, not tech-grey */
  --bg-primary:        #0c1409;
  --bg-secondary:      #111e0d;
  --bg-surface:        #192514;
  --bg-surface-raised: #213019;
  --bg-glass:          rgba(10, 18, 7, 0.88);

  /* Borders */
  --border-subtle:     rgba(255, 255, 255, 0.055);
  --border-default:    rgba(255, 255, 255, 0.10);
  --border-accent:     rgba(212, 168, 83, 0.28);
  --border-forest:     rgba(74, 140, 92, 0.22);

  /* Text — warm cream, not cool white */
  --text-primary:      #ede8d8;
  --text-secondary:    #8da882;
  --text-muted:        #526248;

  /* Accent palette */
  --accent-amber:       #d4a853;
  --accent-amber-light: #f0c674;
  --accent-amber-dim:   #7a5820;
  --accent-forest:      #4a8c5a;
  --accent-forest-light:#6ab872;
  --accent-ember:       #c86830;
  --accent-sky:         #7ab0cc;

  --danger:       #e85540;
  --danger-hover: #d04030;
  --success:      #4ab860;

  /* Typography */
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'SF Mono', 'Fira Code', 'Roboto Mono', monospace;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm:   0 1px 4px rgba(0, 0, 0, 0.40);
  --shadow-md:   0 4px 20px rgba(0, 0, 0, 0.50);
  --shadow-lg:   0 8px 48px rgba(0, 0, 0, 0.60);
  --shadow-glow: 0 0 60px rgba(212, 168, 83, 0.06);

  /* Transitions */
  --transition-fast:   140ms ease;
  --transition-normal: 240ms ease;
  --transition-slow:   500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Layout */
  --max-width: 1360px;
  --nav-height: 72px;
}

/* ---- Reset ---- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

a { color: var(--accent-amber); text-decoration: none; }
a:hover { color: var(--accent-amber-light); }

img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 400; line-height: 1.2; }
h1 { font-size: 2.8rem; letter-spacing: -0.02em; }
h2 { font-size: 1.8rem; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; }

/* ---- Scrollbar ---- */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-amber-dim); }
* { scrollbar-color: rgba(255,255,255,0.12) var(--bg-primary); scrollbar-width: thin; }

/* ---- Focus ---- */

:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  background: rgba(10, 18, 7, 0.90);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--accent-amber-light);
  font-weight: 400;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-brand:hover { color: var(--text-primary); }

.nav-brand svg { color: var(--accent-amber); flex-shrink: 0; }

/* Spacer pushes right side to far right */
.nav-spacer { flex: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* New Trip button */
.nav-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--accent-amber);
  color: #0c1409;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.nav-btn-primary:hover {
  background: var(--accent-amber-light);
  color: #0c1409;
  transform: translateY(-1px);
}

/* User dropdown */
.nav-user-menu {
  position: relative;
}

.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.nav-user-btn:hover {
  background: var(--bg-surface-raised);
  border-color: var(--border-accent);
}

.nav-user-avatar {
  width: 30px;
  height: 30px;
  background: var(--accent-forest);
  color: var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  flex-shrink: 0;
  letter-spacing: 0;
}

.nav-user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.nav-user-menu.open .nav-chevron { transform: rotate(180deg); }

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 300;
}

.nav-user-menu.open .nav-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-user-dropdown a {
  display: block;
  padding: 11px 16px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: background var(--transition-fast);
}

.nav-user-dropdown a:hover { background: var(--bg-surface); color: var(--accent-amber-light); }

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 2px 0;
}

.nav-user-dropdown .dropdown-logout {
  color: var(--danger);
}

.nav-user-dropdown .dropdown-logout:hover {
  background: rgba(232, 85, 64, 0.08);
  color: var(--danger);
}

/* Mobile hamburger */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  margin-left: auto;
}

.mobile-menu-btn:hover { color: var(--text-primary); background: var(--bg-surface); }

/* Mobile nav open state */
@media (max-width: 700px) {
  .mobile-menu-btn { display: flex; }

  .nav-spacer { display: none; }

  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: rgba(10, 18, 7, 0.97);
    flex-direction: column;
    align-items: stretch;
    padding: 24px 20px;
    gap: 8px;
    z-index: 190;
    overflow-y: auto;
  }

  .nav-links.open { display: flex; }

  .nav-btn-primary {
    justify-content: center;
    padding: 14px 18px;
    font-size: 1rem;
  }

  .nav-user-menu { width: 100%; }

  .nav-user-btn { width: 100%; justify-content: flex-start; padding: 12px 14px; }

  .nav-user-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--border-subtle);
    border-radius: 0;
    background: transparent;
    display: none;
  }

  .nav-user-menu.open .nav-user-dropdown { display: block; }
}

@media (min-width: 701px) and (max-width: 960px) {
  .navbar { padding: 0 20px; }
  .nav-user-name { display: none; }
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--accent-amber);
  color: #0c1409;
}
.btn-primary:hover {
  background: var(--accent-amber-light);
  color: #0c1409;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.30);
}

.btn-secondary {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn-secondary:hover {
  background: var(--bg-surface);
  border-color: var(--border-accent);
  color: var(--accent-amber-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-danger {
  background: rgba(232, 85, 64, 0.12);
  color: var(--danger);
  border: 1px solid rgba(232, 85, 64, 0.22);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-hero {
  background: var(--accent-amber);
  color: #0c1409;
  padding: 16px 36px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(212, 168, 83, 0.28);
}
.btn-hero:hover {
  background: var(--accent-amber-light);
  color: #0c1409;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 168, 83, 0.38);
}

.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================
   Flash Messages
   ============================================ */

.flash-container {
  position: fixed;
  top: calc(var(--nav-height) + 12px);
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.flash {
  padding: 13px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: slideInFlash 0.22s ease;
}

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

.flash-success { border-left: 3px solid var(--success); }
.flash-error,
.flash-danger  { border-left: 3px solid var(--danger); }
.flash-info    { border-left: 3px solid var(--accent-sky); }
.flash-warning { border-left: 3px solid var(--accent-amber); }

/* ============================================
   Login — Split Layout
   ============================================ */

/* Override body for login page */
body.login-body {
  background: var(--bg-secondary);
}

.login-page {
  display: flex;
  min-height: 100vh;
}

/* Left visual panel */
.login-visual {
  flex: 0 0 56%;
  position: relative;
  background-image: url('/static/img/bg-login.svg');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.login-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(8, 14, 6, 0.48) 0%,
    rgba(8, 14, 6, 0.28) 50%,
    rgba(8, 14, 6, 0.68) 100%
  );
}

.login-visual-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 52px;
  z-index: 1;
}

.login-visual-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-amber-light);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.login-visual-brand svg { color: var(--accent-amber); }

.login-tagline {
  padding-bottom: 16px;
}

.login-tagline h2 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
  font-weight: 400;
}

.login-tagline p {
  color: rgba(237, 232, 216, 0.72);
  font-size: 1.1rem;
  line-height: 1.6;
  font-style: italic;
  font-family: var(--font-heading);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  max-width: 400px;
}

/* Right form panel */
.login-form-panel {
  flex: 0 0 44%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 56px;
  background: var(--bg-secondary);
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-header {
  margin-bottom: 40px;
}

.login-header svg {
  color: var(--accent-amber);
  margin-bottom: 20px;
}

.login-header h1 {
  font-size: 2.2rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-style: italic;
  font-family: var(--font-heading);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-form .form-group { gap: 8px; }

.login-form input {
  padding: 14px 16px;
  font-size: 1rem;
}

.login-form .btn-full {
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 4px;
}

/* Mobile: hide visual panel */
@media (max-width: 780px) {
  .login-visual { display: none; }
  .login-form-panel {
    flex: none;
    width: 100%;
    padding: 48px 28px;
    min-height: 100vh;
    background: var(--bg-primary);
    background-image: url('/static/img/bg-login.svg');
    background-size: cover;
    background-position: center;
  }
  .login-card {
    background: rgba(10, 18, 7, 0.92);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    max-width: 380px;
    margin: 0 auto;
  }
}

/* ============================================
   Journal Hero — Dashboard
   ============================================ */

.journal-hero {
  position: relative;
  height: 82vh;
  min-height: 520px;
  max-height: 900px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.journal-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/static/img/hero-dashboard.svg');
  background-size: cover;
  background-position: center 40%;
  transform: scale(1.03);
  will-change: transform;
}

.journal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 16, 5, 0.97) 0%,
    rgba(8, 16, 5, 0.80) 22%,
    rgba(8, 16, 5, 0.42) 50%,
    rgba(8, 16, 5, 0.18) 75%,
    rgba(8, 16, 5, 0.06) 100%
  );
}

.journal-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 64px 72px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.journal-hero-eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 16px;
}

.journal-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 6vw, 6rem);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.45);
}

.journal-hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(237, 232, 216, 0.72);
  font-style: italic;
  font-family: var(--font-heading);
  margin-bottom: 36px;
  max-width: 520px;
  line-height: 1.6;
}

.journal-hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.journal-hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-default);
}

.journal-hero-scroll {
  position: absolute;
  bottom: 28px;
  right: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 1;
  animation: scrollBounce 2.4s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%       { transform: translateY(6px); opacity: 0.9; }
}

/* ============================================
   Trips section (below hero)
   ============================================ */

.journal-trips-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 40px 80px;
}

.journal-trips-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.journal-trips-header h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* ============================================
   Trip Grid & Cards
   ============================================ */

.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

.trip-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  cursor: pointer;
}

.trip-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}

/* Featured first card spans 2 columns */
.trip-card--featured {
  grid-column: span 2;
}

.trip-card-image {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: var(--bg-surface-raised);
}

.trip-card--featured .trip-card-image {
  height: 460px;
}

.trip-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.trip-card:hover .trip-card-image img {
  transform: scale(1.04);
}

/* Mood gradient placeholders (no cover image) */
.mood-0 { background: linear-gradient(145deg, #0a1a0a 0%, #1a3018 35%, #0e2210 65%, #152a10 100%); }
.mood-1 { background: linear-gradient(145deg, #080e18 0%, #101a30 35%, #1a2210 55%, #281808 100%); }
.mood-2 { background: linear-gradient(145deg, #061418 0%, #0c2228 35%, #102818 60%, #183018 100%); }
.mood-3 { background: linear-gradient(145deg, #1a0e08 0%, #2a1808 35%, #1a1008 60%, #201408 100%); }
.mood-4 { background: linear-gradient(145deg, #080e1a 0%, #0c1828 35%, #101a20 60%, #142028 100%); }

/* Mood landscape overlays — subtle atmospheric texture */
.mood-0::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 50% 80%, rgba(74,140,92,0.18) 0%, transparent 70%); }
.mood-1::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 50% 65%, rgba(122,176,204,0.14) 0%, transparent 70%); }
.mood-2::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 40% 70%, rgba(122,176,204,0.12) 0%, transparent 65%); }
.mood-3::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 55% 75%, rgba(200,104,48,0.22) 0%, transparent 68%); }
.mood-4::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 50% 60%, rgba(122,176,204,0.16) 0%, transparent 72%); }

/* Gradient overlay for text readability */
.trip-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 16, 5, 0.96) 0%,
    rgba(8, 16, 5, 0.70) 30%,
    rgba(8, 16, 5, 0.18) 60%,
    rgba(8, 16, 5, 0.0) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px 20px;
  transition: background var(--transition-normal);
}

.trip-card:hover .trip-card-overlay {
  background: linear-gradient(
    to top,
    rgba(8, 16, 5, 0.98) 0%,
    rgba(8, 16, 5, 0.72) 35%,
    rgba(8, 16, 5, 0.22) 65%,
    rgba(8, 16, 5, 0.0) 100%
  );
}

.trip-card-overlay-text {
  margin-top: auto;
}

.trip-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.25;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 4px;
}

.trip-card--featured .trip-card-title { font-size: 1.8rem; }

.trip-card-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: rgba(237, 232, 216, 0.65);
}

/* Status badge on card */
.trip-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: flex-start;
}

.trip-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-planned {
  background: rgba(122, 176, 204, 0.15);
  color: var(--accent-sky);
  border: 1px solid rgba(122, 176, 204, 0.25);
}
.status-planned::before { background: var(--accent-sky); }

.status-active {
  background: rgba(74, 140, 92, 0.18);
  color: var(--accent-forest-light);
  border: 1px solid rgba(74, 140, 92, 0.28);
}
.status-active::before { background: var(--accent-forest-light); animation: pulse 1.6s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.status-completed {
  background: rgba(212, 168, 83, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(212, 168, 83, 0.25);
}
.status-completed::before { background: var(--accent-amber); }

/* Card footer */
.trip-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
}

.trip-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.trip-card-mediacount {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   Empty state
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 24px 100px;
  max-width: 520px;
  margin: 0 auto;
}

.empty-illustration {
  margin-bottom: 32px;
  opacity: 0.82;
}

.empty-state h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* Empty state shown inside hero area when no trips */
.journal-hero--empty .journal-hero-content {
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding-bottom: 80px;
}

.journal-hero--empty .journal-hero-title { text-align: center; }
.journal-hero--empty .journal-hero-subtitle { text-align: center; margin-left: auto; margin-right: auto; }
.journal-hero--empty .journal-hero-actions { justify-content: center; }

/* ============================================
   Trip Detail
   ============================================ */

.trip-detail { min-height: calc(100vh - var(--nav-height)); }

/* Hero */
.trip-hero {
  position: relative;
  height: 68vh;
  min-height: 420px;
  max-height: 780px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-surface);
}

.trip-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.trip-hero--no-cover {
  background-image: url('/static/img/hero-dashboard.svg');
  background-size: cover;
  background-position: center 40%;
}

/* Overlay always present */
.trip-hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 64px 56px;
  background: linear-gradient(
    to top,
    rgba(8, 16, 5, 0.96) 0%,
    rgba(8, 16, 5, 0.72) 28%,
    rgba(8, 16, 5, 0.22) 60%,
    rgba(8, 16, 5, 0.0) 100%
  );
}

.trip-hero-overlay h1 {
  font-size: clamp(2rem, 4.5vw, 4rem);
  color: var(--text-primary);
  margin-bottom: 10px;
  text-shadow: 0 3px 24px rgba(0,0,0,0.45);
  line-height: 1.15;
}

.trip-hero-location,
.trip-hero-dates {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: rgba(237, 232, 216, 0.70);
  margin-top: 6px;
  margin-right: 20px;
}

/* Trip content area */
.trip-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

.trip-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
}

.trip-actions .btn-ghost {
  margin-right: auto;
}

.trip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.tag {
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-forest);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--accent-forest-light);
}

.trip-section {
  margin-bottom: 48px;
}

.trip-section h2 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  margin-bottom: 16px;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.trip-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-style: italic;
  font-family: var(--font-heading);
}

.trip-report {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.85;
}

.trip-coords {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.trip-coords p {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-header h2 {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
  flex: 1;
}

/* ============================================
   Media Gallery
   ============================================ */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  padding: 4px;
  border-radius: var(--radius-md);
  transition: outline var(--transition-fast);
}

.media-grid.drag-over {
  outline: 2px dashed var(--accent-amber);
  outline-offset: 4px;
  background: rgba(212, 168, 83, 0.04);
}

/* First media item gets featured spotlight */
.media-item:first-child:not(:only-child) {
  grid-column: span 2;
  grid-row: span 2;
}

.media-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-surface);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.media-item:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-video-thumb {
  position: relative;
  width: 100%;
  height: 100%;
}

.media-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.85);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
  pointer-events: none;
}

.media-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.media-item:hover .media-actions { opacity: 1; }

.media-btn {
  width: 30px;
  height: 30px;
  background: rgba(10, 18, 7, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.media-btn:hover { background: rgba(10, 18, 7, 0.92); color: var(--accent-amber-light); }
.media-btn-danger:hover { color: var(--danger); }

.media-item.favorite .media-btn:first-child { color: var(--accent-amber); }

.media-caption-display {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.85);
  pointer-events: none;
}

.media-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--text-muted);
  text-align: center;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

@media (hover: none) {
  .media-actions { opacity: 1; }
}

/* ============================================
   Upload Progress
   ============================================ */

.upload-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  margin-bottom: 14px;
}

.progress-bar {
  flex: 1;
  height: 5px;
  background: var(--bg-surface-raised);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-amber);
  border-radius: 3px;
  transition: width 0.2s ease;
  width: 0%;
}

.progress-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 160px;
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(4, 8, 3, 0.96);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox.hidden { display: none; }

.lightbox-content {
  max-width: min(90vw, 1200px);
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(10, 18, 7, 0.70);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lightbox-close:hover { background: rgba(10, 18, 7, 0.92); color: var(--accent-amber-light); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 18, 7, 0.70);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lightbox-nav:hover { background: rgba(10, 18, 7, 0.92); color: var(--accent-amber-light); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-info {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(237, 232, 216, 0.65);
  font-size: 0.85rem;
  text-align: center;
  max-width: 600px;
}

/* ============================================
   Confirm Modal
   ============================================ */

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-modal.hidden { display: none; }

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 3, 0.72);
  backdrop-filter: blur(4px);
}

.confirm-modal-box {
  position: relative;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.18s ease;
}

@keyframes modalIn {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.confirm-modal-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.confirm-modal-text {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================
   Forms — Wizard card sections
   ============================================ */

.form-page {
  min-height: calc(100vh - var(--nav-height));
  padding: 52px 24px 80px;
  background: var(--bg-primary);
}

.form-container {
  max-width: 740px;
  margin: 0 auto;
}

.form-page-heading {
  margin-bottom: 8px;
}

.form-page-heading h1 {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.form-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 8px;
  display: block;
}

.trip-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

/* Wizard step cards */
.form-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.form-section:focus-within {
  border-color: var(--border-accent);
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: var(--bg-surface-raised);
  border-bottom: 1px solid var(--border-subtle);
}

.form-section-number {
  width: 34px;
  height: 34px;
  background: var(--accent-amber);
  color: #0c1409;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  flex-shrink: 0;
}

.form-section-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 400;
}

.form-section-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.form-section-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Legacy .form-section-title for account page (no header wrapper) */
.form-section > .form-section-title:first-child {
  display: block;
  padding: 18px 24px 14px;
  background: var(--bg-surface-raised);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 400;
}

/* Form groups inside sections */
.form-section .form-group,
.form-section-body .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-section > .form-group,
.form-section > .form-row {
  padding: 0 24px 20px;
}

.form-section > .form-group:first-of-type { padding-top: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.required { color: var(--accent-amber); margin-left: 2px; }

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.14);
}

.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select { appearance: none; cursor: pointer; }

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }

/* File upload */
.file-upload-area {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  overflow: hidden;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: var(--accent-amber);
  background: rgba(212, 168, 83, 0.04);
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-upload-prompt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 24px;
  text-align: center;
}

.file-upload-prompt svg { color: var(--text-muted); }

.file-upload-prompt p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.file-upload-prompt span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.file-upload-preview {
  position: relative;
  width: 100%;
}

.file-upload-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.file-upload-preview-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 10px;
  background: rgba(10, 18, 7, 0.80);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-primary);
}

.has-preview .file-upload-prompt { display: none; }

/* Form actions bar */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}

/* ============================================
   Account Page
   ============================================ */

/* Uses .form-page / .form-container / .form-section */

/* ============================================
   Error Page
   ============================================ */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  text-align: center;
  padding: 60px 24px;
}

.error-code {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 14vw, 9rem);
  color: var(--accent-amber);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  opacity: 0.8;
}

.error-message {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-style: italic;
  font-family: var(--font-heading);
}

/* ============================================
   Utilities
   ============================================ */

.hidden        { display: none !important; }
.hidden-input  { display: none; }
.sr-only       { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================
   Responsive
   ============================================ */

/* 1440p+ — use full width, scale up nicely */
@media (min-width: 1440px) {
  .journal-hero-content { padding: 0 80px 88px; }
  .journal-trips-container { padding: 72px 64px 100px; }
  .trip-content { max-width: 960px; padding: 56px 0 80px; }
  .trip-hero-overlay { padding: 0 80px 64px; }
}

/* Tablet */
@media (max-width: 1024px) {
  .journal-hero { height: 70vh; }
  .journal-hero-content { padding: 0 40px 56px; }
  .journal-trips-container { padding: 48px 28px 64px; }
  .trip-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .trip-card--featured { grid-column: span 1; }
  .trip-card--featured .trip-card-image { height: 360px; }
  .trip-card--featured .trip-card-title { font-size: 1.35rem; }
  .trip-content { padding: 40px 28px 64px; }
  .trip-hero-overlay { padding: 0 40px 44px; }
}

/* Mobile */
@media (max-width: 700px) {
  :root { --nav-height: 62px; }

  .journal-hero { height: 60vh; min-height: 380px; }
  .journal-hero-content { padding: 0 24px 44px; }
  .journal-hero-title { font-size: 2.4rem; }
  .journal-hero-scroll { display: none; }

  .journal-trips-container { padding: 36px 16px 56px; }
  .journal-trips-header { margin-bottom: 24px; }
  .journal-trips-header h2 { font-size: 1.6rem; }

  .trip-grid { grid-template-columns: 1fr; gap: 18px; }
  .trip-card-image { height: 260px; }

  .trip-hero { height: 50vh; min-height: 320px; }
  .trip-hero-overlay { padding: 0 20px 32px; }
  .trip-hero-overlay h1 { font-size: 1.8rem; }

  .trip-content { padding: 28px 16px 56px; }
  .trip-actions { flex-wrap: wrap; }

  .trip-section h2 { font-size: 1.3rem; }

  .form-page { padding: 36px 16px 60px; }
  .form-page-heading h1 { font-size: 2rem; }

  .flash-container { left: 12px; right: 12px; max-width: none; }
}

/* Very small */
@media (max-width: 420px) {
  .journal-hero-title { font-size: 2rem; }
  .journal-hero-actions { gap: 16px; }
  .btn-hero { padding: 14px 24px; font-size: 0.95rem; }
  .stat-value { font-size: 1.3rem; }
}
