/*
Theme Name: Independent Pets Theme
Theme URI: https://independentpets.com/
Author: IndependentPets
Description: Simple, friendly theme for independent pet store directory with city selection and service filters.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
License: GPLv2 or later
Text Domain: independentpets
*/

/* Base resets and friendly look */
body { 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
  color:#253238; 
  background:#f5f3e8;
  position: relative;
  overflow-x: hidden;
}

/* Pawprint decorative background on home page only */
body.home::before {
  content: '';
  position: fixed;
  left: -50px;
  top: 50%;
  transform: translateY(-50%);
  width: 150px;
  height: 100vh;
  background: 
    radial-gradient(circle at 20px 30px, rgba(102, 126, 234, 0.08) 8px, transparent 8px),
    radial-gradient(circle at 35px 45px, rgba(102, 126, 234, 0.06) 6px, transparent 6px),
    radial-gradient(circle at 50px 35px, rgba(102, 126, 234, 0.06) 6px, transparent 6px),
    radial-gradient(circle at 65px 50px, rgba(102, 126, 234, 0.06) 6px, transparent 6px),
    radial-gradient(circle at 42px 65px, rgba(102, 126, 234, 0.1) 12px, transparent 12px);
  background-size: 100px 80px;
  background-repeat: repeat-y;
  pointer-events: none;
  z-index: 0;
}

body.home::after {
  content: '';
  position: fixed;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
  width: 150px;
  height: 100vh;
  background: 
    radial-gradient(circle at 80px 30px, rgba(102, 126, 234, 0.08) 8px, transparent 8px),
    radial-gradient(circle at 65px 45px, rgba(102, 126, 234, 0.06) 6px, transparent 6px),
    radial-gradient(circle at 50px 35px, rgba(102, 126, 234, 0.06) 6px, transparent 6px),
    radial-gradient(circle at 35px 50px, rgba(102, 126, 234, 0.06) 6px, transparent 6px),
    radial-gradient(circle at 58px 65px, rgba(102, 126, 234, 0.1) 12px, transparent 12px);
  background-size: 100px 80px;
  background-repeat: repeat-y;
  pointer-events: none;
  z-index: 0;
}



