:root {
  --svd-green: #2f8f46;
  --svd-green-dark: #1e6932;
  --svd-green-soft: #ecf8ef;
  --svd-ink: #14201a;
  --svd-muted: #647168;
  --svd-line: #dfe8e1;
  --svd-white: #fff;
  --svd-shadow: 0 18px 50px rgba(23, 54, 34, 0.12);
}

.svd-directory,
.svd-modal {
  box-sizing: border-box;
  font-family: inherit;
}

.svd-directory *,
.svd-modal * {
  box-sizing: border-box;
}

.svd-directory {
  width: 100%;
  padding: clamp(28px, 4vw, 64px) 18px;
  color: var(--svd-ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(47, 143, 70, 0.08), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
}

.svd-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.svd-hero {
  text-align: center;
  margin: 0 auto clamp(28px, 4vw, 44px);
}

.svd-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--svd-green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.svd-hero h2 {
  margin: 0;
  color: var(--svd-ink);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.svd-hero p {
  margin: 12px auto 22px;
  max-width: 700px;
  color: var(--svd-muted);
  font-size: clamp(14px, 1.8vw, 17px);
}

.svd-search-wrap {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
}

.svd-search {
  width: 100%;
  height: 58px;
  padding: 0 54px 0 52px !important;
  border: 1px solid var(--svd-line) !important;
  border-radius: 16px !important;
  outline: none !important;
  background: var(--svd-white) !important;
  box-shadow: 0 12px 34px rgba(22, 48, 31, 0.08) !important;
  color: var(--svd-ink) !important;
  font: inherit !important;
  font-size: 16px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.svd-search:focus {
  border-color: rgba(47, 143, 70, 0.65) !important;
  box-shadow: 0 0 0 4px rgba(47, 143, 70, 0.11), 0 12px 34px rgba(22, 48, 31, 0.08) !important;
}

.svd-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  fill: var(--svd-green);
  pointer-events: none;
}

.svd-clear {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: #eef4f0;
  color: #405047;
  font-size: 24px;
  line-height: 32px;
  cursor: pointer;
}

.svd-search-meta {
  min-height: 24px;
  margin-top: 12px;
  color: var(--svd-muted);
  font-size: 13px;
}

.svd-status.is-loading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  border: 2px solid #c9d6cd;
  border-top-color: var(--svd-green);
  border-radius: 50%;
  vertical-align: -2px;
  animation: svd-spin 0.75s linear infinite;
}

@keyframes svd-spin {
  to { transform: rotate(360deg); }
}

.svd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
}

.svd-card {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #e6eee8;
  box-shadow: 0 10px 30px rgba(17, 50, 29, 0.1);
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.svd-card:focus-visible {
  outline: 4px solid rgba(47, 143, 70, 0.25);
  outline-offset: 4px;
}

.svd-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 46px rgba(17, 50, 29, 0.17);
}

.svd-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 245px;
  overflow: hidden;
  background: linear-gradient(135deg, #dceade, #c6dccb);
}

.svd-card-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease, filter 0.35s ease;
}

.svd-card:hover .svd-card-media > img {
  transform: scale(1.045);
}

.svd-image-placeholder,
.svd-modal-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 70% 20%, rgba(255,255,255,0.35), transparent 15rem),
    linear-gradient(145deg, #4bab60, #246f39);
  color: rgba(255,255,255,0.92);
  font-size: clamp(56px, 7vw, 86px);
  font-weight: 800;
  letter-spacing: -0.06em;
}

.svd-verified-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: calc(100% - 24px);
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,0.42);
  border-radius: 999px;
  background: rgba(18, 35, 24, 0.76);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 10px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.025em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,0.14);
}

.svd-badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #71dd88;
  box-shadow: 0 0 0 3px rgba(113, 221, 136, 0.18);
}

.svd-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: #fff;
  background: linear-gradient(180deg, transparent 34%, rgba(7, 20, 11, 0.72) 76%, rgba(7, 20, 11, 0.94) 100%);
  transition: background 0.3s ease;
}

.svd-card-heading h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.18;
}

.svd-card-heading p {
  margin: 5px 0 0;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
}

.svd-hover-details {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: max-height 0.35s ease, margin 0.35s ease, opacity 0.28s ease, transform 0.35s ease;
}

.svd-card:hover .svd-card-overlay,
.svd-card:focus-visible .svd-card-overlay {
  background: linear-gradient(180deg, rgba(8, 24, 13, 0.08) 0%, rgba(8, 24, 13, 0.9) 48%, rgba(8, 24, 13, 0.98) 100%);
}

.svd-card:hover .svd-hover-details,
.svd-card:focus-visible .svd-hover-details {
  max-height: 180px;
  margin-top: 14px;
  opacity: 1;
  transform: translateY(0);
}

.svd-hover-details span {
  display: block;
  margin-top: 5px;
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  line-height: 1.35;
}

.svd-hover-details span strong {
  color: #fff;
}

.svd-hover-details em {
  display: block;
  margin-top: 12px;
  color: #9decad;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.svd-empty {
  margin: 22px auto 0;
  padding: 44px 20px;
  border: 1px dashed #cfdcd2;
  border-radius: 18px;
  text-align: center;
  background: #fff;
}

.svd-empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--svd-green-soft);
  color: var(--svd-green-dark);
  font-size: 24px;
  font-weight: 800;
}

