/* ===================== 屋根修理ランキング v1.0 ===================== */

/* ========== 基本カード ========== */
.srr-ranking-card {
  border: 1px solid #CDD6DD;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 40px;
  background: #fff;
  font-family: sans-serif;
  margin-left: var(--swl-h2-margin--x,0);
  margin-right: var(--swl-h2-margin--x,0);
}

/* ========== タイトル行：順位と店名と業種 ========== */
.srr-title-area {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.srr-rank {
  background-color: #42A9BB;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  padding: 6px 20px;
  border-radius: 4px;
  text-align: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.srr-rank-label {
  font-size: 1.0em;
}

.srr-rank-number {
  font-size: 1.6em;
  margin-top: 5px;
}

/* 会社名リンク */
.srr-title-text h3,
.srr-title-text h3::before,
.srr-title-text h3::after {
  all: unset !important;
  display: inline !important;
  font-weight: bold !important;
  color: #0073aa !important;
  line-height: 1.3 !important;
  text-decoration: underline !important;
  cursor: pointer;
}

h3.srr-company-name {
  font-size: 1.5em !important;
}

.srr-industry {
  font-size: 0.9em;
  color: #666;
  margin-top: 4px;
}

/* ========== メイン画像 ========== */
.srr-main-image {
  width: 100%;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.srr-main-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ========== 評価表示 ========== */
.srr-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.8em;
  color: #e2b007;
  margin-bottom: 16px;
}

.srr-stars {
  font-size: 1em;
}

.srr-score {
  font-weight: bold;
  color: #333;
  font-size: 1em;
}

.srr-review-count-link {
  font-size: 0.6em;
  color: #0073aa !important;
  text-decoration: underline !important;
  font-weight: normal !important;
  cursor: pointer;
  margin-left: 4px;
}

/* ========== 情報リスト ========== */
.srr-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.srr-info-item {
  display: flex;
  align-items: center;
  font-size: 1.1em;
  color: #444;
  line-height: 1;
}

.srr-icon-col {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.srr-icon-col .srr-icon {
  font-size: 1em;
  color: #42A9BB;
  line-height: 1;
}

.srr-text-col {
  margin-left: 8px;
  font-size: 1em;
  color: #444;
  line-height: 1.4;
}

.srr-ranking-card.srr-type-premium .srr-icon-col .srr-icon {
  color: #B59208;
}

/* ========== 専門分野タグ ========== */
.srr-service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.srr-service-tag {
  display: inline-block;
  font-size: 0.9em;
  padding: 6px 12px;
  border-radius: 0;
  border: 1px solid;
  transition: all 0.2s ease;
}

.srr-service-tag.is-active {
  background-color: #e8f4f6;
  color: #42A9BB;
  border-color: #42A9BB;
}

.srr-service-tag.is-inactive {
  background-color: #f0f0f0;
  color: #999;
  border-color: transparent;
}

.srr-ranking-card.srr-type-premium .srr-service-tag.is-active {
  background-color: #B59208;
  color: #fff;
  border-color: #B59208;
}

.srr-ranking-card.srr-type-premium .srr-service-tag.is-inactive {
  background-color: #f5f5f5;
  color: #aaa;
  border-color: transparent;
}

/* ========== コンセプト見出し ========== */
.srr-heading,
.srr-heading::before,
.srr-heading::after {
  all: unset !important;
  display: block !important;
  font-weight: bold !important;
  color: #d80028 !important;
  font-size: 1.5em !important;
  margin: 8px 0 !important;
  line-height: 1.3 !important;
}

.srr-noimage-detail .srr-heading {
  margin: 8px 0 !important;
}

/* ========== 本文 ========== */
.srr-description {
  font-size: 1.05em;
  color: #333;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ========== ボタンセクション ========== */
.srr-action-section {
  background: none;
  text-align: center;
  padding: 20px 0;
  margin-top: 5px;
}

.srr-microcopy {
  font-size: 1.1em;
  margin-bottom: 14px;
  color: #333;
}

.srr-microcopy .srr-highlight {
  font-weight: bold;
  color: #00a6b4;
}

.srr-button-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.srr-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 290px;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1.2em;
  text-decoration: none;
  border-radius: 8px;
  color: #fff;
  transition: top 0.1s ease, box-shadow 0.1s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
  border-bottom: 4px solid rgba(0, 0, 0, 0.2);
}

.srr-btn.srr-blue {
  background-color: #007aa3;
  color: #fff;
}

.srr-btn.srr-green {
  background-color: #28a745;
  color: #fff;
}

.srr-btn.srr-orange {
  background-color: #f4a800;
  color: #fff;
}

.srr-btn-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.srr-icon-container {
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.srr-icon-img {
  width: 28px;
  height: 28px;
  margin-right: 15px;
  vertical-align: middle;
}

.srr-icon-fa {
  font-size: 20px;
  margin-right: 15px;
  vertical-align: middle;
  color: #fff;
}

.srr-btn-text-mobile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
  line-height: 1.3;
  white-space: nowrap;
}

.srr-line1,
.srr-line2 {
  display: inline;
  white-space: nowrap;
  word-break: normal;
}

/* ========== プレミアムカード ========== */
.srr-ranking-card.srr-type-premium {
  background-color: #FFF6E9;
  border: 2px solid #B59208;
  padding: 15px;
  border-radius: 8px;
}

.srr-ranking-card.srr-type-premium .srr-rank {
  background-color: #BFAE6B;
}

/* ========== type4：画像なしカード ========== */
.srr-ranking-card.srr-type-noimage {
  background-color: #FFFFFF;
  border: 1px solid #ddd;
}

.srr-noimage-detail {
  margin-bottom: 16px;
}

.srr-noimage-detail .srr-info-list {
  margin-bottom: 12px;
}

/* ========== スマホ版 ========== */
@media (max-width: 599px) {
  .srr-ranking-card {
    padding: 15px;
  }

  .srr-rank {
    min-width: 70px;
    padding: 12px 8px;
    font-size: 0.85em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    word-break: keep-all;
    white-space: nowrap;
  }

  .srr-rank-label {
    font-size: 0.9em;
    line-height: 1;
    white-space: nowrap;
  }

  .srr-rank-number {
    font-size: 1.3em;
    line-height: 1.1;
    margin-top: 2px;
  }

  h3.srr-company-name {
    font-size: 1.1em !important;
  }

  .srr-rating-row {
    font-size: 1.3em;
  }

  .srr-review-count-link {
    font-size: 0.7em;
  }

  .srr-info-list {
    gap: 4px;
    margin-bottom: 10px;
  }

  .srr-info-item {
    font-size: 0.9em;
  }

  .srr-text-col {
    font-size: 0.95em;
  }

  .srr-heading {
    margin-top: 0px !important;
    font-size: 1.1em !important;
    margin: 10px 0 !important;
    line-height: 1.2 !important;
  }

  .srr-description {
    font-size: 0.9em;
    line-height: 1.8;
  }

  .srr-microcopy {
    font-size: 0.9em;
  }

  .srr-button-group {
    gap: 12px;
  }

  .srr-button-group .srr-btn {
    flex: 1 1 49%;
    max-width: 48%;
    font-size: 1.0em;
    padding: 8px 10px;
  }

  .srr-btn {
    display: block;
    padding: 12px;
  }

  .srr-btn-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 10px;
  }

  .srr-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
  }

  .srr-icon-img {
    width: 20px;
    height: 20px;
  }

  .srr-icon-fa {
    font-size: 18px;
    margin-right: 10px;
  }

  .srr-btn-text-mobile {
    flex-direction: column !important;
    align-items: flex-start !important;
    white-space: normal !important;
    word-break: break-word;
    gap: 4px;
    width: 100%;
    font-size: 0.9em;
    line-height: 1.3;
    text-align: left;
  }

  .srr-line1,
  .srr-line2 {
    display: block !important;
    width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: left;
  }

  .srr-review-btn .srr-btn-inner {
    align-items: center !important;
  }

  .srr-service-tag {
    font-size: 0.8em;
    padding: 4px 8px;
  }
}

/* ========== PC版 ========== */
@media (min-width: 600px) {
  .srr-pc-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
  }
  
  .srr-pc-image {
    flex: 0 0 45%;
    max-width: 45%;
  }
  
  .srr-pc-image a {
    display: block;
    width: 100%;
    aspect-ratio: 352 / 212;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  .srr-pc-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
  }
  
  .srr-pc-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
  }
  
  .srr-pc-detail .srr-rating-row {
    margin-bottom: 0px;
  }
  
  .srr-pc-detail .srr-info-list {
    margin-bottom: 12px;
    min-width: 0;
  }

  .srr-info-item-area {
    min-width: 0;
  }
  
  .srr-info-item-area .srr-text-col {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .srr-btn-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .srr-icon-container {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .srr-icon-img {
    width: 20px;
    height: 20px;
  }

  .srr-icon-fa {
    font-size: 18px;
    margin-right: 12px;
  }
}

/* ========== 掲載申し込みリンク ========== */
.srr-contact-link {
  text-align: right;
  margin-top: 16px;
}

.srr-contact-link a {
  color: #0073aa;
  font-size: 1em;
  text-decoration: underline;
}

.srr-contact-link a:hover {
  color: #005177;
}

/* ========== ページネーション ========== */
.srr-pagination {
  margin: 40px 0 20px;
  text-align: center;
}

.srr-pagination__list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.srr-pagination__item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.srr-pagination__item::before {
  content: none !important;
  display: none !important;
}

.srr-pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid #42A9BB;
  border-radius: 8px;
  background: #fff;
  color: #42A9BB;
  transition: all 0.2s ease;
}

.srr-pagination__link:hover {
  background: #42A9BB;
  color: #fff;
}

.srr-pagination__link--current {
  background: #42A9BB;
  color: #fff;
  cursor: default;
}
