/* =========================
   Encinitas Directory Theme CSS
   Cleaned & Organized by Section
   ========================= */

/* ========== Listing Card & Google Rating Styles ========== */
.listing-card.post {
  margin: 0;
  padding: 0;
}
.listing-card-title a {
  color: #4A90E2;
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.listing-card-title a:hover {
  color: #357abd;
  text-decoration: none;
}
.listing-card-title .arrow-icon {
  fill: #4A90E2;
  transition: fill 0.3s ease;
  flex-shrink: 0;
  margin-left: 0.25rem;
}
.listing-card-title a:hover .arrow-icon {
  fill: #357abd;
}
.google-rating-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.google-rating-card .stars-container {
  display: flex;
  color: #ffa500;
}
.google-rating-card .star {
  position: relative;
  display: inline-block;
}
.google-rating-card .partial-star {
  color: transparent; /* Hide the base star character */
}
.google-rating-card .partial-star::before {
  content: '☆'; /* Empty star as background */
  position: absolute;
  left: 0;
  top: 0;
  color: #ffa500; /* Color of the empty part of the star */
  z-index: 1;
}
.google-rating-card .partial-star::after {
  content: '★'; /* Filled star for the partial fill */
  position: absolute;
  left: 0;
  top: 0;
  color: #ffa500;
  overflow: hidden;
  width: var(--partial-width);
  z-index: 2;
}
.google-rating-card .rating-text {
  font-size: 0.9rem;
  color: #666;
}

/* ========== List Styles ========== */
.entry-content ul, .page-content ul, main ul {
  list-style: disc inside;
}
.entry-content ol, .page-content ol, main ol {
  list-style: decimal inside;
}
.entry-content ul, .page-content ul, main ul,
.entry-content ol, .page-content ol, main ol {
  padding-left: 1em;
  line-height: 1.6;
}
.entry-content li, .page-content li, main li {
  margin-bottom: 0.4em;
}

/* ========== Consolidated Place/Business Image Styles ========== */
.place-image, .business-image {
  float: left;
  margin: 0 2rem 1rem 0;
  max-width: 350px;
  width: 40%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.place-image img, .business-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

/* ...existing code... */
/*
Theme Name: Encinitas Directory
Description: A custom WordPress theme for the Encinitas Directory website. Features a modern, clean design perfect for showcasing local businesses and community information.
Author: Custom Development
Version: 1.0
Text Domain: encinitas-directory
*/

@import url("https://fonts.googleapis.com/css2?family=Federo&display=swap");

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* Links */
a {
  color: #4A90E2;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Fix H1 font-size deprecation warnings */
article h1,
aside h1,
nav h1,
section h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.page-header h1,
.post-type-archive-business .page-header h1 {
  font-size: 2.5rem;
}

/* Heading font-size reset to prevent browser deprecation warnings */
h1 { font-size: 2rem; line-height: 1.2; }
h2 { font-size: 1.6rem; line-height: 1.3; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.site-header {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #e1f5fe 100%);
  color: #2c3e50;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.12);
  position: relative;
  border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

/* Consolidated .site-header::before (opacity handled by pseudo-element stacking in HTML if needed) */
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".15" fill="%234A90E2"></path></svg>') no-repeat bottom;
  background-size: cover;
  opacity: 0.7;
  z-index: 1;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.site-title {
  font-family: "Federo", "Arial", "Helvetica", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
  color: #2c3e50;
  letter-spacing: -0.5px;
  position: relative;
  margin: 0;
}

.site-title a {
  color: #2c3e50;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.site-title:hover a {
  color: #4a90e2;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.site-branding {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.custom-logo {
  max-height: 50px;
  width: auto;
  filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.custom-logo:hover {
  transform: scale(1.05);
}

.custom-logo-link {
  display: inline-block;
  line-height: 0;
}

/* Navigation - Hamburger menu for all screen sizes */
.main-navigation {
  position: relative;
  z-index: 2;
}

.main-navigation ul {
  list-style: none;
  display: none; /* Hidden by default - show via hamburger */
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  z-index: 9999;

  /* Animation Properties */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
}

.main-navigation ul.show {
  display: flex;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.main-navigation li {
  width: 100%;
}

.main-navigation a {
  display: block;
  padding: 0.75rem;
  font-size: 0.95rem;
  border-bottom: 1px solid #eee;
  color: #2c3e50;
  background: none;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.main-navigation a:hover {
  color: #4a90e2;
  background: rgba(74, 144, 226, 0.05);
  text-decoration: none;
}

.main-navigation li:last-child a {
  border-bottom: none;
}

/* Mobile Menu Toggle - Always show hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1000;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: #2c3e50;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Menu visibility controlled by JavaScript hamburger toggle only */

/* Dropdown Icons */
.dropdown-icon {
  font-size: 0.8rem;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.submenu-open > a .dropdown-icon {
  transform: rotate(180deg);
}

/* Submenu Styles */
.main-navigation .sub-menu {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 5px;
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.main-navigation .sub-menu a {
  color: #333;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.main-navigation .sub-menu a:hover {
  color: #4a90e2;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #4a90e2;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-to-top:hover {
  background: #357abd;
  transform: translateY(-3px);
  text-decoration: none;
  color: white;
}

/* Form Validation */
input.invalid {
  border-color: #ff6b6b !important;
  box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

/* Loading States */
.loading * {
  transition: none !important;
}

button:disabled,
input[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Main Content */
.site-main {
  padding: 1.5rem 0;
  min-height: 60vh;
  max-width: 900px;
  margin: 0 auto;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #4a90e2 0%, #6bb6ff 100%);
  color: white;
  padding: 2rem 0;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  border-radius: 10px;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  background: #00bcd4;
  color: white;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 188, 212, 0.4);
  text-decoration: none;
  color: white;
  background: #0097a7;
}

/* Post/Page Content */
.content-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 1.5rem;
}

.main-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Post Styles */
.post {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.post-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.post-title a {
  color: #333;
  text-decoration: none;
}

.post-title a:hover {
  color: #4a90e2;
  text-decoration: none;
}

.post-meta {
  color: #666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.post-content {
  line-height: 1.5;
}

.post-content h2 {
  margin-bottom: 1rem;
}

.post-content p {
  margin-bottom: 1rem;
}

/* Directory/Business Listing Styles */
/* Card Styles (business, place, listing) */
.business-card, .place-card, .listing-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.business-card, .place-card {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.listing-card {
  overflow: hidden;
  border: 1px solid #e1e8ed;
  display: flex;
  flex-direction: column;
}
.business-card:hover, .place-card:hover, .listing-card:hover .listing-card-image img {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.business-name {
  font-size: 1.4rem;
  color: #4a90e2;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Category badge styles (business, place) */
.business-category, .place-category {
  background: #4a90e2;
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.business-description {
  color: #666;
  margin-bottom: 1rem;
}

.business-contact {
  font-size: 0.9rem;
  color: #555;
}

/* Places Grid and Card Styles */
.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.place-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.place-thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.place-info {
  padding: 1.5rem;
}

.place-name {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.place-name a {
  color: #333;
  text-decoration: none;
}

.place-name a:hover {
  color: #4a90e2;
}

.place-categories {
  margin-bottom: 1rem;
}

/* (merged above) */

.place-quick-info {
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #666;
}

.place-quick-info > div {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.place-quick-info .icon {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.difficulty-easy {
  color: #28a745;
  font-weight: 500;
}
.difficulty-moderate {
  color: #ffc107;
  font-weight: 500;
}
.difficulty-difficult {
  color: #dc3545;
  font-weight: 500;
}

.place-excerpt {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.place-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.place-actions .btn {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  color: white;
  text-decoration: none;
}

.no-places {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.no-places h2 {
  margin-bottom: 1rem;
  color: #333;
}

.no-places a {
  color: #4a90e2;
  text-decoration: none;
  font-weight: 500;
}

.no-places a:hover {
  color: #357abd;
  text-decoration: none;
}

/* Sidebar Widgets */
.widget {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.widget:last-child {
  border-bottom: none;
}

.widget-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #333;
  border-left: 4px solid #4a90e2;
  padding-left: 1rem;
}

.widget ul {
  list-style: none;
}

.widget li {
  margin-bottom: 0.5rem;
}

.widget a {
  color: #666;
  text-decoration: none;
}

.widget a:hover {
  color: #4a90e2;
  text-decoration: none;
}

/* Footer */
.site-footer {
  background: #2c3e50;
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 3rem;
}

.footer-content {
  text-align: center;
  margin-bottom: 2rem;
}

.footer-main h3 {
  margin-bottom: 1rem;
  color: #ecf0f1;
}

.footer-main p {
  color: #bdc3c7;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #34495e;
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  color: #4a90e2;
  text-decoration: none;
}

.footer-links a:hover {
  color: #5ba0f2;
  text-decoration: underline;
}

.footer-bottom p {
  color: #95a5a6;
  margin: 0;
}

/* Business Page Header */
.post-type-archive-business .page-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 0;
  background: linear-gradient(135deg, #4a90e2 0%, #6bb6ff 100%);
  color: white;
  border-radius: 10px;
}

.post-type-archive-business .page-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 600;
}

.post-type-archive-business .page-header .page-description {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

/* Listing Category Archive Styles */
.page-header {
  margin-bottom: 30px;
  text-align: center;
  padding: 40px 0;
  background: #f8f9fa;
  border-radius: 12px;
}

.page-header h1 {
  margin: 0;
  color: #2c3e50;
  font-size: 32px;
}

.page-header p {
  margin: 15px 0 0 0;
  color: #666;
  font-size: 18px;
}

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

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

.listing-content {
  padding: 20px;
}

.listing-content h3 {
  margin: 0 0 10px 0;
  font-size: 20px;
  line-height: 1.3;
}

.listing-content h3 a {
  color: #2c3e50;
  text-decoration: none;
}

.listing-content h3 a:hover {
  color: #4a90e2;
}

.listing-content .excerpt {
  margin: 0 0 15px 0;
  color: #666;
  line-height: 1.5;
  font-size: 14px;
}

.listing-content .address {
  margin: 0 0 15px 0;
  color: #888;
  font-size: 13px;
}

.no-listings {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.no-listings h2 {
  margin: 0 0 15px 0;
  color: #2c3e50;
}

.no-listings p {
  margin: 0;
  color: #666;
}

/* Single Place/Post Page Specific Fixes */

.place-header,
.business-header,
.post-header {
  margin-bottom: 1rem;
}

/* Shared image styles for business/place */
.place-image, .business-image {
  float: left;
  margin: 0 2rem 1rem 0;
  max-width: 350px;
  width: 40%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}


/* Fix place image sizing - embedded style */
.place-image {
  float: left;
  margin: 0 2rem 1rem 0;
  max-width: 350px;
  width: 40%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Shared image inner styles */
.place-image img, .business-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

/* Also apply same style to business images */
.business-image {
  float: left;
  margin: 0 2rem 1rem 0;
  max-width: 350px;
  width: 40%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Ensure content flows around the image properly */
/* Shared content block formatting context */
.place-content, .business-content {
  overflow: hidden;
}

/* Shared description styles */
.place-description, .business-description {
  line-height: 1.6;
  font-size: 1.1rem;
}

/* Clear float after content */
/* Clear floats after content */
.place-content::after, .business-content::after {
  content: "";
  display: table;
  clear: both;
}

/* Hide sidebar on specific pages */
.single-place .sidebar,
.single-business .sidebar,
.post-type-archive-place .sidebar,
.post-type-archive-business .sidebar,
.tax-place_category .sidebar,
.tax-business_category .sidebar {
  display: none;
}

/* Make content full width when sidebar is hidden */
.single-place .content-area,
.single-business .content-area,
.post-type-archive-place .content-area,
.post-type-archive-business .content-area,
.tax-place_category .content-area,
.tax-business_category .content-area {
  display: block;
}

.single-place .main-content,
.single-business .main-content,
.post-type-archive-place .main-content,
.post-type-archive-business .main-content,
.tax-place_category .main-content,
.tax-business_category .main-content {
  width: 100%;
  max-width: none;
}

/* Single Listing Page Container */
.single-place .site-main,
.single-business .site-main,
.single-listing .site-main {
  padding: 2rem 4rem;
}

@media (max-width: 850px) {
  .single-place .site-main,
  .single-business .site-main,
  .single-listing .site-main {
    padding: 1.5rem 1rem;
  }
}

/* Responsive Design */
/* Consolidated mobile header and navigation styles */
@media (max-width: 850px) {
  .header-content, .site-branding, .main-navigation, .menu-toggle {
    display: flex;
    align-items: center;
    position: relative;
  }
  .header-content {
    flex-direction: row;
    justify-content: space-between;
    min-height: auto;
  }
  .site-branding {
    flex: 0 0 auto;
    align-self: center;
  }
  .site-title {
    font-size: 2rem !important;
  }
  .main-navigation {
    flex: 0 0 auto;
    order: 2;
    width: auto;
    margin: 10px 0;
    z-index: 10000;
    height: auto;
  }
  .menu-toggle {
    order: 2;
    margin-left: auto;
    align-self: center;
  }
  .custom-logo {
    max-height: 40px;
  }
  .hero-section {
    margin-bottom: 1rem;
  }
  .hero-content h1 {
    font-size: 2rem !important;
    margin-bottom: 1rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .container {
    padding: 0 20px;
  }
  .site-main {
    padding: 1rem 0;
  }
  .archive-header {
    margin-bottom: 0.75rem !important;
  }
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .main-content,
  .sidebar {
    padding: 0;
    box-shadow: none;
  }

  /* Showcase grid - single column on mobile */
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Single post/place pages on mobile */
  .single .main-content,
  .single-place .main-content {
    padding: 1rem;
    margin: 0;
  }

  .single .post-thumbnail,
  .single-place .post-thumbnail {
    margin: -1rem -1rem 1rem -1rem;
    border-radius: 0;
  }

  .single .post-thumbnail img,
  .single-place .post-thumbnail img {
    border-radius: 0;
  }

  /* Ensure content doesn't overflow */
  .single .post-content,
  .single-place .entry-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
}

/* Mobile H1 sizing */
@media (max-width: 850px) {
  .post-title,
  .page-title {
    font-size: 2rem !important;
  }
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

.wp-post-image,
.attachment-full,
.size-full {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Post/Place Content Images */
.post-content img,
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.entry-content p {
  margin-bottom: 1rem;
}

/* Featured Images */
.post-thumbnail,
.featured-image {
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: 10px;
}

.post-thumbnail img,
.featured-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 1rem;
}
.mb-2 {
  margin-bottom: 2rem;
}
.mb-3 {
  margin-bottom: 3rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: #4a90e2;
  color: white;
}

.btn-primary:hover {
  background: #5a6fd8;
  color: white;
  text-decoration: none;
}

/* WordPress Specific */
.wp-block-group {
  margin-bottom: 2rem;
}

.aligncenter {
  text-align: center;
}

.alignleft {
  float: left;
  margin-right: 1rem;
}

.alignright {
  float: right;
  margin-left: 1rem;
}

/* Category Filter Buttons */
.directory-filters {
  margin: 2rem 0;
}

.filter-categories {
  margin-bottom: 2rem;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.category-button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background: rgba(74, 144, 226, 0.08);
  color: #4a90e2;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid rgba(74, 144, 226, 0.2);
  transition: all 0.3s ease;
}

.category-button:hover {
  background: rgba(74, 144, 226, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
  text-decoration: none;
  color: #4a90e2;
}

.category-button.active {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.category-button.active:hover {
  background: #357abd;
  color: white;
}

/* Hero Search Styles */
.hero-search .search-form {
  max-width: 650px;
  margin: 0.5rem auto 1.5rem auto;
  position: relative;
}

.hero-search .search-input-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50px;
  padding: 8px 8px 8px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.hero-search .search-input-container:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.hero-search .search-field {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  width: 100%;
  padding: 18px 16px !important;
  font-size: 1.2rem !important;
  color: #333 !important;
  font-weight: 400;
}

.hero-search .search-field::placeholder {
  color: #666 !important;
  font-weight: 400;
}

.hero-search .search-submit {
  width: 56px !important;
  height: 56px !important;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%) !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer;
  transition: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
}

.hero-search .search-submit:hover {
  background: linear-gradient(135deg, #357abd 0%, #2968a3 100%) !important;
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.hero-search .search-submit:before {
  display: none !important;
}

.hero-search .search-submit svg {
  stroke: #fff;
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

/* Style for PNG image */
.hero-search .search-submit img {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
  filter: brightness(0) invert(1) !important;
}

/* Remove problematic transition */
.hero-search .search-submit {
  transition: none !important;
}

/* Make search input clear button larger on mobile */
.hero-search .search-field::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  cursor: pointer;
}

.hero-search .search-field::-webkit-search-cancel-button:hover {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
}

@media (max-width: 850px) {
  .hero-search .search-field::-webkit-search-cancel-button {
    width: 24px;
    height: 24px;
    background-size: 20px 20px;
  }
}

/* Screen reader text for accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* Universal Search Form Styles (for other search forms) */
form[role="search"]:not(.hero-search .search-form),
.search-form:not(.hero-search .search-form),
.places-search-form {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  align-items: center;
  max-width: 400px;
}

/* Universal Search Input Styles */
input[type="search"]:not(.hero-search .search-field) {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(74, 144, 226, 0.2);
  border-radius: 25px;
  font-size: 0.9rem;
  background: rgba(74, 144, 226, 0.05);
  color: #2c3e50;
}

input[type="search"]:not(.hero-search .search-field):focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Universal Search Button Styles */
form[role="search"]:not(.hero-search .search-form) button,
.search-form:not(.hero-search .search-form) button,
.search-form:not(.hero-search .search-form) .search-submit,
.places-search-form button {
  width: 40px;
  height: 40px;
  background: #4a90e2;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

form[role="search"]:not(.hero-search .search-form) button:before,
.search-form:not(.hero-search .search-form) button:before,
.search-form:not(.hero-search .search-form) .search-submit:before,
.places-search-form button:before {
  content: "🔍";
  display: block;
}

/* General buttons (excluding search forms) */
button[type="submit"]:not(.places-search-form button):not(.search-form button),
input[type="submit"],
.btn,
.button {
  padding: 0.75rem 1.25rem;
  background: rgba(74, 144, 226, 0.08);
  color: #4a90e2;
  border: 1px solid rgba(74, 144, 226, 0.2);
  border-radius: 25px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

button[type="submit"]:not(.places-search-form button):not(.search-form button):hover,
input[type="submit"]:hover,
.btn:hover,
.button:hover {
  background: rgba(74, 144, 226, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
  text-decoration: none;
  color: #4a90e2;
}

/* Override for get directions button */
.get-directions-btn:hover,
.btn.get-directions-btn:hover,
.btn-primary.get-directions-btn:hover {
  background: #357abd !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(53, 122, 189, 0.3);
}

/* Read More and Link Buttons */
.read-more,
.view-all,
.learn-more {
  color: #4a90e2 !important;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.read-more:hover,
.view-all:hover,
.learn-more:hover {
  color: #357abd !important;
  text-decoration: none;
}

/* Get Directions Button */
a[href*="google.com/maps"] {
  background: #4a90e2 !important;
  color: white !important;
  padding: 12px 24px;
  text-decoration: none !important;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

a[href*="google.com/maps"]:hover {
  background: #1a365d !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.4);
  text-decoration: none !important;
  color: white !important;
}

a[href*="google.com/maps"]:focus,
a[href*="google.com/maps"]:active,
a[href*="google.com/maps"]:visited {
  text-decoration: none !important;
}

/* Mobile responsive */
@media (max-width: 850px) {
  .category-buttons {
    gap: 0.5rem;
  }

  .category-button {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  form[role="search"],
  .search-form,
  .places-search-form {
    max-width: 100%;
  }

  input[type="search"] {
    flex: 1;
  }

  /* Places grid responsive */
  .places-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
  }

  .place-card {
    margin-bottom: 0;
  }

  .place-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .place-actions .btn {
    flex: none;
  }

  /* Single post/place pages on mobile */
  .single .main-content,
  .single-place .main-content, .main-content {
    padding: 0;
    margin: 0;
    box-shadow: none;
  }

  .single .post-thumbnail,
  .single-place .post-thumbnail {
    margin: -1rem -1rem 1rem -1rem;
    border-radius: 0;
  }

  .single .post-thumbnail img,
  .single-place .post-thumbnail img {
    border-radius: 0;
  }

  /* Ensure content doesn't overflow */
  .single .post-content,
  .single-place .entry-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  body {
    background-color: white;
  }

  /* Fix site header height on single pages mobile - REMOVED for consistency */
}

/* Place Gallery Styles */
.place-gallery {
  margin: 2rem 0;
}

.place-gallery h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

@media (max-width: 850px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .gallery-item img {
    height: 150px;
  }
}

/* Mobile responsive for embedded images */
/* Mobile responsive for embedded images (overrides above on mobile) */
.place-image, .business-image {
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem 0;
}

/* Mobile description font size */
.place-description, .business-description {
  text-align: left;
  font-size: 1rem;
}

/* Archive & Category Page Styles */
.archive-header {
  text-align: center;
  margin-bottom: 1rem;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eff5 100%);
  border-radius: 12px;
  border: 1px solid #e1e8ed;
}

.archive-header .page-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.archive-header .archive-description {
  font-size: 1.1rem;
  color: #5a6f80;
  margin-top: 0.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

/* Listing Card Styles */
.listing-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e1e8ed;
  display: flex;
  flex-direction: column;
}

.listing-card-image {
  position: relative;
  overflow: hidden;
}

.listing-card-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.listing-card:hover .listing-card-image img {
  transform: scale(1.05);
}

.listing-card-content {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.listing-card-header {
  margin-bottom: .5rem;
}

.listing-card-category a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a90e2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.listing-card-title {
  font-size: 1.3rem;
  margin: 0.25rem 0 0 0;
}

.listing-card-excerpt {
  color: #5a6f80;
  flex-grow: 1;
  margin-bottom: 1rem 1.5rem;
}

.listing-card-footer {
  margin-top: auto;
}

/* Pagination Styles */
.pagination {
  margin: 3rem 0;
  text-align: center;
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 0; /* Remove gap, we'll handle spacing with margins */
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #f0f4f8;
  color: #5a6f80;
  text-decoration: none;
  transition: all 0.3s ease;
  height: 44px;
  min-width: 44px;
  box-sizing: border-box;
  line-height: 1;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid transparent;
  margin: 0 0.125rem; /* Consistent margin on all buttons */
}

/* Special styling for arrow buttons */
.pagination .page-numbers.prev,
.pagination .page-numbers.next {
  font-size: 1.2rem; /* Make arrows slightly larger */
  font-weight: 700; /* Make arrows bolder */
}

.pagination .page-numbers:hover {
  background: #e1e8ed;
  color: #2c3e50;
}

.pagination .page-numbers.current {
  background: #4a90e2;
  color: #fff;
  font-weight: 600;
  margin: 0 0.125rem; /* Same consistent margin as other buttons */
}

/* --- MOBILE MENU DROPDOWN FIX --- */
/* Consolidated mobile menu dropdown fix */
@media (max-width: 850px) {
  .main-navigation {
    position: relative;
    width: 100%;
  }
  .menu-toggle {
    display: flex;
    margin-left: auto;
    z-index: 10001;
  }
  .main-navigation ul {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    pointer-events: none;
  }
  .main-navigation ul.show {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
}
/* --- END MOBILE MENU DROPDOWN FIX --- */

/* --- MOBILE MENU ALIGNMENT FIX --- */
@media (max-width: 850px) {
  .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }
  .main-navigation {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: auto;
    width: auto;
    order: 2;
  }
  .menu-toggle {
    display: flex;
    margin-left: 0;
    z-index: 10001;
  }
  .main-navigation ul {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    pointer-events: none;
  }
  .main-navigation ul.show {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
}
/* --- END MOBILE MENU ALIGNMENT FIX --- */

/* Child Categories */
.child-categories {
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Category Button Style */
.category-btn {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eff5 100%);
  border-radius: 8px;
  border: 1px solid #e1e8ed;
  padding: 0.4rem 0.8rem;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.category-btn:hover {
  background: linear-gradient(135deg, #e8eff5 0%, #dae4ea 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: #2c3e50;
  text-decoration: none;
}

/* Post Categories Gap */
.post-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Child Categories and Tags Styling */
/* Child and tag categories shared styles */
.child-categories, .tag-categories {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 1rem 0;
}

/* Mobile Responsive Category Buttons */
@media (max-width: 850px) {
  .category-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 6px;
  }

  .child-categories,
  .tag-categories {
    gap: 0.3rem;
    margin: 0.5rem 0 .75rem 0;
  }
}

/* Remove external link arrows globally */
a[target="_blank"]:after,
.get-directions-btn:after {
  content: none !important;
}
