/* ===========================================
   TOP TEN MARBELLA — Välkomstguide
   Design: lugn, premium, varm cream-bas
   =========================================== */

:root {
  /* Samma palett som huvudsajten. Namnen behålls (--orange etc.)
     så att resten av filen inte behöver skrivas om – bara värdena byts. */
  --navy: #0e3b3a;          /* sajtens sea-ink */
  --navy-deep: #07262A;
  --orange: #CB8338;        /* sajtens amber */
  --orange-dark: #b9722c;
  --blue: #3F7E76;          /* sajtens sea-mid – havet på kustkartan */
  --blue-dark: #2c5f58;
  --gold: #CB8338;
  --gold-soft: #E2A85C;
  --charcoal: #16302E;      /* sajtens ink */
  --ink: #07262A;

  /* Bakgrunder */
  --cream: #F6F1E7;         /* sajtens paper */
  --cream-soft: #EFE8DA;
  --paper: #FFFFFF;

  /* Text */
  --text: #16302E;
  --text-soft: #5C6E6A;
  --text-faint: #8B9794;

  /* Bordrar och linjer */
  --line: #E7DDCB;          /* sajtens sand */
  --line-soft: #F0EAE0;

  /* Typografi */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Spacing */
  --pad: 1.25rem;
  --pad-lg: 2rem;
  --radius: 14px;
  --radius-lg: 22px;

  /* Skuggor */
  --shadow-sm: 0 1px 2px rgba(45, 42, 38, 0.04), 0 1px 3px rgba(45, 42, 38, 0.06);
  --shadow-md: 0 4px 12px rgba(45, 42, 38, 0.06), 0 2px 6px rgba(45, 42, 38, 0.04);
  --shadow-lg: 0 10px 30px rgba(45, 42, 38, 0.08);
}

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

html, body {
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }

.hidden { display: none !important; }

/* ===========================================
   HEADER
   =========================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: none;
}

/* Ordmärket – samma uppbyggnad som sajtens meny: emblem + text, enfärgat. */
.brand { display: flex; align-items: center; gap: 11px; color: #F4F1EA; text-decoration: none; }
.brand .emblem { height: 34px; width: auto; display: block; }
.brand .wm { display: flex; flex-direction: column; line-height: 1; }
.brand .wm b { font-family: var(--font-sans); font-weight: 700; font-size: 1.06rem; letter-spacing: .06em; }
.brand .wm i { font-style: normal; font-size: .54rem; letter-spacing: .4em; opacity: .85; margin-top: 4px; }

/* Tillbaka till sajten – guiden är en del av den, inte en egen ö. */
.back-site {
  position: absolute; left: var(--pad); top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-size: .8rem; font-weight: 400;
  color: rgba(244,241,234,.9); text-decoration: none; white-space: nowrap;
  transition: color .18s ease, gap .18s ease;
}
.back-site:hover { color: #F4F1EA; gap: 10px; }
@media (max-width: 560px) { .back-site { background: rgba(244,241,234,.12); border: 1px solid rgba(244,241,234,.42); border-radius: 20px; padding: 5px 12px; color: #F4F1EA; } }

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.75rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  height: 38px;
  width: auto;
}

/* ===========================================
   HERO
   =========================================== */

.hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-soft) 100%);
  padding: 3rem var(--pad) 2.5rem;
  text-align: center;
  position: relative;
}

.hero::after {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto 0;
}

.hero-inner {
  max-width: 600px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--text-soft);
  margin-bottom: 1rem;
}

.hero-intro {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 480px;
  margin: 0 auto;
}

/* ===========================================
   CATEGORY TABS
   =========================================== */

.tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1.25rem var(--pad);
  max-width: 720px;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.tab:hover {
  border-color: var(--gold-soft);
  color: var(--text);
}

.tab.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* ===========================================
   PLACES GRID
   =========================================== */

.places {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--pad) 3rem;
  display: grid;
  gap: 1rem;
}

.place-group-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin: 1.5rem 0 0.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.place-group-title:first-child { margin-top: 0; }

.place-group-count {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.place {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.place:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

.place-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.place-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.place-favorite {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  flex: 0 0 auto;
  padding-top: 0.35rem;
}

.place-favorite::before {
  content: "★";
  font-size: 0.85rem;
}

.place-description {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.place-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.825rem;
  color: var(--text-soft);
}

.place-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.place-meta-item.clickable {
  color: var(--blue);
  font-weight: 500;
}

.place-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--cream-soft);
}

.btn-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex-shrink: 0;
}

/* ===========================================
   LOADING + ERROR
   =========================================== */

.loading, .error-state {
  text-align: center;
  padding: 4rem var(--pad);
  color: var(--text-soft);
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--orange);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

/* ===========================================
   FOOTER
   =========================================== */

.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 3rem var(--pad) 2.5rem;
  text-align: center;
  margin-top: auto;
}

.footer-inner {
  max-width: 480px;
  margin: 0 auto;
}

.footer-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
}

