/* home.css — page-specific styles. Global vars/nav/footer in global.css */

/* ── HERO ── */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 50%, var(--dark-3) 100%);
  display: flex; align-items: center;
  padding: 50px 5% 80px;
  position: relative;
  /* No overflow clipping — dropdown must escape freely */
}
/* Decorative glow — translateX pushes it right so gradient fades before viewport edge */
.hero::before {
  content: '';
  position: absolute; top: -150px; right: 0;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232,100,42,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translateX(40%);
}
.hero-grid {
  max-width: 1280px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 80px;
}
/* Ensure dropdown can escape hero left column */
.hero-grid > div:first-child {
  overflow: visible;
  position: relative;
}
.hero-image-wrap {
  width: 100%; height: 100%; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,100,42,0.15); border: 1px solid rgba(232,100,42,0.3);
  color: #FF9A6C; padding: 6px 14px; border-radius: 50px;
  font-size: 13px; font-weight: 500; margin-bottom: 24px;
}
.hero-badge::before { content: '●'; font-size: 8px; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.hero h1 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 800; line-height: 1.1; letter-spacing: -1.5px;
  color: white; margin-bottom: 20px;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p {
  font-size: 17px; color: rgba(255,255,255,0.65); line-height: 1.7;
  margin-bottom: 36px; max-width: 480px; font-weight: 300;
}


/* Search Box */
.search-box {
  background: white;
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  gap: 0;
  align-items: stretch;
  box-shadow: var(--shadow-lg);
  margin-bottom: 10px;
  /* NO overflow:hidden — dropdown panel must escape */
  position: relative;
  min-height: 64px;
}
.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  min-width: 0;
}
.search-input-wrap svg { color: var(--text-lighter); flex-shrink: 0; }
.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: transparent;
  min-width: 0;
  width: 100%;
}
.search-input-wrap input::placeholder { color: var(--text-lighter); }

.search-divider { width: 1px; background: var(--border); align-self: stretch; margin: 8px 0; flex-shrink: 0; }

/* Category selector wrapper */
#home-cat-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  min-width: 0;
}
#home-cat-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  cursor: pointer;
  width: 100%;
  min-width: 160px;
  user-select: none;
}
#home-cat-display svg { flex-shrink: 0; color: var(--text-lighter); }
#home-cat-label { font-size: 14px; color: var(--text-light); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Category dropdown panel — escapes the search box */
#home-cat-panel {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  width: 320px !important;
  background: white;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  border: 1.5px solid var(--border);
  z-index: 9999 !important;
  overflow: hidden;
}
#home-cat-panel > div:first-child {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
#home-cat-search {
  width: 100%;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: transparent;
  pointer-events: all;
  cursor: text;
}
#home-cat-list {
  max-height: 260px;
  overflow-y: auto;
}

.search-btn {
  padding: 0 28px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(232,100,42,0.4);
  flex-shrink: 0;
  margin: 4px;
  min-height: 48px;
}
.search-btn:hover { background: var(--orange-dark); transform: translateY(-1px); }
.search-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tag {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7); padding: 5px 12px; border-radius: 50px;
  font-size: 12px; cursor: pointer; transition: all .2s; text-decoration: none;
}
.hero-tag:hover { background: rgba(232,100,42,0.2); border-color: rgba(232,100,42,0.4); color: white; }

/* Hero right stats */
.hero-right { position: relative; }
.hero-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); padding: 24px; backdrop-filter: blur(10px); transition: all .3s;
}
.stat-card:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }
.stat-card.featured {
  grid-column: 1/-1;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-color: transparent;
}
.stat-icon { font-size: 28px; margin-bottom: 12px; }
.stat-num { font-family: 'Sora', sans-serif; font-size: 32px; font-weight: 800; color: white; line-height: 1; }
.stat-label { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; font-weight: 300; }
.stat-card.featured .stat-label { color: rgba(255,255,255,0.8); }

/* Trust row */
.hero-trust-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.tp-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50px; padding: 7px 14px; text-decoration: none; transition: all 0.3s;
}
.tp-pill:hover { background: rgba(255,255,255,0.13); }
.tp-pill .tp-name { font-size: 0.78rem; font-weight: 800; color: #fff; }
.tp-pill .tp-name em { color: #00b67a; font-style: normal; }
.tp-pill .tp-stars i { color: #00b67a; font-size: 0.7rem; }
.tp-pill .tp-num { font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.85); }
.h-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.18); }
.h-avatars { display: flex; }
.h-avatars img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); margin-left: -7px; object-fit: cover; }
.h-avatars img:first-child { margin-left: 0; }
.h-trust-text { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.75); }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.h-stat .h-stat-num { font-size: 1.8rem; font-weight: 900; color: #fff; line-height: 1; display: block; letter-spacing: -0.5px; }
.h-stat .h-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.55); font-weight: 500; }