a { color:#0d6efd; text-decoration:none; }
a:hover { text-decoration:underline; }

.site { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
header.site-header { display:flex; align-items:center; gap:12px; margin-bottom: 16px; flex-wrap: wrap; }
.site-title { font-size: 1.6rem; font-weight:700; color:#1f2a34; }
.site-tagline { color:#4a5b6a; font-size: 0.95rem; }
.site-nav { margin-left:auto; display:flex; gap:12px; }
.site-nav a { color:#1f3a54; background:#eef5fb; border:1px solid #d8e6f2; padding:6px 10px; border-radius:999px; font-size:14px; display:inline-flex; align-items:center; gap:6px; }
.site-nav a:hover { background:#e6f0f9; text-decoration:none; }
.site-nav .icon { display:inline-block; line-height:1; }

.hero { background:#fff; border:1px solid #e6eef5; border-radius:12px; padding:24px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.hero h1 { margin:0 0 6px; font-size: 1.8rem; }
.hero p { margin:0 0 16px; color:#405363; }

/* Homepage Banner */
.homepage-banner { 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
  padding: 60px 20px; 
  text-align: center; 
  margin: -24px -16px 40px; 
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.banner-title { 
  color: white; 
  font-size: 3.5rem; 
  margin: 0; 
  font-weight: 700; 
  text-shadow: 0 2px 4px rgba(0,0,0,0.1); 
  letter-spacing: -1px;
}
.banner-subtitle { 
  color: rgba(255,255,255,0.95); 
  font-size: 1.3rem; 
  margin: 10px 0 0; 
  font-weight: 300;
}

/* Search Section */
.search-section { 
  background: #e8f2ff; 
  border-radius: 12px; 
  padding: 40px; 
  margin: 0 auto 40px; 
  max-width: 800px; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  text-align: center;
}
.search-container h2 { 
  margin: 0 0 20px; 
  color: #223140; 
  font-size: 1.8rem;
}
#city-search { 
  width: 100%; 
  max-width: 500px; 
  padding: 16px 20px; 
  border: 2px solid #dbe5ee; 
  border-radius: 8px; 
  font-size: 16px;
  transition: all 0.3s ease;
}
#city-search:focus { 
  outline: none; 
  border-color: #667eea; 
  box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}

/* City Autocomplete */
.city-autocomplete-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.city-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #f0f8ff;
  border: 2px solid #c8e0ff;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

.city-suggestion {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid #f0f4f8;
  transition: background-color 0.2s ease;
}

.city-suggestion:last-child {
  border-bottom: none;
}

.city-suggestion:hover,
.city-suggestion.selected {
  background-color: #f4f8fb;
}

.suggestion-name {
  font-weight: 500;
  color: #223140;
}

.suggestion-count {
  font-size: 12px;
  color: #667eea;
  background: #eef5fb;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Featured Cities Section */
.featured-cities-section {
  background: #e8f2ff;
  border-radius: 12px;
  padding: 40px;
  margin: 0 auto 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  text-align: center;
}
.featured-cities-section h2 {
  margin: 0 0 30px;
  color: #223140;
  font-size: 1.8rem;
}
.featured-city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.featured-city-card {
  background: #f0f8ff;
  border: 2px solid #c8e0ff;
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.featured-city-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  border-color: #667eea;
  text-decoration: none;
}
.city-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  line-height: 1;
}
.city-info {
  text-align: center;
}
.featured-city-card .name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #223140;
  margin-bottom: 4px;
  display: block;
}
.featured-city-card .count {
  font-size: 14px;
  color: #667eea;
  font-weight: 500;
}

/* Map Section */
.map-section {
  background: #e8f2ff;
  border-radius: 12px;
  padding: 40px;
  margin: 0 auto 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.map-section h2 {
  margin: 0 0 20px;
  color: #223140;
  font-size: 1.8rem;
  text-align: center;
}
.map-note {
  text-align: center;
  color: #5a6c7b;
  margin-top: 12px;
  font-size: 14px;
}
.map-popup h4 {
  margin: 0 0 8px;
}
.map-popup h4 a {
  color: #667eea;
  text-decoration: none;
}
.map-popup h4 a:hover {
  text-decoration: underline;
}
.map-popup p {
  margin: 0;
  color: #555;
  font-size: 14px;
}
.map-link {
  color: #667eea !important;
  font-weight: 500;
  text-decoration: none;
}
.map-link:hover {
  text-decoration: underline;
}

/* Cities Section */
.cities-section { 
  background: #e8f2ff; 
  border-radius: 12px; 
  padding: 40px; 
  margin: 0 auto; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.cities-section h2 { 
  margin: 0 0 30px; 
  color: #223140; 
  font-size: 1.8rem;
  text-align: center;
}

.city-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap:12px; }
.city-card { background:#ffffff; border:1px solid #e6eef5; border-radius:12px; padding:12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); display:flex; align-items:center; justify-content:space-between; transition: all 0.2s ease; }
.city-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: #667eea; text-decoration: none; }
.city-card .name { font-weight:600; color:#223140; }
.city-card .count { font-size: 12px; color:#5a6c7b; background: #f4f8fb; padding: 2px 8px; border-radius: 12px; }

/* Borrow plugin card classes for consistency */
.ipd-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ipd-card { border: 1px solid #e3e3e3; border-radius: 12px; padding: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.ipd-title { margin: 0 0 6px; }
.ipd-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ipd-tag, .ipd-tag a { background: #f4f8fb; border: 1px solid #dbe5ee; color: #1f3a54; border-radius: 999px; padding: 3px 8px; font-size: 12px; display:inline-block; }
.ipd-hours { margin-top: 8px; font-size: 0.95em; color: #222; }

.heading { margin: 8px 0 16px; font-size: 1.6rem; }
.subtle { color:#5a6c7b; }

/* Responsive Design */
@media (max-width: 768px) {
  .banner-title { font-size: 2.5rem; }
  .banner-subtitle { font-size: 1.1rem; }
  .homepage-banner { padding: 40px 20px; }
  
  .search-section { padding: 30px 20px; }
  .featured-cities-section { padding: 30px 20px; }
  .map-section { padding: 30px 20px; }
  .cities-section { padding: 30px 20px; }
  
  .featured-city-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .featured-city-card { padding: 20px 16px; }
  .city-icon { font-size: 2.5rem; margin-bottom: 8px; }
  .featured-city-card .name { font-size: 1rem; }
  
  .city-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .city-card { padding: 10px 12px; font-size: 14px; }
  
  .site-header { flex-direction: column; align-items: flex-start; }
  .site-nav { margin-left: 0; margin-top: 12px; }
}

@media (max-width: 480px) {
  .banner-title { font-size: 2rem; }
  .banner-subtitle { font-size: 1rem; }
  .homepage-banner { padding: 30px 15px; margin: -16px -16px 30px; }
  
  #city-search { font-size: 14px; padding: 12px 16px; }
  .city-suggestion { padding: 10px 16px; }
  .suggestion-name { font-size: 14px; }
  .search-container h2 { font-size: 1.5rem; }
  .featured-cities-section h2 { font-size: 1.5rem; }
  .map-section h2 { font-size: 1.5rem; }
  .cities-section h2 { font-size: 1.5rem; }
  
  .featured-city-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .featured-city-card { padding: 16px 12px; }
  .city-icon { font-size: 2rem; margin-bottom: 6px; }
  .city-grid { grid-template-columns: 1fr; }
}

/* News Page Styles */
.news-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

.news-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 40px 0;
  background: #e8f2ff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.page-title {
  font-size: 2.5rem;
  color: #223140;
  margin: 0 0 12px;
  font-weight: 700;
}

.page-subtitle {
  font-size: 1.1rem;
  color: #5a6c7b;
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
}

.news-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
  justify-content: center;
}

.category-tag {
  padding: 8px 16px;
  background: #f4f8fb;
  border: 1px solid #dbe5ee;
  border-radius: 20px;
  font-size: 14px;
  color: #223140;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-tag:hover,
.category-tag.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.news-feed {
  display: grid;
  gap: 24px;
  margin-bottom: 40px;
}

.news-article {
  background: #f0f8ff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.article-image {
  height: 200px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  padding: 20px;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.article-source {
  color: #667eea;
  font-weight: 500;
}

.article-date {
  color: #5a6c7b;
}

.article-title {
  margin: 0 0 12px;
  font-size: 1.3rem;
  line-height: 1.4;
}

.article-title a {
  color: #223140;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-title a:hover {
  color: #667eea;
}

.article-description {
  color: #5a6c7b;
  line-height: 1.6;
  margin: 0 0 16px;
}

.read-more {
  color: #667eea;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: #223140;
  text-decoration: underline;
}

.no-news {
  text-align: center;
  padding: 60px 20px;
  color: #5a6c7b;
}

.news-footer {
  background: #e8f2ff;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.news-disclaimer {
  font-size: 14px;
  color: #5a6c7b;
  margin-bottom: 20px;
  font-style: italic;
}

.news-sources h3 {
  color: #223140;
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.news-sources ul {
  color: #5a6c7b;
  font-size: 14px;
}

.news-sources li {
  margin-bottom: 4px;
}

/* Responsive Design for News Page */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }
  
  .news-header {
    padding: 30px 20px;
  }
  
  .news-categories {
    justify-content: flex-start;
  }
  
  .category-tag {
    font-size: 13px;
    padding: 6px 12px;
  }
  
  .article-content {
    padding: 16px;
  }
  
  .article-title {
    font-size: 1.2rem;
  }
  
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.8rem;
  }
  
  .news-categories {
    gap: 6px;
  }
  
  .category-tag {
    font-size: 12px;
    padding: 5px 10px;
  }
}
