/* SSR styles for search page - Server-side rendered content */

/* Breadcrumbs */
.seo-breadcrumbs {
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.seo-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  gap: 4px;
  max-width: 1200px;
  margin: 0 auto;
}
.seo-breadcrumbs li {
  display: flex;
  align-items: center;
}
.seo-breadcrumbs li:not(:last-child)::after {
  content: '>';
  margin: 0 8px;
  color: #94a3b8;
}
.seo-breadcrumbs a {
  color: #4a5568;
  text-decoration: none;
}
.seo-breadcrumbs a:hover {
  color: #FF6B6B;
}
.seo-breadcrumbs .active {
  color: #1a1a1a;
  font-weight: 500;
}

/* Hero Stats Section */
.seo-hero-stats {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 20px;
}
.seo-hero-container {
  max-width: 1200px;
  margin: 0 auto;
}
.seo-hero-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px 0;
  line-height: 1.3;
}
.seo-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #4a5568;
}
.seo-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.seo-stat i {
  font-size: 14px;
  color: #6A63A6;
}
.seo-stat strong {
  color: #1a1a1a;
  font-weight: 600;
}
.seo-stat-divider {
  color: #cbd5e0;
  font-weight: 300;
}
.seo-stat-light {
  color: #718096;
  font-weight: 400;
}

/* SEO Content Text - Apple style */
.seo-content {
  padding: 32px 24px;
  background: #f8f9fa;
}
.seo-content-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.seo-title {
  font-size: 32px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 16px 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.seo-subtitle {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 20px 0;
  letter-spacing: -0.01em;
  text-align: left;
}
.seo-description {
  font-size: 17px;
  color: #86868b;
  line-height: 1.6;
  margin: 0 0 32px 0;
}
.seo-description p {
  margin: 0 0 16px 0;
  color: #1d1d1f;
  font-size: 17px;
  line-height: 1.6;
}
.seo-description p:last-child {
  margin-bottom: 0;
}

/* Stats Columns - Apple style SSR */
.seo-stats-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin: 32px 0;
  padding: 32px 28px;
  background: #f5f5f7;
  border-radius: 20px;
}
.seo-stats-column h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.seo-stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.seo-stats-list li {
  font-size: 15px;
  color: #515154;
  padding: 8px 0;
  border-bottom: 1px solid #e8e8ed;
}
.seo-stats-list li:last-child {
  border-bottom: none;
}

/* Service Comparison Table - Apple style */
.seo-services-comparison {
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 28px;
  margin: 0 0 48px 0;
  border: 1px solid #e8e8ed;
}
.seo-services-comparison h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}
.seo-services-comparison .comparison-subtitle {
  font-size: 15px;
  color: #86868b;
  margin: 0 0 24px 0;
  line-height: 1.5;
}
.seo-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  table-layout: fixed;
}
.seo-comparison-table th {
  text-align: left;
  padding: 16px 12px;
  font-weight: 600;
  color: #1d1d1f;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid #e8e8ed;
}
.seo-comparison-table th:nth-child(1) {
  width: 50%;
}
.seo-comparison-table th:nth-child(2) {
  width: 20%;
  text-align: center;
}
.seo-comparison-table th:nth-child(3) {
  width: 30%;
  text-align: right;
}
.seo-comparison-table td {
  padding: 20px 12px;
  border-bottom: 1px solid #f5f5f7;
  vertical-align: middle;
}
.seo-comparison-table tr:last-child td {
  border-bottom: none;
}
.seo-comparison-table .service-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.seo-comparison-table .service-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.seo-comparison-table .service-name {
  color: #1d1d1f;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.seo-comparison-table .service-name:hover {
  color: #667eea;
}
.seo-comparison-table .current-badge {
  background: #667eea;
  color: white;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 8px;
}
.seo-comparison-table .sitters-count {
  text-align: center;
  color: #1d1d1f;
  font-weight: 500;
  font-size: 16px;
}
.seo-comparison-table .price-range {
  text-align: right;
  color: #1d1d1f;
  font-weight: 500;
  font-size: 16px;
}

/* Other Services Section - Apple pills */
.seo-services {
  margin: 0 0 48px 0;
  text-align: left;
}
.seo-services h2,
.seo-other-services h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 20px 0;
  letter-spacing: -0.01em;
}
.seo-service-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.seo-service-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: #f5f5f7;
  border: none;
  border-radius: 100px;
  font-size: 14px;
  color: #1d1d1f;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}
.seo-service-chip:hover {
  background: #e8e8ed;
  transform: scale(1.02);
}
.seo-service-chip .chip-icon {
  font-size: 16px;
}

