/* カウマエ トップページ v2 */

.page-home-v2 {
  --home-green: #059669;
  --home-green-dark: #047857;
  --home-green-soft: #ecfdf5;
  --home-bg: #ffffff;
  --home-text: #0f172a;
  --home-muted: #64748b;
  --home-border: #e2e8f0;
  --home-star: #fbbf24;
  --home-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --home-shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
  background: var(--home-bg);
  color: var(--home-text);
  overflow-x: hidden;
}

.page-home-v2 .btn-trust {
  background: var(--home-green);
  border-color: var(--home-green);
}

.page-home-v2 .btn-trust:hover {
  background: var(--home-green-dark);
  border-color: var(--home-green-dark);
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- Hero --- */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 0.5rem 0 1.15rem;
  background: #fff;
}

.home-hero::before {
  display: none;
}

.home-hero > .container {
  position: relative;
  z-index: 1;
}

.home-hero-inner {
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: 0.35rem 1.25rem;
  align-items: center;
  min-height: auto;
  max-height: none;
}

.home-hero-copy {
  padding: 0.15rem 0;
  max-width: 38.75rem;
}

.home-hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  font-size: clamp(1.95rem, 4vw, 3.35rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
  color: var(--home-text);
}

.home-hero-title-line {
  display: block;
}

.home-hero-em {
  color: var(--home-green);
}

.home-hero-lead {
  font-size: 0.975rem;
  line-height: 1.65;
  color: #64748b;
  margin: 0 0 1.2rem;
  max-width: 34rem;
}

.home-search-form {
  width: 100%;
  max-width: 38.75rem;
}

.home-search-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 38.75rem;
  background: #fff;
  border: 1px solid var(--home-border);
  border-radius: 16px;
  box-shadow: var(--home-shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.home-search-wrap:focus-within {
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1), var(--home-shadow-sm);
}

.home-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0.95rem 1.1rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--home-text);
  background: transparent;
}

.home-search-input::placeholder {
  color: #94a3b8;
}

.home-search-btn {
  flex-shrink: 0;
  width: 3.75rem;
  border: 0;
  background: var(--home-green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.home-search-btn:hover {
  background: var(--home-green-dark);
}

.home-search-btn svg {
  width: 1.3rem;
  height: 1.3rem;
}

.home-search-note {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}

/* Hero visual */
.home-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin-left: -0.5rem;
}

.home-hero-visual-stage {
  position: relative;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  transform: translateX(-3%);
  overflow: visible;
}

.home-hero-visual-stage::before {
  display: none;
}

.home-hero-visual-stage::after {
  display: none;
}

.home-hero-main-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* --- Trust --- */
.home-trust {
  padding: 1.25rem 0 2.75rem;
}

.home-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.home-trust-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  padding: 1rem 0.95rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  min-height: 100%;
}

.home-trust-icon {
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 50%;
  background: var(--home-green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-trust-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.home-trust-body {
  min-width: 0;
  flex: 1;
}

.home-trust-title {
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 0.35rem;
  color: var(--home-green);
}

.home-trust-card p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #334155;
}

/* --- Section common --- */
.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.home-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: var(--home-text);
}

.home-section-title--center {
  justify-content: center;
  margin-bottom: 1.25rem;
}

.home-section-icon {
  display: inline-flex;
  color: var(--home-green);
}

.home-section-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.home-section-sub {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--home-muted);
}

.home-section-link {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--home-green);
  text-decoration: none;
}

.home-section-link:hover {
  color: var(--home-green-dark);
  text-decoration: underline;
}

/* --- Reviews --- */
.home-reviews-section {
  padding: 0 0 3.5rem;
}

.home-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.home-review-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--home-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--home-shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.home-review-card:hover {
  box-shadow: var(--home-shadow);
  transform: translateY(-3px);
}

.home-review-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--home-green-soft);
  overflow: hidden;
}

.home-review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-review-proof {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--home-green);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
}

.home-review-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.85rem 0.95rem 1rem;
  gap: 0.4rem;
}

.home-review-name {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--home-text);
  text-decoration: none;
}

.home-review-name:hover {
  color: var(--home-green);
}

.home-review-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
}

.home-review-rating .stars {
  color: var(--home-star);
  letter-spacing: 0.03em;
}

.home-review-rating .stars .empty {
  color: #e2e8f0;
}

.home-review-rating strong {
  font-weight: 800;
  color: var(--home-text);
}