/* ── TRUST BAR ── */
.trust-bar { background: var(--dark-2); padding: 20px 5%; border-bottom: 1px solid rgba(255,255,255,0.06); }
.trust-bar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.trust-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.7); font-size: 13px; }
.trust-item svg { color: var(--orange); flex-shrink: 0; }

/* ── CATEGORIES ── */
.cats-section { background: var(--border-light); }
.cats-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px; flex-wrap: wrap; gap: 16px; }
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  align-items: stretch; /* all cards in a row stretch to same height */
}
.cat-card {
  background: white; border-radius: var(--radius); padding: 20px 12px;
  text-align: center; border: 1.5px solid var(--border);
  cursor: pointer; text-decoration: none; transition: all .25s;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  /* Equal height cards — content never overflows */
  height: 100%;
  min-width: 0;
  word-break: break-word;
}
.cat-card:hover { border-color: var(--orange); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(232,100,42,0.12); }
.cat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--orange-pale); display: flex; align-items: center;
  justify-content: center; font-size: 22px; transition: all .25s;
  flex-shrink: 0;
}
.cat-card:hover .cat-icon { background: var(--orange); }
.cat-name {
  font-size: 13px; font-weight: 600; color: var(--dark);
  line-height: 1.35;
  /* Wrap long titles — no overflow */
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  width: 100%;
}
.cat-count {
  font-size: 11px; color: var(--text-lighter);
  white-space: nowrap; /* fine for short "12+ pros" text */
}
/* Description variant used on printing categories page */
.cat-desc {
  white-space: normal;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
  width: 100%;
}
.view-all-btn {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--orange); font-weight: 600; font-size: 14px;
  text-decoration: none; border: 1.5px solid var(--orange);
  padding: 10px 22px; border-radius: var(--radius-sm); transition: all .2s;
}
.view-all-btn:hover { background: var(--orange); color: white; }

