/* Guide Page Mobile-First Styles */

/* Section Color System */
:root {
  /* 0 Food & Farming - Warm Terracotta */
  --section-0: #c2703e;
  --section-0-light: #faf0e8;
  --section-0-dark: #9e5a30;
  /* 1 Getting Around - Deep Teal-Blue */
  --section-1: #2a7a8a;
  --section-1-light: #e8f4f6;
  --section-1-dark: #1e5f6d;
  /* 2 Energy & Home - Golden Honey */
  --section-2: #c49a2a;
  --section-2-light: #faf5e4;
  --section-2-dark: #a07e1e;
  /* 3 Waste & Recycling - Sage Green */
  --section-3: #6a8a5a;
  --section-3-light: #f0f5ec;
  --section-3-dark: #557048;
  /* 4 Nature & Outdoors - Forest Green */
  --section-4: #3a7a2a;
  --section-4-light: #edf5ea;
  --section-4-dark: #2d5f1e;
  /* 5 Community & Learning - Warm Plum */
  --section-5: #8a4a6a;
  --section-5-light: #f5edf2;
  --section-5-dark: #6e3a55;
  /* 6 Government Resources (Your Town) - Slate Blue */
  --section-6: #4a6a8a;
  --section-6-light: #ecf1f5;
  --section-6-dark: #3a5570;
  /* 7 Goods & Services (Shopping) - Warm Brown */
  --section-7: #8b6914;
  --section-7-light: #faf6e8;
  --section-7-dark: #6d5210;
  /* Dynamic section color (set by JS on .guide-content) */
  --section-color: var(--color-accent);
  --section-color-light: var(--color-bg-cream);
  --section-color-dark: var(--color-accent-dark);
}

/* FontAwesome Icon Utility */
.fa-icon {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-style: normal;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1;
}

.fa-icon--seedling::before { content: '\f4d8'; }
.fa-icon--bicycle::before { content: '\f206'; }
.fa-icon--bolt::before { content: '\f0e7'; }
.fa-icon--recycle::before { content: '\f1b8'; }
.fa-icon--tree::before { content: '\f1bb'; }
.fa-icon--book-open::before { content: '\f518'; }
.fa-icon--landmark::before { content: '\f66f'; }
.fa-icon--house::before { content: '\f015'; }
.fa-icon--calendar::before { content: '\f073'; }
.fa-icon--clipboard-list::before { content: '\f46d'; }
.fa-icon--bars::before { content: '\f0c9'; }
.fa-icon--arrow-left::before { content: '\f060'; }
.fa-icon--compass::before { content: '\f14e'; }
.fa-icon--shopping-bag::before { content: '\f290'; }

/* Full Viewport Mobile Setup */
.guide-body {
  height: 100vh;
  overflow: hidden;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
}

/* Top Navbar (program-style: Guide + section icons + close) */
.guide-top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-cream);
  box-shadow: 0 2px 12px rgba(26, 95, 109, 0.08);
  z-index: 1000;
  height: 60px;
}

.guide-top-nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 45%, var(--color-golden) 75%, var(--color-coral) 100%);
}

.guide-nav-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 0 var(--spacing-md);
  height: 100%;
}

