/* Enhanced Beer Pairing CSS with SEO Content Support */

/* Add smooth scrolling to the entire page */
html {
  scroll-behavior: smooth;
}
.hero-stabilizer {
  /* approximate space for the heading + paragraph so they don’t jump */
  min-height: 250px; /* adjust up/down after you confirm visually */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Page intro section styling */
.page-intro {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  color: #f0f0f0;
  padding: 6rem 2rem 3rem;
  text-align: center;
}

@media (max-width: 768px) {
  /* FIXED: Add padding to body to account for fixed navigation header */
  body {
    padding-top: 70px; /* Increased to 100px for better clearance */
  }
  
  /* Alternative approach - target main content directly */
  main {
    margin-top: 20px;
  }
  
  .page-intro {
    padding: 3rem 1rem 2rem; /* Reset to normal padding since body handles the offset */
  }
  
  .page-intro h1 {
    font-size: 2rem !important;
  }
  
  .page-intro p {
    font-size: 1.1rem !important;
  }
  
  .page-intro .how-to-use-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

/* Breadcrumb styling */
.page-intro nav[aria-label="Breadcrumb"] ol {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.page-intro nav[aria-label="Breadcrumb"] a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-intro nav[aria-label="Breadcrumb"] a:hover {
  color: #FFD700;
  text-decoration: underline;
}

/* How to use section enhancements */
.how-to-use-container {
  background: rgba(255,255,255,0.1);
  padding: 2rem;
  border-radius: 12px;
  max-width: 900px;
  margin: 0 auto;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.how-to-use-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  text-align: left;
}

.how-to-step {
  background: rgba(255,255,255,0.05);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #FFD700;
  transition: transform 0.3s ease, background 0.3s ease;
}

.how-to-step:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.08);
}

.how-to-step h3 {
  color: #FFD700;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.how-to-step p {
  color: #e0e0e0;
  margin: 0;
  line-height: 1.5;
}

/* Popular searches styling */
.popular-searches {
  margin-top: 3rem;
}

.popular-searches h2 {
  color: #D2691E;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.search-tag {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
}

.search-tag:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.05);
}

/* Enhanced grid layout - inherit existing styles but add new features */
.grid-layout-beer {
  background-color: #2a2a2a;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0);
  background-size: 20px 20px;
  color: #f0f0f0;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1rem 3rem;
  box-sizing: border-box;
  min-height: 60vh;
}