.home-review-excerpt {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--home-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.home-review-meta {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--home-border);
  font-size: 0.75rem;
  color: var(--home-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
}

.home-review-empty {
  grid-column: 1 / -1;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--home-border);
  border-radius: 14px;
  color: var(--home-muted);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.home-review-empty a {
  color: var(--home-green);
  font-weight: 700;
}

/* --- Categories --- */
.home-categories-section {
  padding: 0 0 3.5rem;
}

.home-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.home-category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.85rem 0.9rem;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--home-border);
  border-radius: 12px;
  box-shadow: var(--home-shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.home-category-card:hover {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: var(--home-shadow);
  transform: translateY(-2px);
}

.home-category-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.15rem;
}

.home-category-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.home-category-icon--career { background: #dbeafe; color: #2563eb; }
.home-category-icon--romance { background: #fce7f3; color: #db2777; }
.home-category-icon--side { background: #ffedd5; color: #ea580c; }
.home-category-icon--ai { background: #e0e7ff; color: #4f46e5; }
.home-category-icon--web { background: #ccfbf1; color: #0d9488; }
.home-category-icon--sales { background: #fef3c7; color: #d97706; }
.home-category-icon--health { background: #dcfce7; color: #16a34a; }
.home-category-icon--cert { background: #f3e8ff; color: #9333ea; }
.home-category-icon--english { background: #e0f2fe; color: #0284c7; }
.home-category-icon--money { background: #fef9c3; color: #ca8a04; }
.home-category-icon--search { background: #eff6ff; color: #3b82f6; }

.home-category-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
}

.home-category-desc {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--home-muted);
}

.home-category-card--cta {
  justify-content: center;
  text-align: left;
  background: linear-gradient(180deg, #fff 0%, var(--home-bg) 100%);
}

.home-category-card--cta .home-category-desc {
  font-size: 0.75rem;
}

/* --- How to --- */
.home-howto {
  padding: 0 0 4rem;
}

.home-howto-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 1.25rem;
  align-items: stretch;
}

.home-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.home-step-card {
  background: #fff;
  border: 1px solid var(--home-border);
  border-radius: 14px;
  padding: 1.1rem 1rem;
  box-shadow: var(--home-shadow-sm);
}

.home-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--home-green);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.home-step-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.home-step-card p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--home-muted);
}

.home-howto-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(160deg, var(--home-green-soft) 0%, #fff 55%);
  border: 1px solid rgba(5, 150, 105, 0.18);
  border-radius: 16px;
  box-shadow: var(--home-shadow-sm);
}

.home-howto-cta-lead {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.55;
  color: var(--home-text);
}

.home-howto-cta-btn {
  min-width: 12rem;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
}

/* --- Footer (トップページも共通のダークフッターを使用) --- */
.page-home-v2 .site-footer {
  background: #0f172a;
  color: #94a3b8;
  border-top: none;
}

.page-home-v2 .site-footer .footer-desc {
  color: #94a3b8;
}

.page-home-v2 .site-footer .footer-links a {
  color: #94a3b8;
}

.page-home-v2 .site-footer .footer-links a:hover {
  color: #fff;
}

.page-home-v2 .site-footer .footer-bottom {
  border-top-color: #1e293b;
  color: #64748b;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
    gap: 1.5rem;
  }

  .home-hero-visual {
    max-width: 32rem;
    margin: 0 auto;
  }

  .home-hero-visual-stage {
    max-width: 100%;
    margin: 0 auto;
    transform: none;
  }

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

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

  .home-categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-howto-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .home-hero {
    padding: 0.5rem 0 1.25rem;
    overflow: hidden;
  }

  .home-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: none;
  }

  .home-hero-copy {
    order: 1;
    max-width: none;
  }

  .home-hero-visual {
    order: 2;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    margin: 0;
  }

  .home-hero-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    margin-bottom: 0.7rem;
  }

  .home-hero-lead {
    max-width: none;
    margin-bottom: 1rem;
  }

  .home-search-form,
  .home-search-wrap {
    max-width: none;
  }

  .home-hero-visual-stage {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    transform: none;
  }

  .home-hero-visual-stage::after {
    display: none;
  }

  .home-hero-main-img {
    width: 100%;
    max-width: 22rem;
    margin: 0 auto;
  }

  .home-trust-grid,
  .home-reviews-grid,
  .home-steps {
    grid-template-columns: 1fr;
  }

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

  .home-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-section-title--center {
    text-align: center;
    flex-wrap: wrap;
    justify-content: center;
  }
}

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