.guide-nav-home {
  flex-shrink: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  padding: 0.375rem 0.5rem;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.guide-nav-home:hover {
  background-color: var(--color-nav-hover);
  color: var(--color-accent-dark);
}

.guide-nav-home:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.guide-nav-sections {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Mobile: menu button visible, icons hidden */
.guide-nav-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--color-accent);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.guide-nav-menu-btn:hover {
  background-color: var(--color-nav-hover);
  color: var(--color-accent-dark);
}

.guide-nav-menu-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.guide-nav-menu-btn .fa-icon {
  font-size: 1.1rem;
}

.guide-nav-icons {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.guide-nav-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--color-accent);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.guide-nav-icon:hover,
.guide-nav-icon:focus-visible {
  background-color: var(--color-nav-hover);
  color: var(--color-accent-dark);
}

.guide-nav-icon:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.guide-nav-icon .fa-icon {
  font-size: 1.1rem;
}

/* Text label: hidden when showing icons only; shown on wide screens */
.guide-nav-icon-label {
  display: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Tooltip: show section name on hover/focus when icon-only (below icon, above content) */
.guide-nav-icon::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.25rem 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  background: var(--color-accent-dark);
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 1001;
}

.guide-nav-icon:hover::after,
.guide-nav-icon:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

/* Active section icon color (0=Shopping/Goods & Services=color 7, 1-7=Food..Government=colors 0-6) */
.guide-nav-icon.active[data-section="0"] { color: var(--section-7); }
.guide-nav-icon.active[data-section="1"] { color: var(--section-0); }
.guide-nav-icon.active[data-section="2"] { color: var(--section-1); }
.guide-nav-icon.active[data-section="3"] { color: var(--section-2); }
.guide-nav-icon.active[data-section="4"] { color: var(--section-3); }
.guide-nav-icon.active[data-section="5"] { color: var(--section-4); }
.guide-nav-icon.active[data-section="6"] { color: var(--section-5); }
.guide-nav-icon.active[data-section="7"] { color: var(--section-6); }

.guide-nav-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
  color: var(--color-accent);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.guide-nav-close:hover {
  background-color: var(--color-nav-hover);
  color: var(--color-accent-dark);
}

.guide-nav-close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Mobile (< 768px): dropdown only; hide close × and section icons; show hamburger */
@media (max-width: 767px) {
  .guide-nav-close {
    display: none;
  }
}

/* Tablet / medium (768px+): show icons only, hide menu button, show close × */
@media (min-width: 768px) {
  .guide-top-nav {
    height: 64px;
  }

  .guide-nav-home {
    font-size: 1.375rem;
  }

  .guide-nav-menu-btn {
    display: none;
  }

  .guide-nav-icons {
    display: flex;
  }

  /* Icon-only: tooltip on hover */
  .guide-nav-icon-label {
    display: none;
  }
}

/* Wide (1100px+): show icon + text in navbar; no tooltip needed */
@media (min-width: 1200px) {
  .guide-nav-icon {
    width: auto;
    padding: 0.375rem 0.5rem;
    gap: 0.35rem;
  }

  .guide-nav-icon-label {
    display: inline;
  }

  /* Hide tooltip when text label is visible */
  .guide-nav-icon::after {
    display: none;
  }
}

/* Mobile dropdown / pullout menu (sections list below navbar) */
.pullout-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.pullout-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.pullout-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  background: var(--color-card-bg);
  box-shadow: 0 4px 12px rgba(60, 40, 20, 0.15);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.pullout-menu.open {
  max-height: 70vh;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
}

@media (min-width: 768px) {
  .pullout-menu {
    top: 64px;
  }
}

.pullout-menu-list {
  list-style: none;
  margin: 0;
  padding: var(--spacing-md) 0;
}

.pullout-menu-item {
  padding: var(--spacing-md) var(--spacing-lg);
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: background-color 0.25s ease-out, border-color 0.25s ease-out;
  color: var(--color-text-primary);
  font-size: 1rem;
}

.pullout-menu-item:hover {
  background-color: rgba(45, 80, 22, 0.05);
}

.pullout-menu-item.active {
  background-color: rgba(45, 80, 22, 0.1);
  border-left-color: var(--color-accent);
  color: var(--color-accent);
  font-weight: 600;
}

.pullout-menu-item-back {
  font-weight: 600;
  border-bottom: 1px solid rgba(45, 80, 22, 0.1);
  margin-bottom: var(--spacing-xs);
}

.pullout-menu-item-back:hover {
  background-color: rgba(26, 95, 109, 0.08);
}

.pullout-menu-item-home {
  border-bottom: 1px solid rgba(45, 80, 22, 0.1);
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
}

.pullout-menu-item-home.active {
  background-color: rgba(45, 80, 22, 0.15);
  border-left-color: var(--color-accent);
  color: var(--color-accent);
}

/* Main Content Area (single navbar; bottom nav removed) */
.guide-content {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: var(--color-card-bg);
}

.guide-content.title-screen-active {
  top: 60px;
  bottom: 0;
}

@media (min-width: 768px) {
  .guide-content {
    top: 64px;
  }

  .guide-content.title-screen-active {
    top: 64px;
  }
}

/* Title Screen Styles */
.title-screen-section {
  display: block;
}

.title-screen-content {
  text-align: center;
  padding: var(--spacing-md);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  justify-content: space-between;
  min-height: 0;
}

/* Section title screens should use normal flex flow, not space-between */
.guide-section .title-screen-content {
  justify-content: flex-start;
}

.title-screen-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0;
  line-height: 1.3;
  flex-shrink: 0;
  padding: var(--spacing-sm) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title-screen-line1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.title-screen-line2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 0.2rem;
  line-height: 1.2;
}

