/* ================================================
   ROOT VARIABLES
   ================================================ */
:root {
  --accent: #ff6b6b;
  --accent-dark: #e63946;
  --grey: #f7f9fc;
  --dark: #222;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --transition: .3s ease;
}

.lfbd-form-container * {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ================================================
   FORM CONTAINER
   ================================================ */
.lfbd-form-container {
  max-width: 720px;
  margin: 60px auto;
  padding: 0 15px;
}

.lfbd-form-wrap {
  max-width: 700px;
  margin: auto;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.lfbd-form-wrap label {
  display: block;
  margin-top: 20px;
  font-weight: 600;
}

.lfbd-form-wrap input,
.lfbd-form-wrap select,
.lfbd-form-wrap textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* ================================================
   PROGRESS BAR
   ================================================ */
.lfbd-progress {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  margin-bottom: 30px;
  overflow: hidden;
}

.lfbd-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 33%;
  transition: width var(--transition);
}

/* ================================================
   STEPS
   ================================================ */
.lfbd-step {
  display: none;
}

.lfbd-step.active {
  display: block;
  animation: fadeIn .4s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px)
  }
  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.lfbd-step-title {
  font-size: 1.5rem;
  margin-bottom: 25px;
  font-weight: 600;
  color: var(--dark);
}

.lfbd-step-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

/* ================================================
   GRID LAYOUTS
   ================================================ */
.lfbd-grid-2 {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media(min-width: 600px) {
  .lfbd-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.lfbd-grid-3 {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media(min-width: 600px) {
  .lfbd-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ================================================
   FORM FIELDS
   ================================================ */
.lfbd-field {
  margin-bottom: 20px;
}

.lfbd-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: #444;
}

.lfbd-field input,
.lfbd-field select,
.lfbd-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccd2dc;
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color var(--transition);
}

.lfbd-field input:focus,
.lfbd-field select:focus,
.lfbd-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.lfbd-field textarea {
  resize: vertical;
  min-height: 100px;
}

/* ================================================
   PHONE INPUT
   ================================================ */
.lfbd-phone-wrap {
  display: flex;
  gap: 8px;
}

.lfbd-phone-wrap select {
  flex: 0 0 110px;
}

/* ================================================
   FILE UPLOAD
   ================================================ */
.lfbd-upload-zone {
  position: relative;
  border: 2px dashed #ccd2dc;
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  background: var(--grey);
  cursor: pointer;
  transition: border-color var(--transition);
}

.lfbd-upload-zone:hover {
  border-color: var(--accent);
}

.lfbd-upload-zone input[type=file] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.lfbd-upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lfbd-upload-preview img {
  height: 70px;
  border-radius: 6px;
  object-fit: cover;
}

/* ================================================
   BUSINESS HOURS (FORM)
   ================================================ */
.lfbd-hours-wrap {
  background: var(--grey);
  border-radius: var(--radius);
  padding: 20px;
}

.lfbd-day-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.lfbd-day-name {
  flex: 0 0 110px;
  font-weight: 500;
}

.lfbd-to {
  flex: 0 0 30px;
  text-align: center;
  color: #777;
}

/* ================================================
   BUTTONS
   ================================================ */
.lfbd-btn {
  display: inline-block;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  margin-top: 20px;
}

.lfbd-btn:hover {
  background: var(--accent-dark);
}

.lfbd-btn.primary {
  background: #2ecc71;
}

.lfbd-btn.primary:hover {
  background: #27ae60;
}

/* ================================================
   NOTICES
   ================================================ */
.lfbd-notice {
  background: #ffeaa7;
  border-left: 4px solid #fdcb6e;
  padding: 12px 16px;
  margin-bottom: 25px;
  border-radius: 4px;
}

/* ================================================
   DIRECTORY PAGE - IMPROVED RESPONSIVE LAYOUT
   ================================================ */
.lfbd-directory-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 30px auto 60px;
  padding: 0 15px;
}

/* Mobile: Stack sidebar on top */
@media (min-width: 768px) {
  .lfbd-directory-wrap {
    margin-top: 50px;
  }
}

/* Tablet and up: Show sidebar */
@media (min-width: 992px) {
  .lfbd-directory-wrap {
    grid-template-columns: 280px 1fr;
    margin-top: 60px;
  }
}

/* ================================================
   FILTER SIDEBAR - RESPONSIVE
   ================================================ */
.lfbd-filter-sidebar {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.lfbd-filter-sidebar h3 {
  margin: 0 0 20px;
  font-size: 1.25rem;
  color: var(--dark);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 12px;
}

.lfbd-filter-group {
  margin-bottom: 18px;
}

.lfbd-filter-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #444;
  font-size: 0.9rem;
}

.lfbd-filter-group input,
.lfbd-filter-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #ccd2dc;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.lfbd-filter-group input:focus,
.lfbd-filter-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Filter buttons */
.lfbd-filter-sidebar .lfbd-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px 20px;
  font-size: 15px;
}

.lfbd-btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.lfbd-btn.ghost:hover {
  background: var(--accent);
  color: #fff;
}

/* Mobile: Collapsible filter on small screens */
@media (max-width: 991px) {
  .lfbd-filter-sidebar {
    position: relative;
    top: 0;
  }
}

/* ================================================
   RESULTS AREA - RESPONSIVE
   ================================================ */
.lfbd-results-area {
  min-width: 0; /* Prevent grid overflow */
}

/* Result count/header */
.lfbd-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e7eb;
}

