/* ===========================
   KaKaNai 履歴書LP 固有スタイル
   (style.css と併用)
   v1.0 — Phase 1
=========================== */

/* ===========================
   ページヒーロー
=========================== */
#page-hero {
  background: linear-gradient(135deg, #fff9f9 0%, #f0fffe 50%, #fffdf0 100%);
  padding: 56px 0 64px;
}

.page-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "top preview"
    "bottom preview";
  column-gap: 48px;
  row-gap: 0;
  align-items: start;
}

.hero-content-top  { grid-area: top; }
.hero-content-bottom { grid-area: bottom; }
.hero-preview-wrap {
  grid-area: preview;
  align-self: end;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-badge-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.page-badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-accent);
  color: var(--color-text);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.badge-free {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-main);
  color: var(--color-white);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.page-title {
  font-size: 44px;
  font-weight: 900;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  padding: 14px 16px;
  background-color: rgba(255,255,255,0.75);
  border-left: 4px solid var(--color-sub);
  border-radius: 0 8px 8px 0;
}

/* ===========================
   推奨テンプレートカード
=========================== */
.recommended-card {
  background: var(--color-white);
  border: 2px solid var(--color-main);
  border-radius: 16px;
  padding: 28px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(255,107,107,0.12);
}

.recommended-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-main {
  background: var(--color-main);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
}

.badge-rec {
  background: var(--color-accent);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
}

.recommended-name {
  font-size: 22px;
  font-weight: 900;
  color: var(--color-text);
  line-height: 1.3;
}

.recommended-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tags .tag {
  background: var(--color-light-gray);
  color: #555;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 4px;
}

.tag-photo-none { background: #e8f8f7 !important; color: #2a9d94 !important; }
.tag-no-motivation { background: #fff0f0 !important; color: #e55a5a !important; }

.btn-cta-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 32px;
  font-size: 18px;
  font-weight: 900;
  border-radius: 16px;
  background: var(--color-main);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(255,107,107,0.30);
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
  width: 100%;
  border: none;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
}

.btn-cta-hero:hover {
  background: #e85555;
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,107,107,0.40);
  opacity: 1;
}

.steps-note {
  font-size: 12px;
  color: #aaa;
  text-align: center;
}

/* ===========================
   A4プレビュー（CSS mock）
=========================== */
.resume-preview {
  aspect-ratio: 297 / 210;
  background: #ffffff;
  border: 1.5px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.08);
  padding: 6%;
  display: flex;
  flex-direction: column;
  gap: 4%;
  width: 100%;
  max-width: 300px;
  overflow: hidden;
}

.alt-preview {
  aspect-ratio: 297 / 210;
  background: #fff;
  border: 1.5px solid #ccc;
  border-radius: 3px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  padding: 7%;
  display: flex;
  flex-direction: column;
  gap: 4%;
  width: 100%;
  max-width: 180px;
  overflow: hidden;
}

.preview-header {
  display: flex;
  gap: 5%;
  align-items: flex-start;
}

.preview-personal {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.preview-photo {
  width: 22%;
  aspect-ratio: 3/4;
  background: #e0e0e0;
  border: 1px solid #bbb;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6px;
  color: #aaa;
  flex-shrink: 0;
}

.preview-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-section-label {
  font-size: 6px;
  color: #bbb;
  font-weight: 700;
  border-bottom: 1px solid #eee;
  padding-bottom: 2px;
  margin-bottom: 2px;
}

.preview-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-line {
  height: 4px;
  background: #ebebeb;
  border-radius: 2px;
  width: 100%;
}

.preview-line.s { width: 55%; }
.preview-line.m { width: 75%; }

.preview-2col {
  display: flex;
  gap: 5%;
}

.preview-2col .preview-section { flex: 1; }

/* ===========================
   書き方ガイドセクション
=========================== */
#writing-guide { background-color: var(--color-white); }

.guide-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.guide-item {
  display: flex;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
  align-items: flex-start;
}

.guide-item:first-child { border-top: 1px solid var(--color-border); }

.guide-item-icon {
  font-size: 28px;
  line-height: 1.4;
  flex-shrink: 0;
}

.guide-item-body { flex: 1; }

.guide-item h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
  line-height: 1.5;
}

.guide-item p {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  margin: 0;
}

/* ===========================
   別テンプレートセクション
=========================== */
#alt-templates { background-color: var(--color-light-gray); }

.alt-template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}

