/* Facility Template Styles - SEO Optimized Version */

/* Layout improvements */
@media (min-width: 768px) {
  .featured-image img {
    width: 750px;
    margin: 0 auto 20px auto;
  }

  .separate-containers .inside-article {
    padding-top: 15px;
  }
  .postcard-img {
    max-width: 400px;
    margin: 0 auto;
  }
  .facility-nav-menu {
    display: flex;
    background: #f0f0f0;
    padding: 8px;
    flex: 1;
    border-radius: 8px;
  }
}

/* Table of Contents */
.table-of-contents {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  margin-bottom: 30px;
}

.table-of-contents h2 {
  font-size: 1.25rem;
  margin-bottom: 15px;
}

.toc-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
}

.toc-list a {
  color: #3182ce;
  text-decoration: none;
  padding: 5px 0;
  display: block;
}

.toc-list a:hover {
  text-decoration: underline;
}

/* Enhanced Search Section */
.search-box-wrapper {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 30px;
}

#pm-search-app {
  margin-bottom: 0;
}

.search-title {
  font-size: 1.75rem;
  margin-bottom: 10px;
}

.search-description {
  color: #666;
  margin-bottom: 20px;
}

.search-tips {
  margin-top: 15px;
  font-size: 0.9rem;
  color: #666;
}

/* Content Section Improvements */
.guide-section {
  scroll-margin-top: 80px;
  margin-bottom: 60px;
}

/* Step by Step Lists */
.steps-list {
  counter-reset: step-counter;
  padding-left: 0;
}

.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 50px;
  margin-bottom: 20px;
  list-style: none;
}

.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: #3182ce;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Info Boxes */
.info-box {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  border-left: 4px solid #3182ce;
  margin: 20px 0;
}

.feature-highlight {
  background: #e8f4fd;
}

.feature-highlight h3 {
  margin-bottom: 15px;
  color: #1a1a1a;
}

.feature-highlight ul {
  list-style: none;
  padding: 0;
}

.feature-highlight li {
  padding: 8px 0;
}

/* FAQ Improvements */
.faq {
  list-style: none;
  padding: 0;
}

.faq-item {
  margin-bottom: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  background: #fff;
}

.faq-item h3 {
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: #1a1a1a;
}

.faq-item h4 {
  font-size: 1.1rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #333;
}

.faq-item p {
  margin-bottom: 15px;
  line-height: 1.6;
}

/* Facility Details Grid */
.facility-details {
  margin-bottom: 30px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.info-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
}

.info-item h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: #333;
}

.info-item address {
  font-style: normal;
  line-height: 1.8;
}

/* CTA Section */
.cta-section {
  background: #3182ce;
  color: white;
  text-align: center;
  padding: 50px 30px;
  border-radius: 12px;
  margin: 60px 0;
}

.cta-section h2 {
  color: white;
  margin-bottom: 10px;
  font-size: 2rem;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.cta-button {
  display: inline-block;
  background: white;
  color: #3182ce;
  padding: 15px 35px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 20px;
  transition: background-color 0.2s;
}

.cta-button:hover {
  background: #f0f0f0;
  text-decoration: none;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #3182ce;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background-color 0.2s;
  z-index: 1000;
}

#back-to-top:hover {
  background: #2563eb;
}

/* Related Facilities */
.related-facilities {
  margin: 60px 0;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 8px;
}

.related-facilities h2 {
  margin-bottom: 20px;
}

/* Existing styles preserved */
.strong {
  font-weight: 600;
}

.guide-intro {
  margin-bottom: 60px;
}

.guide-intro .video-embed {
  margin-top: 30px;
}

.video-embed iframe {
  max-width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: 8px;
}

.video-embed p {
  font-weight: 600;
  margin-bottom: 15px;
}

.cta-important {
  font-weight: 700;
  color: #e53e3e;
}

.guide-section h5 {
  font-weight: 800;
}

.guide-section .hero-img {
  margin: 20px auto;
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.guide-section a {
  text-decoration: underline;
  color: #3182ce;
}

.guide-section ul, .guide-section ol {
  margin-bottom: 15px;
  padding-left: 25px;
}

.guide-intro h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 10px 0px;
}

.guide-intro ol, .guide-intro ul {
  padding: 0 20px;
}

.guide-intro li {
  margin-bottom: 10px;
}

.guide-intro a, .link {
  text-decoration: underline;
  color: #3182ce;
  font-weight: 500;
}

.guide-intro p {
  text-align: left;
  line-height: 1.6;
}

.guide-section h3, .guide-section h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 25px 0 15px;
}

.guide-section.overview {
  margin-top: 30px;
}

.postcard-img {
  margin: 20px auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.facility-nav-menu {
  display: none;
  margin-bottom: 30px;
}

.facility-nav-menu.desktop {
  display: flex;
  margin: 0 15px;
}

.facility-nav-menu a {
  font-weight: bold;
  text-decoration: underline;
  font-size: 16px;
  color: #2f6ca6;
}

.nav-item {
  flex: 0.25;
  text-align: center;
}

.nav-item-middle {
  border-left: 1px solid #d2d2d2;
  border-right: 1px solid #d2d2d2;
}

/* Business Hours */
.biz-hours ul {
  list-style: none;
  padding: 0;
}

.biz-hours li {
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.biz-hours li:last-child {
  border-bottom: none;
}

/* Image Placeholders */
.programs-image-placeholder,
.visitation-image-placeholder {
  min-height: 300px;
  background: #f0f0f0;
  border-radius: 8px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-style: italic;
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }
  
  .quick-stats {
    flex-direction: column;
    gap: 10px;
  }
  
  .toc-list {
    grid-template-columns: 1fr;
  }
  
  .steps-list li {
    padding-left: 40px;
  }
  
  .steps-list li::before {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .search-box-wrapper {
    padding: 20px;
  }
  
  .cta-section {
    padding: 40px 20px;
  }
  
  #back-to-top {
    width: 40px;
    height: 40px;
    font-size: 20px;
    bottom: 20px;
    right: 20px;
  }
}

/* Print Styles */
@media print {
  .search-box-wrapper,
  .table-of-contents,
  .cta-section,
  .facility-nav-menu,
  #back-to-top,
  .video-embed {
    display: none;
  }
  
  .guide-section {
    page-break-inside: avoid;
  }
  
  a {
    text-decoration: none;
    color: inherit;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* Accessibility */
:focus {
  outline: 2px solid #3182ce;
  outline-offset: 2px;
}

.skip-nav:focus {
  outline: 3px solid #fff;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .info-box,
  .faq-item,
  .search-box-wrapper {
    border: 2px solid currentColor;
  }
}

.section-image {
  margin: 15px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Related Resources Section */
.related-resources {
  margin-top: 40px;
  padding: 30px 0;
  border-top: 1px solid #e0e0e0;
}

.related-resources h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #1a1a1a;
}

.resource-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.resource-link {
  flex: 1;
  min-width: 250px;
  max-width: 280px;
  padding: 20px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  text-align: center;
}

.resource-link:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.resource-link h3 {
  color: #2f6ca6;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.resource-link p {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

/* Mobile styling for related resources */
@media (max-width: 768px) {
  .resource-links {
    flex-direction: column;
    align-items: center;
  }
  
  .resource-link {
    max-width: 100%;
    min-width: auto;
  }
}