/* ============================================================
   SVeapa — style.css
   Italian vintage Vespa theme
   
   TABLE OF CONTENTS:
   1. CSS Variables (tokens)
   2. Reset & Base
   3. Utilities (.container, .btn, .section-title)
   4. Navbar
   5. Hero Section
   6. Problem Cards Section
   7. AI Chat Section
   8. World Map Section
   9. Footer
   10. Animations
   11. Responsive (mobile)
============================================================ */


/* ============================================================
   1. CSS VARIABLES
============================================================ */
:root {
  /* Colors */
  --color-green:       #2D6A2D;   /* Vespa classic green */
  --color-green-dark:  #1a3d1a;
  --color-green-light: #4a9a4a;
  --color-red:         #CE2B37;   /* Italian red */
  --color-gold:        #c9a227;   /* vintage gold accent */
  --color-gold-light:  #ffe066;
  --color-cream:       #f5f0e8;   /* aged paper background */
  --color-cream-dark:  #e8e0cc;
  --color-white:       #ffffff;
  --color-black:       #1a1a1a;
  --color-gray:        #555555;
  --color-gray-light:  #888888;
  --color-border:      #d4c9a8;

  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'Inter', 'Helvetica Neue', sans-serif;
  --font-italic:  'Lora', 'Georgia', serif;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 80px;

  /* Border */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.12);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.16);

  /* Transition */
  --transition: 0.2s ease;
}


/* ============================================================
   2. RESET & BASE
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-cream);
  color: var(--color-black);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

textarea, input {
  font-family: var(--font-body);
  font-size: 15px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ============================================================
   3. UTILITIES
============================================================ */

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* Section title */
.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-green-dark);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.section-title svg {
  flex-shrink: 0;
  color: var(--color-gold);
}

.section-sub {
  color: var(--color-gray);
  font-size: 0.95rem;
  margin-bottom: var(--space-xl);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  font-family: var(--font-body);
}
.btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--color-green);
  color: var(--color-white);
  border-color: var(--color-green);
}
.btn--primary:hover { background: var(--color-green-dark); border-color: var(--color-green-dark); }

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.7);
}
.btn--outline:hover { background: rgba(255,255,255,0.15); }

.btn--send {
  background: var(--color-green);
  color: var(--color-white);
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.btn--send:hover { background: var(--color-green-dark); }
.btn--send:disabled { background: var(--color-gray-light); cursor: not-allowed; transform: none; box-shadow: none; }

.btn--sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  background: var(--color-green);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
}
.btn--sm:hover { background: var(--color-green-dark); }


/* ============================================================
   3b. ORNAMENT DIVIDERS
============================================================ */
.ornament-divider {
  width: 100%;
  height: 28px;
  display: block;
  color: var(--color-gold);
}
.ornament-divider svg { width: 100%; height: 100%; display: block; }

/* Background matches the section BELOW the divider (seam appears on top of it) */
.ornament-divider--problems  { background: var(--color-cream); color: var(--color-green-dark); }
.ornament-divider--ai        { background: linear-gradient(135deg, var(--color-green-dark) 0%, #1e4d1e 100%); color: var(--color-gold); }
.ornament-divider--map       { background: var(--color-cream-dark); color: var(--color-green-dark); }


/* ============================================================
   4. NAVBAR
============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--space-xl);
  background: rgba(26, 61, 26, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--color-gold);
  transition: background var(--transition);
}

.navbar__logo {
  display: flex;
  align-items: center;
}
.navbar__logo-svg {
  height: 48px;
  width: 48px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.navbar__links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: color var(--transition);
}
.navbar__links a:hover { color: var(--color-gold-light); }


/* ============================================================
   5. HERO SECTION
============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 100px var(--space-xl) var(--space-2xl);
  background: var(--color-green-dark);
}

/* Starfield / particle layer */
.hero__stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero__stars .star {
  position: absolute;
  background: var(--color-gold-light);
  border-radius: 50%;
  opacity: 0.6;
  animation: twinkle 4s ease-in-out infinite;
}
.hero__stars .star--drift {
  animation: twinkle 4s ease-in-out infinite, drift 18s linear infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50%      { opacity: 0.9;  transform: scale(1.2); }
}
@keyframes drift {
  from { transform: translateX(0) translateY(0); }
  to   { transform: translateX(-30px) translateY(20px); }
}

/* Italian flag diagonal bg strips */
.hero__flag-bg {
  position: absolute;
  inset: 0;
  display: flex;
  transform: skewY(-8deg);
  transform-origin: top left;
  top: -5%;
  height: 110%;
  opacity: 0.07;
  pointer-events: none;
}
.hero__flag-green { flex: 1; background: #009246; }
.hero__flag-white { flex: 1; background: #ffffff; }
.hero__flag-red   { flex: 1; background: #CE2B37; }

/* Decorative grain texture overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

.hero__eyebrow {
  font-family: var(--font-italic);
  font-style: italic;
  color: var(--color-gold);
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin-bottom: var(--space-md);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 7rem);
  color: var(--color-white);
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: var(--space-md);
}
.hero__title em {
  font-style: italic;
  color: var(--color-gold-light);
}

.hero__tagline {
  font-family: var(--font-italic);
  font-style: italic;
  color: rgba(255,255,255,0.7);
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

/* Hand-drawn gold underline beneath tagline */
.hero__tagline::after {
  content: '';
  position: absolute;
  left: -2%;
  bottom: -6px;
  width: 104%;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6 C 30 2, 60 9, 90 5 S 150 1, 198 6' stroke='%23c9a227' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 0.85;
}

.hero__sub {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  margin-bottom: var(--space-xl);
}

/* Typewriter cursor for animated subtitle */
.hero__sub .typewriter-cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--color-gold-light);
  animation: caret-blink 0.9s steps(1) infinite;
}
@keyframes caret-blink {
  0%, 50%  { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* Scroll-down indicator */
.hero__scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--color-gold);
  opacity: 0.75;
  animation: scrollBounce 2s ease-in-out infinite;
  pointer-events: none;
}

.hero__cta-group {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Vespa illustration */
.hero__illustration {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  animation: float 4s ease-in-out infinite;
}
.vespa-svg {
  width: min(420px, 45vw);
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.4; }
  50%      { transform: translate(-50%, 10px); opacity: 0.9; }
}


/* ============================================================
   6. PROBLEM CARDS SECTION
============================================================ */
.problems {
  padding: var(--space-2xl) 0;
  background: var(--color-cream);
  border-top: 3px solid var(--color-gold);
  position: relative;
  overflow: hidden;
}
/* Subtle parchment texture */
.problems::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.79  0 0 0 0 0.71  0 0 0 0 0.5  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23p)'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}
.problems .container { position: relative; z-index: 1; }

/* Header row: heading + badge */
.problems__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}
.problems__heading .section-title { margin-bottom: var(--space-xs); }
.problems__heading .section-sub { margin-bottom: 0; }

.problems__badge {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--color-gold);
  outline: 1px dashed var(--color-gold);
  outline-offset: 5px;
  background: var(--color-green-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.problems__badge-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-gold-light);
  line-height: 1;
}
.problems__badge-label {
  font-size: 0.62rem;
  color: var(--color-cream);
  line-height: 1.25;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.problem-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}

