/*
Theme Name: DEMO WORKS Theme
Theme URI:
Description: Custom theme for DEMO WORKS Web Service based on mockup design.
Version: 1.0.0
Author: akimatsu
*/


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

  html {
    overflow-x: hidden;
  }

  body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: #334155;
    background-color: #ffffff;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
  }

  body.dark-mode {
    background-color: #0f172a;
    color: #f8fafc;
  }
  body.dark-mode header {
    background-color: rgba(15, 23, 42, 0.9);
    border-bottom-color: #334155;
  }
  body.dark-mode .logo-text,
  body.dark-mode nav a,
  body.dark-mode .section-title,
  body.dark-mode .card-title,
  body.dark-mode .work-title,
  body.dark-mode .sim-field label,
  body.dark-mode .sim-checkboxes label {
    color: #f8fafc;
  }
  body.dark-mode #works,
  body.dark-mode #skills {
    background-color: #0f172a;
  }
  body.dark-mode #services,
  body.dark-mode #contact {
    background-color: #1e293b;
  }
  body.dark-mode .card,
  body.dark-mode .work-card,
  body.dark-mode .skills-container,
  body.dark-mode .contact-box,
  body.dark-mode .simulator-card,
  body.dark-mode .calendar-box {
    background-color: #1e293b;
    border-color: #334155;
  }
  body.dark-mode .card-text {
    color: #94a3b8;
  }

  .snap-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
  }

  .dot-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1001;
  }
  .dot-nav a {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #0284c7;
    opacity: 0.3;
    transition: opacity 0.2s, transform 0.2s;
  }
  .dot-nav a:hover, .dot-nav a.active {
    opacity: 1;
    transform: scale(1.3);
  }

  header {
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 1000;
  }

  .logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
    background: #0284c7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 18px;
  }

  .logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
  }

  nav {
    display: flex;
    align-items: center;
    gap: 30px;
  }

  nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
  }

  nav a {
    text-decoration: none;
    color: #64748b;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s ease;
  }

  nav a:hover {
    color: #0284c7;
  }

  .theme-toggle-btn {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: inherit;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
  }

  .snap-container > section {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 60px 60px;
    overflow: hidden;
  }

  .section-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
  }

  .section-title {
    font-size: clamp(24px, 6vw, 36px);
    font-weight: 800;
    margin-bottom: 36px;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  #hero {
    background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
  }
  body.dark-mode #hero {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  }

  #services {
    background-color: #f0f9ff;
    border-top: 1px solid #e0f2fe;
    border-bottom: 1px solid #e0f2fe;
  }
  #services .section-title { color: #0369a1; }

  #works { background-color: #ffffff; }
  #works .section-title { color: #0f172a; }

  #skills {
    background-color: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
  }
  #skills .section-title { color: #334155; }

  #contact { background-color: #f0f9ff; }
  #contact .section-title { color: #0369a1; }

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

  .hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #7dd3fc;
    color: #0369a1;
    border-radius: 20px;
    font-size: clamp(12px, 3vw, 15px);
    font-weight: 700;
    margin-bottom: 20px;
    word-break: keep-all;
  }

  .hero-title {
    font-size: clamp(28px, 7vw, 54px);
    font-weight: 800;
    color: #0c4a6e;
    margin-bottom: 20px;
    line-height: 1.3;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
  body.dark-mode .hero-title { color: #38bdf8; }

  .hero-text {
    font-size: clamp(14px, 3.5vw, 20px);
    color: #0369a1;
    margin-bottom: 32px;
    overflow-wrap: break-word;
  }
  body.dark-mode .hero-text { color: #bae6fd; }

  .hero-btn {
    display: inline-block;
    padding: 16px 40px;
    background-color: #0284c7;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  }

  .hero-btn:hover {
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
  }

  .hero-btn:hover, .card:hover, .work-card:hover {
    transform: translateY(-6px);
  }
  .hero-btn:active, .card:active, .work-card:active {
    transform: translateY(-2px);
  }

  .terminal-box {
    background: #0f172a;
    border-radius: 8px;
    padding: 18px 24px;
    color: #38bdf8;
    font-family: monospace;
    font-size: 15px;
    margin-top: 28px;
    text-align: left;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  }
  .terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }
  .terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }
  .dot-red { background: #ef4444; }
  .dot-yellow { background: #eab308; }
  .dot-green { background: #22c55e; }

  .grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }

  .card {
    background: #ffffff;
    border-radius: 12px;
    padding: 36px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  }
  .card:hover {
    box-shadow: 0 16px 32px rgba(2, 132, 199, 0.12);
    border-color: #7dd3fc;
  }
  .card .card-icon {
    display: inline-block;
    transition: transform 0.3s ease;
  }
  .card:hover .card-icon {
    transform: scale(1.15) rotate(-4deg);
  }

  #services .card {
    background: #ffffff;
    border: 1px solid #bae6fd;
  }

  .card-icon {
    font-size: 36px;
    margin-bottom: 16px;
  }

  .card-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .card-text {
    font-size: 15px;
    line-height: 1.6;
    color: #64748b;
  }

  .simulator-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 36px;
    border: 1px solid #bae6fd;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.05);
    margin-top: 28px;
  }
  .simulator-title {
    font-size: 20px;
    font-weight: 700;
    color: #0369a1;
    text-align: center;
    margin-bottom: 20px;
  }
  .simulator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 20px;
  }
  .sim-field label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
  }
  .sim-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    background: #f8fafc;
  }
  .sim-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }
  .sim-checkboxes label {
    font-size: 14px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }
  .sim-result {
    text-align: center;
    padding-top: 16px;
    border-top: 1px dashed #cbd5e1;
    font-size: 20px;
    font-weight: 800;
    color: #0284c7;
  }

  .filter-btns {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
  }
  .filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
  }
  .filter-btn.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
  }

  .work-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .work-card:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
  }
  .work-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
  }
  .work-card:hover .work-img {
    transform: scale(1.1);
    filter: brightness(0.55);
  }

  /* 画像の上に「詳細を見る」をホバーで浮かび上がらせる */
  .work-card::after {
    content: "🔍 詳細を見る";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
  }
  .work-card:hover::after {
    opacity: 1;
    transform: translateY(0);
  }
  .work-body {
    padding: 20px;
  }
  .work-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .tab-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
  }
  .tab-btn {
    padding: 8px 24px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 3px solid transparent;
  }
  .tab-btn.active {
    color: #0284c7;
    border-color: #0284c7;
  }

  .skills-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 36px;
    border: 1px solid #e2e8f0;
  }

  .skills-radar {
    max-width: 520px;
    height: 420px;
    margin: 0 auto;
  }

  .contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
  }

  .contact-box {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 36px;
    border: 1px solid #bae6fd;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.05);
  }

  .calendar-box {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 36px;
    border: 1px solid #bae6fd;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .form-group {
    margin-bottom: 18px;
  }
  .form-group label {
    display: block;
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
    font-weight: 600;
  }
  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    background-color: #f8fafc;
  }

  .submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
  }

  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
  }
  .modal-content {
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    max-width: 550px;
    width: 90%;
    color: #334155;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  }

  .chatbot-wrapper {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .chatbot-tooltip {
    background: #0f172a;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    position: relative;
    animation: bounce 2s infinite;
  }

  .chatbot-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 28px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #0f172a;
  }

  .chatbot-toggle {
    height: 56px;
    padding: 0 20px;
    border-radius: 28px;
    background: #0284c7;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
    font-size: 16px;
    font-weight: 800;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7);
    }
    70% {
      box-shadow: 0 0 0 16px rgba(2, 132, 199, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
    }
  }

  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
  }

  .chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 32px;
    width: 360px;
    height: 450px;
    background: #ffffff;
    border: 2px solid #0284c7;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 1002;
    overflow: hidden;
  }
  .chatbot-header {
    padding: 16px 20px;
    background: #0284c7;
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .chatbot-close {
    cursor: pointer;
    font-size: 18px;
  }
  .chatbot-body {
    flex: 1;
    padding: 16px;
    font-size: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .chatbot-input {
    display: flex;
    border-top: 1px solid #e2e8f0;
  }
  .chatbot-input input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 14px;
    outline: none;
  }

  footer {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    color: #94a3b8;
    padding: 14px;
    text-align: center;
    font-size: 12px;
  }

  /* 旧1ページ構成（スナップスクロール）ではセクション内下端に重ねて表示する */
  .snap-container footer {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 10;
  }

  @media (max-width: 1024px) {
    .snap-container > section { padding: 80px 20px 40px; }
    .grid-3 { gap: 16px; }
  }

  .nav-toggle-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
  }
  .nav-toggle-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #334155;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  body.dark-mode .nav-toggle-btn span {
    background-color: #f8fafc;
  }
  .nav-toggle-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-btn.active span:nth-child(2) { opacity: 0; }
  .nav-toggle-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ナビ項目が8個あり、768px〜1150px幅では横並びに収まらず文字が縦に折り返してしまうため、
     このレンジではモバイルと同じハンバーガーメニューに切り替える。
     基本ルール（.nav-toggle-btn の display:none 等）より後ろに置くことで確実に上書きする */
  @media (max-width: 1150px) and (min-width: 769px) {
    nav {
      gap: 12px;
    }
    nav ul {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      flex-direction: column;
      gap: 0;
      background-color: rgba(255, 255, 255, 0.98);
      border-bottom: 1px solid rgba(226, 232, 240, 0.8);
      padding: 8px 0;
    }
    body.dark-mode nav ul {
      background-color: rgba(15, 23, 42, 0.98);
    }
    nav ul.open {
      display: flex;
    }
    nav ul li {
      width: 100%;
      text-align: center;
    }
    nav ul li a {
      display: block;
      padding: 14px 20px;
    }
    .nav-toggle-btn {
      display: flex;
    }
  }

  @media (max-width: 768px) {
    .grid-3, .contact-container, .simulator-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    /* position:fixedのヘッダーがモバイル端末のスクロールエミュレーションで浮いてずれる不具合を避けるため、
       通常フローに沿って追従するsticky方式に切り替える */
    header {
      position: sticky;
      padding: 16px 20px;
    }
    #hero {
      padding-top: 40px;
    }
    body.admin-bar #hero {
      padding-top: 40px;
    }

    nav {
      gap: 12px;
    }
    nav ul {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      flex-direction: column;
      gap: 0;
      background-color: rgba(255, 255, 255, 0.98);
      border-bottom: 1px solid rgba(226, 232, 240, 0.8);
      padding: 8px 0;
    }
    body.dark-mode nav ul {
      background-color: rgba(15, 23, 42, 0.98);
    }
    nav ul.open {
      display: flex;
    }
    nav ul li {
      width: 100%;
      text-align: center;
    }
    nav ul li a {
      display: block;
      padding: 14px 20px;
    }
    .nav-toggle-btn {
      display: flex;
    }
    .dot-nav {
      display: none;
    }
    .filter-btns, .tab-btns {
      flex-wrap: nowrap;
      overflow-x: auto;
      justify-content: flex-start;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 4px;
    }
    .filter-btn, .tab-btn {
      flex: 0 0 auto;
      white-space: nowrap;
    }
    .tab-btns {
      gap: 12px;
      justify-content: flex-start;
      padding-left: 4px;
    }
    .simulator-card, .skills-container, .contact-box, .calendar-box {
      padding: 20px;
    }
    .hero-btn {
      padding: 14px 24px;
      white-space: normal;
    }

    /* セクション内コンテンツが100vhを超える場合があるため、モバイルではスナップ固定をやめて自然なスクロールにする */
    .snap-container {
      height: auto;
      overflow-y: visible;
      scroll-snap-type: none;
    }
    .snap-container > section {
      height: auto;
      min-height: 100vh;
      overflow: visible;
      padding: 40px 20px 60px;
      flex-direction: column;
    }
    #contact {
      padding-bottom: 90px;
    }
    .snap-container footer {
      position: static;
      margin-top: 24px;
    }

    .theme-toggle-btn {
      font-size: 12px;
      padding: 5px 10px;
    }

    .chatbot-wrapper {
      bottom: 16px;
      right: 16px;
    }
    .chatbot-toggle {
      height: 44px;
      padding: 0 14px;
      font-size: 13px;
    }
    .chatbot-tooltip {
      font-size: 12px;
      padding: 8px 12px;
    }
    .chatbot-window {
      width: calc(100vw - 32px);
      right: 16px;
      bottom: 90px;
      height: 70vh;
      max-height: 420px;
    }
  }

  @media (max-width: 400px) {
    .chatbot-tooltip {
      display: none;
    }
  }