.title-screen-date {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin: 0;
  flex-shrink: 0;
  padding: var(--spacing-xs) 0;
}

/* Section Panels Grid */
.section-panels-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(8, 1fr);
  gap: 0;
  flex: 1 1 0;
  width: 100%;
  max-width: 100%;
  margin: var(--spacing-sm) 0 0 0;
  min-height: 0;
  overflow: visible;
}

/* Section title screens should use auto rows instead of fixed 6 rows */
.guide-section .section-panels-grid {
  grid-template-rows: auto;
  flex: 0 1 auto;
  min-height: auto;
}

/* Title screen panels slightly more compact */
.title-screen-section .section-panel {
  padding: var(--spacing-md);
}

/* Title screen: base grid uses section-panels-grid defaults;
   mobile-specific overrides are defined in a max-width media query below. */
.title-screen-section .section-panels-grid {
}

/* Mobile (phones): show title screen panels in a 2×4 grid and tighten spacing
   so all 8 panels plus the Festival Program button fit within one viewport. */
@media (max-width: 767px) {
  .title-screen-content {
    padding: var(--spacing-sm);
  }

  .title-screen-heading {
    font-size: 1.25rem;
    padding: var(--spacing-xs) 0;
  }

  .title-screen-line1 {
    font-size: 1.35rem;
  }

  .title-screen-line2 {
    font-size: 0.95rem;
  }

  .title-screen-section .section-panels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }

  .title-screen-section .section-panel {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .title-screen-section .section-panel h3 {
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1;
  }

  .title-screen-section .section-panel .section-panel-icon {
    line-height: 1;
    margin-bottom: -0.1rem;
  }

  .guide-festival-button {
    margin-top: var(--spacing-sm);
    font-size: 0.95rem;
  }
}

.section-panel {
  background: white;
  border: none;
  border-top: 1px solid rgba(60, 40, 20, 0.12);
  border-bottom: 1px solid rgba(60, 40, 20, 0.12);
  padding: var(--spacing-lg);
  transition: background-color 0.25s ease-out, transform 0.1s ease;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.section-panel:first-child {
  border-top: 2px solid rgba(60, 40, 20, 0.15);
}

.section-panel:last-child {
  border-bottom: 2px solid rgba(60, 40, 20, 0.15);
}

.section-panel:hover {
  background-color: rgba(45, 80, 22, 0.05);
  transform: scale(1.02);
}

.section-panel:active {
  background-color: rgba(45, 80, 22, 0.1);
  transform: scale(0.98);
}

.section-panel h3 {
  margin: 0 0 var(--spacing-xs) 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1.3;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.section-panel p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.section-panel p em {
  font-style: italic;
  font-weight: 400;
}

/* 8th card: Festival Program poster link (title screen only) */
.guide-hero-program-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  background: white;
  border-top: 1px solid rgba(60, 40, 20, 0.12);
  border-bottom: 2px solid rgba(60, 40, 20, 0.15);
  padding: var(--spacing-lg);
  transition: background-color 0.25s ease-out, transform 0.1s ease;
  cursor: pointer;
  flex: 1;
  max-width: 100%;
  min-height: 0;
}
.guide-hero-program-card:hover {
  background-color: rgba(244, 126, 96, 0.08);
  transform: scale(1.02);
}
.guide-hero-program-card:active {
  transform: scale(0.98);
}
.guide-hero-program-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.guide-hero-program-card__globe {
  width: 80px;
  height: 80px;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: var(--spacing-xs);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(60, 40, 20, 0.12);
}
.guide-hero-program-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-coral, #f47e60);
  line-height: 1.3;
  margin-bottom: 0.15rem;
}
.guide-hero-program-card__subtitle {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1.2;
}

.guide-section {
  display: none;
  height: 100%;
  width: 100%;
}

/* Title screen shown by default until JS takes over */
.guide-section.title-screen-section {
  display: block;
}

.guide-screen {
  display: none;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: var(--spacing-md);
  animation: fadeIn 0.3s ease;
  box-sizing: border-box;
}

/* Title screen specific - remove padding to maximize space */
.title-screen-section .guide-screen {
  padding: 0;
}

.guide-screen.screen-active {
  display: block;
}

.guide-screen.screen-hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen-content {
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: var(--spacing-xl);
}

/* Paragraph Styling for Beautiful, Professional Text */
.screen-content p {
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
  color: var(--color-text-primary);
}