/* Individual card — rendered by JS, styled here */
.problem-card {
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(16px);
  animation: cardStaggerIn 0.5s ease forwards;
  overflow: hidden;
}

/* Accent stripe on top, colored per category */
.problem-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-glow, var(--color-gold));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.problem-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), 0 0 22px var(--card-glow-soft, rgba(45,106,45,0.3));
  border-color: var(--color-green);
}
.problem-card:active { transform: translateY(-1px); }

@keyframes cardStaggerIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Vintage corner ornaments */
.problem-card__corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-gold);
  opacity: 0.45;
  transition: opacity var(--transition);
}
.problem-card:hover .problem-card__corner { opacity: 1; }
.problem-card__corner--tl { top: 10px;    left: 6px;    border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.problem-card__corner--tr { top: 10px;    right: 6px;   border-left: none;  border-bottom: none; border-radius: 0 4px 0 0; }
.problem-card__corner--bl { bottom: 6px;  left: 6px;    border-right: none; border-top: none;    border-radius: 0 0 0 4px; }
.problem-card__corner--br { bottom: 6px;  right: 6px;   border-left: none;  border-top: none;    border-radius: 0 0 4px 0; }

/* Icon as a ring instead of filled circle */
.problem-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--card-glow, var(--color-green));
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-glow, var(--color-green));
  margin-top: 4px;
  transition: background var(--transition), transform var(--transition);
}
.problem-card:hover .problem-card__icon {
  background: var(--color-white);
  transform: scale(1.06);
}

.problem-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-green-dark);
}

.problem-card__desc {
  font-size: 0.82rem;
  color: var(--color-gray);
}


/* ============================================================
   7. AI CHAT SECTION
============================================================ */
.ai-section {
  padding: var(--space-2xl) 0;
  background: linear-gradient(135deg, var(--color-green-dark) 0%, #1e4d1e 100%);
  border-top: 3px solid var(--color-gold);
  position: relative;
  overflow: hidden;
}
/* Subtle parchment / old-paper texture overlay */
.ai-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.79  0 0 0 0 0.71  0 0 0 0 0.5  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23p)'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.ai-section .container { position: relative; z-index: 1; }
.ai-section .section-title,
.ai-section .section-sub { color: var(--color-cream); }

/* Header row */
.ai-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.marco-avatar {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid var(--color-gold);
  background: var(--color-cream);
  padding: 4px;
  box-shadow: 0 0 0 4px rgba(201,162,39,0.18), 0 0 26px rgba(255,224,102,0.45);
}
.ai-header__text h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-white);
}
.ai-header__text p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}
.ai-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #7ed17e;
  margin-top: 4px;
}

/* Chat window */
.chat-window {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  min-height: 320px;
  max-height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  scroll-behavior: smooth;
}

/* Message bubbles */
.chat-msg {
  display: flex;
  gap: var(--space-sm);
  max-width: 88%;
  animation: fadeInUp 0.25s ease;
}
.chat-msg--user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg--assistant { align-self: flex-start; }

