/* Main stylesheet for USAMap.net */

/* Base Styles */
:root {
  --primary: #0052A5;
  --secondary: #D22730;
  --light: #f8f9fa;
  --dark: #212529;
  --accent: #3A7D44;
  --gray: #6c757d;
  --light-gray: #dee2e6;
}

/* Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: var(--dark);
}

p {
  margin-bottom: 1.2rem;
}

strong {
  font-weight: 700;
  color: var(--primary);
}

em {
  font-style: italic;
  color: var(--secondary);
}

/* Links */
a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.3s;
}

a:hover, a:focus {
  color: var(--secondary);
  text-decoration: underline;
}

/* Lists */
ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.figure {
  margin-bottom: 1.5rem;
}

figcaption {
  font-size: 0.9rem;
  color: var(--gray);
  text-align: center;
  padding-top: 0.5rem;
}

/* Buttons */
.button {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.2s;
}

.button:hover, .button:focus {
  background-color: var(--secondary);
  color: white;
  transform: translateY(-2px);
}

.cta-button {
  text-align: center;
  margin: 2rem 0;
}

/* Affiliate Banner Styles */
.affiliate-banner-container {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
}

.affiliate-leaderboard {
  width: 100%;
  max-width: 728px;
  margin: 2rem auto;
}

.affiliate-rectangle {
  margin: 2rem auto;
  max-width: 300px;
}

/* Hero section with flanking banners */
.hero-with-banners {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 0;
  width: 100%;
  margin: 0 auto;
}

.hero-left-banner,
.hero-right-banner {
  flex: 0 0 auto;
  width: 300px;
  min-width: 250px;
  height: 250px;
  overflow: hidden;
  display: inline-block;
}

.hero-left-banner > *,
.hero-right-banner > * {
  width: 300px !important;
  height: 250px !important;
  display: inline-block !important;
}

.hero-center-content {
  flex: 0 1 auto;
  text-align: center;
  max-width: 500px;
  padding: 0 1rem;
}

.hero-center-content h1 {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.hero-center-content p {
  font-size: 1.1rem;
  margin: 0;
}

/* Force horizontal layout for screens 993px and up */
@media (min-width: 993px) {
  .hero-with-banners {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }
  
  .hero-left-banner,
  .hero-right-banner {
    display: block !important;
    flex: 0 0 300px !important;
  }
  
  .hero-center-content {
    flex: 1 1 auto !important;
  }
}

/* Laptops and smaller desktops */
@media (max-width: 1400px) {
  .hero-with-banners {
    gap: 1.5rem;
  }
  
  .hero-left-banner,
  .hero-right-banner {
    flex: 0 0 250px;
  }
  
  .hero-left-banner > div,
  .hero-right-banner > div {
    width: 250px !important;
    height: 200px !important;
  }
  
  .hero-center-content h1 {
    font-size: 2rem;
  }
}

/* Tablets - switch to vertical layout */
@media (max-width: 992px) {
  .hero-with-banners {
    flex-direction: column !important;
    padding: 1.5rem 0;
  }
  
  .hero-left-banner,
  .hero-right-banner {
    flex: 0 0 auto;
    width: 300px;
    max-width: 100%;
    height: auto;
  }
  
  .hero-left-banner {
    order: 2;
    margin-top: 1rem;
  }
  
  .hero-center-content {
    order: 1;
    max-width: 100%;
  }
  
  .hero-right-banner {
    order: 3;
    margin-top: 1rem;
  }
  
  .hero-left-banner > div,
  .hero-right-banner > div {
    width: 300px !important;
    height: 250px !important;
  }
}

/* Mobile - show only right banner */
@media (max-width: 768px) {
  .hero-with-banners {
    padding: 1rem 0;
  }
  
  .hero-left-banner {
    display: none !important;
  }
  
  .hero-right-banner {
    order: 2;
    width: 100%;
    max-width: 300px;
    margin: 1rem auto 0;
  }
  
  .hero-center-content h1 {
    font-size: 1.8rem;
  }
  
  .hero-center-content p {
    font-size: 1rem;
  }
}

.affiliate-sidebar {
  position: sticky;
  top: 2rem;
  width: 160px;
  margin-left: 2rem;
}

/* Main content with sidebar layout */
.content-with-sidebar {
  display: flex;
  gap: 2rem;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar-content {
  flex-shrink: 0;
  width: 180px;
}

/* Responsive Design for Affiliate Banners */
@media (max-width: 1200px) {
  .content-with-sidebar {
    flex-direction: column;
  }
  
  .sidebar-content {
    width: 100%;
    margin-top: 2rem;
  }
  
  .affiliate-sidebar {
    position: relative;
    width: 100%;
    max-width: 728px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .affiliate-leaderboard {
    max-width: 100%;
    overflow-x: auto;
  }
  
  .affiliate-banner-container {
    padding: 0.5rem;
  }
  
  /* Hide sidebar banner on mobile */
  .sidebar-content {
    display: none;
  }
}

/* Layout Components */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 1.5rem;
}

.footer-section h3 {
  border-bottom: 1px solid var(--light-gray);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-section ul {
  list-style: none;
  padding-left: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

footer {
  background-color: var(--light);
  border-top: 1px solid var(--light-gray);
  padding: 3rem 0;
}

.copyright {
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--light-gray);
}

/* FAQ Section */
.faq-item {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--light-gray);
  padding-bottom: 1.5rem;
}

.faq-item h3 {
  margin-bottom: 0.75rem;
  color: var(--primary);
}

/* Map Tooltip */
.map-tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  z-index: 100;
  max-width: 200px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.map-tooltip::after {
  content: '';
  position: absolute;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
  top: 100%;
  left: 50%;
  margin-left: -5px;
}

/* State sections */
.state-section {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  background-color: var(--light);
  border: 1px solid var(--light-gray);
}

.state-section h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.state-flag {
  width: 30px;
  margin-right: 10px;
}

/* Map Gallery */
.map-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.map-card {
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.map-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.map-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--light-gray);
}

.map-card-content {
  padding: 1rem;
}

.map-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.map-card p {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 1rem;
}

/* Media Queries */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  
  nav a {
    margin-bottom: 0.5rem;
    display: block;
    width: 100%;
    text-align: center;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .map-gallery {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    flex-direction: column;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .map-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Print Styles */
@media print {
  body {
    font-size: 12pt;
    color: black;
  }
  
  header, nav, footer, .cta-button {
    display: none;
  }
  
  a {
    color: black;
    text-decoration: none;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
  
  p, li {
    page-break-inside: avoid;
  }
  
  img {
    max-width: 100% !important;
  }
}