.alt-template-card {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.alt-template-card:hover {
  border-color: var(--color-main);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.alt-preview-wrap {
  display: flex;
  justify-content: center;
}

.alt-card-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 26px;
}

.alt-card-name {
  font-size: 19px;
  font-weight: 900;
  color: var(--color-text);
}

.alt-card-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  flex: 1;
}

.alt-card-for {
  font-size: 13px;
  color: #666;
  padding: 10px 14px;
  background: var(--color-light-gray);
  border-radius: 8px;
  border-left: 3px solid var(--color-sub);
  line-height: 1.7;
}

/* ===========================
   別の用途セクション
=========================== */
#other-uses { background-color: var(--color-white); }

.other-use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.other-use-card {
  background: var(--color-light-gray);
  border: 2px solid var(--color-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.other-use-card:hover {
  border-color: var(--color-main);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  opacity: 1;
}

.other-use-dot {
  width: 8px;
  height: 8px;
  background: var(--color-main);
  border-radius: 50%;
  flex-shrink: 0;
}

.other-use-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
}

.other-use-card p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  flex: 1;
}

.other-use-link {
  font-size: 13px;
  color: var(--color-main);
  font-weight: 700;
}

.other-use-card--current {
  background: #f0f0f0;
  border-color: #d0d0d0;
  cursor: default;
  pointer-events: none;
  opacity: 0.65;
}

.other-use-card--current:hover {
  border-color: #d0d0d0;
  box-shadow: none;
  transform: none;
}

.other-use-dot--current { background: #bbb; }
.other-use-card--current h3 { color: #999; }
.other-use-card--current p { color: #aaa; }

.other-use-current-label {
  font-size: 11px;
  color: #fff;
  font-weight: 700;
  background: #bbb;
  padding: 3px 8px;
  border-radius: 3px;
  align-self: flex-start;
}

/* ===========================
   アカウント作成セクション（LP版）
=========================== */
#register {
  padding: 80px 0;
  background: linear-gradient(135deg, #f0fffe 0%, #fff9f9 100%);
  text-align: center;
}

.btn-register {
  background: linear-gradient(135deg, var(--color-main) 0%, #ff8e53 100%);
  color: var(--color-white);
  padding: 22px 60px;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
  display: inline-block;
  box-shadow: 0 4px 20px rgba(255,107,107,0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,107,107,0.45);
  opacity: 1;
  color: var(--color-white);
}

.register-sub {
  font-size: 13px;
  color: #aaa;
  margin-top: 16px;
}

/* ===========================
   レスポンシブ（768px以下）
=========================== */
@media (max-width: 768px) {
  .page-hero-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "top"
      "preview"
      "bottom";
    row-gap: 24px;
  }

  .page-title { font-size: 32px; }
  .resume-preview { max-width: 220px; }

  .alt-template-grid { grid-template-columns: 1fr; max-width: 480px; }
  .other-use-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 480px) {
  #page-hero { padding: 40px 0 48px; }
  .page-title { font-size: 28px; }
  .resume-preview { max-width: 180px; }
  .recommended-card { padding: 20px; }
  .recommended-name { font-size: 18px; }
  .btn-cta-hero { font-size: 16px; padding: 18px 24px; }
  .btn-register { padding: 18px 32px; font-size: 17px; }
  .other-use-grid { grid-template-columns: 1fr; }
}

/* ===========================
   実テンプレート画像プレビュー
=========================== */
.resume-preview:has(img),
.alt-preview:has(img) {
  padding: 0 !important;
  display: block !important;
  gap: 0 !important;
  max-width: 100% !important;
  aspect-ratio: 420 / 297 !important;
  position: relative !important;
  overflow: hidden !important;
}
.resume-preview img,
.alt-preview img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: auto;
  height: 100%;
  display: block;
  background: #fff;
}
.resume-preview img ~ *,
.alt-preview img ~ * {
  display: none;
}
.resume-preview.portrait,
.alt-preview.portrait {
  aspect-ratio: 210 / 297;
}

/* ===========================
   サブレイアウトカード
=========================== */
.recommended-card-sub {
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.badge-sub {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  color: #4a5568;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
}

.btn-cta-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  background: #fff;
  color: var(--color-sub);
  border: 2px solid var(--color-sub);
  width: 100%;
  font-family: 'Noto Sans JP', sans-serif;
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 0.2s, color 0.2s;
}

.btn-cta-sub:hover {
  background: var(--color-sub);
  color: #fff;
}