/* ── HOW IT WORKS ── */
.how-section { background: white; overflow: clip; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; }
.step-card { text-align: center; position: relative; }
.step-card::after { content: '→'; position: absolute; top: 28px; right: -24px; font-size: 24px; color: var(--border); font-weight: 300; }
.step-card:last-child::after { display: none; }
.step-num {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 800; color: white;
  margin: 0 auto 20px; box-shadow: 0 8px 20px rgba(232,100,42,0.3);
}
.step-title { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.step-desc { font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* ── PROFESSIONALS ── */
.pros-section { background: var(--border-light); }
.pros-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.pros-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn { padding: 7px 16px; border-radius: 50px; border: 1.5px solid var(--border); font-size: 13px; font-weight: 500; color: var(--text-light); background: white; cursor: pointer; transition: all .2s; }
.filter-btn.active, .filter-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-pale); }
.pros-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.pro-card { background: white; border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--border); transition: all .25s; cursor: pointer; }
.pro-card:hover { border-color: var(--orange); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.pro-card-top { padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.pro-avatar { width: 54px; height: 54px; border-radius: 14px; background: var(--orange); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 800; color: white; }
.pro-info { flex: 1; min-width: 0; }
.pro-name { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 700; color: var(--dark); }
.pro-trade { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.pro-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.badge { padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 600; }
.badge-verified { background: #E8F5E9; color: #2E7D32; }
.badge-featured { background: var(--orange-pale); color: var(--orange-dark); }
.badge-top { background: #EDE7F6; color: #512DA8; }
.pro-card-mid { padding: 0 20px 16px; }
.pro-stats { display: flex; gap: 20px; }
.pro-stat { text-align: center; }
.pro-stat-num { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 700; color: var(--dark); }
.pro-stat-label { font-size: 11px; color: var(--text-lighter); }
.stars { color: #F59E0B; font-size: 13px; letter-spacing: 1px; }
.pro-card-footer { padding: 14px 20px; border-top: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.pro-location { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-light); }
.pro-cta { padding: 8px 18px; background: var(--orange); color: white; border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all .2s; }
.pro-cta:hover { background: var(--orange-dark); }

/* ── TESTIMONIALS ── */
.testimonials-section { background: white; }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.testimonial-card { background: var(--border-light); border-radius: var(--radius); padding: 28px; border: 1.5px solid var(--border); transition: all .25s; }
.testimonial-card:hover { border-color: var(--orange); box-shadow: var(--shadow); }
.testimonial-card.featured { background: linear-gradient(135deg, var(--dark), var(--dark-2)); border-color: transparent; grid-row: span 2; }
.quote-icon { font-size: 36px; color: var(--orange); margin-bottom: 16px; line-height: 1; }
.testimonial-card.featured .quote-icon { color: rgba(232,100,42,0.6); }
.testimonial-text { font-size: 14px; line-height: 1.8; color: var(--text-light); }
.testimonial-card.featured .testimonial-text { color: rgba(255,255,255,0.7); font-size: 15px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 14px; flex-shrink: 0; }
.author-name { font-weight: 600; font-size: 14px; color: var(--dark); }
.testimonial-card.featured .author-name { color: white; }
.author-trade { font-size: 12px; color: var(--text-lighter); }
.testimonial-card.featured .author-trade { color: rgba(255,255,255,0.5); }

/* ── JOIN CTA ── */
.join-section { background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%); position: relative; overflow: hidden; }
.join-section::before { content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(232,100,42,0.2) 0%, transparent 60%); border-radius: 50%; }
.join-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.join-title { font-family: 'Sora', sans-serif; font-size: clamp(28px, 3vw, 42px); font-weight: 800; color: white; letter-spacing: -1px; margin-bottom: 16px; }
.join-title em { color: var(--orange); font-style: normal; }
.join-desc { font-size: 16px; color: rgba(255,255,255,0.6); line-height: 1.7; margin-bottom: 32px; font-weight: 300; }
.join-features { display: flex; flex-direction: column; gap: 14px; }
.join-feature { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.8); font-size: 14px; }
.join-feature-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
.join-card { background: white; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg); }
.join-card-title { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.join-card-sub { font-size: 14px; color: var(--text-light); margin-bottom: 28px; }
.join-input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; outline: none; font-family: 'DM Sans', sans-serif; color: var(--text); margin-bottom: 12px; transition: border-color .2s; }
.join-input:focus { border-color: var(--orange); }
.join-submit { width: 100%; padding: 14px; background: var(--orange); color: white; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all .2s; box-shadow: 0 6px 16px rgba(232,100,42,0.3); }
.join-submit:hover { background: var(--orange-dark); transform: translateY(-1px); }
.join-note { text-align: center; margin-top: 12px; font-size: 12px; color: var(--text-lighter); }

/* ── POPULAR AREAS ── */
.areas-section { background: var(--border-light); }
.areas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 36px; }
.area-link { background: white; border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 16px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 500; transition: all .2s; display: flex; align-items: center; justify-content: space-between; }
.area-link:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-pale); }
.area-link span { font-size: 11px; color: var(--text-lighter); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-right { display: none; }
  .steps-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .join-inner { grid-template-columns: 1fr; gap: 40px; }
  .trust-bar-inner { justify-content: flex-start; gap: 20px; }
}
@media (max-width: 640px) {
  .hero { padding: 40px 4% 60px; min-height: auto; }
  .hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .hero p { font-size: 15px; }

  /* Stack search box vertically on mobile */
  .search-box {
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: var(--radius-sm);
    overflow: visible; /* keep dropdown visible */
    min-height: auto;
  }
  .search-input-wrap {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    min-height: 52px;
  }
  .search-divider { display: none; }
  #home-cat-wrap {
    border-bottom: 1px solid var(--border);
    min-height: 52px;
  }
  #home-cat-display {
    padding: 14px 16px;
    min-width: unset;
  }
  /* On mobile, dropdown opens full-width */
  #home-cat-panel {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    min-width: 280px;
  }
  .search-btn {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding: 16px;
    width: 100%;
    margin: 0;
    min-height: 52px;
  }

  .steps-grid { grid-template-columns: 1fr; }
  .step-card::after { display: none; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonial-card.featured { grid-row: auto; }
  .cats-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .join-card { padding: 24px; }
  .trust-bar-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-trust-row { gap: 10px; }
  .hero-stats { gap: 16px; }
}
@media (max-width: 400px) {
  /* Strict 2-column grid — every card exactly the same width */
  .cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Smaller padding so text has more room */
  .cat-card { padding: 16px 10px; gap: 8px; }
  .cat-icon { width: 44px; height: 44px; font-size: 20px; }
  .cat-name { font-size: 12px; }
  .areas-grid { grid-template-columns: 1fr; }
}
