/* ===========================
   Bannertrailer.dk Design System
   =========================== */

/* --- Fonts --- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* --- CSS Custom Properties --- */
:root {
  --brand-red: #b22222;
  --brand-red-light: #d43f3f;
  --brand-red-dark: #8b1a1a;
  --brand-red-glow: rgba(178, 34, 34, 0.3);

  --bg-primary: #0f0f1a;
  --bg-secondary: #161627;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(255, 255, 255, 0.06);

  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a82;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--brand-red-glow);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  --max-width: 1280px;
  --header-height: 80px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

/* --- Header --- */
.header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: var(--transition-fast);
}

.logo:hover {
  transform: translateY(-1px);
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
  font-style: italic;
}

/* Nav */
.main-nav {
  display: flex;
  gap: 8px;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition-fast);
  border-radius: 2px;
}

/* --- Main Content --- */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
}

/* --- Map Section --- */
.map-section {
  position: relative;
}

.map-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-section h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 24px;
  background: var(--brand-red);
  border-radius: 2px;
}

.map-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  background: var(--bg-secondary);
  height: 560px;
  transition: var(--transition-smooth);
}

.map-container:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Leaflet overrides */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-sm) !important;
}

.leaflet-control-zoom a {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
  transition: var(--transition-fast) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-card-hover) !important;
  color: var(--brand-red-light) !important;
}

.pin-tooltip {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 12px !important;
  font-family: "Inter", sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-md) !important;
}

.pin-tooltip::before {
  border-top-color: var(--bg-secondary) !important;
}

.custom-pin {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.custom-pin:hover {
  transform: scale(1.2) translateY(-4px);
}

/* --- Info Panel --- */
.info-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-red-light));
  opacity: 0;
  transition: var(--transition-fast);
}

.info-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.info-card:hover::before {
  opacity: 1;
}

.info-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.info-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.info-card ul {
  list-style: none;
  margin-top: 12px;
}

.info-card ul li {
  color: var(--text-secondary);
  font-size: 0.92rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-card ul li:last-child {
  border-bottom: none;
}

.info-card ul li .price-label {
  color: var(--text-muted);
}

.info-card ul li .price-value {
  color: var(--text-primary);
  font-weight: 600;
}

.info-card .highlight {
  color: var(--brand-red-light);
  font-weight: 600;
}

.step-list {
  counter-reset: steps;
  list-style: none !important;
  margin-top: 16px !important;
}

.step-list li {
  counter-increment: steps;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 12px;
  padding: 10px 0 !important;
  border-bottom: none !important;
}

.step-list li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  background: var(--brand-red);
  color: white;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: linear-gradient(145deg, var(--bg-secondary) 0%, #1a1a30 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(30px) scale(0.95);
  transition: var(--transition-bounce);
  position: relative;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  transform: rotate(90deg);
}

.modal-image-container {
  width: 100%;
  height: 220px;
  background: linear-gradient(
    135deg,
    var(--brand-red-dark) 0%,
    var(--brand-red) 50%,
    var(--brand-red-light) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.modal-image-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--bg-secondary), transparent);
}

.modal-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
}

.modal-image-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.6;
}

.modal-image-placeholder span {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.7;
}

.modal-body {
  padding: 28px;
}

.modal-body h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.modal-info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-info-row:last-child {
  border-bottom: none;
}

.modal-info-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-red-light);
}

.modal-info-icon svg {
  width: 18px;
  height: 18px;
}

.modal-info-content {
  flex: 1;
}

.modal-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.modal-info-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.modal-info-value a {
  color: var(--brand-red-light);
  text-decoration: none;
  transition: var(--transition-fast);
}

.modal-info-value a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.modal-description {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.modal-description p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.modal-cta {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

.btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.btn-primary {
  background: var(--brand-red);
  color: white;
  box-shadow: 0 4px 16px var(--brand-red-glow);
}

.btn-primary:hover {
  background: var(--brand-red-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--brand-red-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-subtle);
  margin-top: 48px;
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--brand-red-light);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .map-container {
    height: 400px;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 24px;
    gap: 8px;
  }

  .logo-text {
    font-size: 1.6rem;
  }

  .tagline {
    display: none;
  }

  .main-nav {
    display: none;
  }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-top: 12px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .modal-card {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }

  .modal-image-container {
    height: 180px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 16px;
  }

  .info-card {
    padding: 20px;
  }

  .map-container {
    height: 320px;
    border-radius: var(--radius-md);
  }

  .modal-body {
    padding: 20px;
  }

  .modal-cta {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}
