/* County Pages - Custom Styles */

/* Page wrapper prevents horizontal scroll */
.county-page-wrapper {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Hero section with blue to white gradient */
.county-hero {
  position: relative;
  min-height: 400px;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    #1e40af 0%,
    #2563eb 15%,
    #3b82f6 30%,
    #60a5fa 45%,
    #93c5fd 60%,
    #bfdbfe 75%,
    #dbeafe 85%,
    #f0f9ff 93%,
    #ffffff 100%
  );
}

/* Fade overlay at bottom of hero for smooth transition */
.county-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 40%,
    rgba(255, 255, 255, 0.8) 70%,
    #ffffff 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Hero content wrapper */
.county-hero-content {
  position: relative;
  z-index: 3;
  padding: 9rem 5rem 4rem;
}

/* Hero headline animation */
.county-hero-headline {
  animation: countyHeroReveal 1.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes countyHeroReveal {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

/* Hero subheadline animation */
.county-hero-subheadline {
  opacity: 0;
  animation: countySlideUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  animation-delay: 0.3s;
}

@keyframes countySlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Quick stats grid */
.county-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  max-width: 600px;
  margin: 2rem auto 0;
  opacity: 0;
  animation: countySlideUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  animation-delay: 0.5s;
}

.county-stat-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.county-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.county-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  display: block;
  letter-spacing: -0.025em;
}

.county-stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Breadcrumb styling */
.county-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.875rem;
}

.county-breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.county-breadcrumb a:hover {
  color: #ffffff;
}

.county-breadcrumb-separator {
  color: rgba(255, 255, 255, 0.5);
}

.county-breadcrumb-current {
  color: rgba(255, 255, 255, 0.7);
}

/* Section header styling */
.county-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.county-section-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.county-section-header p {
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

.county-section-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #f16700, #fbbf24);
  margin: 1rem auto;
  border-radius: 2px;
}

/* About county section */
.county-about-section {
  padding: 3rem 0;
  background: #ffffff;
}

.county-about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .county-about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.county-description {
  color: #475569;
  line-height: 1.7;
  font-size: 1rem;
}

.county-description p {
  margin-bottom: 1rem;
}

.county-wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
  margin-top: 0.5rem;
  transition: color 0.2s ease;
}

.county-wiki-link:hover {
  color: #1d4ed8;
}

/* Map container */
.county-map-container {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  height: 350px;
  background: #f1f5f9;
}

/* Thumbnail image */
.county-thumbnail {
  width: 100%;
  height: 350px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.county-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Featured listings section */
.county-listings-section {
  padding: 3rem 0;
  background: #f8fafc;
}

.county-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.county-listings-cta {
  text-align: center;
  margin-top: 2rem;
}

.county-view-all-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #3b82f6;
  color: #ffffff;
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.county-view-all-button:hover {
  background: #2563eb;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Cities grid section */
.county-cities-section {
  padding: 3rem 0;
  background: #ffffff;
}

.county-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.county-city-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.county-city-card:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.county-city-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.county-city-card:hover .county-city-name {
  color: #ffffff;
}

/* CTA section */
.county-cta-section {
  padding: 4rem 0;
  background: linear-gradient(
    135deg,
    #1e40af 0%,
    #2563eb 50%,
    #3b82f6 100%
  );
  text-align: center;
}

.county-cta-headline {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

.county-cta-subtext {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.county-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f16700;
  color: #ffffff;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(241, 103, 0, 0.4);
}

.county-cta-button:hover {
  background: #d95d00;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(241, 103, 0, 0.5);
}

/* Scroll reveal animation */
.county-scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.county-scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .county-hero {
    min-height: 350px;
  }

  .county-hero-content {
    padding: 2rem 1rem 3rem;
  }

  .county-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .county-stat-value {
    font-size: 1.25rem;
  }

  .county-section-header h2 {
    font-size: 1.5rem;
  }

  .county-cta-headline {
    font-size: 1.5rem;
  }

  .county-listings-grid {
    grid-template-columns: 1fr;
  }

  .county-cities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
