/* ==========================================================================
   Oripa Select - Top Page Styles
   ========================================================================== */

/* --- Design Tokens --- */
:root {
  --ot-blue: #49b6ff;
  --ot-blue-dark: #2a8fe0;
  --ot-blue-darker: #1478bd;
  --ot-bg: #f4f7fa;
  --ot-white: #ffffff;
  --ot-border: #e3eaf1;
  --ot-text: #1e2a35;
  --ot-text-sub: #3a4a58;
  --ot-text-muted: #7d8b98;
  --ot-text-link: #2196e3;
  --ot-gold-bg: linear-gradient(135deg, #e8c766, #c9a227);
  --ot-about-bg: #eaf3fa;
  --ot-shadow: 0 2px 10px rgba(30, 60, 90, 0.07);
  --ot-shadow-hover: 0 4px 14px rgba(40, 120, 190, 0.14);
  --ot-radius: 14px;
  --ot-max-width: 1120px;
}

/* --- SWELL Layout Adjustments (1-column, full-width) --- */
/*
 * SWELLは body_class() を <body> ではなく <div id="body_wrap"> に出力する。
 * そのため .oripa-top-page は #body_wrap のクラス。
 */
#body_wrap.oripa-top-page {
  background: var(--ot-bg);
}
#body_wrap.oripa-top-page #content.l-content.l-container {
  --container_size: 100% !important;
  --swl-pad_container: 0px !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
/* 空の記事スライダーがヘッダーとコンテンツの間に隙間を作るので非表示 */
#body_wrap.oripa-top-page #post_slider {
  display: none !important;
}
.oripa-top-main {
  max-width: none;
  padding: 0;
}

/* --- Hero Section --- */
.oripa-top-hero {
  background: linear-gradient(160deg, #2a8fe0 0%, #49b6ff 55%, #6fc6ff 100%);
  position: relative;
  overflow: hidden;
}

.oripa-top-hero__deco {
  position: absolute;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.oripa-top-hero__deco--1 {
  top: -60px; right: 8%; width: 170px; height: 240px;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(14deg);
}

.oripa-top-hero__deco--2 {
  top: 40px; right: 20%; width: 150px; height: 210px;
  background: rgba(255, 255, 255, 0.06);
  transform: rotate(-8deg);
}

.oripa-top-hero__deco--3 {
  bottom: -70px; left: -30px; width: 180px; height: 250px;
  transform: rotate(-16deg);
}

.oripa-top-hero__inner {
  max-width: var(--ot-max-width);
  margin: 0 auto;
  padding: 72px 20px 80px;
  position: relative;
  text-align: center;
  color: #ffffff;
}

.oripa-top-hero__badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.oripa-top-hero__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.oripa-top-hero__lead {
  margin: 0 auto 36px;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.92);
}

.oripa-top-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.oripa-top-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 15px 30px;
  border-radius: 999px;
  text-decoration: none;
}

.oripa-top-hero__btn--primary {
  background: #ffffff;
  color: var(--ot-blue-darker);
  box-shadow: 0 4px 14px rgba(20, 60, 100, 0.25);
}

.oripa-top-hero__btn--gold {
  background: var(--ot-gold-bg);
  color: #3d3208;
  box-shadow: 0 4px 14px rgba(20, 60, 100, 0.25);
}