.chat-msg__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  overflow: hidden;
}
.chat-msg--user    .chat-msg__avatar { background: var(--color-gold); }
.chat-msg--assistant .chat-msg__avatar { background: var(--color-cream); }

.chat-msg__bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.93rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
}
.chat-msg--user .chat-msg__bubble {
  background:
    radial-gradient(circle at 8px 8px, rgba(255,255,255,0.12) 1.5px, transparent 1.6px) 0 0/16px 16px,
    var(--color-gold);
  color: var(--color-black);
  border-bottom-right-radius: 4px;
}
.chat-msg--assistant .chat-msg__bubble {
  background:
    radial-gradient(circle at 8px 8px, rgba(255,224,102,0.06) 1.5px, transparent 1.6px) 0 0/16px 16px,
    rgba(255,255,255,0.12);
  color: var(--color-white);
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255,255,255,0.10);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.typing-indicator span {
  width: 7px; height: 7px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40%           { transform: translateY(-8px); }
}

/* Chat input area */
.chat-input-area {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-end;
  margin-bottom: var(--space-md);
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--color-white);
  resize: none;
  transition: border-color var(--transition);
}
.chat-input::placeholder { color: rgba(255,255,255,0.4); }
.chat-input:focus {
  outline: none;
  border-color: var(--color-gold);
}

/* API Key notice */
.api-notice {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  background: rgba(201,162,39,0.15);
  border: 1px solid rgba(201,162,39,0.4);
  border-radius: var(--radius-md);
  padding: 10px var(--space-md);
  font-size: 0.85rem;
  color: var(--color-gold-light);
}
.api-notice svg { flex-shrink: 0; }
.api-notice.hidden { display: none; }

.api-key-field {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--color-white);
  font-size: 0.85rem;
  width: 200px;
  transition: border-color var(--transition);
}
.api-key-field:focus { outline: none; border-color: var(--color-gold); }


/* ============================================================
   8. WORLD MAP SECTION
============================================================ */
.map-section {
  padding: var(--space-2xl) 0;
  background: var(--color-cream-dark);
  border-top: 3px solid var(--color-gold);
}

.map-legend {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--color-gray);
}

.map-container {
  width: 100%;
  height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid var(--color-gold);
  outline: 1px solid var(--color-border);
  outline-offset: 6px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
/* Sepia tone over map tiles for vintage look */
.map-container .leaflet-tile-pane {
  filter: sepia(45%) saturate(85%) brightness(0.97) hue-rotate(-6deg);
}

/* Compass rose decoration */
.map-compass {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 56px;
  height: 56px;
  z-index: 500;
  opacity: 0.85;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

/* Leaflet popup customisation */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  border: 2px solid var(--color-gold) !important;
}
.leaflet-popup-content { font-family: var(--font-body); font-size: 0.9rem; }
.map-popup-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-green-dark);
  margin-bottom: 4px;
}
.map-popup-type {
  font-size: 0.78rem;
  color: var(--color-gray);
}


/* ============================================================
   9. FOOTER
============================================================ */
.footer {
  background: var(--color-green-dark);
  border-top: 3px solid var(--color-gold);
  padding: var(--space-xl) 0;
  text-align: center;
}
.footer__logo-svg { height: 60px; width: 60px; margin-bottom: var(--space-sm); }
.footer__tagline {
  font-family: var(--font-italic);
  font-style: italic;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
}
.footer__copy { color: rgba(255,255,255,0.35); font-size: 0.8rem; }


/* ============================================================
   10. ANIMATIONS
============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   11. RESPONSIVE (Mobile)
============================================================ */
@media (max-width: 768px) {

  .container { padding: 0 var(--space-lg); }

  /* Navbar */
  .navbar { padding: 10px var(--space-lg); }
  .navbar__links { gap: var(--space-md); }
  .navbar__links a span { display: none; }

  /* Hero */
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 90px;
    padding-bottom: var(--space-xl);
    gap: var(--space-xl);
  }
  .hero__content { max-width: 100%; }
  .hero__cta-group { justify-content: center; }
  .vespa-svg { width: 260px; }

  /* Section titles */
  .section-title { font-size: 1.4rem; }

  /* Problem cards */
  .problems__header { flex-direction: column; align-items: flex-start; gap: var(--space-md); }
  .problems__badge { align-self: flex-start; }
  .problem-cards { grid-template-columns: repeat(2, 1fr); }

  /* AI chat */
  .chat-window { max-height: 300px; }

  /* Map */
  .map-container { height: 320px; }
  .map-compass { width: 40px; height: 40px; top: 8px; right: 8px; }

  /* Marco avatar */
  .marco-avatar { width: 72px; height: 72px; }

  /* Scroll indicator */
  .hero__scroll-indicator { bottom: 16px; }

  /* Footer */
  .map-legend { gap: var(--space-md); }
}

@media (max-width: 480px) {
  .hero__title { font-size: 3.5rem; }
  .problem-cards { grid-template-columns: 1fr 1fr; }
  .navbar__links a {
    font-size: 0.78rem;
    gap: 2px;
  }
}