/* Locations Section - Apple pills */
.seo-locations {
  margin: 0 0 48px 0;
  text-align: left;
}
.seo-locations h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 20px 0;
  letter-spacing: -0.01em;
}
.locations-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.location-link {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 18px;
  background: #f5f5f7;
  border: none;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  color: #1d1d1f;
  font-weight: 500;
  transition: all 0.2s ease;
}
.location-link:hover {
  background: #e8e8ed;
  transform: scale(1.02);
}
.location-count {
  font-size: 12px;
  color: #86868b;
  font-weight: 400;
}
.location-link .sitter-count {
  font-size: 12px;
  color: #999;
}

/* Pagination - Apple style */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  margin-top: 24px;
  border-top: 1px solid #e8e8ed;
}
.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #d2d2d7;
  border-radius: 50%;
  background: #ffffff;
  color: #1d1d1f;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pagination-btn:hover:not(.disabled) {
  border-color: #1d1d1f;
  background: #f5f5f7;
}
.pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.pagination-pages {
  display: flex;
  gap: 6px;
  margin: 0 8px;
}
.pagination-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d2d2d7;
  border-radius: 22px;
  background: #ffffff;
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pagination-page:hover {
  border-color: #1d1d1f;
  background: #f5f5f7;
}
.pagination-page.active {
  background: #1d1d1f;
  color: #ffffff;
  border-color: #1d1d1f;
}

/* Region Links */
.seo-regions {
  margin: 0 0 48px 0;
}
.seo-regions h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 20px 0;
  letter-spacing: -0.01em;
}
.seo-region-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.seo-region-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: #f5f5f7;
  border: none;
  border-radius: 100px;
  font-size: 14px;
  color: #1d1d1f;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}
.seo-region-link:hover {
  background: #e8e8ed;
  transform: scale(1.02);
}
.seo-region-link .region-count {
  font-size: 12px;
  color: #86868b;
  font-weight: 400;
}

/* Featured Reviews - Apple style SSR */
.seo-reviews {
  margin: 0 0 48px 0;
}
.seo-reviews .seo-subtitle {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 24px 0;
  letter-spacing: -0.01em;
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.review-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  border: 1px solid #e8e8ed;
  transition: all 0.2s ease;
}
.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.review-rating {
  display: flex;
  gap: 4px;
  font-size: 16px;
}
.review-rating .star {
  color: #d2d2d7;
}
.review-rating .star.filled {
  color: #667eea;
}
.review-time {
  font-size: 13px;
  color: #86868b;
}
.review-text {
  font-size: 15px;
  line-height: 1.6;
  color: #1d1d1f;
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
}
.review-footer {
  font-size: 14px;
  color: #515154;
}
.review-author {
  font-weight: 500;
  color: #1d1d1f;
}
.review-about {
  color: #86868b;
}
.review-about strong {
  color: #1d1d1f;
  font-weight: 500;
}
.review-reply {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e8e8ed;
}
.reply-label {
  font-size: 13px;
  font-weight: 600;
  color: #515154;
  display: block;
  margin-bottom: 8px;
}
.reply-text {
  font-size: 14px;
  color: #515154;
  line-height: 1.6;
  margin: 0;
}

/* FAQs Accordion - Apple style SSR */
.seo-faqs {
  margin: 0 0 48px 0;
}
.seo-faqs .seo-subtitle {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 24px 0;
  letter-spacing: -0.01em;
}
.faqs-list {
  border: 1px solid #e8e8ed;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
}
.faq-item {
  border-bottom: 1px solid #e8e8ed;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  background: #ffffff;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: #1d1d1f;
  transition: background-color 0.2s ease;
}
.faq-question:hover {
  background: #f5f5f7;
}
.faq-question span:first-child {
  flex: 1;
  padding-right: 16px;
  word-wrap: break-word;
  max-width: 100%;
}
.faq-icon {
  font-size: 20px;
  font-weight: 300;
  color: #86868b;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px;
}
.faq-answer p {
  font-size: 15px;
  color: #515154;
  line-height: 1.6;
  margin: 0;
}