.oripa-top-hero__btn--ghost {
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.oripa-top-hero__btn:hover {
  opacity: 0.88;
  text-decoration: none;
}

/* --- Section Headings --- */
.oripa-top-section {
  max-width: var(--ot-max-width);
  margin: 0 auto;
  padding: 64px 20px;
}

.oripa-top-section--white {
  max-width: none;
  background: var(--ot-white);
  border-top: 1px solid var(--ot-border);
  border-bottom: 1px solid var(--ot-border);
}

.oripa-top-section--white > .oripa-top-section__inner {
  max-width: var(--ot-max-width);
  margin: 0 auto;
  padding: 64px 20px;
}

.oripa-top-section__kicker {
  margin: 0 0 6px;
  color: var(--ot-blue-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
}

.oripa-top-section__heading {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-align: center;
}

.oripa-top-section__update {
  text-align: center;
  font-size: 13px;
  color: var(--ot-text-muted);
  margin: 4px 0 0;
}

/* --- FAQ Section --- */
.oripa-top-faq {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.oripa-top-faq__item {
  background: var(--ot-bg);
  border: 1px solid var(--ot-border);
  border-radius: 10px;
  overflow: hidden;
}

.oripa-top-faq__q {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
}

.oripa-top-faq__q::-webkit-details-marker {
  display: none;
}

.oripa-top-faq__q::before {
  content: "Q";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ot-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oripa-top-faq__q::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  color: #9aa8b5;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.oripa-top-faq__item[open] .oripa-top-faq__q::after {
  transform: rotate(180deg);
}

.oripa-top-faq__q:hover {
  background: rgba(73, 182, 255, 0.04);
}

.oripa-top-faq__a {
  overflow: hidden;
}

.oripa-top-faq__a p {
  margin: 0;
  padding: 0 20px 20px 60px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ot-text-sub);
}

/* --- Service Cards Grid --- */
.oripa-top-cards {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.oripa-top-card {
  background: var(--ot-white);
  border-radius: var(--ot-radius);
  box-shadow: var(--ot-shadow);
  border: 1px solid var(--ot-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.2s;
}

.oripa-top-card:hover {
  box-shadow: var(--ot-shadow-hover);
}

/* Ribbon */
.oripa-top-card__ribbon {
  position: absolute;
  top: 0;
  left: 16px;
  font-weight: 900;
  font-size: 13px;
  padding: 8px 10px 6px;
  border-radius: 0 0 8px 8px;
  z-index: 2;
}

/* Logo area */
.oripa-top-card__logo {
  height: 96px;
  background: repeating-linear-gradient(45deg, #e8f4fd, #e8f4fd 10px, #f2f9ff 10px, #f2f9ff 20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.oripa-top-card__logo img {
  max-height: 60px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Card body */
.oripa-top-card__body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.oripa-top-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.oripa-top-card__name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.oripa-top-card__rating {
  flex-shrink: 0;
}

.oripa-top-card__rating .oripa-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.oripa-top-card__rating .oripa-rating__stars {
  color: #f5a623;
  letter-spacing: 1px;
}

.oripa-top-card__rating .oripa-rating__value {
  font-weight: 700;
  color: var(--ot-text-sub);
  font-size: 12px;
}

.oripa-top-card__tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.oripa-top-card__tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Details grid */
.oripa-top-card__details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 13px;
}

.oripa-top-card__dt {
  color: var(--ot-text-muted);
}

.oripa-top-card__dd {
  font-weight: 700;
}

.oripa-top-card__dd--bonus {
  color: #b8860b;
}

/* Payment chips */
.oripa-top-card__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.oripa-top-card__chip {
  border: 1px solid #dde5ec;
  color: #5b6b79;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
}

/* CTA button */
.oripa-top-card__cta {
  display: block;
  flex: 1;
  text-align: center;
  background: var(--ot-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  border-radius: 9px;
  text-decoration: none;
  transition: background 0.2s;
}

.oripa-top-card__cta:hover {
  background: var(--ot-blue-dark);
  color: #ffffff;
  text-decoration: none;
}

.oripa-top-card__actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.oripa-top-card__cta--review {
  background: #fff !important;
  color: var(--ot-blue-darker) !important;
  border: 1.5px solid var(--ot-blue);
}

.oripa-top-card__cta--review:hover {
  background: #e8f4fd !important;
}

.oripa-top-section__desc {
  text-align: center;
  font-size: 14px;
  color: var(--ot-text-sub);
  line-height: 1.8;
  margin: 4px auto 0;
  max-width: 640px;
}

/* "View all" button */
.oripa-top-viewall {
  text-align: center;
  margin-top: 28px;
}

.oripa-top-viewall__btn {
  display: inline-block;
  border: 1.5px solid var(--ot-blue);
  color: var(--ot-blue-darker);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 40px;
  border-radius: 999px;
  background: var(--ot-white);
  text-decoration: none;
  transition: background 0.2s;
}

.oripa-top-viewall__btn:hover {
  background: #e8f4fd;
  text-decoration: none;
}

/* --- Compare Table --- */
.oripa-top-table-wrap {
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--ot-border);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.oripa-top-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 860px;
  font-size: 13px;
  background: var(--ot-white);
}

.oripa-top-table thead tr {
  background: #f0f7fd;
}

.oripa-top-table th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  color: #33475b;
  border-bottom: 2px solid #cfe6f8;
}

.oripa-top-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f7;
}

.oripa-top-table__sticky {
  position: sticky;
  left: 0;
  background: var(--ot-white);
  min-width: 130px;
  z-index: 2;
}

thead .oripa-top-table__sticky {
  background: #f0f7fd;
}

.oripa-top-table__zebra td {
  background: #fafcfe;
}

.oripa-top-table__zebra .oripa-top-table__sticky {
  background: #fafcfe;
}

.oripa-top-table__name {
  font-weight: 700;
  text-align: center;
}

.oripa-top-table__logo {
  display: block;
  max-width: 80px;
  height: auto;
  margin: 0 auto 4px;
}

.oripa-top-table__bonus {
  color: #b8860b;
  font-weight: 700;
}

.oripa-top-table__charge {
  min-width: 140px;
  white-space: nowrap;
}

.oripa-top-table__shipping {
  min-width: 120px;
  white-space: nowrap;
}

.oripa-top-table-link {
  text-align: center;
  margin-top: 20px;
}

.oripa-top-table-link a {
  font-size: 14px;
  font-weight: 700;
}

/* --- Category Cards --- */
.oripa-top-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.oripa-top-cat-card {
  background: var(--ot-white);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius);
  padding: 20px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 4px;
  align-items: center;
  text-decoration: none;
  color: var(--ot-text);
  box-shadow: 0 2px 8px rgba(30, 60, 90, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
}

.oripa-top-cat-card:hover {
  border-color: var(--ot-blue);
  box-shadow: var(--ot-shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--ot-text);
}

.oripa-top-cat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  grid-row: 1 / 3;
}

.oripa-top-cat-card__title {
  font-size: 15px;
  font-weight: 700;
  grid-column: 2;
  align-self: end;
}

.oripa-top-cat-card::after {
  content: "\203A";
  grid-row: 1 / 3;
  grid-column: 3;
  font-size: 22px;
  color: #bcc5ce;
  font-weight: 300;
  transition: color 0.2s, transform 0.2s;
}

.oripa-top-cat-card:hover::after {
  color: var(--ot-blue);
  transform: translateX(3px);
}

.oripa-top-cat-card__desc {
  font-size: 12px;
  color: #7d8b98;
  line-height: 1.5;
  grid-column: 2;
  align-self: start;
}

/* --- Post Cards --- */
.oripa-top-posts-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.oripa-top-posts-header a {
  font-size: 14px;
  font-weight: 700;
}

.oripa-top-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.oripa-top-post-card {
  background: var(--ot-white);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ot-text);
  box-shadow: 0 2px 8px rgba(30, 60, 90, 0.05);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.oripa-top-post-card:hover {
  box-shadow: var(--ot-shadow-hover);
  text-decoration: none;
  color: var(--ot-text);
}

.oripa-top-post-card__thumb {
  aspect-ratio: 16/9;
  background: repeating-linear-gradient(45deg, #e8f4fd, #e8f4fd 12px, #f2f9ff 12px, #f2f9ff 24px);
  overflow: hidden;
}

.oripa-top-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oripa-top-post-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oripa-top-post-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.oripa-top-post-card__cat {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.oripa-top-post-card__date {
  font-size: 12px;
  color: #9aa8b5;
}

.oripa-top-post-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

/* --- About Section --- */
.oripa-top-about {
  background: var(--ot-about-bg);
  border-top: 1px solid #dbe8f2;
}

.oripa-top-about__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 20px;
  text-align: center;
}

.oripa-top-about__text {
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 2;
  color: var(--ot-text-sub);
}

.oripa-top-about__badges {
  display: flex;
  justify-content: center;
  gap: 14px 28px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.oripa-top-about__badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #33475b;
}

.oripa-top-about__badge-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ot-gold-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3d3208;
  font-size: 12px;
  flex-shrink: 0;
}

.oripa-top-about__btn {
  display: inline-block;
  border: 1.5px solid var(--ot-blue);
  color: var(--ot-blue-darker);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 40px;
  border-radius: 999px;
  background: var(--ot-white);
  text-decoration: none;
  transition: background 0.2s;
}

.oripa-top-about__btn:hover {
  background: #e8f4fd;
  text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .oripa-top-hero__inner {
    padding: 48px 20px 56px;
  }

  .oripa-top-hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .oripa-top-hero__btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .oripa-top-cards {
    grid-template-columns: 1fr;
  }

  .oripa-top-posts {
    grid-template-columns: 1fr;
  }

  .oripa-top-categories {
    grid-template-columns: 1fr 1fr;
  }

  .oripa-top-section {
    padding: 48px 16px;
  }

  .oripa-top-section--white > .oripa-top-section__inner {
    padding: 48px 16px;
  }

  .oripa-top-about__inner {
    padding: 48px 16px;
  }

  .oripa-top-section__heading {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .oripa-top-categories {
    grid-template-columns: 1fr;
  }
}