/* Section headers with descriptions */
.grid-layout-beer .left h2,
.grid-layout-beer .right h2 {
  font-family: 'Arial Black', sans-serif;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 900;
  /* FIXED: Set consistent height for titles on desktop */
  min-height: 4.5em; /* Increased for desktop to handle wrapping */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.grid-layout-beer .left h2 {
  color: #FFD700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.grid-layout-beer .right h2 {
  color: #D2691E;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.grid-layout-beer .left p,
.grid-layout-beer .right p {
  color: #ccc;
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.4;
  font-style: italic;
  /* FIXED: Set consistent height for descriptions on desktop */
  min-height: 80px; /* Increased for desktop */
  max-height: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Enhanced pairing box default state */
#pairingsBox .default-content {
  text-align: center;
  color: #ccc;
  padding: 2rem;
}
#pairingsBox, #winePairingsBox {
  scroll-margin-top: 140px;
}

#pairingsBox .default-content h2 {
  color: #FF6B35;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

#pairingsBox .default-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.why-pairing-matters {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

.why-pairing-matters h3 {
  color: #FFD700;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.why-pairing-matters p {
  color: #e0e0e0;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

/* SEO content section */
.seo-content-section {
  background: #f8f9fa;
  padding: 4rem 2rem;
  color: #333;
}

.seo-content-container {
  max-width: 1200px;
  margin: 0 auto;
}

.seo-content-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: #2a2a2a;
  font-size: 2.2rem;
  font-weight: bold;
}

.beer-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.beer-style-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.beer-style-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.beer-style-card h3 {
  color: #D2691E;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.beer-style-card p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #555;
}

.beer-style-card .best-with {
  font-weight: bold;
  color: #333;
  background: #f8f9fa;
  padding: 0.8rem;
  border-radius: 6px;
  margin: 0;
  border-left: 4px solid #D2691E;
}

.expert-section {
  text-align: center;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  color: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.expert-section h3 {
  color: #FFD700;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.expert-section p {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
  color: #e0e0e0;
}

/* Responsive enhancements */
@media (max-width: 768px) {
  .grid-layout-beer {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "left right"
      "center center";
    gap: 1rem;
    padding: 3rem 1rem 2rem;
  }

  .grid-layout-beer .left {
    grid-area: left;
  }
  .grid-layout-beer .right {
    grid-area: right;
  }
  .grid-layout-beer .center {
    grid-area: center;
  }

  /* FIXED: Adjust titles for mobile with consistent heights */
  .grid-layout-beer .left h2,
  .grid-layout-beer .right h2 {
    font-size: 1.2rem; /* Reduced from 1.4rem */
    min-height: 4.5em; /* Consistent height for both columns */
    max-height: 4.5em; /* Added max-height to prevent expansion */
    line-height: 1.1;
    overflow: hidden; /* Prevent text overflow from breaking alignment */
  }

  /* FIXED: Adjust descriptions for mobile */
  .grid-layout-beer .left p,
  .grid-layout-beer .right p {
    font-size: 0.85rem;
    min-height: 120px; /* Consistent height for both columns */
    max-height: 120px; /* Consistent max-height */
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3; /* Slightly increased line-height for readability */
    margin-bottom: 1rem; /* Ensure consistent bottom margin */
  }

  .seo-content-section {
    padding: 3rem 1rem;
  }

  .seo-content-section h2 {
    font-size: 1.8rem;
  }

  .beer-style-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .beer-style-card {
    padding: 1.5rem;
  }

  .beer-style-card h3 {
    font-size: 1.2rem;
  }

  .expert-section {
    padding: 2rem;
  }

  .expert-section h3 {
    font-size: 1.5rem;
  }

  .expert-section p {
    font-size: 1rem;
  }

  .search-tags {
    gap: 0.5rem;
  }

  .search-tag {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Accessibility improvements */
.beer-style-card:focus-within {
  outline: 2px solid #D2691E;
  outline-offset: 2px;
}

.search-tag:focus {
  outline: 2px solid #FFD700;
  outline-offset: 2px;
}

/* Print styles for SEO content */
@media print {
  .page-intro,
  .grid-layout-beer,
  .seo-content-section {
    break-inside: avoid;
  }
  
  .beer-style-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Remove bullets and add spacing to the beer list */
.beer-label-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Each beer item */
.beer-label-list li {
  background: rgba(255,255,255,0.05);
  border-left: 4px solid #FFD700;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #f0f0f0;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.beer-label-list li:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

#pairingsBox h2 {
  color: #FF6B35;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: center;
}

.pairing-category {
  margin-bottom: 1.5rem;
}

.pairing-category h4 {
  color: #FFD700;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.beer-page .pairing-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 70px;
}

.beer-page .pairing-category li {
  background: rgba(255,255,255,0.05);
  border-left: 4px solid #D2691E;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: #e0e0e0;
  transition: background 0.3s ease;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.beer-page .pairing-category li:hover {
  background: rgba(255,255,255,0.1);
}

.beer-page .beer-label-list li.active {
  background: rgba(255,215,0,0.15);
  border-left-color: #FF6B35;
}

.beer-page .left .beer-bottle-container,
.beer-page .right .beer-bottle-container {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem; /* Optional: makes room for scrollbar */
}

/* Optional: Make sure both left and right sections are same height visually */
.beer-page .grid-layout-beer .left,
.beer-page .grid-layout-beer .right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.left .beer-bottle-container::-webkit-scrollbar,
.right .beer-bottle-container::-webkit-scrollbar {
  width: 6px;
}

.left .beer-bottle-container::-webkit-scrollbar-thumb,
.right .beer-bottle-container::-webkit-scrollbar-thumb {
  background-color: rgba(255, 215, 0, 0.3);
  border-radius: 10px;
}