/*
Theme Name: Tree Roots
Theme URI: https://tree-roots.net
Author: ツリールーツ合同会社
Author URI: https://tree-roots.net
Description: ツリールーツ合同会社 コーポレートサイト - 相談支援アスト・アイノネ（保育所等訪問支援）
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: treeroots
*/

/* ===========================
   CSS Custom Properties
   =========================== */
:root {
  --color-primary: #21443d;
  --color-primary-light: #2d5c53;
  --color-primary-dark: #193530;
  --color-accent: #c4a265;
  --color-accent-light: #d4b87d;
  --color-warm: #f5f0e8;
  --color-warm-dark: #e8dfd2;
  --color-white: #ffffff;
  --color-text: #1a1a1a;
  --color-text-light: #666666;
  --font-heading: 'Shippori Mincho', serif;
  --font-body: 'Noto Sans JP', sans-serif;
}

/* ===========================
   Base Styles
   =========================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.8;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.4;
}

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

/* ===========================
   Navigation
   =========================== */
.nav-link {
  position: relative;
  padding-bottom: 2px;
}

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

.nav-link:hover::after {
  width: 100%;
}

/* Dropdown */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu,
.group:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Header shadow on scroll */
.header-scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-overlay {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ===========================
   Buttons
   =========================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(33, 68, 61, 0.3);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(33, 68, 61, 0.3);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-accent:hover {
  background-color: var(--color-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(196, 162, 101, 0.3);
}

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #06c755;
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-line:hover {
  background-color: #05b34c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

/* ===========================
   Cards
   =========================== */
.card {
  background: var(--color-white);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

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

/* ===========================
   Scroll Animations
   Animations are handled by header.php inline CSS with .js-ready guard.
   Content is visible by default; animations only apply after JS loads.
   =========================== */

/* ===========================
   Section Styles
   =========================== */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Hero gradient overlay */
.hero-gradient {
  background: linear-gradient(135deg, rgba(33, 68, 61, 0.85) 0%, rgba(33, 68, 61, 0.6) 100%);
}

/* ===========================
   Utility Classes
   =========================== */
.text-balance {
  text-wrap: balance;
}

/* WordPress default alignment classes */
.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

/* WordPress content styles */
.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.entry-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.entry-content ul, .entry-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-warm);
  border-radius: 0 0.5rem 0.5rem 0;
}

.entry-content img {
  border-radius: 0.5rem;
}

.entry-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content a:hover {
  color: var(--color-accent);
}

/* ===========================
   Pagination
   =========================== */
.page-numbers {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.page-numbers li {
  display: inline-flex;
}

.page-numbers a,
.page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

.page-numbers a {
  color: var(--color-text);
  background: var(--color-warm);
}

.page-numbers a:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.page-numbers .current {
  background: var(--color-primary);
  color: var(--color-white);
}

.page-numbers .dots {
  color: var(--color-text-light);
  background: transparent;
}

.page-numbers .prev,
.page-numbers .next {
  background: transparent;
  color: var(--color-primary);
}

.page-numbers .prev:hover,
.page-numbers .next:hover {
  background: var(--color-warm);
}

/* ===========================
   吹き出し (Fukidashi)
   =========================== */
.fukidashi {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  align-items: flex-start;
}

.fukidashi-right {
  flex-direction: row-reverse;
}

.fukidashi-avatar {
  flex-shrink: 0;
  text-align: center;
  width: 80px;
}

.fukidashi-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-warm-dark);
  background: #fff;
}

.fukidashi-name {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 0.25rem;
}

.fukidashi-balloon {
  position: relative;
  background: var(--color-warm);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  max-width: 80%;
  line-height: 1.8;
}

.fukidashi-balloon p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text);
}

/* 左配置（アイさん）：左に三角 */
.fukidashi-left .fukidashi-balloon::before {
  content: '';
  position: absolute;
  top: 20px;
  left: -10px;
  border: 6px solid transparent;
  border-right: 8px solid var(--color-warm);
}

/* 右配置（ノネちゃん）：右に三角 */
.fukidashi-right .fukidashi-balloon::before {
  content: '';
  position: absolute;
  top: 20px;
  right: -10px;
  border: 6px solid transparent;
  border-left: 8px solid var(--color-warm);
}

/* モバイル対応 */
@media (max-width: 640px) {
  .fukidashi-avatar {
    width: 60px;
  }

  .fukidashi-avatar img {
    width: 60px;
    height: 60px;
  }

  .fukidashi-balloon {
    max-width: 100%;
    padding: 0.875rem 1rem;
  }

  .fukidashi-name {
    font-size: 0.6rem;
  }
}
