/* サステナブル・エシカルファッションサイト スタイルシート */

:root {
  --primary-color: #2d5016;
  --primary-light: #4a7c59;
  --secondary-color: #8b9d7c;
  --accent-color: #a8b896;
  --text-dark: #2c3e1f;
  --text-light: #5a6b4f;
  --bg-light: #f8f9f6;
  --bg-white: #ffffff;
  --border-color: #d4ddc9;
  --shadow: rgba(45, 80, 22, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  line-height: 1.8;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

/* ヘッダー */
header {
  background-color: var(--bg-white);
  box-shadow: 0 2px 10px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::before {
  content: '🌿';
  font-size: 1.8rem;
}

/* ナビゲーション */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

nav a:hover {
  color: var(--primary-color);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  transition: var(--transition);
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ヒーローセクション */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
  opacity: 0.3;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-image {
  max-width: 100%;
  height: auto;
  margin-top: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* メインコンテナ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
}

/* メインコンテンツ */
main {
  background-color: var(--bg-white);
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--shadow);
}

main h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent-color);
}

main h3 {
  color: var(--primary-light);
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

main p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

main ul, main ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

main li {
  margin-bottom: 0.5rem;
}

main strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* サイドバー */
aside {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-section {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--shadow);
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 0.8rem;
}

.sidebar-nav a {
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.sidebar-nav a::before {
  content: '▸';
  color: var(--primary-light);
  font-weight: bold;
}

.sidebar-nav a:hover {
  color: var(--primary-color);
  padding-left: 0.5rem;
}

.sidebar-nav a.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* 広告スペース */
.ad-space {
  background-color: var(--bg-light);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  border: 1px dashed var(--border-color);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* インフォボックス */
.info-box {
  background-color: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 5px;
}

.info-box h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* カード */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background-color: var(--bg-white);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px var(--shadow);
}

.card h3 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.card a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.card a:hover {
  color: var(--primary-color);
}

/* フッター */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--accent-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: white;
  text-decoration: none;
  opacity: 0.9;
  transition: var(--transition);
}

.footer-section a:hover {
  opacity: 1;
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* パンくずリスト */
.breadcrumb {
  background-color: var(--bg-white);
  padding: 1rem 2rem;
  margin-bottom: 2rem;
  border-radius: 5px;
}

.breadcrumb ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
  content: '›';
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--primary-light);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
  }

  aside {
    position: static;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }

  nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--bg-white);
    transition: left 0.3s ease;
    z-index: 999;
    box-shadow: 2px 0 10px var(--shadow);
    padding: 5rem 2rem 2rem;
  }

  nav.active {
    left: 0;
  }

  nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .container {
    padding: 2rem 1rem;
    gap: 2rem;
  }

  main {
    padding: 1.5rem;
  }

  main h2 {
    font-size: 1.6rem;
  }

  main h3 {
    font-size: 1.3rem;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

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

  .footer-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  main {
    padding: 1rem;
  }
}

/* プリント用スタイル */
@media print {
  header, aside, footer, .hamburger {
    display: none;
  }

  .container {
    grid-template-columns: 1fr;
  }

  main {
    box-shadow: none;
  }
}



/* === Mobile fix v3 (auto-injected) === */
html, body { overflow-x: hidden; }
img, video, iframe, table { max-width: 100%; }

@media (max-width: 768px) {
  /* ヒーローテキストがviewportからはみ出さないようにする */
  h1, h2, h3 {
    font-size: clamp(1.3rem, 5vw, 2.5rem) !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  p, li, td, th, span, a {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  /* 全要素の幅を100vw以内に */
  .container, main, section, article, header, footer, nav,
  [class*="container"], [class*="wrapper"], [class*="content"] {
    max-width: 100vw;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}
/* === End Mobile fix v3 === */
