@import "voices.css";

.provider-section {
  max-width: none;
  padding-inline: max(4vw, 28px);
  background: #f7f2e9;
}

.provider-section > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.provider-intro {
  max-width: 820px;
  margin-bottom: 28px;
  text-align: center;
  font-size: 14px;
}

.provider-table-wrap {
  overflow-x: auto;
  border: 1px solid #d7e1e2;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 24px #123b4a0a;
}

.provider-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 13px;
}

.provider-table th,
.provider-table td {
  padding: 16px 17px;
  border-bottom: 1px solid #e1e7e7;
  text-align: left;
  vertical-align: top;
}

.provider-table th {
  color: var(--ink);
  background: #eaf7f7;
  font-size: 12px;
  white-space: nowrap;
}

.provider-table tr:last-child td {
  border-bottom: 0;
}

.provider-table .provider-name {
  color: var(--ink);
  font-weight: 700;
}

.provider-table .provider-link {
  display: inline-flex;
  margin-top: 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.provider-type {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 12px;
  background: #edf8f8;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.provider-note {
  margin-top: 18px;
  color: #677a80;
  font-size: 11px;
}

.provider-jump {
  display: inline-flex;
  margin-top: 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .provider-section {
    padding-inline: 18px;
  }

  .provider-table-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .provider-table,
  .provider-table tbody,
  .provider-table tr,
  .provider-table td {
    display: block;
    min-width: 0;
  }

  .provider-table thead {
    display: none;
  }

  .provider-table tr {
    margin-bottom: 13px;
    padding: 18px;
    border: 1px solid #d7e1e2;
    border-radius: 7px;
    background: #fff;
  }

  .provider-table td {
    padding: 5px 0;
    border: 0;
  }
}

.search .provider-search-form {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr auto auto;
  gap: 12px;
  align-items: end;
  padding: 22px;
  border: 1px solid #d3e3e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px #123b4a0a;
  text-align: left;
}

.provider-search-form label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.provider-search-form select,
.provider-search-form input {
  width: 100%;
  height: 46px;
  margin-top: 5px;
  padding: 0 12px;
  border: 1px solid #c8d9dc;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.provider-search-form button {
  min-width: 132px;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.provider-search-form .search-reset {
  min-width: 110px;
  border: 1px solid #b9cdd0;
  background: #fff;
  color: var(--ink);
}

.provider-result-head {
  max-width: 1100px;
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  color: #667a80;
  font-size: 12px;
  text-align: left;
}

.provider-result-head p {
  margin-bottom: 8px;
}

#provider-count {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.provider-results {
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  text-align: left;
}

.provider-card {
  position: relative;
  overflow: hidden;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  padding: 0 22px 20px;
  border: 1px solid #d6e2e3;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 59, 74, 0.09);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.provider-card::before {
  content: "";
  flex: 0 0 108px;
  margin: 0 -22px;
  background:
    linear-gradient(90deg, rgba(11, 66, 84, 0.28), rgba(24, 128, 147, 0.08)),
    url("../public/images/hero-sea.png") center 54% / cover no-repeat;
}

.provider-card[data-area~="hokkaido-tohoku"]::before {
  background-image:
    linear-gradient(90deg, rgba(13, 63, 83, 0.34), rgba(83, 157, 174, 0.08)),
    url("../public/images/article-ikema-bridge.jpg");
}

.provider-card[data-area~="kanto"]::before {
  background-image:
    linear-gradient(90deg, rgba(13, 63, 83, 0.32), rgba(83, 157, 174, 0.06)),
    url("../public/images/article-irabu-bridge.jpg");
}

.provider-card[data-area~="tokai-hokuriku"]::before {
  background-image:
    linear-gradient(90deg, rgba(13, 63, 83, 0.3), rgba(83, 157, 174, 0.06)),
    url("../public/images/intro-miyako.jpg");
}

.provider-card[data-area~="kansai"]::before,
.provider-card[data-area~="chugoku-shikoku"]::before {
  background-image:
    linear-gradient(90deg, rgba(13, 63, 83, 0.3), rgba(83, 157, 174, 0.06)),
    url("../public/images/article-kurima-bridge.jpg");
}

.provider-card[data-area~="kyushu"]::before {
  background-image:
    linear-gradient(90deg, rgba(13, 63, 83, 0.28), rgba(83, 157, 174, 0.04)),
    url("../public/images/hero-miyako.jpeg");
}

.provider-card[data-area~="okinawa-islands"]::before,
.provider-card[data-area~="miyakojima"]::before {
  background-image:
    linear-gradient(90deg, rgba(8, 75, 96, 0.24), rgba(83, 157, 174, 0.02)),
    url("../public/images/hero-sea.png");
}

.provider-card:hover {
  transform: translateY(-4px);
  border-color: #b9d5d8;
  box-shadow: 0 17px 38px rgba(18, 59, 74, 0.15);
}

.provider-card[hidden] {
  display: none;
}

.provider-card > div:first-of-type {
  position: relative;
}

.provider-card h3 {
  margin: -1px 0 9px;
  color: #123d4c;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.55;
}

.provider-card p {
  margin: 0;
  color: #4d6269;
  font-size: 13px;
  line-height: 1.75;
}

.area-tag {
  position: relative;
  transform: translateY(-14px);
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 14px;
  border: 2px solid #fff;
  background: #e7f6f5;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(14, 65, 79, 0.12);
}

.area-tag.nationwide {
  background: #f3ebdd;
  color: #8a6231;
}

.method-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: auto 0 13px;
  padding-top: 18px;
}

.method-tags span {
  padding: 3px 8px;
  border: 1px solid #cfe0e2;
  border-radius: 12px;
  background: #f6fafa;
  color: #526b72;
  font-size: 10px;
}

.provider-card > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 5px;
  background: #176c80;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.provider-card > a:hover {
  background: #105a6d;
  text-decoration: none;
}

.provider-empty {
  max-width: 1100px;
  padding: 40px 24px;
  border: 1px dashed #b9cccf;
  border-radius: 7px;
  background: #fff;
  color: #5d7379;
}

.provider-directory-note {
  max-width: 1100px;
  margin-top: 20px;
  color: #64777d;
  font-size: 11px;
  text-align: left;
}

@media (max-width: 980px) {
  .search .provider-search-form {
    grid-template-columns: 1fr 1fr;
  }

  .provider-search-form .keyword-label {
    grid-column: 1 / -1;
  }

  .provider-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .search .provider-search-form,
  .provider-results {
    grid-template-columns: 1fr;
  }

  .provider-search-form .keyword-label {
    grid-column: auto;
  }

  .provider-search-form button {
    width: 100%;
  }

  .provider-result-head {
    display: block;
  }

  .provider-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .provider-card {
    transition: none;
  }

  .provider-card:hover {
    transform: none;
  }
}