.footer-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--cream);
  margin-bottom: 1.25rem;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.footer-link {
  color: var(--gold-soft);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.footer-link:hover {
  border-color: var(--gold-soft);
}

.footer-sep {
  color: var(--gold);
}

.footer-meta {
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (min-width: 600px) {
  .hero {
    padding: 4rem var(--pad) 3rem;
  }
  .places {
    grid-template-columns: 1fr 1fr;
  }
  .place-group-title {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  :root {
    --pad: 2rem;
  }
}

/* Safe area för iPhone notch */
@supports (padding: max(0px)) {
  .site-header { padding-top: env(safe-area-inset-top); }
  .site-footer { padding-bottom: max(2.5rem, env(safe-area-inset-bottom)); }
}

/* ===========================================
   COAST MAP
   =========================================== */

.coast-map {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem var(--pad) 0.5rem;
  text-align: center;
}

.coast-svg {
  width: 100%;
  height: auto;
  max-height: 360px;
}

/* ===========================================
   PRINT
   =========================================== */

@media print {
  :root {
    --pad: 1.25rem;
  }

  html, body {
    background: white;
    color: #07262A;
    font-size: 10.5pt;
    line-height: 1.4;
  }

  .site-header,
  .tabs,
  .loading,
  .error-state {
    display: none !important;
  }

  .site-footer {
    background: white !important;
    color: #07262A !important;
    padding: 1rem var(--pad) !important;
    border-top: 1px solid #E2A85C;
    page-break-inside: avoid;
  }

  .footer-line,
  .footer-mark { color: #07262A !important; }

  .footer-link {
    color: #07262A !important;
    border-bottom: none !important;
  }

  .footer-sep,
  .footer-meta { color: #5C6E6A !important; }

  .hero {
    background: white !important;
    padding: 0.5rem var(--pad) 1rem !important;
    page-break-after: avoid;
  }

  .hero::after { display: none; }

  .hero-title {
    font-size: 22pt;
    margin-bottom: 0.25rem;
  }

  .hero-tagline { font-size: 11pt; }
  .hero-intro { font-size: 10pt; }

  .coast-map {
    padding: 0.25rem var(--pad);
    page-break-inside: avoid;
    page-break-after: avoid;
  }

  .coast-svg { max-height: none; }

  .places {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    padding: 0.5rem var(--pad) 1rem !important;
  }

  .place-group-title {
    grid-column: 1 / -1;
    font-size: 14pt !important;
    margin: 0.75rem 0 0.25rem !important;
    page-break-after: avoid;
    border-bottom: 1px solid #E2A85C;
    padding-bottom: 0.25rem;
  }

  .place {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #E2A85C !important;
    padding: 0.6rem 0.85rem !important;
    gap: 0.35rem !important;
  }

  .place-name {
    font-size: 13pt !important;
    line-height: 1.15 !important;
  }

  .place-description {
    font-size: 9.5pt !important;
    line-height: 1.4 !important;
  }

  .place-favorite::before {
    content: "★ ";
  }

  .place-favorite {
    color: #07262A !important;
  }

  .place-meta {
    font-size: 9pt !important;
    color: #07262A !important;
  }

  .place-meta-item.clickable {
    color: #07262A !important;
  }

  /* Knappar -> visa som text */
  .place-actions {
    display: none !important;
  }

  /* Skriv ut hela telefonnumret som text efter länken */
  a[href^="tel:"]::after {
    content: "" !important;
  }

  a[href^="mailto:"]::after {
    content: "" !important;
  }
}

/* ===========================================
   HEADER WITH PRINT ACTION
   =========================================== */

.header-inner--with-action {
  position: relative;
  justify-content: center;
}

.print-btn {
  position: absolute;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: transparent;
  border: 1px solid rgba(244,241,234,.3);
  border-radius: 999px;
  color: rgba(244,241,234,.85);
  font-family: var(--font-sans);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.print-btn:hover {
  border-color: var(--gold);
  color: #fff;
  background: var(--gold);
}

.print-btn svg {
  stroke: currentColor;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .print-btn span {
    display: none;
  }
  .print-btn {
    padding: 0.45rem 0.55rem;
  }
}

/* ===========================================
   SMALLER MAP
   =========================================== */

.coast-map {
  max-width: 560px;
  padding: 1rem var(--pad) 0;
}

.coast-svg {
  max-height: 200px;
}

/* ===========================================
   QR SECTION
   =========================================== */

.qr-section {
  max-width: 560px;
  margin: 2rem auto 1.5rem;
  padding: 1.25rem var(--pad);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
}

.qr-image {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.qr-text {
  flex: 1;
}

.qr-label {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.qr-sub {
  font-size: 0.825rem;
  color: var(--text-soft);
  word-break: break-all;
}

/* ===========================================
   PRINT — overrides
   =========================================== */

@media print {
  .print-btn, .back-site { display: none !important; }

  .coast-map {
    max-width: none;
    padding: 0.25rem var(--pad);
  }

  .coast-svg {
    max-height: 140px;
  }

  .qr-section {
    page-break-inside: avoid;
    margin: 0.5rem auto !important;
    padding: 0.75rem var(--pad) !important;
    border: 1px solid #E2A85C !important;
    background: white !important;
  }

  .qr-image {
    width: 130px !important;
    height: 130px !important;
  }

  .qr-label { font-size: 13pt !important; }
  .qr-sub { font-size: 9pt !important; }
}

/* ===========================================
   OVERRIDES — print btn position & QR size
   =========================================== */

/* Flytta print-knappen till skärmens högra kant istället för 720px-containerns */
.site-header {
  position: sticky;
}

.header-inner--with-action {
  position: static;
}

.print-btn {
  position: fixed;
  right: 1rem;
  top: 0.75rem;
  transform: none;
}

@supports (padding: max(0px)) {
  .print-btn {
    top: max(0.75rem, env(safe-area-inset-top));
  }
}

/* Mindre QR-bild */
.qr-image {
  width: 88px;
  height: 88px;
}

.qr-section {
  gap: 1rem;
  padding: 1rem var(--pad);
}

.qr-label {
  font-size: 1.05rem;
}

@media print {
  .qr-image {
    width: 110px !important;
    height: 110px !important;
  }
}

/* ===========================================
   RESTORE MAP TO HUB SIZE
   =========================================== */

.coast-map {
  max-width: 800px;
  padding: 2rem var(--pad) 1rem;
}

.coast-svg {
  max-height: 360px;
}