.lfbd-results-count {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
}

/* ================================================
   LISTING CARDS - RESPONSIVE GRID
   ================================================ */
.lfbd-cards-grid {
  display: grid;
  gap: 25px;
  grid-template-columns: 1fr;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .lfbd-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: 3 columns */
@media (min-width: 1200px) {
  .lfbd-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* ================================================
   LISTING CARDS - IMPROVED DESIGN
   ================================================ */
.lfbd-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #f0f0f0;
}

.lfbd-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 107, 107, 0.3);
}

.lfbd-card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--grey);
  position: relative;
  overflow: hidden;
}

.lfbd-card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lfbd-card:hover .lfbd-card-img::after {
  opacity: 1;
}

/* Fallback for missing images */
.lfbd-card-img:empty::after {
  content: '📷';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  opacity: 0.3;
  background: none;
}

.lfbd-card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--accent);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.lfbd-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lfbd-card-body h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lfbd-card-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  flex-grow: 1;
}

.lfbd-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.lfbd-card-cat {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 107, 107, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

.lfbd-card-county {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #666;
}

.lfbd-card-county::before {
  content: '📍';
  margin-right: 6px;
}

.lfbd-card-rating {
  display: flex;
  align-items: center;
  margin-top: 5px;
  color: #f39c12;
  font-size: 0.85rem;
}

.lfbd-card-rating::before {
  content: '★';
  margin-right: 5px;
}

.lfbd-card-footer {
  padding: 0 22px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lfbd-card-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.lfbd-card-link:hover {
  color: var(--accent-dark);
}

.lfbd-card-link::after {
  content: '→';
  margin-left: 5px;
  transition: transform 0.2s;
}

.lfbd-card-link:hover::after {
  transform: translateX(3px);
}

.lfbd-card-phone {
  font-size: 0.85rem;
  color: #666;
}

/* Empty state */
.lfbd-cards-grid p {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  font-size: 1.1rem;
  color: #666;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* ================================================
   SINGLE LISTING PAGE
   ================================================ */
.lfbd-single {
  background: #f9fafb;
  padding: 40px 15px;
}

@media (min-width: 768px) {
  .lfbd-single {
    padding: 60px 30px;
  }
}

.lfbd-hero {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .lfbd-hero {
    gap: 40px;
  }
}

@media (min-width: 992px) {
  .lfbd-hero {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.lfbd-hero-text {
  background: #fff;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .lfbd-hero-text {
    padding: 40px;
  }
}

.lfbd-hero-cat {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lfbd-hero-meta {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
}

.lfbd-hero-social {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lfbd-social-btn {
  background: #2c3e50;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: 0.3s;
}

.lfbd-social-btn:hover {
  background: #34495e;
  transform: translateY(-2px);
}

/* ================================================
   MAP - RESPONSIVE
   ================================================ */
#map {
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 768px) {
  #map {
    height: 380px;
  }
}

.lfbd-map-placeholder {
  height: 300px;
  background: var(--grey);
  display: grid;
  place-items: center;
  color: #777;
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .lfbd-map-placeholder {
    height: 380px;
  }
}

/* ================================================
   GALLERY - RESPONSIVE
   ================================================ */
.lfbd-gallery {
  margin-top: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .lfbd-gallery {
    margin-top: 50px;
  }
}

.lfbd-gallery h2 {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.lfbd-gallery-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 480px) {
  .lfbd-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .lfbd-gallery-grid {
    gap: 15px;
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 992px) {
  .lfbd-gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.lfbd-gallery-grid a img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .lfbd-gallery-grid a img {
    height: 150px;
  }
}

.lfbd-gallery-grid a:hover img {
  transform: scale(1.05);
}

/* ================================================
   BUSINESS HOURS (DISPLAY) - RESPONSIVE
   ================================================ */
.lfbd-hours {
  margin-top: 40px;
  background: #fff;
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .lfbd-hours {
    margin-top: 50px;
    padding: 30px;
  }
}

.lfbd-hours h2 {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.lfbd-hours-grid {
  display: grid;
  gap: 8px;
}

.lfbd-hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eef;
  gap: 15px;
}

.lfbd-hours-row:last-child {
  border-bottom: none;
}

.lfbd-day {
  font-weight: 600;
  color: var(--dark);
  min-width: 100px;
}

.lfbd-time {
  color: #555;
  text-align: right;
  font-size: 0.95rem;
}

/* ================================================
   LOADING STATE
   ================================================ */
.lfbd-loading {
  display: none;
  text-align: center;
  padding: 40px 20px;
  font-size: 1.1rem;
  color: #666;
}

.lfbd-loading.active {
  display: block;
}

/* ================================================
   RESPONSIVE UTILITIES
   ================================================ */
@media (max-width: 767px) {
  .lfbd-hide-mobile {
    display: none;
  }
}

@media (min-width: 768px) {
  .lfbd-hide-desktop {
    display: none;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Accessibility improvements */
.lfbd-card:focus,
.lfbd-btn:focus,
.lfbd-filter-group input:focus,
.lfbd-filter-group select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ================================================
   PAGINATION STYLES
   ================================================ */
.lfbd-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 24px 0 8px;
  flex-wrap: wrap;
}

.lfbd-pagination .lfbd-page {
  appearance: none;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.lfbd-pagination .lfbd-page:hover { border-color: #bbb; }

.lfbd-pagination .lfbd-page.active {
  background: #0073aa;
  border-color: #0073aa;
  color: #fff;
}