.screen-content p:last-child {
  margin-bottom: 0;
}

/* List Styling - Proper Indentation and Spacing */
.screen-content ul,
.screen-content ol {
  margin-left: 1.5rem;
  margin-bottom: var(--spacing-md);
  padding-left: 0.5rem;
  color: var(--color-text-primary);
}

.screen-content ul:last-child,
.screen-content ol:last-child {
  margin-bottom: 0;
}

/* List Item Styling - Proper Spacing and Readability */
.screen-content li {
  margin-bottom: var(--spacing-xs);
  line-height: 1.7;
  padding-left: 0.25rem;
}

.screen-content li:last-child {
  margin-bottom: 0;
}

/* Heading Spacing - Ensure Proper Spacing After Headings */
.screen-content h3 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.screen-content h3:first-child {
  margin-top: 0;
}

.screen-content h3 + p,
.screen-content h3 + ul,
.screen-content h3 + ol {
  margin-top: 0;
}

.screen-content h4 {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.screen-content h4 + p,
.screen-content h4 + ul,
.screen-content h4 + ol {
  margin-top: 0;
}

.screen-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--section-color, var(--color-accent));
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

/* Hide screen title when no-title class is applied */
.screen-content.no-title .screen-title {
  display: none;
}

/* Event Main Info Styles */
.event-main-info {
  text-align: center;
}

.event-time {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: var(--spacing-md) 0;
}

.event-date {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-lg);
}

.event-location {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-lg);
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.location-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--spacing-xs);
}

.location-address {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
}

.event-description {
  margin-top: var(--spacing-lg);
  font-size: 1rem;
  color: var(--color-text-primary);
}

/* Navigation Controls (bottom bar removed; styles kept for reference) */
.nav-btn {
  background: transparent;
  color: var(--section-color, var(--color-accent));
  border: 1.5px solid var(--section-color, var(--color-accent));
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s ease-out, border-color 0.25s ease-out, color 0.25s ease-out, transform 0.1s ease;
  min-width: 90px;
}

.nav-btn:hover:not(.disabled) {
  background: var(--section-color-light, rgba(26, 95, 109, 0.08));
  border-color: var(--section-color-dark, var(--color-accent-dark));
  color: var(--section-color-dark, var(--color-accent-dark));
  transform: translateY(-1px);
}

.nav-btn:active:not(.disabled) {
  transform: translateY(0);
}

.nav-btn.disabled {
  border-color: rgba(60, 40, 20, 0.2);
  color: rgba(60, 40, 20, 0.3);
  background: transparent;
  cursor: not-allowed;
  opacity: 0.5;
}

.screen-indicator {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  padding: 0 var(--spacing-md);
}

/* Sponsor Grid */
.sponsor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.sponsor-card {
  background: white;
  border-radius: 16px;
  padding: var(--spacing-md);
  box-shadow: 0 4px 6px rgba(60, 40, 20, 0.08), 0 2px 4px rgba(60, 40, 20, 0.05);
  border: 1px solid rgba(60, 40, 20, 0.1);
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.sponsor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.sponsor-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--color-accent);
}

.sponsor-logo {
  max-width: 150px;
  max-height: 80px;
  margin-bottom: var(--spacing-sm);
}

.sponsor-category-name {
  color: var(--color-accent);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-xs);
}

/* Sponsor Categories with Font Size Hierarchy */
.sponsor-categories {
  margin: var(--spacing-lg) 0;
}

.sponsor-category {
  margin-bottom: var(--spacing-md);
}

.sponsor-category h3 {
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.sponsor-category p {
  margin: var(--spacing-xs) 0;
}

/* Category Sponsors - Largest */
.sponsor-category-category {
  font-size: 1.5rem;
}

.sponsor-category-category h3 {
  font-size: 1.75rem;
}

/* Sustainable Sponsors - Smaller than Category */
.sponsor-category-sustainable {
  font-size: 1.25rem;
}

.sponsor-category-sustainable h3 {
  font-size: 1.5rem;
}

/* Advertising and Exhibiting Sponsors - Smaller than Sustainable */
.sponsor-category-exhibiting {
  font-size: 1.125rem;
}

.sponsor-category-exhibiting h3 {
  font-size: 1.375rem;
}

/* Prize Sponsors - Smallest */
.sponsor-category-prize {
  font-size: 1rem;
}

.sponsor-category-prize h3 {
  font-size: 1.25rem;
}

/* Business Name Font Sizes for Goods & Services */
.business-name-category {
  font-size: 1.5rem;
}

.business-name-sustaining {
  font-size: 1.25rem;
}

.business-name-advertising {
  font-size: 1.125rem;
}

.business-name-prize {
  font-size: 1rem;
}

/* Business Name Link Styling */
.business-name-category,
.business-name-sustaining,
.business-name-advertising,
.business-name-prize {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.business-name-category:hover,
.business-name-sustaining:hover,
.business-name-advertising:hover,
.business-name-prize:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* Event List */
.event-list {
  margin: var(--spacing-lg) 0;
}

.event-item {
  background: white;
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--section-color, var(--color-accent));
}

.event-time {
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--spacing-xs);
}

