/*
Theme Name: HugLife Labo Theme
Theme URI: https://huglifelabo.jp
Author: HugLife Labo
Author URI: https://huglifelabo.jp
Description: カスタムテーマ for ハグライフラボ - がん患者さんとご家族に「安心の居場所」をつくり、支える人を支える
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: huglife-theme
*/

/* ========================================
   リセットCSS
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
  line-height: 1.7;
  color: #333;
  background-color: #fff5f7;
}

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

a {
  color: #4a90a4;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  opacity: 0.7;
}

/* ========================================
   カラーパレット
======================================== */
:root {
  --color-primary: #4a90a4; /* ブルー */
  --color-secondary: #7eb09b; /* グリーン */
  --color-accent: #f4a5ae; /* ピンク */
  --color-light: #fef0f3;
  --color-white: #ffffff;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #e0e0e0;
}

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

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
  color: var(--color-primary);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-secondary);
  margin: 20px auto 0;
}

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

.header-inner {
  display: grid;
  grid-template-columns: minmax(250px, auto) 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 15px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.site-logo a {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-with-text {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-image {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-image img,
.site-logo img {
  max-height: 80px;
  width: auto;
}

.logo-image a {
  display: block;
  line-height: 0;
}

.logo-text-link {
  text-decoration: none;
}

.logo-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.logo-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 500;
  color: #f4a5ae;
  white-space: nowrap;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.logo-kana {
  font-size: 0.85rem;
  font-weight: 400;
  color: #999;
  letter-spacing: 0.1em;
  line-height: 1;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 15px;
  flex-wrap: wrap;
}

.main-navigation a {
  color: var(--color-text);
  font-weight: 500;
  padding: 8px 12px;
  font-size: 0.9rem;
  white-space: nowrap;
}

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

.header-cta-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cta-button {
  background: var(--color-accent);
  color: var(--color-white);
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 600;
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}

.cta-button:hover {
  background: #e5949d;
  opacity: 1;
}

.cta-button-secondary {
  background: var(--color-secondary);
}

.cta-button-secondary:hover {
  background: #6a9d88;
}

/* ハンバーガーメニュー */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  position: relative;
  width: 35px;
  height: 35px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--color-text);
  margin: 5px 0;
  transition: all 0.3s ease;
  position: absolute;
  left: 5px;
}

.menu-toggle span:nth-child(1) {
  top: 8px;
}

.menu-toggle span:nth-child(2) {
  top: 16px;
}

.menu-toggle span:nth-child(3) {
  top: 24px;
}

/* メニューが開いている時のハンバーガーアイコン（×マークに変化） */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 16px;
}

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

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 16px;
}

/* ========================================
   フッター
======================================== */
.site-footer {
  background: var(--color-light);
  padding: 50px 0 30px;
  margin-top: 80px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-info {
  margin-bottom: 30px;
}

.footer-info h3 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.footer-info p {
  color: var(--color-text-light);
  margin: 5px 0;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
}

.footer-social a {
  color: var(--color-text);
  font-size: 1.5rem;
}

.footer-line {
  margin: 30px 0;
}

.line-button {
  display: inline-block;
  background: #06c755;
  color: var(--color-white);
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 600;
}

.line-button:hover {
  background: #05b24c;
  opacity: 1;
}

.copyright {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ========================================
   ボタン
======================================== */
.button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.button:hover {
  background: #3a7a8d;
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 144, 164, 0.3);
}

.button-secondary {
  background: var(--color-secondary);
}

.button-secondary:hover {
  background: #6a9d88;
}

.button-accent {
  background: var(--color-accent);
}

.button-accent:hover {
  background: #e5949d;
}

/* ========================================
   ページヘッダー（共通）
======================================== */
.page-header {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  padding: 60px 20px;
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
}

.page-subtitle {
  font-size: 1.2rem;
  margin-top: 15px;
  opacity: 0.95;
}

/* ========================================
   カードレイアウト
======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: var(--color-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 25px;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--color-text);
}

.card-text {
  color: var(--color-text-light);
  margin-bottom: 20px;
  line-height: 1.6;
}

.card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 15px;
}

/* ========================================
   レスポンシブデザイン
======================================== */
@media screen and (max-width: 1200px) {
  .header-inner {
    grid-template-columns: minmax(200px, auto) 1fr auto auto;
    gap: 12px;
  }

  .site-logo a,
  .logo-with-text {
    gap: 10px;
  }

  .logo-text {
    font-size: 1.4rem;
  }

  .logo-kana {
    font-size: 0.75rem;
  }

  .main-navigation ul {
    gap: 6px;
  }

  .main-navigation a {
    font-size: 0.82rem;
    padding: 6px 8px;
  }

  .cta-button {
    padding: 8px 18px;
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 768px) {
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 15px;
    align-items: center;
  }

  .site-logo {
    flex: 1 1 auto;
    order: 1;
    min-width: 0;
  }

  .logo-image img,
  .site-logo img {
    max-height: 50px;
  }

  .logo-text {
    font-size: 1.3rem;
    letter-spacing: 0.06em;
  }

  .logo-kana {
    font-size: 0.7rem;
  }

  .logo-icon {
    font-size: 1.5rem;
  }

  .site-logo a,
  .logo-with-text {
    gap: 12px;
  }

  .main-navigation {
    display: none;
    order: 4;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-navigation.active {
    display: block;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--color-white);
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .header-cta-buttons {
    order: 2;
    display: flex;
    gap: 6px;
    margin-right: 10px;
    transition: opacity 0.3s ease;
  }

  .cta-button {
    font-size: 0.85rem;
    padding: 8px 12px;
  }

  /* メニューが開いている時はCTAボタンを非表示 */
  .header-cta-buttons.hidden {
    opacity: 0;
    pointer-events: none;
  }

  .menu-toggle {
    display: block;
    order: 3;
    position: relative;
    background: var(--color-white);
    border-radius: 5px;
    flex-shrink: 0;
  }

  /* メニューが開いている時、ハンバーガーボタンを固定表示 */
  .menu-toggle.active {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1002;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: var(--color-white);
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
  }

  .main-navigation a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
  }

  .main-navigation a:hover {
    background: var(--color-light);
  }

  .cta-button {
    grid-column: 2;
  }

  .cta-button {
    font-size: 0.9rem;
    padding: 8px 15px;
  }

  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

/* ========================================
   トップへ戻るボタン
======================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(74, 144, 164, 0.3);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(74, 144, 164, 0.4);
  background: linear-gradient(135deg, #3a7a8d, #6a9d88);
}

.back-to-top:active {
  transform: translateY(-2px);
}

@media screen and (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

@media screen and (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 15px;
  }

  .section {
    padding: 40px 0;
  }

  .site-logo {
    font-size: 1rem;
  }

  .logo-image img,
  .site-logo img {
    max-height: 40px;
  }

  .logo-text {
    font-size: 1.1rem;
    letter-spacing: 0.05em;
  }

  .logo-kana {
    font-size: 0.65rem;
  }

  .logo-icon {
    font-size: 1.3rem;
  }

  .site-logo a,
  .logo-with-text {
    gap: 10px;
  }

  .header-inner {
    padding: 8px 10px;
    gap: 8px;
  }

  .cta-button {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .menu-toggle.active {
    top: 10px;
    right: 10px;
  }

  .main-navigation.active {
    top: 55px;
    max-height: calc(100vh - 55px);
  }

  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}