/* WordPress Admin Bar Margin Adjustment */
body.admin-bar header {
  top: 32px;
}

#hero {
  padding-top: 140px;
}

body.admin-bar #hero {
  padding-top: 172px;
}

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

/* ==========================================================================
   複数ページ構成用スタイル（page.php / page-*.php / archive.php / single.php / home.php）
   ========================================================================== */

.page-wrap {
  width: 100%;
}

.page-hero {
  width: 100%;
  padding: 160px 60px 60px;
  text-align: center;
  background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
  box-sizing: border-box;
}
body.dark-mode .page-hero {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}
.page-hero-compact {
  padding: 150px 60px 50px;
}
body.admin-bar .page-hero {
  padding-top: 192px;
}

/* トップページのヒーロー（page-hero-compactではない方）は画面の高さいっぱいに表示し、
   スクロールしないと次のセクションが見えないようにする */
.page-hero:not(.page-hero-compact) {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-section {
  width: 100%;
  min-height: 100vh;
  padding: 70px 60px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* コンテンツが1画面に収まらない場合はmin-heightにより下へ伸び、
   短いセクションは画面いっぱいに広がって次のセクションと重なって見えないようにする */
.page-section.alt-bg {
  background-color: #f0f9ff;
  border-top: 1px solid #e0f2fe;
  border-bottom: 1px solid #e0f2fe;
}
body.dark-mode .page-section.alt-bg {
  background-color: #1e293b;
  border-color: #334155;
}

.link-card {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

.pagination-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.pagination-nav .page-numbers {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  color: #334155;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.pagination-nav .page-numbers.current {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* 料金プラン比較ページ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-bottom: 56px;
  align-items: stretch;
}
.pricing-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
}
.pricing-card-featured {
  border: 2px solid #0284c7;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.15);
  transform: scale(1.03);
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #0284c7;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
}
.pricing-name {
  font-size: 20px;
  font-weight: 800;
  color: #0369a1;
  text-align: center;
  margin-bottom: 12px;
}
.pricing-price {
  font-size: 36px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin-bottom: 8px;
}
.pricing-price span {
  font-size: 16px;
  font-weight: 600;
  color: #64748b;
}
.pricing-desc {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  margin-bottom: 24px;
}
.pricing-features {
  list-style: none;
  margin-bottom: 32px;
  flex: 1;
}
.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 14px;
  color: #334155;
}
.pricing-btn {
  text-align: center;
}
body.dark-mode .pricing-card {
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .pricing-name,
body.dark-mode .pricing-price { color: #f8fafc; }
body.dark-mode .pricing-features li { color: #cbd5e1; border-color: #334155; }

.pricing-table-wrap {
  overflow-x: auto;
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.pricing-table th,
.pricing-table td {
  padding: 14px 20px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}
.pricing-table thead th {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
}
.pricing-table td:first-child {
  text-align: left;
  font-weight: 700;
  color: #334155;
}
body.dark-mode .pricing-table { background: #1e293b; border-color: #334155; }
body.dark-mode .pricing-table td { color: #cbd5e1; border-color: #334155; }
body.dark-mode .pricing-table td:first-child { color: #f8fafc; }

/* スタッフ・会社紹介ページ */
.staff-card {
  text-align: center;
}
.staff-avatar {
  font-size: 56px;
  margin-bottom: 16px;
}
.staff-role {
  color: #0284c7;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}

.company-info-card {
  max-width: 700px;
  margin: 0 auto;
}
.company-info-table {
  width: 100%;
  border-collapse: collapse;
}
.company-info-table th,
.company-info-table td {
  padding: 16px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  font-size: 15px;
}
.company-info-table th {
  width: 140px;
  color: #0369a1;
  font-weight: 700;
}
.company-info-table td {
  color: #334155;
}
body.dark-mode .company-info-table th,
body.dark-mode .company-info-table td {
  border-color: #334155;
  color: #f8fafc;
}

/* ブログ/お知らせ */
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.single-post-card {
  padding: 40px;
}
.single-post-content {
  font-size: 16px;
  line-height: 1.9;
  color: #334155;
}
.single-post-content p { margin-bottom: 1.2em; }
.single-post-content img { max-width: 100%; border-radius: 8px; }
body.dark-mode .single-post-content { color: #e2e8f0; }

/* 予約フォーム */
.reservation-status {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  font-size: 14px;
}
.status-pending {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.status-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
.status-error {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
}

@media (max-width: 1024px) {
  .page-hero, .page-section { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 768px) {
  .page-hero { padding-top: 100px; }
  body.admin-bar .page-hero { padding-top: 130px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card-featured { transform: none; }
  .single-post-card { padding: 20px; }
}

/* ==========================================================================
   予約状況カレンダー（page-reservation.php）
   ========================================================================== */

.calendar-heading {
  font-size: 20px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 16px;
  text-align: center;
}
body.dark-mode .calendar-heading { color: #38bdf8; }

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.calendar-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0284c7;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.calendar-nav-btn:hover {
  background: #e0f2fe;
  border-color: #0284c7;
}
body.dark-mode .calendar-nav-btn {
  background: #1e293b;
  border-color: #334155;
  color: #38bdf8;
}

.calendar-month {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  min-width: 150px;
  text-align: center;
}
body.dark-mode .calendar-month { color: #f8fafc; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-dow {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  padding: 6px 0;
}
.calendar-dow.is-sun { color: #ef4444; }
.calendar-dow.is-sat { color: #0284c7; }

.calendar-cell {
  position: relative;
  min-height: 62px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  background: #ffffff;
  transition: border-color 0.2s, background-color 0.2s, transform 0.15s;
}
.calendar-cell:hover {
  border-color: #0284c7;
  transform: translateY(-2px);
}
.calendar-cell.is-empty {
  border: none;
  background: transparent;
  cursor: default;
}
.calendar-cell.is-empty:hover { transform: none; }
.calendar-cell.is-today {
  border-color: #0284c7;
}
.calendar-cell.is-free {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.calendar-cell.is-full {
  background: #fef2f2;
  border-color: #fecaca;
}
.calendar-cell.is-closed {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}
.calendar-cell.is-closed:hover {
  transform: none;
  border-color: #e2e8f0;
}
.calendar-cell.is-selected {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.35);
}
body.dark-mode .calendar-cell {
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .calendar-cell.is-free { background: #14532d; border-color: #166534; }
body.dark-mode .calendar-cell.is-full { background: #450a0a; border-color: #7f1d1d; }
body.dark-mode .calendar-cell.is-closed { background: #0f172a; }

.calendar-day-num {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
body.dark-mode .calendar-day-num { color: #f8fafc; }

.calendar-badge {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  border-radius: 10px;
  padding: 2px 6px;
  width: fit-content;
}
.calendar-badge.badge-free   { background: #16a34a; }
.calendar-badge.badge-full   { background: #ef4444; }
.calendar-badge.badge-closed { background: #94a3b8; }

.calendar-rules {
  font-size: 13px;
  color: #64748b;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.6;
}

.calendar-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #64748b;
}
.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}
.legend-free   { background: #f0fdf4; border: 1px solid #16a34a; }
.legend-full   { background: #fef2f2; border: 1px solid #ef4444; }
.legend-closed { background: #f1f5f9; border: 1px solid #94a3b8; }

/* 空き枠選択ボタン */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.slot-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 8px;
  border: 1px solid #7dd3fc;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}
.slot-btn:hover:not(.is-disabled) {
  background: #e0f2fe;
  transform: translateY(-2px);
}
.slot-btn.is-selected {
  background: #0284c7;
  border-color: #0284c7;
}
.slot-btn.is-selected .slot-time,
.slot-btn.is-selected .slot-state { color: #ffffff; }
.slot-btn.is-disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  cursor: not-allowed;
  opacity: 0.7;
}
.slot-time {
  font-size: 16px;
  font-weight: 700;
  color: #0369a1;
}
.slot-state {
  font-size: 11px;
  color: #64748b;
}
body.dark-mode .slot-btn {
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .slot-time { color: #38bdf8; }

/* フォーム側の選択済み枠表示 */
.selected-slot {
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #94a3b8;
  background: #f8fafc;
}
.selected-slot.has-value {
  border-style: solid;
  border-color: #0284c7;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
}
body.dark-mode .selected-slot {
  background: #1e293b;
  border-color: #334155;
}

.calendar-hint {
  font-size: 13px;
  color: #64748b;
  text-align: center;
  margin-top: 14px;
}

.calendar-daylist {
  margin-top: 16px;
}
.calendar-daylist h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 10px;
}
body.dark-mode .calendar-daylist h4 { color: #38bdf8; }
.calendar-daylist ul {
  list-style: none;
}
.calendar-daylist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  background: #f8fafc;
}
body.dark-mode .calendar-daylist li {
  background: #1e293b;
  border-color: #334155;
}
.calendar-daylist-time {
  font-weight: 700;
  color: #0284c7;
  min-width: 52px;
}
.calendar-daylist-service {
  flex: 1;
  color: #334155;
}
body.dark-mode .calendar-daylist-service { color: #cbd5e1; }
.calendar-daylist-status {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 10px;
  padding: 3px 10px;
}
.calendar-daylist-empty {
  font-size: 14px;
  color: #64748b;
  text-align: center;
  padding: 12px;
}

@media (max-width: 768px) {
  .calendar-grid { gap: 4px; }
  .calendar-cell { min-height: 50px; padding: 4px; }
  .calendar-day-num { font-size: 12px; }
  .calendar-badge { font-size: 10px; padding: 1px 4px; }
  .calendar-month { font-size: 16px; min-width: 120px; }
}

/* ==========================================================================
   ご相談予約の露出強化（トップページCTA / 特集カード / ナビボタン）
   ========================================================================== */

.hero-btn-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-btn-primary {
  background-color: #16a34a;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}
.hero-btn-primary:hover {
  background-color: #15803d;
}

.featured-link-card {
  position: relative;
  border: 2px solid #0284c7;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.15);
}
body.dark-mode .featured-link-card {
  border-color: #38bdf8;
}

.card-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: #16a34a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ナビの「ご予約」をボタン風に強調表示 */
nav a[href*="/reservation/"] {
  background-color: #0284c7;
  color: #ffffff !important;
  padding: 8px 18px;
  border-radius: 20px;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
nav a[href*="/reservation/"]:hover {
  background-color: #0369a1;
  transform: translateY(-1px);
}
body.dark-mode nav a[href*="/reservation/"] {
  background-color: #38bdf8;
  color: #0f172a !important;
}
body.dark-mode nav a[href*="/reservation/"]:hover {
  background-color: #7dd3fc;
}

@media (max-width: 768px) {
  nav ul li a[href*="/reservation/"] {
    display: inline-block;
    margin: 6px auto;
    width: auto;
  }
}


/* ==========================================================================
   スクロール連動フェードイン（main.jsのIntersectionObserverと対）
   ========================================================================== */

.reveal-init {
  opacity: 0;
  transform: translateY(56px) scale(0.94);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-init.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==========================================================================
   トップページ ヒーローの初回表示アニメーション（全ページのpage-heroにも適用）
   ========================================================================== */

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content > .hero-badge,
.hero-content > .hero-title,
.hero-content > .hero-text,
.hero-content > .hero-btn-group,
.hero-content > .hero-btn,
.hero-content > .terminal-box {
  animation: hero-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-content > .hero-badge   { animation-delay: 0s; }
.hero-content > .hero-title   { animation-delay: 0.1s; }
.hero-content > .hero-text    { animation-delay: 0.2s; }
.hero-content > .hero-btn-group,
.hero-content > .hero-btn     { animation-delay: 0.3s; }
.hero-content > .terminal-box { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-init {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-content > .hero-badge,
  .hero-content > .hero-title,
  .hero-content > .hero-text,
  .hero-content > .hero-btn-group,
  .hero-content > .hero-btn,
  .hero-content > .terminal-box {
    animation: none;
  }
}

/* ==========================================================================
   トップページ 制作実績プレビュー（AOSの交互フェードインで見せる）
   ========================================================================== */

.works-showcase {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.showcase-row {
  display: flex;
  align-items: center;
  gap: 48px;
}
.showcase-row-reverse {
  flex-direction: row-reverse;
}

.showcase-img {
  width: 46%;
  flex-shrink: 0;
  height: 280px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.showcase-body {
  flex: 1;
  min-width: 0;
}
.showcase-body .hero-badge {
  margin-bottom: 12px;
}
.showcase-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 4px 0 12px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
body.dark-mode .showcase-title {
  color: #f8fafc;
}
.showcase-desc {
  font-size: 15px;
  line-height: 1.8;
  color: #64748b;
}
body.dark-mode .showcase-desc {
  color: #94a3b8;
}

@media (max-width: 768px) {
  .showcase-row, .showcase-row-reverse {
    flex-direction: column;
    gap: 20px;
  }
  .showcase-img {
    width: 100%;
    height: 200px;
  }
}

/* ==========================================================================
   ご相談予約・お問い合わせページは操作優先のため演出を無効化する
   ========================================================================== */

body.page-template-page-reservation-php .reveal-init,
body.page-template-page-contact-php .reveal-init {
  opacity: 1;
  transform: none;
  transition: none;
}

body.page-template-page-reservation-php .hero-content > .hero-badge,
body.page-template-page-reservation-php .hero-content > .hero-title,
body.page-template-page-reservation-php .hero-content > .hero-text,
body.page-template-page-contact-php .hero-content > .hero-badge,
body.page-template-page-contact-php .hero-content > .hero-title,
body.page-template-page-contact-php .hero-content > .hero-text {
  animation: none;
}
