/*
Theme Name: CIN Green Partners
Theme URI: https://cingreenpartners.jp
Author: CIN Green Partners
Author URI: https://cingreenpartners.jp
Description: CINグリーンパートナーズ協同組合のオリジナルテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cin-theme
Tags: custom, responsive, green, cooperative
*/

/* ===== CSS変数（カラーパレット・共通設定） ===== */
:root {
  /* ブランドカラー */
  --color-primary: #4CAF50;
  --color-primary-light: #66BB6A;
  --color-primary-dark: #2d5016;
  
  /* アクセントカラー */
  --color-accent-orange: #FFA726;
  --color-accent-blue: #42A5F5;
  --color-accent-yellow: #FDD835;
  
  /* グレースケール */
  --color-text-primary: #333333;
  --color-text-secondary: #666666;
  --color-text-light: #999999;
  --color-bg-white: #ffffff;
  --color-bg-light: #f8fcf8;
  --color-bg-gray: #f5f5f5;
  
  /* ボーダー・シャドウ */
  --color-border: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  
  /* スペーシング */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-xxl: 64px;
  
  /* フォント */
  --font-family-base: 'Noto Sans JP', 'M PLUS Rounded 1c', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.7;
  
  /* ヘッダー高さ */
  --header-height: 80px;
  
  /* トランジション */
  --transition-base: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

/* ===== リセット＆基本スタイル ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== コンテナ ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ===== ヘッダー ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: var(--transition-base);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.site-logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo-image {
  height: 50px;
  width: auto;
  object-fit: contain;
}

/* ===== デスクトップナビゲーション ===== */
.desktop-nav {
  display: flex;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.3s ease;
  padding: 8px 0;
  display: block;
}

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

.nav-menu a.btn-contact {
  background: var(--color-primary);
  color: white;
  padding: 10px 24px;
  border-radius: 25px;
  transition: var(--transition-base);
}

.nav-menu a.btn-contact:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* ===== ハンバーガーメニュー ===== */
.hamburger-circle {
  display: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
  transition: var(--transition-base);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.hamburger-circle:hover {
  background: var(--color-primary-dark);
  transform: scale(1.05);
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition-base);
}

.hamburger-circle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-circle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-circle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== モバイルメニュー ===== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 350px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 999;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 100px 30px 30px;
}

.mobile-nav.active {
  right: 0;
}

.mobile-menu-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--color-primary);
}

.mobile-menu-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
}

.mobile-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-menu li {
  margin-bottom: 15px;
}

.mobile-nav-menu a {
  display: block;
  padding: 15px 20px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  border-radius: 10px;
  transition: var(--transition-base);
  background: var(--color-bg-light);
}

.mobile-nav-menu a:hover {
  background: var(--color-primary);
  color: white;
  transform: translateX(5px);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
}

/* ===== ボタンスタイル ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 30px;
  transition: var(--transition-base);
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 12px 32px;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

/* ===== スクロールトップボタン ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 20px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-base);
  z-index: 900;
}

.scroll-top.visible {
  opacity: 0.9;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  opacity: 1;
  background: var(--color-primary-dark);
  transform: translateY(-5px);
}

/* ===== フッター ===== */
.site-footer {
  background: var(--color-primary-dark);
  color: white;
  padding: 60px 20px 30px;
  margin-top: 80px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--color-primary-light);
}

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

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* ===== ユーティリティクラス ===== */
.text-center {
  text-align: center;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ===== レスポンシブ対応 ===== */
@media (max-width: 1024px) {
  :root {
    --header-height: 70px;
  }
  
  .nav-menu {
    gap: 20px;
  }
  
  .nav-menu a {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
    --font-size-base: 15px;
  }
  
  .desktop-nav {
    display: none;
  }
  
  .hamburger-circle {
    display: flex;
  }
  
  .mobile-nav {
    display: block;
  }
  
  .mobile-menu-overlay {
    display: block;
  }
  
  .header-container {
    padding: 0 20px;
  }
  
  .logo-image {
    height: 40px;
  }
  
  .scroll-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-base: 14px;
    --header-height: 60px;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .header-container {
    height: 60px;
    padding: 0 15px;
  }
  
  .logo-image {
    height: 35px;
  }
  
  .hamburger-circle {
    width: 45px;
    height: 45px;
  }
  
  .mobile-nav {
    width: 90%;
    padding: 80px 20px 20px;
  }
}

/* ===== アクセシビリティ ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* フォーカス表示の改善 */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* スクリーンリーダー専用テキスト */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}