/* Nearby Cities - Apple style SSR */
.seo-nearby-cities {
  margin: 0 0 48px 0;
}
.seo-nearby-cities .seo-subtitle {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 24px 0;
  letter-spacing: -0.01em;
}
.nearby-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.nearby-city-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #f5f5f7;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.nearby-city-link:hover {
  background: #e8e8ed;
  transform: scale(1.02);
}
.nearby-city-link .city-name {
  font-size: 15px;
  font-weight: 500;
  color: #1d1d1f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}
.nearby-city-link .city-sitters {
  font-size: 13px;
  color: #86868b;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Last Updated - Apple style SSR */
.seo-last-updated {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e8e8ed;
  text-align: center;
}
.seo-last-updated small {
  font-size: 13px;
  color: #86868b;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Show More/Less for long descriptions */
.seo-city-desc {
  position: relative;
}
.seo-city-desc.truncated {
  max-height: 120px;
  overflow: hidden;
}
.seo-city-desc.truncated::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, #ffffff);
}
.show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 18px;
  background: #f5f5f7;
  border: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: #1d1d1f;
  cursor: pointer;
  transition: all 0.2s ease;
}
.show-more-btn:hover {
  background: #e8e8ed;
  transform: scale(1.02);
}
.show-more-btn i {
  font-size: 12px;
  transition: transform 0.3s ease;
}
.show-more-btn.expanded i {
  transform: rotate(180deg);
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
  .seo-hero-stats {
    padding: 16px;
  }
  .seo-hero-title {
    font-size: 20px;
  }
  .seo-hero-meta {
    font-size: 14px;
  }
  .seo-content-container {
    padding: 0 20px;
  }
  .seo-title {
    font-size: 24px;
  }
  .seo-subtitle {
    font-size: 20px;
  }
  .seo-description {
    font-size: 15px;
  }
  .seo-description p {
    font-size: 15px;
  }
  .seo-services-comparison {
    padding: 24px 20px;
    margin: 0 0 32px 0;
    border-radius: 16px;
  }
  .seo-services-comparison h2 {
    font-size: 20px;
  }
  .seo-services-comparison .comparison-subtitle {
    font-size: 14px;
  }
  .seo-comparison-table {
    font-size: 14px;
  }
  .seo-comparison-table th {
    font-size: 11px;
    padding: 12px 8px;
  }
  .seo-comparison-table th:nth-child(1) {
    width: 45%;
  }
  .seo-comparison-table th:nth-child(2) {
    width: 22%;
  }
  .seo-comparison-table th:nth-child(3) {
    width: 33%;
  }
  .seo-comparison-table td {
    padding: 16px 8px;
  }
  .seo-comparison-table .service-name {
    font-size: 14px;
  }
  .seo-comparison-table .service-icon {
    font-size: 18px;
  }
  .seo-comparison-table .service-cell {
    gap: 8px;
  }
  .seo-comparison-table .sitters-count,
  .seo-comparison-table .price-range {
    font-size: 14px;
  }
  .seo-services h2,
  .seo-locations h2,
  .seo-regions h3 {
    font-size: 20px;
  }
  .seo-services,
  .seo-locations,
  .seo-regions {
    margin: 0 0 32px 0;
  }

  /* Stats columns - Stack vertically */
  .seo-stats-columns {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 20px;
  }

  /* Reviews - Single column */
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .review-card {
    padding: 20px;
  }
  .review-text {
    -webkit-line-clamp: 3;
  }

  /* FAQs - Reduce padding */
  .faq-question {
    padding: 16px 20px;
    font-size: 15px;
  }
  .faq-item.open .faq-answer {
    padding: 0 20px 16px;
  }

  /* Nearby cities - 2 columns on mobile */
  .nearby-cities-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .nearby-city-link {
    padding: 12px 16px;
  }
  .nearby-city-link .city-name {
    font-size: 14px;
    max-width: 100px;
  }
  .nearby-city-link .city-sitters {
    font-size: 12px;
  }

  /* Section spacing */
  .seo-reviews,
  .seo-faqs,
  .seo-nearby-cities {
    margin: 0 0 32px 0;
  }

  .seo-reviews .seo-subtitle,
  .seo-faqs .seo-subtitle,
  .seo-nearby-cities .seo-subtitle {
    font-size: 20px;
  }
}

/* ========================================
   SSR RESPONSIVE LAYOUTS
   Desktop (>=769px): Show desktop SSR, hide mobile SSR
   Mobile (<769px): Show mobile SSR, hide desktop SSR
   ======================================== */

/* SSR Mobile Layout - hidden by default (desktop first) */
.ssr-mobile-layout {
  display: none;
}

/* Desktop: Show desktop layout, hide mobile layout */
@media (min-width: 769px) {
  .ssr-mobile-layout {
    display: none !important;
  }
  .explore-search-container.desktop {
    display: block;
  }
}

/* Mobile: Show mobile layout, hide desktop layout */
@media (max-width: 768px) {
  .ssr-mobile-layout {
    display: block;
  }

  /* Mobile header bar - highest z-index to stay above everything */
  .ssr-mobile-layout .mobile-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200; /* Above static map (101) */
    background: transparent;
  }

  .explore-search-container.desktop {
    display: none !important;
  }

  /* Mobile map loading placeholder - fallback when no static map available */
  .ssr-mobile-map-placeholder {
    position: fixed;
    top: 60px; /* Below mobile header */
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #aedff7 0%, #c5e8d5 50%, #f5f5dc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99; /* Below static map when available */
  }

  .map-loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #666;
    font-size: 14px;
  }

  .map-loading-indicator i {
    font-size: 48px;
    color: #999;
    animation: pulse 1.5s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
  }
}