/* Resource Grid */
.resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.resource-card {
  background: white;
  border-radius: 16px;
  padding: var(--spacing-lg);
  box-shadow: 0 4px 6px rgba(60, 40, 20, 0.08), 0 2px 4px rgba(60, 40, 20, 0.05);
  border: 1px solid rgba(60, 40, 20, 0.1);
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(60, 40, 20, 0.1), 0 6px 8px rgba(60, 40, 20, 0.06);
  border-color: rgba(60, 40, 20, 0.18);
}

.resource-card h3 {
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--section-color, var(--color-accent));
  line-height: 1.3;
  border-bottom: 2px solid rgba(60, 40, 20, 0.12);
  padding-bottom: var(--spacing-xs);
}

.resource-card p {
  margin-bottom: var(--spacing-sm);
  line-height: 1.7;
  color: var(--color-text-primary);
}

.resource-card .card-description {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
  font-size: 1rem;
}

.contact-info {
  margin-top: auto;
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(60, 40, 20, 0.1);
}

.contact-item {
  margin-bottom: var(--spacing-xs);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-xs);
  font-size: 0.95rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-label {
  font-weight: 600;
  color: var(--section-color, var(--color-accent));
  min-width: 80px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-value {
  flex: 1;
  color: var(--color-text-primary);
  word-break: break-word;
}

.contact-value a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-value a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

.contact-value a[href^="tel:"] {
  font-weight: 500;
}

.contact-value a[href^="mailto:"] {
  word-break: break-all;
}

/* Primer Subtitle */
.primer-subtitle {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-accent);
  margin: var(--spacing-xs) 0 var(--spacing-lg);
}

/* Goods & Services Category Links */
.goods-services-categories {
  margin: var(--spacing-lg) 0;
  text-align: left;
}

.goods-services-categories p {
  margin: var(--spacing-md) 0;
  text-align: left;
}

.goods-services-categories .category-link {
  color: var(--color-link);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration 0.2s ease;
  display: inline-block;
  padding: var(--spacing-xs) 0;
}

.goods-services-categories .category-link:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* Government List Styles */
.government-list {
  margin: var(--spacing-lg) 0;
}

.government-level-group {
  margin-bottom: var(--spacing-xl);
  background: white;
  border-radius: 16px;
  padding: var(--spacing-md);
  box-shadow: 0 4px 6px rgba(60, 40, 20, 0.08), 0 2px 4px rgba(60, 40, 20, 0.05);
  border: 1px solid rgba(60, 40, 20, 0.1);
}

.government-level-header {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--section-color, var(--color-accent));
  margin: 0 0 var(--spacing-md) 0;
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid rgba(60, 40, 20, 0.15);
}

.government-org-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.government-org-list li {
  margin: var(--spacing-sm) 0;
  padding: var(--spacing-xs) 0;
}

.government-org-link {
  color: var(--color-link);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
  padding: var(--spacing-xs) 0;
  padding-left: 0;
}

.government-org-link:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
  padding-left: var(--spacing-xs);
}

/* Government Services List (for main orgs with multiple services) */
.government-services-list {
  margin: var(--spacing-lg) 0;
}

.government-services-list p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
  font-weight: 500;
}

.government-service-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.government-service-links li {
  margin: var(--spacing-sm) 0;
  padding: var(--spacing-xs) 0;
}

.government-service-link {
  color: var(--color-link);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
  padding: var(--spacing-xs) 0;
  padding-left: 0;
}

.government-service-link:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
  padding-left: var(--spacing-xs);
}

/* Utility Classes */
.text-center-mt-md {
  text-align: center;
  margin-top: var(--spacing-md);
}

/* ================================ */
/* Cover Page / Title Screen        */
/* ================================ */