.svd-empty h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.svd-empty p {
  margin: 0;
  color: var(--svd-muted);
}

/* Modal */
body.svd-modal-open {
  overflow: hidden !important;
}

.svd-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  padding: 22px;
}

.svd-modal.is-open {
  display: grid;
  place-items: center;
}

.svd-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 15, 10, 0.72);
  backdrop-filter: blur(6px);
  animation: svd-fade-in 0.2s ease both;
}

.svd-modal-dialog {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.35fr);
  width: min(1040px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.34);
  animation: svd-pop-in 0.22s ease both;
}

@keyframes svd-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes svd-pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.svd-modal-close {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 32, 22, 0.82);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.svd-modal-close:hover {
  transform: rotate(4deg) scale(1.05);
  background: var(--svd-green-dark);
}

.svd-modal-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 530px;
  padding: 14px;
  overflow: hidden;
  background: #eef3ef;
}

.svd-modal-photo > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 14px;
  background: #eef3ef;
}

.svd-modal-placeholder {
  min-height: 502px;
  border-radius: 14px;
}

.svd-modal-verified {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(14, 32, 20, 0.84);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.svd-modal-body {
  min-width: 0;
  overflow-y: auto;
  padding: clamp(28px, 4vw, 46px);
}

.svd-modal-title > span {
  color: var(--svd-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.svd-modal-title h2 {
  margin: 7px 0 3px;
  padding-right: 34px;
  color: var(--svd-ink);
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.svd-modal-title p {
  margin: 0;
  color: var(--svd-muted);
  font-size: 15px;
}

.svd-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.svd-detail-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--svd-line);
  border-radius: 14px;
  background: #fbfdfb;
}

.svd-detail-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--svd-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.svd-detail-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--svd-ink);
  font-size: 15px;
  line-height: 1.35;
}

.svd-detail-wide {
  grid-column: 1 / -1;
}

.svd-contact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 16px;
  background: var(--svd-green-soft);
}

.svd-contact-label {
  display: block;
  margin-bottom: 3px;
  color: var(--svd-green-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.svd-contact-box strong {
  font-size: 14px;
}

.svd-contact-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.svd-contact-pair {
  display: flex;
  gap: 8px;
}

.svd-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid #cbdccc;
  border-radius: 11px;
  background: #fff;
  color: #1f4028 !important;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: transform 0.17s ease, border-color 0.17s ease, box-shadow 0.17s ease;
}

.svd-contact-btn:hover {
  transform: translateY(-1px);
  border-color: #9dc7a6;
  box-shadow: 0 8px 18px rgba(25, 80, 39, 0.1) !important;
}

.svd-contact-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.svd-email-btn {
  background: var(--svd-green) !important;
  border-color: var(--svd-green) !important;
  color: #fff !important;
}

.svd-whatsapp-btn {
  color: #137333 !important;
}

.svd-contact-btn.is-disabled {
  display: none;
}

@media (max-width: 980px) {
  .svd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .svd-modal-dialog {
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  }

  .svd-modal-photo {
    min-height: 460px;
  }

  .svd-modal-photo > img {
    min-height: 0;
  }

  .svd-modal-placeholder {
    min-height: 432px;
  }

  .svd-contact-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .svd-contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .svd-directory {
    padding-inline: 13px;
  }

  .svd-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .svd-card-media {
    min-height: 285px;
  }

  .svd-modal {
    padding: 10px;
  }

  .svd-modal-dialog {
    display: block;
    width: 100%;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    border-radius: 18px;
  }

  .svd-modal-photo {
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
    padding: 10px;
  }

  .svd-modal-photo > img,
  .svd-modal-placeholder {
    min-height: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .svd-modal-body {
    overflow: visible;
    padding: 24px 18px 20px;
  }

  .svd-modal-title h2 {
    font-size: 27px;
  }

  .svd-contact-actions,
  .svd-contact-pair {
    width: 100%;
  }

  .svd-contact-btn {
    flex: 1 1 0;
  }
}

@media (max-width: 460px) {
  .svd-verified-badge {
    top: 9px;
    right: 9px;
    max-width: calc(100% - 18px);
    padding: 5px 8px;
    gap: 5px;
    font-size: 9px;
  }

  .svd-verified-badge .svd-badge-dot {
    width: 7px;
    height: 7px;
  }

  .svd-search {
    height: 54px;
    font-size: 14px !important;
  }

  .svd-card-media {
    min-height: 255px;
  }

  .svd-card-overlay {
    padding: 17px;
  }

  .svd-detail-grid {
    grid-template-columns: 1fr;
  }

  .svd-detail-wide {
    grid-column: auto;
  }

  .svd-contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .svd-contact-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .svd-email-btn {
    width: 100%;
  }
}

/* Touch devices do not have hover, so show a useful compact set of details. */
@media (hover: none) {
  .svd-card-overlay {
    background: linear-gradient(180deg, transparent 24%, rgba(7, 20, 11, 0.82) 70%, rgba(7, 20, 11, 0.97) 100%);
  }

  .svd-hover-details {
    max-height: 115px;
    margin-top: 10px;
    opacity: 1;
    transform: none;
  }

  .svd-hover-details span:nth-of-type(n+3) {
    display: none;
  }

  .svd-hover-details em {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .svd-card,
  .svd-card-media > img,
  .svd-hover-details,
  .svd-modal-backdrop,
  .svd-modal-dialog {
    transition: none !important;
    animation: none !important;
  }
}
