/* 
 * 日本の住宅庭園計画ガイド - 教育サイト用スタイルシート
 * Calm, trustworthy, modern Japanese aesthetic
 */

:root {
  --primary-green: #2E5A3C;
  --accent-green: #4A7C59;
  --light-green: #E8F0E9;
  --warm-beige: #F5F1E9;
  --soft-gray: #6B7280;
  --dark-text: #1F2937;
  --light-bg: #FAF8F5;
  --white: #FFFFFF;
  --border: #D1D5DB;
  --font-display: "Shippori Mincho", "Hiragino Mincho ProN", serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.7;
  color: var(--dark-text);
  background-color: var(--light-bg);
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.4;
  color: var(--primary-green);
  letter-spacing: 0.02em;
}

h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.65rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.35rem; margin: 1.5rem 0 0.75rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent-green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top identification bar */
.topbar {
  background: var(--primary-green);
  color: rgba(255,255,255,0.92);
  font-size: 0.78rem;
  padding: 0.45rem 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.topbar a {
  color: #fff;
  opacity: 0.9;
}

.topbar a:hover {
  opacity: 1;
}

.topbar-ops {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Header & Navigation */
header {
  background-color: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.logo-main {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-green);
}

.logo-sub {
  font-size: 0.68rem;
  color: var(--soft-gray);
  letter-spacing: 0.04em;
}

nav a.active {
  background-color: var(--light-green);
  color: var(--primary-green);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-green);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  color: var(--dark-text);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

nav a:hover {
  background-color: var(--light-green);
  text-decoration: none;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(rgba(46, 90, 60, 0.65), rgba(46, 90, 60, 0.55)), url('serene-japanese-residential-garden.webp') center/cover no-repeat;
  color: white;
  padding: 5rem 0;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-green);
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background-color: #3A6649;
  text-decoration: none;
  transform: translateY(-1px);
}

.secondary-button {
  display: inline-block;
  background-color: transparent;
  color: white;
  padding: 0.85rem 1.8rem;
  border: 2px solid white;
  border-radius: 6px;
  font-weight: 600;
  margin-left: 0.75rem;
  transition: all 0.2s;
}

.secondary-button:hover {
  background-color: rgba(255,255,255,0.15);
  text-decoration: none;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background-color: var(--white);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 1.25rem;
}

.card-content h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.card-content p {
  font-size: 0.95rem;
  color: var(--soft-gray);
  margin-bottom: 0.75rem;
}

/* Learning stages */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stage {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.2s;
}

.stage:hover {
  border-color: var(--accent-green);
}

.stage-number {
  display: inline-block;
  background: var(--light-green);
  color: var(--primary-green);
  font-size: 0.85rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.stage h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

/* Special sections */
.special-section {
  background: var(--light-green);
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.special-section h3 {
  color: var(--primary-green);
}

/* Image with caption */
.image-with-caption {
  margin: 1.5rem 0;
}

.image-with-caption img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.image-with-caption figcaption {
  font-size: 0.875rem;
  color: var(--soft-gray);
  margin-top: 0.5rem;
  text-align: center;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.gallery-item img {
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: white;
  padding: 1.25rem 0.75rem 0.75rem;
  font-size: 0.9rem;
}

/* Forms */
form {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  max-width: 620px;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-green);
}

button[type="submit"] {
  background: var(--primary-green);
  color: white;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
}

button[type="submit"]:hover {
  background: #234730;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.faq-question {
  padding: 1rem 1.25rem;
  background: var(--white);
  cursor: pointer;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background: var(--light-green);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  display: none;
  border-top: 1px solid var(--border);
}

.faq-answer.active {
  display: block;
}

/* Articles */
.article-list {
  display: grid;
  gap: 1.5rem;
}

.article-card {
  display: flex;
  gap: 1.25rem;
  background: var(--white);
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.article-card img {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--soft-gray);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--light-green);
  font-weight: 600;
  color: var(--primary-green);
}

/* Footer */
footer {
  background: #1F2937;
  color: #D1D5DB;
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
}

footer a {
  color: #9CA3AF;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
  }
  
  nav ul {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }
  
  nav ul.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero h1 {
    font-size: 2.1rem;
  }
  
  .card-grid,
  .stages-grid {
    grid-template-columns: 1fr;
  }
  
  .article-card {
    flex-direction: column;
  }
  
  .article-card img {
    width: 100%;
    height: 160px;
  }

  .topbar .container {
    justify-content: center;
    text-align: center;
  }

  .topbar-ops {
    justify-content: center;
  }

  .footer-company {
    grid-template-columns: 1fr;
  }
}

/* Accessibility & performance */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Modal for gallery */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
}

.modal-content {
  max-width: 90%;
  max-height: 85vh;
}

.modal-content img {
  max-height: 80vh;
  width: auto;
  border-radius: 4px;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
}

/* Learning path */
.learning-path {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.step:last-child {
  margin-bottom: 0;
}

.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--accent-green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Small yard & narrow plot cards */
.special-card {
  border-left: 5px solid var(--accent-green);
}

/* Success message */
.success-message {
  background: #E8F0E9;
  color: #2E5A3C;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  margin: 1rem 0;
  display: none;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--soft-gray);
  padding: 1rem 0 0;
}

.breadcrumb a {
  color: var(--soft-gray);
}

.breadcrumb a:hover {
  color: var(--accent-green);
}

/* Page header (non-home pages) */
.page-header {
  background: linear-gradient(rgba(46, 90, 60, 0.82), rgba(46, 90, 60, 0.75));
  color: #fff;
  padding: 2.75rem 0 2.25rem;
}

.page-header h1 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.92;
  max-width: 680px;
  margin-bottom: 0;
}

/* Non-blocking toast notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: auto;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 320px;
}

.toast {
  background: var(--primary-green);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.toast-info {
  background: #374151;
}

@media (max-width: 480px) {
  #toast-container {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

/* Interactive checklist (Start Learning page) */
.checklist-progress {
  font-weight: 600;
  color: var(--primary-green);
  margin: 1.5rem 0 1rem;
}

.checklist {
  margin-bottom: 1rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.65rem;
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}

.checklist-item:hover {
  border-color: var(--accent-green);
}

.checklist-item.completed {
  background: var(--light-green);
  border-color: var(--accent-green);
}

.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--accent-green);
}

.checklist-item .checklist-text h4 {
  font-family: inherit;
  font-weight: 600;
  color: var(--dark-text);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.checklist-item.completed .checklist-text h4 {
  color: var(--primary-green);
  text-decoration: line-through;
  text-decoration-color: var(--accent-green);
}

.checklist-item .checklist-text p {
  font-size: 0.85rem;
  color: var(--soft-gray);
  margin-bottom: 0;
}

.checklist-reset {
  background: none;
  border: 1px solid var(--border);
  color: var(--soft-gray);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

.checklist-reset:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* Footer company identification block */
.footer-company {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-company h4 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.footer-company p {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: #9CA3AF;
}

.footer-nav-col a {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

/* 404 page */
.error-page {
  text-align: center;
  padding: 5rem 0 4rem;
}

.error-code {
  font-family: var(--font-display);
  font-size: 6.5rem;
  color: var(--accent-green);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1rem;
}

.error-page .cta-button {
  background-color: var(--primary-green);
  color: #fff;
}

/* Notice / disclosure box */
.notice-box {
  background: var(--warm-beige);
  border-left: 4px solid var(--accent-green);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  color: var(--dark-text);
}