.cover-poster {
  max-width: 220px;
  margin: 0 auto;
  flex-shrink: 0;
}

.cover-poster img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(60, 40, 20, 0.15);
}

.title-screen-line1 {
  font-family: 'Playfair Display', serif;
  color: var(--color-forest, #2d5016);
}

.cover-program-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  background: var(--color-coral, #f47e60);
  color: white;
  text-decoration: none;
  border-radius: 16px;
  padding: var(--spacing-sm) var(--spacing-lg);
  max-width: 340px;
  margin: var(--spacing-sm) auto;
  transition: background-color 0.25s ease-out, transform 0.15s ease-out, box-shadow 0.25s ease-out;
  flex-shrink: 0;
}

.cover-program-link:hover {
  background: #e06045;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(244, 126, 96, 0.3);
}

.cover-program-link:active {
  transform: translateY(0);
}

.cover-program-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.cover-program-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.cover-program-title {
  font-weight: 700;
  font-size: 1rem;
}

.cover-program-subtitle {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.9;
}

/* Section Panel Icons (on cover page) */
.section-panel-icon {
  font-size: 1.4rem;
  margin-bottom: var(--spacing-xs);
  display: block;
  color: var(--color-accent);
}

/* Section-specific panel colors on title screen */
.title-screen-section .section-panel[data-section-color="0"] { border-left: 4px solid var(--section-0); }
.title-screen-section .section-panel[data-section-color="1"] { border-left: 4px solid var(--section-1); }
.title-screen-section .section-panel[data-section-color="2"] { border-left: 4px solid var(--section-2); }
.title-screen-section .section-panel[data-section-color="3"] { border-left: 4px solid var(--section-3); }
.title-screen-section .section-panel[data-section-color="4"] { border-left: 4px solid var(--section-4); }
.title-screen-section .section-panel[data-section-color="5"] { border-left: 4px solid var(--section-5); }
.title-screen-section .section-panel[data-section-color="6"] { border-left: 4px solid var(--section-6); }
.title-screen-section .section-panel[data-section-color="7"] { border-left: 4px solid var(--section-7); }

.title-screen-section .section-panel[data-section-color="0"] .section-panel-icon { color: var(--section-0); }
.title-screen-section .section-panel[data-section-color="1"] .section-panel-icon { color: var(--section-1); }
.title-screen-section .section-panel[data-section-color="2"] .section-panel-icon { color: var(--section-2); }
.title-screen-section .section-panel[data-section-color="3"] .section-panel-icon { color: var(--section-3); }
.title-screen-section .section-panel[data-section-color="4"] .section-panel-icon { color: var(--section-4); }
.title-screen-section .section-panel[data-section-color="5"] .section-panel-icon { color: var(--section-5); }
.title-screen-section .section-panel[data-section-color="6"] .section-panel-icon { color: var(--section-6); }
.title-screen-section .section-panel[data-section-color="7"] .section-panel-icon { color: var(--section-7); }

.title-screen-section .section-panel[data-section-color="0"] h3 { color: var(--section-0); }
.title-screen-section .section-panel[data-section-color="1"] h3 { color: var(--section-1); }
.title-screen-section .section-panel[data-section-color="2"] h3 { color: var(--section-2); }
.title-screen-section .section-panel[data-section-color="3"] h3 { color: var(--section-3); }
.title-screen-section .section-panel[data-section-color="4"] h3 { color: var(--section-4); }
.title-screen-section .section-panel[data-section-color="5"] h3 { color: var(--section-5); }
.title-screen-section .section-panel[data-section-color="6"] h3 { color: var(--section-6); }
.title-screen-section .section-panel[data-section-color="7"] h3 { color: var(--section-7); }

.title-screen-section .section-panel[data-section-color="0"]:hover { background-color: var(--section-0-light); }
.title-screen-section .section-panel[data-section-color="1"]:hover { background-color: var(--section-1-light); }
.title-screen-section .section-panel[data-section-color="2"]:hover { background-color: var(--section-2-light); }
.title-screen-section .section-panel[data-section-color="3"]:hover { background-color: var(--section-3-light); }
.title-screen-section .section-panel[data-section-color="4"]:hover { background-color: var(--section-4-light); }
.title-screen-section .section-panel[data-section-color="5"]:hover { background-color: var(--section-5-light); }
.title-screen-section .section-panel[data-section-color="6"]:hover { background-color: var(--section-6-light); }
.title-screen-section .section-panel[data-section-color="7"]:hover { background-color: var(--section-7-light); }

/* ================================ */
/* Progress Bar in Bottom Nav       */
/* ================================ */

.nav-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.nav-progress-track {
  width: 100%;
  max-width: 100px;
  height: 3px;
  background: rgba(60, 40, 20, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.nav-progress-fill {
  height: 100%;
  background: var(--section-color, var(--color-accent));
  border-radius: 2px;
  transition: width 0.3s ease-out, background-color 0.25s ease-out;
  width: 0%;
}

/* ================================ */
/* Pullout Menu Polish              */
/* ================================ */

.pullout-menu {
  background: #faf7f2;
}

.pullout-icon {
  display: inline-block;
  width: 1.5em;
  text-align: center;
  margin-right: var(--spacing-sm);
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.pullout-menu-item.active .pullout-icon {
  color: inherit;
}

.pullout-divider {
  height: 1px;
  background: rgba(60, 40, 20, 0.1);
  margin: var(--spacing-xs) var(--spacing-lg);
  list-style: none;
}

.pullout-menu-item-program:hover {
  background-color: rgba(244, 126, 96, 0.06);
}

/* Section-specific active colors in pullout menu */
.pullout-menu-item[data-section-color="0"].active { border-left-color: var(--section-0); color: var(--section-0); }
.pullout-menu-item[data-section-color="1"].active { border-left-color: var(--section-1); color: var(--section-1); }
.pullout-menu-item[data-section-color="2"].active { border-left-color: var(--section-2); color: var(--section-2); }
.pullout-menu-item[data-section-color="3"].active { border-left-color: var(--section-3); color: var(--section-3); }
.pullout-menu-item[data-section-color="4"].active { border-left-color: var(--section-4); color: var(--section-4); }
.pullout-menu-item[data-section-color="5"].active { border-left-color: var(--section-5); color: var(--section-5); }
.pullout-menu-item[data-section-color="6"].active { border-left-color: var(--section-6); color: var(--section-6); }
.pullout-menu-item[data-section-color="7"].active { border-left-color: var(--section-7); color: var(--section-7); }

/* Desktop Layout */
@media (min-width: 768px) {
  .guide-content {
    top: 64px;
  }

  .cover-poster {
    max-width: 300px;
  }

  .nav-progress-track {
    max-width: 120px;
  }

  .screen-content {
    max-width: 800px;
    padding: var(--spacing-lg);
  }

  .screen-title {
    font-size: 2rem;
  }

  .sponsor-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .title-screen-heading {
    font-size: 2rem;
    padding: var(--spacing-md) 0;
  }

  .title-screen-line1 {
    font-size: 2rem;
  }

  .title-screen-line2 {
    font-size: 1.4rem;
  }

  .title-screen-date {
    font-size: 1.2rem;
    padding: var(--spacing-sm) 0;
  }

  .section-panels-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    margin-top: var(--spacing-md);
  }

  .section-panel {
    border: 1px solid rgba(60, 40, 20, 0.12);
    border-right: none;
  }

  .section-panel:nth-child(2n) {
    border-right: 1px solid rgba(60, 40, 20, 0.12);
  }

  .section-panel:first-child,
  .section-panel:nth-child(2) {
    border-top: 2px solid rgba(60, 40, 20, 0.15);
  }

  .section-panel:nth-last-child(1),
  .section-panel:nth-last-child(2) {
    border-bottom: 2px solid rgba(60, 40, 20, 0.15);
  }

  .title-screen-section .section-panels-grid .guide-hero-program-card {
    border: 1px solid rgba(60, 40, 20, 0.12);
    border-right: 1px solid rgba(60, 40, 20, 0.12);
    border-bottom: 2px solid rgba(60, 40, 20, 0.15);
  }

  .section-panel h3 {
    font-size: 1.2rem;
  }

  .section-panel-icon {
    font-size: 1.6rem;
  }

  .guide-hero-program-card__globe {
    width: 72px;
    height: 72px;
  }
  .guide-hero-program-card__title {
    font-size: 1.2rem;
  }
  .guide-hero-program-card__subtitle {
    font-size: 0.9rem;
  }
}

@media (min-width: 1024px) {
  .guide-content {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .guide-section {
    flex-direction: row;
    min-width: 100%;
    flex-shrink: 0;
  }

  .guide-screen {
    min-width: 100%;
    flex-shrink: 0;
    display: block;
    padding: var(--spacing-xl);
  }

  .guide-screen.screen-hidden {
    display: none;
  }

  .screen-content {
    max-width: 900px;
  }

  .sponsor-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .resource-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .title-screen-heading {
    font-size: 2.5rem;
    padding: var(--spacing-lg) 0;
  }

  .title-screen-line1 {
    font-size: 2.5rem;
  }

  .title-screen-line2 {
    font-size: 1.6rem;
  }

  .title-screen-date {
    font-size: 1.3rem;
    padding: var(--spacing-sm) 0;
  }

  .section-panels-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    max-width: 1000px;
    margin: var(--spacing-md) auto 0;
  }

  .section-panel {
    border: 1px solid rgba(60, 40, 20, 0.12);
    border-right: none;
    border-bottom: none;
  }

  .section-panel:nth-child(4n) {
    border-right: 1px solid rgba(60, 40, 20, 0.12);
  }

  .section-panel:nth-child(1),
  .section-panel:nth-child(2),
  .section-panel:nth-child(3),
  .section-panel:nth-child(4) {
    border-top: 2px solid rgba(60, 40, 20, 0.15);
  }

  .section-panel:nth-child(5),
  .section-panel:nth-child(6),
  .section-panel:nth-child(7),
  .section-panel:nth-child(8) {
    border-bottom: 2px solid rgba(60, 40, 20, 0.15);
  }

  .title-screen-section .section-panels-grid .guide-hero-program-card {
    border: 1px solid rgba(60, 40, 20, 0.12);
    border-right: 1px solid rgba(60, 40, 20, 0.12);
    border-bottom: 2px solid rgba(60, 40, 20, 0.15);
  }

  .section-panel h3 {
    font-size: 1.3rem;
  }

  .section-panel-icon {
    font-size: 1.8rem;
  }

  /* Title screen: fit in one viewport, no scrolling */
  .title-screen-section .guide-screen {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .title-screen-section .title-screen-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .title-screen-section .title-screen-heading {
    padding: var(--spacing-sm) 0;
    flex-shrink: 0;
  }
  .title-screen-section .section-panels-grid {
    margin-top: var(--spacing-sm);
    flex: 1 1 0;
    min-height: 0;
  }
  .title-screen-section .guide-festival-button {
    flex-shrink: 0;
    margin-top: var(--spacing-md);
    margin-left: auto;
    margin-right: auto;
  }

  .guide-hero-program-card__globe {
    width: 64px;
    height: 64px;
  }
  .guide-hero-program-card__title {
    font-size: 1.15rem;
  }
  .guide-hero-program-card__subtitle {
    font-size: 0.8rem;
  }

  .cover-poster {
    max-width: 360px;
  }

  .nav-progress-track {
    max-width: 160px;
  }
}

/* Floating Scroll Arrows */
.scroll-arrow {
  position: fixed;
  z-index: 997;
  width: 48px;
  height: 48px;
  min-width: 44px;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 2px solid var(--section-color, rgba(45, 80, 22, 0.3));
  border-radius: 50%;
  color: var(--section-color, rgba(45, 80, 22, 1));
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease-out, transform 0.25s ease-out, background-color 0.25s ease-out;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 4px 12px rgba(60, 40, 20, 0.12), 0 2px 4px rgba(60, 40, 20, 0.08);
  padding: 0;
  margin: 0;
}

.scroll-arrow.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-arrow:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(60, 40, 20, 0.15), 0 3px 6px rgba(60, 40, 20, 0.1);
}

.scroll-arrow:active {
  transform: scale(0.95);
}

.scroll-arrow:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.scroll-arrow-up {
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-arrow-down {
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-arrow-up.visible {
  transform: translateX(-50%);
}

.scroll-arrow-down.visible {
  transform: translateX(-50%);
}

.scroll-arrow-up.visible:hover {
  transform: translateX(-50%) scale(1.1);
}

.scroll-arrow-down.visible:hover {
  transform: translateX(-50%) scale(1.1);
}

.scroll-arrow-up.visible:active {
  transform: translateX(-50%) scale(0.95);
}

.scroll-arrow-down.visible:active {
  transform: translateX(-50%) scale(0.95);
}

.scroll-arrow span {
  line-height: 1;
  display: block;
}

/* Desktop adjustments */
@media (min-width: 768px) {
  .scroll-arrow {
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
  }

  .scroll-arrow-up {
    top: 115px;
  }

  .scroll-arrow-down {
    bottom: 65px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}
