/*
  CB Pests Section
  Follows site conventions: cb- prefix, #f59e0b primary, clean borders
*/

/* ── Section ── */
.cb-pests-section {
  padding: 4rem 0 2rem;
}

/* ── Header ── */
.cb-pests-header {
  text-align: center;
  margin-bottom: 2rem;
}
.cb-pests-header h3 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #111;
  margin: 0 0 1.25rem;
}
.cb-pests-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.cb-pests-tabs-inner {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: .5rem;
  padding: .25rem;
  gap: .25rem;
}
.cb-pests-tab-toggle {
  padding: .625rem 1.75rem;
  font-size: .875rem;
  font-weight: 600;
  background: transparent;
  border: none;
  border-radius: .375rem;
  cursor: pointer;
  transition: all .2s ease;
  color: #64748b;
  white-space: nowrap;
}
.cb-pests-tab-toggle:hover {
  background: rgba(255,255,255,.6);
  color: #111;
}
.cb-pests-tab-toggle.is-active {
  background: #fff;
  color: #f59e0b;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.cb-pests-section-bar {
  width: 4rem;
  height: 4px;
  background: #f59e0b;
  margin: 0 auto 1.25rem;
  border-radius: 2px;
}
.cb-pests-hint {
  display: none;
  color: #475569;
  font-size: .875rem;
  margin-top: .75rem;
}

/* ── Mobile toggle ── */
.cb-pests-mobile-toggle {
  display: none;
}

/* ── Pests icons list ── */
.cb-pests-list {
  display: block;
  background: rgba(245,158,11,.04);
  position: relative;
  overflow: hidden;
  padding: 0;
}
.cb-pests-list-container {
  max-width: 100%;
  padding: 0;
  display: flex;
  justify-content: center;
}
.cb-pests-icons {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  flex-direction: row;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  border-left: 1px solid #e5e7eb;
}
.cb-pests-icons::-webkit-scrollbar {
  display: none;
}

/* ── Individual pest button ── */
.cb-pest-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  flex-shrink: 0;
  scroll-snap-align: start;
}
.cb-pest-button-inner {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  width: 85px;
  padding: 1rem .5rem;
  border-bottom: none;
  border-right: 1px solid #e5e7eb;
  color: #111;
  transition: background .2s, color .2s;
  position: relative;
}
.cb-pest-button-inner:hover {
  background: #f59e0b;
  color: #fff;
}
.cb-pest-button.is-active .cb-pest-button-inner {
  background: #f59e0b;
  color: #fff;
}
.cb-pest-button.is-active .cb-pest-button-inner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: .375rem;
  background: #f59e0b;
}
.cb-pest-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  background: rgba(245,158,11,.1);
  color: #f59e0b;
  transition: background .2s, color .2s;
}
.cb-pest-icon svg,
.cb-pest-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cb-pest-button-inner:hover .cb-pest-icon {
  background: #fff;
  color: #f59e0b;
}
.cb-pest-button.is-active .cb-pest-icon {
  background: #fff;
  color: #f59e0b;
}
.cb-pest-button h4 {
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: inherit;
  text-align: center;
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .cb-pests-section {
    padding: 0;
    margin: 2rem 0 3rem;
  }
  .cb-pests-header {
    padding-top: 0;
  }
  .cb-pests-header h3 {
    font-size: 1.25rem;
  }
  .cb-pests-hint {
    display: block;
  }
  .cb-pests-icons {
    justify-content: center;
  }
  .cb-pest-button-inner {
    gap: .75rem;
    width: 94px;
    padding: 1.5rem .5rem;
  }
  .cb-pest-icon {
    width: 1.5rem;
    height: 1.5rem;
    font-size: .875rem;
    border-radius: .75rem;
  }
  .cb-pest-button-inner:hover {
    background: #bcbcbc;
    color: #f59e0b;
  }
  .cb-pest-button.is-active .cb-pest-button-inner {
    background: #bcbcbc;
    color: #f59e0b;
  }
  .cb-pest-button.is-active .cb-pest-button-inner::after {
    background: #f59e0b;
  }
  .cb-pest-button h4 {
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
  }
}

@media (min-width: 1024px) {
  .cb-pest-icon {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1rem;
  }
  .cb-pest-button-inner {
    width: 120px;
    padding: 2rem .5rem;
  }
  .cb-pest-button h4 {
    font-size: .875rem;
  }
}

/* ── Pest info content panels ── */
.cb-pests-info {
  margin-top: 1.5rem;
  background: #f8fafc;
  padding: 2rem 0;
}
.cb-pests-info-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.cb-pest-content {
  display: none;
}
.cb-pest-content.is-active {
  display: block;
  animation: cbFadeIn .35s ease;
}
@keyframes cbFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cb-pest-content-inner {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
}
.cb-pest-content-text {
  padding: 1.75rem;
  flex: 1;
  min-width: 0;
}
.cb-pest-content-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #f59e0b;
  background: rgba(245,158,11,.08);
  padding: .3rem .75rem;
  border-radius: 2rem;
  margin-bottom: .75rem;
}
.cb-pest-content-inner h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 .75rem;
  letter-spacing: -.01em;
}
.cb-pest-content-inner p {
  font-size: .9375rem;
  line-height: 1.75;
  color: #475569;
  margin: 0 0 1.25rem;
}
.cb-pest-content-link {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 700;
  color: #f59e0b;
  text-decoration: none;
  padding: .5rem 1.25rem;
  border-radius: .5rem;
  background: rgba(245,158,11,.06);
  transition: background .2s, color .2s, transform .15s;
}
.cb-pest-content-link:hover {
  background: #f59e0b;
  color: #fff;
  text-decoration: none;
}
.cb-pest-content-link:active {
  transform: scale(.97);
}
.cb-pest-content-link::after {
  content: '→';
  transition: transform .2s;
}
.cb-pest-content-link:hover::after {
  transform: translateX(3px);
}
.cb-pest-content-img {
  width: 100%;
  min-height: 200px;
  max-height: 280px;
  overflow: hidden;
  position: relative;
}
.cb-pest-content-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .4s ease;
}
.cb-pest-content-inner:hover .cb-pest-content-img img {
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .cb-pests-info {
    margin-top: 2rem;
    padding: 3rem 0;
  }
  .cb-pest-content-inner {
    flex-direction: row;
    align-items: stretch;
  }
  .cb-pest-content-text {
    padding: 2.5rem;
  }
  .cb-pest-content-inner h4 {
    font-size: 1.5rem;
  }
  .cb-pest-content-inner p {
    font-size: 1rem;
  }
  .cb-pest-content-img {
    width: 340px;
    min-width: 340px;
    max-height: none;
    min-height: 260px;
  }
}

@media (min-width: 1024px) {
  .cb-pests-info {
    padding: 4rem 0;
  }
  .cb-pest-content-text {
    padding: 3rem;
  }
  .cb-pest-content-img {
    width: 420px;
    min-width: 420px;
    min-height: 300px;
  }
}

@media (min-width: 1280px) {
  .cb-pest-icon {
    width: 4rem;
    height: 4rem;
    font-size: 1.125rem;
  }
  .cb-pest-button-inner {
    width: 150px;
    padding: 2.5rem .5rem;
  }
  .cb-pest-button h4 {
    font-size: 1rem;
  }
}
