/*
Theme Name: Takuhaishoku Navi
Theme URI: https://example.com/
Author: Codex
Author URI: https://example.com/
Description: 宅配食アフィリエイト向けのオリジナルWordPressテーマ。ランキング、比較表、目的別カテゴリ、レビュー記事に対応。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: takuhai-navi
*/

:root {
  --green: #1f7a5b;
  --green-dark: #155a43;
  --orange: #f28c28;
  --orange-dark: #c66712;
  --cream: #fffaf2;
  --soft: #f4fbf7;
  --line: #dbe8df;
  --text: #24312d;
  --muted: #69766f;
  --white: #fff;
  --shadow: 0 14px 38px rgba(31, 122, 91, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.8;
}

a {
  color: var(--green-dark);
}

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
}

.header-inner,
.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.logo {
  color: var(--green-dark);
  font-size: 21px;
  font-weight: 800;
  text-decoration: none;
}

.nav,
.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.nav a,
.menu a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover,
.menu a:hover {
  color: var(--green);
}

.pr {
  margin: 18px auto 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfc;
  color: var(--muted);
  font-size: 13px;
}

.hero {
  padding: 52px 0 42px;
  background:
    radial-gradient(circle at 88% 20%, rgba(242, 140, 40, .18), transparent 28%),
    linear-gradient(180deg, var(--soft), #fff);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 32px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--cream);
  color: #934f0e;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3 {
  line-height: 1.35;
}

h1 {
  margin: 14px 0 16px;
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: 0;
}

h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 17px;
}

.hero-card,
.card,
.rank-card,
.article-card,
.cta-band,
.toc,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.hero-card,
.card,
.article-card {
  padding: 18px;
}

.hero-card-title {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-weight: 800;
}

.check-list,
.plain-list {
  padding: 0;
  margin: 16px 0;
  list-style: none;
}

.check-list li,
.plain-list li {
  position: relative;
  padding: 10px 12px 10px 36px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.check-list li::before {
  position: absolute;
  left: 12px;
  color: var(--green);
  font-weight: 900;
  content: "✓";
}

.plain-list li::before {
  position: absolute;
  left: 14px;
  color: var(--orange);
  font-weight: 900;
  content: "•";
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 6px;
  background: var(--orange);
  box-shadow: 0 4px 0 var(--orange-dark);
  color: #fff !important;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.button:hover,
.wp-block-button__link:hover {
  transform: translateY(1px);
  box-shadow: 0 3px 0 var(--orange-dark);
}

.button.secondary {
  border: 1px solid var(--green);
  background: #fff;
  box-shadow: none;
  color: var(--green-dark) !important;
}

.section {
  padding: 44px 0;
}

.section.alt {
  background: var(--soft);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
  color: var(--green-dark);
}

.rank-card {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin-bottom: 16px;
}

.rank-badge {
  display: grid;
  place-items: center;
  min-height: 86px;
  border-radius: 8px;
  background: var(--cream);
  color: #9b4d05;
  font-size: 24px;
  font-weight: 900;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.cta-band {
  padding: 24px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  text-align: center;
}

.cta-band h2,
.cta-band p {
  color: #fff;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.toc {
  position: sticky;
  top: 92px;
  padding: 16px;
}

.toc a {
  display: block;
  padding: 7px 0;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}

.notice {
  padding: 18px;
  background: var(--cream);
}

.content {
  padding: 44px 0;
}

.content .entry {
  max-width: 860px;
  margin: 0 auto;
}

.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.footer-links a {
  color: var(--muted);
}

@media (max-width: 820px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav,
  .menu {
    justify-content: flex-start;
  }

  .hero-grid,
  .grid-3,
  .grid-2,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

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

  table {
    min-width: 640px;
  }
}

/* Contact Form 7 */
.contact-form,
.wpcf7 {
  max-width: 760px;
  margin: 0 auto;
}

.contact-form {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.contact-form p {
  margin: 0 0 18px;
}

.contact-form label {
  display: block;
  color: var(--text);
  font-weight: 800;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="url"],
.contact-form select,
.contact-form textarea,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="url"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}

.contact-form textarea,
.wpcf7 textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus,
.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 91, .14);
  outline: none;
}

.contact-form .form-note {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 14px;
}

.wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 700;
}

.wpcf7-acceptance input {
  width: 18px;
  height: 18px;
  margin-top: 6px;
  accent-color: var(--green);
}

.contact-form input[type="submit"],
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 50px;
  padding: 12px 22px;
  border: 0;
  border-radius: 6px;
  background: var(--orange);
  box-shadow: 0 4px 0 var(--orange-dark);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  text-align: center;
}

.contact-form input[type="submit"]:hover,
.wpcf7-submit:hover {
  transform: translateY(1px);
  box-shadow: 0 3px 0 var(--orange-dark);
}

.wpcf7-spinner {
  vertical-align: middle;
}

.wpcf7-not-valid-tip {
  margin-top: 6px;
  color: #b3261e;
  font-size: 13px;
  font-weight: 700;
}

.wpcf7 form .wpcf7-response-output {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--text);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  border-color: #f2c4b8;
  background: #fff7f5;
}

.wpcf7 form.sent .wpcf7-response-output {
  border-color: var(--line);
  background: var(--soft);
}

@media (max-width: 680px) {
  .contact-form {
    padding: 18px;
  }

  .contact-form input[type="submit"],
  .wpcf7-submit {
    width: 100%;
  }
}
