/* ------------------- */
/* Custom Properties   */
/* ------------------- */

:root {
  /* Retro Chicago Dog Directory Colors */
  --retro-beige: #F5E6C8;
  --retro-green: #3A6B35;
  --retro-red: #B94A2C;
  --retro-yellow: #E9B44C;
  --retro-brown: #C89F6A;
  --retro-shadow: rgba(58, 107, 53, 0.10);

  /* Neutral Colors */
  --color-text: #3A2C1A;
  --color-background: #F5E6C8;
  --color-white: #ffffff;
  --color-light-gray: #F8F3E6;
  --color-dark-gray: #555;

  /* Spacing from concept.md */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 2rem;     /* 32px */
  --space-xl: 4rem;     /* 64px */

  /* Typography from concept.md */
  --font-primary: 'Inter', 'Arial Rounded MT Bold', Arial, sans-serif;
  --font-display: 'Bebas Neue', 'Montserrat ExtraBold', 'League Spartan', Impact, sans-serif;

  /* Font Sizes (example scale) */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 3rem;
  --fs-4xl: 3.5rem; /* Matched to hero h1 */

  /* Shadows from concept.md */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

/* ------------------- */
/* CSS Reset           */
/* ------------------- */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.6;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* ------------------- */
/* Base Styles         */
/* ------------------- */

body {
  font-family: var(--font-primary);
  background-color: var(--retro-beige);
  color: var(--color-text);
  /* Optional: subtle paper texture effect */
  background-image: repeating-linear-gradient(135deg, #f7ecd6 0px, #f7ecd6 2px, transparent 2px, transparent 8px);
}

/* Retro stacked title */
.hero-title-group {
  text-align: center;
  margin-bottom: 0;
}
.retro-title {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.retro-title-red {
  color: var(--retro-red);
  display: block;
}
.retro-title-green {
  color: var(--retro-green);
  display: block;
}

/* Yellow block for hot dog image */
.hero-hotdog-img {
  display: block;
  margin: 0 auto;
  background: var(--retro-yellow);
  padding: 2.5rem 0 2rem 0;
  width: 100%;
  max-width: 600px;
  border-radius: 0;
  box-shadow: none;
}

/* Find a Chicago-Style Hot Dog headline */
.retro-find-headline {
  color: var(--retro-green);
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  text-align: left;
  margin: 2.5rem 0 1rem 0;
  padding-left: 2rem;
}

/* Try Something New Button */
.random-suggestion {
  text-align: center;
  margin: var(--space-lg) 0;
}

.try-something-new-btn {
  background: var(--retro-green);
  color: white;
  border: 3px solid var(--retro-brown);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  text-shadow: 1px 1px 0px var(--retro-shadow);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.try-something-new-btn:hover {
  background: var(--retro-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.random-suggestion-text {
  color: var(--color-text);
  font-size: var(--fs-base);
  margin: 0;
  font-style: italic;
}

/* Random Location Modal */
.random-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.random-modal-overlay.show {
  opacity: 1;
}

.random-modal {
  background: white;
  border-radius: var(--radius-lg);
  border: 4px solid var(--retro-brown);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  cursor: default;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.random-modal-overlay.show .random-modal {
  transform: translateY(0);
}

.random-modal-header {
  background: var(--retro-yellow);
  padding: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--retro-brown);
}

.random-modal-header h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--retro-red);
  margin: 0;
  text-shadow: 1px 1px 0px var(--retro-shadow);
}

.close-random-modal {
  background: none;
  border: none;
  font-size: var(--fs-2xl);
  color: var(--retro-red);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.close-random-modal:hover {
  background: var(--retro-red);
  color: white;
}

.random-modal-content {
  padding: var(--space-lg);
}

.random-location-card {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.random-location-image {
  flex: 1;
  max-width: 200px;
}

.random-location-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 3px solid var(--retro-brown);
  box-shadow: var(--shadow-md);
}

.random-location-info {
  flex: 2;
}

.random-location-name {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--retro-red);
  margin-bottom: var(--space-sm);
  text-shadow: 1px 1px 0px var(--retro-shadow);
}

.random-location-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.random-rating {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.random-rating .stars {
  color: var(--retro-yellow);
  font-size: var(--fs-lg);
}

.random-rating .rating-text {
  color: var(--retro-green);
  font-weight: 700;
}

.random-price {
  color: var(--retro-green);
  font-size: var(--fs-lg);
  font-weight: 700;
}

.random-location-description {
  color: var(--color-text);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.random-location-address {
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.random-location-specialties {
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.random-modal-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-tertiary {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--retro-brown);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background: var(--retro-red);
  color: white;
}

.btn-primary:hover {
  background: var(--retro-green);
  text-decoration: none;
}

.btn-secondary {
  background: var(--retro-yellow);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--retro-green);
  color: white;
  text-decoration: none;
}

.btn-tertiary {
  background: white;
  color: var(--retro-green);
  border-color: var(--retro-green);
}

.btn-tertiary:hover {
  background: var(--retro-green);
  color: white;
}

/* Header Random Button */
.header-random-btn {
  font-size: var(--fs-sm) !important;
  padding: var(--space-xs) var(--space-sm) !important;
  margin-left: var(--space-md);
  border-radius: var(--radius-sm);
}

/* Footer Random Section */
.footer-random-section {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-light-gray);
  margin-top: var(--space-md);
}

.footer-random-btn {
  font-size: var(--fs-base) !important;
  padding: var(--space-sm) var(--space-md) !important;
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
  .random-location-card {
    flex-direction: column;
    text-align: center;
  }
  
  .random-location-image {
    max-width: 100%;
  }
  
  .random-modal-actions {
    flex-direction: column;
  }
  
  .btn-primary, .btn-secondary, .btn-tertiary {
    width: 100%;
  }
  
  /* Mobile header button */
  .header-random-btn {
    display: none; /* Hide in mobile header to save space */
  }
  
  /* Mobile navigation adjustments */
  .main-nav {
    flex-wrap: wrap;
    gap: var(--space-xs);
  }
}

/* Search bar block */
.retro-search-bar {
  display: flex;
  align-items: center;
  background: var(--retro-yellow);
  border-radius: 2rem;
  padding: 1rem 2rem;
  margin: 0 2rem 2.5rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  max-width: 600px;
}
.retro-search-bar input[type="search"] {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  flex: 1;
  margin-left: 0.5rem;
  outline: none;
}
.retro-search-bar button {
  background: var(--retro-red);
  color: #fff;
  border: none;
  border-radius: 2rem;
  padding: 0.7rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin-left: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.retro-search-bar button:hover {
  background: var(--retro-green);
}

/* History section block */
.retro-history {
  display: flex;
  align-items: flex-start;
  background: transparent;
  margin: 2.5rem 0 0 0;
  padding: 0 2rem;
  position: relative;
}
.history-content {
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 2rem 2rem 2rem 2rem;
  max-width: 480px;
  margin-right: 2rem;
  z-index: 1;
}
.retro-history-title {
  color: var(--retro-red);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 1rem;
}
.retro-history-desc {
  color: var(--retro-green);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.retro-learn-more {
  color: var(--retro-red);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: underline;
}

/* Mascot image offset */
.history-mascot-img {
  position: relative;
  top: 2rem;
  left: -1.5rem;
  width: 180px;
  z-index: 0;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .retro-history {
    flex-direction: column;
    align-items: center;
  }
  .history-content {
    margin-right: 0;
    margin-bottom: 1.5rem;
  }
  .history-mascot-img {
    left: 0;
    top: 0;
    margin: 0 auto;
    display: block;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--retro-green);
  line-height: 1.05;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 0 var(--retro-shadow);
}

a {
  color: var(--retro-red);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

a:hover {
  color: var(--retro-green);
  text-decoration: underline;
}

/* --- Vintage/Old Men Enhancements for History Page --- */

/* Subtle paper texture overlay for history container */
.history-container::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  /* Public domain noise texture PNG, seamless */
  background: url('https://www.transparenttextures.com/patterns/old-mat.png'), 
              repeating-linear-gradient(135deg, #f7ecd6 0px, #f7ecd6 2px, transparent 2px, transparent 8px);
  mix-blend-mode: multiply;
  border-radius: 18px;
}

/* Vignette effect for hero image block */
.vignette {
  position: relative;
  overflow: hidden;
}
.vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 12px;
  box-shadow: 0 0 0 12px rgba(44, 32, 16, 0.08) inset, 0 0 32px 12px rgba(44,32,16,0.13) inset;
  z-index: 1;
}

/* Mustache SVG positioning for history page */
.mustache-svg {
  position: absolute;
  right: 18px;
  bottom: 12px;
  opacity: 0.18;
  z-index: 2;
  pointer-events: none;
}
@media (max-width: 700px) {
  .mustache-svg {
    width: 48px !important;
    right: 8px;
    bottom: 6px;
  }
}
