/* ==========================================================================
   ATH Guidebook Shared Stylesheet
   ==========================================================================
   Per-property colors are set via CSS custom properties in each HTML file:
     --color-primary        Main accent (headings, links, buttons)
     --color-primary-dark   Hover states, gradients, nav link backgrounds
     --color-primary-light  Highlight box backgrounds, TOC pill backgrounds
     --color-bg             Page background
     --color-hero-bg        Desktop hero wrapper background
     --color-nav-overlay    Nav overlay background (rgba with 0.97 alpha)
   ========================================================================== */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: #333;
  background: var(--color-bg);
  padding-bottom: 40px;
}

/* Hero */
.hero {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.6)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  padding: 60px 20px;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.hero .subtitle {
  font-size: 1rem;
  opacity: 0.9;
}

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Cards */
.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card h2 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h3 {
  font-size: 0.95rem;
  color: #555;
  margin: 16px 0 8px 0;
  font-weight: 600;
}

.card p {
  margin-bottom: 12px;
  color: #555;
}

.card ul {
  margin-left: 20px;
  margin-bottom: 12px;
}

.card li {
  margin-bottom: 6px;
  color: #555;
}

.card a {
  color: var(--color-primary);
}

/* Info Tables */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table td {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.info-table td:first-child {
  font-weight: 500;
  color: #333;
  width: 40%;
}

.info-table td:last-child {
  color: #666;
}

.info-table tr:last-child td {
  border-bottom: none;
}

/* Numbered Steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.steps li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 12px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Highlight Boxes */
.highlight-box {
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
}

.highlight-box.warning {
  background: #fff3cd;
  border-left-color: #ffc107;
}

.highlight-box.danger {
  background: #f8d7da;
  border-left-color: #dc3545;
}

.highlight-box.important {
  background: #ffebee;
  border-left-color: #c62828;
}

.highlight-box.info {
  background: #e3f2fd;
  border-left-color: #1976d2;
}

/* Emoji */
.emoji {
  font-size: 1.2rem;
}

/* Quick Links (TOC pills) */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.toc a {
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.toc a:hover {
  background: var(--color-primary);
  color: white;
}

/* Book Direct CTAs */
.book-direct {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  margin-top: 16px;
}

.book-direct a {
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.book-direct a:hover {
  text-decoration: underline;
}

.book-direct-top {
  background: var(--color-primary-light);
  border: 2px solid var(--color-primary);
  text-align: center;
  padding: 12px 16px;
  border-radius: 12px;
  margin-top: 16px;
}

.book-direct-top a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.book-direct-top a:hover {
  text-decoration: underline;
}

/* Property-specific callout (HITS) */
.hits-callout {
  background: linear-gradient(135deg, #8b4513 0%, #d2691e 100%);
  color: white;
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  margin-top: 16px;
}

.hits-callout strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

/* Footer */
footer {
  text-align: center;
  padding: 30px 20px;
  color: #999;
  font-size: 0.85rem;
}

/* Desktop */
@media (min-width: 768px) {
  .hero-wrapper {
    background-color: var(--color-hero-bg);
  }

  .hero {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 20px;
    border-radius: 12px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .card {
    padding: 24px;
  }
}

/* Floating Menu Button */
.floating-menu-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.2s, background 0.2s;
}

.floating-menu-btn:hover {
  transform: scale(1.05);
  background: var(--color-primary-dark);
}

.floating-menu-btn:active {
  transform: scale(0.95);
}

/* Full-screen nav overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-nav-overlay);
  z-index: 1001;
  display: none;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}

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

.nav-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.nav-overlay-title {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

.nav-overlay-close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid white;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-overlay-close:hover {
  background: white;
  color: var(--color-primary);
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.nav-overlay-links a {
  display: block;
  background: var(--color-primary-dark);
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: background 0.2s;
}

.nav-overlay-links a:hover {
  background: white;
  color: var(--color-primary);
}

.nav-overlay-links a .nav-emoji {
  margin-right: 12px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  /* Reset page for binder printing */
  @page {
    size: letter;
    margin: 0.75in 0.75in 0.75in 1in; /* extra left margin for 3-hole punch */
  }

  /* Force white background, override any theme color bleed */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: white !important;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
    padding: 0;
    orphans: 3;
    widows: 3;
  }

  /* Hide interactive/web-only elements */
  .floating-menu-btn,
  .nav-overlay,
  .toc,
  .book-direct-top,
  .card:has(.toc) {
    display: none !important;
  }

  /* Hide hero image section */
  .hero-wrapper,
  .hero {
    display: none !important;
  }

  /* Print header: property name + "Guest Guide" with theme color accent */
  .container::before {
    content: attr(data-property-name) " | Guest Guide";
    display: block;
    font-size: 18pt;
    font-weight: 600;
    color: #000;
    padding: 0 0 10pt 0;
    margin-bottom: 12pt;
    border-bottom: 3pt solid var(--color-primary);
  }

  /* Container resets */
  .container {
    max-width: none;
    padding: 0;
  }

  /* Cards: completely invisible containers, allow page breaks within */
  .card {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 4pt 0 !important;
    margin-top: 0 !important;
    border: none !important;
  }

  /* Section headings: theme color accent keeps the personality */
  .card h2 {
    color: var(--color-primary);
    font-size: 13pt;
    border-bottom: 1.5pt solid var(--color-primary);
    padding-bottom: 3pt;
    margin-bottom: 8pt;
    page-break-after: avoid;
  }

  .card h3 {
    color: #333;
    font-size: 11pt;
    page-break-after: avoid;
    break-before: auto;
  }

  .card p,
  .card li {
    color: #333;
  }

  .card a {
    color: #333;
    text-decoration: none;
  }

  /* Don't show link URLs after every anchor - too cluttered */
  .card a::after {
    content: none;
  }

  /* Info tables */
  .info-table td {
    border-bottom-color: #ccc;
  }

  /* Numbered steps: use property theme color for circle */
  .steps li::before {
    background: var(--color-primary);
  }

  /* Highlight boxes: keep theme color for the accent border */
  .highlight-box {
    background: var(--color-primary-light) !important;
    border-left: 4pt solid var(--color-primary) !important;
  }

  .highlight-box.warning {
    background: #fff8e1 !important;
    border-left-color: #f9a825 !important;
  }

  .highlight-box.danger,
  .highlight-box.important {
    background: #fce4ec !important;
    border-left-color: #c62828 !important;
  }

  .highlight-box.info {
    background: #e3f2fd !important;
    border-left-color: #1565c0 !important;
  }

  /* HITS callout for print */
  .hits-callout {
    background: #fff3e0 !important;
    color: #000 !important;
    border: 1.5pt solid #8b4513;
    border-radius: 8px;
  }

  /* Book direct section: clean box with theme accent */
  .book-direct {
    background: var(--color-primary-light) !important;
    color: #000;
    border: 1.5pt solid var(--color-primary);
    border-radius: 8px;
    padding: 12pt !important;
    margin-top: 16pt !important;
    text-align: center;
  }

  .book-direct a {
    color: var(--color-primary);
    font-size: 12pt;
  }

  .book-direct p {
    color: #333;
  }

  /* Subtle separator between sections (not a visible box) */
  .card + .card {
    border-top: none;
    padding-top: 6pt;
  }

  /* Avoid orphaned headings - keep heading with following content */
  h2, h3 {
    page-break-after: avoid;
  }

  /* Avoid breaking inside compact content blocks */
  .highlight-box,
  .info-table,
  .steps,
  .book-direct {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Emoji sizing for print */
  .emoji {
    font-size: 1rem;
  }

  /* Footer */
  footer {
    color: #666;
    font-size: 9pt;
  }
}
