/**
 * Base CSS - 基本スタイルとリセット
 * 全ページ共通の基本スタイル定義
 */

/* ====================================
   リセットCSS
==================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-feature-settings: "palt";
  line-height: 1.7;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 70px;
}

/* 管理バーがある場合 */
body.admin-bar {
  padding-top: 102px;
}

body.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    padding-top: 116px;
  }
  
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* ====================================
   基本要素
==================================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

ul, ol {
  list-style: none;
}

/* ====================================
   タイポグラフィ
==================================== */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.4;
  font-weight: bold;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(24px, 3.5vw, 32px); }
h3 { font-size: clamp(20px, 3vw, 24px); }
h4 { font-size: clamp(18px, 2.5vw, 20px); }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* ====================================
   共通レイアウト
==================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.main,
main.main {
  padding-top: 0;
  margin-top: 0;
  min-height: calc(100vh - 70px);
}

/* ====================================
   ヘッダー
==================================== */
.site-header,
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eee;
  z-index: 1000;
  height: 70px;
  transition: all 0.3s;
}

.header-container,
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.site-branding,
.header-logo {
  font-size: 24px;
  font-weight: bold;
  color: #000;
}

.main-navigation ul,
.header-nav ul {
  display: flex;
  gap: 40px;
  list-style: none;
}

.main-navigation a,
.header-nav a {
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s;
}

.main-navigation a:hover,
.header-nav a:hover {
  color: #667eea;
}

/* モバイルメニュー */
.mobile-menu-toggle {
  display: none;
  width: 30px;
  height: 30px;
  position: relative;
  cursor: pointer;
}

/* ====================================
   ボタン
==================================== */
.btn {
  display: inline-block;
  padding: 16px 40px;
  background: #000;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  background: #333;
  transform: translateY(-2px);
  color: #fff;
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-outline {
  background: transparent;
  color: #000;
  border: 2px solid #000;
}

.btn-outline:hover {
  background: #000;
  color: #fff;
}

.btn-large {
  padding: 18px 50px;
  font-size: 18px;
}

/* ====================================
   カード
==================================== */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.card-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
}

.card-text {
  color: #666;
  line-height: 1.8;
}

/* ====================================
   フォーム
==================================== */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.3s;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.form-group.required .form-label::after {
  content: ' *';
  color: #e74c3c;
}

/* ====================================
   グリッド
==================================== */
.grid {
  display: grid;
  gap: 32px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ====================================
   フッター
==================================== */
.footer {
  background: #000;
  color: #fff;
  padding: 60px 0 40px;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.footer-brand p {
  color: #999;
  line-height: 1.8;
}

.footer-column h4 {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 16px;
  opacity: 0.8;
}

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

.footer-column li {
  margin-bottom: 12px;
}

.footer-column a {
  color: #999;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-column a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid #333;
  text-align: center;
}

.footer-copyright {
  font-size: 14px;
  color: #666;
}

/* ====================================
   ユーティリティ
==================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

.pt-1 { padding-top: 8px; }
.pt-2 { padding-top: 16px; }
.pt-3 { padding-top: 24px; }
.pt-4 { padding-top: 32px; }
.pt-5 { padding-top: 40px; }

.pb-1 { padding-bottom: 8px; }
.pb-2 { padding-bottom: 16px; }
.pb-3 { padding-bottom: 24px; }
.pb-4 { padding-bottom: 32px; }
.pb-5 { padding-bottom: 40px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* ====================================
   アニメーション
==================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ====================================
   レスポンシブ
==================================== */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }
  
  .site-header,
  .header {
    height: 60px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .main-navigation,
  .header-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .btn {
    padding: 14px 32px;
    font-size: 15px;
  }
  
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  h4 { font-size: 18px; }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .section {
    padding: 40px 0;
  }
}