.sns { background: var(--white); }
.sns-header { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.25rem; position: relative; }
.sns-badge { display: inline-block; padding: 0.3rem 0.85rem; font-weight: 900; font-size: 1.15rem; color: var(--primary-blue); background: rgba(61,90,128,0.08); border: 1px solid rgba(61,90,128,0.22); border-radius: 999px; letter-spacing: 0.04em; }
.sns-title { font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 800; color: var(--dark-gray); letter-spacing: -0.01em; }
.sns-header::after { content: none; }
.sns-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 0.5rem; }
.sns-card { position: relative; display: block; padding: 1rem 1.25rem; border: 1px solid var(--border-light); border-radius: 14px; background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.0) 100%); text-decoration: none; color: inherit; box-shadow: var(--shadow-md); transition: var(--transition); }
.sns-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.sns-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 14px 0 0 14px; }
.sns-card--ig .sns-bar { background: radial-gradient(circle at 30% 110%, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%); }
.sns-card--x .sns-bar { background: linear-gradient(180deg, #0f172a 0%, #1f2937 100%); }
.sns-body { display: flex; align-items: center; gap: 0.75rem; }
.sns-icon { width: 32px; height: 32px; border-radius: 8px; background: #fff; display: inline-block; box-shadow: 0 1px 2px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(0,0,0,0.06); }
.sns-icon--ig { background: transparent url('../images/instagram-icon.png') center/contain no-repeat; }
.sns-icon--x { background: transparent url('../images/x-icon.jpg') center/contain no-repeat; position: relative; }
.sns-icon--x::after { content: none; }
.sns-content { padding-left: 0.25rem; }
.sns-platform { font-size: 1rem; font-weight: 800; color: var(--dark-gray); letter-spacing: 0.01em; }
.sns-type { font-size: 0.9rem; font-weight: 700; color: var(--gray); margin-top: 0.1rem; }
.sns-handle { font-size: 1.2rem; font-weight: 900; letter-spacing: 0.01em; color: var(--dark-blue); }
.sns-note { font-size: 0.75rem; font-weight: 700; color: var(--gray); margin-left: 0.25rem; }
@media (max-width: 480px) { .sns-handle { font-size: 1rem; } }
.pro-heading {
  text-align: left;
  margin-bottom: 1rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, rgba(61,90,128,0.06) 0%, rgba(61,90,128,0.03) 100%);
  border-left: 8px solid var(--primary-blue);
  border-radius: 12px 0 0 12px; /* 左のみ角丸 */
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}
.pro-heading-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--dark-gray);
  display: block;
}
.pro-heading--green { 
  background: linear-gradient(180deg, rgba(184,213,81,0.16) 0%, rgba(184,213,81,0.08) 100%);
  border-left-color: var(--primary-green);
}
.pro-heading-cta { flex-shrink: 0; }
@media (max-width: 640px) {
  .pro-heading { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .pro-heading-cta { width: 100%; }
}
.services-head--pro { padding-bottom: 2rem; }
.services-detail-section { padding-top: 2rem; }
.service-detail { display: grid; grid-template-columns: 1fr 1.5fr; gap: 2.5rem; align-items: start; }
.service-detail-left { min-width: 320px; margin-top: 1rem; }
.service-detail-right { }
.service-detail-title { font-size: 1.5rem; font-weight: 800; color: var(--dark-gray); margin-bottom: 0.75rem; }
.service-detail-text { color: var(--gray); line-height: 1.85; margin-bottom: 1rem; }
.service-detail-text { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
.service-detail-points li { font-size: clamp(1.05rem, 1.7vw, 1.2rem); line-height: 1.88; }
/* テキスト塊をカードの縦感に近づけるため余白もやや拡大 */
.service-detail-text + .service-detail-text { margin-top: 0.25rem; }
.service-detail-points { margin: 0.25rem 0 1.1rem 1.25rem; }
.service-detail-points { margin: 0 0 1rem 1.25rem; }
.service-detail-cta { margin-top: 0.5rem; }
@media (max-width: 900px) {
  .service-detail { grid-template-columns: 1fr; }
  .service-detail-left { order: 1; }
  .service-detail-right { order: 2; }
}
/* リセットと基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ブランドカラー（ロゴに合わせた配色） */
    --primary-blue: #3D5A80;
    --primary-green: #B8D551;
    --dark-blue: #2C4158;
    --light-green: #D4E8A0;
    --accent-green: #C5D86D;
    --gradient-start: #3D5A80;
    --gradient-end: #B8D551;
    
    /* ニュートラルカラー */
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --gray: #6C757D;
    --dark-gray: #343A40;
    --black: #000000;
    --bg-light: #FAFBFC;
    --border-light: #E5E7EB;
    
    /* フォント */
    --font-primary: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* シャドウ */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* トランジション */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* スペーシング */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* 角丸 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* ナビゲーション共通 */
    --nav-item-width: 120px;
}

body {
    font-family: var(--font-primary);
    color: var(--dark-gray);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ナビゲーション */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.logo img {
    height: 50px;
    width: auto;
    max-height: 50px;
    object-fit: contain;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* 右上ナビを等幅・同デザインで横並び */
.nav-menu > a.nav-link,
.nav-menu > .nav-dropdown {
    width: var(--nav-item-width);
    text-align: center;
    display: inline-flex;
    justify-content: center;
}
.nav-link,
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    width: 100%;
}
.nav-link:hover,
.nav-dropdown-toggle:hover,
.nav-dropdown:hover .nav-dropdown-toggle {
    background: rgba(61, 90, 128, 0.06);
}

/* ドロップダウン */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { background: none; border: none; padding: 0.5rem 0.75rem; cursor: pointer; font: inherit; color: var(--dark-gray); opacity: 0.8; }
.nav-dropdown-toggle:hover { opacity: 1; color: var(--primary-blue); }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-12%);
    display: none;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: var(--nav-item-width);
    width: var(--nav-item-width);
    text-align: center;
    z-index: 1001;
}
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }
.nav-sublink { padding: 0.4rem 0.5rem; white-space: nowrap; border-radius: var(--radius-sm); display: block; width: 100%; text-align: center; }
.nav-sublink:hover { background: rgba(61, 90, 128, 0.06); }

/* ドロップダウン */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { background: none; border: none; padding: 0; cursor: pointer; font: inherit; color: var(--dark-gray); opacity: 0.8; }
.nav-dropdown-toggle:hover { opacity: 1; color: var(--primary-blue); }
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 160px;
    z-index: 1001;
}
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }
.nav-sublink { padding: 0.35rem 0.5rem; white-space: nowrap; }
.nav-sublink:hover { color: var(--primary-blue); }

.nav-link {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
    opacity: 0.8;
}

.nav-link:hover {
    opacity: 1;
    color: var(--primary-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 20px;
}

/* SERVICE 親項目はホバーで色を変えない（サブリンクのみ色変化） */
.nav-dropdown-toggle:hover,
.nav-dropdown:hover .nav-dropdown-toggle {
    background: transparent !important;
    color: var(--dark-gray) !important;
    opacity: 0.8 !important;
}
.nav-dropdown-toggle::after,
.nav-dropdown-toggle:hover::after {
    width: 0 !important; /* 下線を表示しない */
    background: transparent !important;
}
.nav-dropdown-menu .nav-sublink:hover {
    color: var(--primary-blue) !important;
    background: rgba(61, 90, 128, 0.06);
}

/* サブリンクにホバーがある時のみ親SERVICEをハイライト */
.nav-dropdown.sub-hover .nav-dropdown-toggle {
    background: rgba(61, 90, 128, 0.06) !important;
    color: var(--primary-blue) !important;
    opacity: 1 !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--dark-gray);
    margin: 5px 0;
    transition: var(--transition);
}

/* ヒーローセクション */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--white) 0%, var(--bg-light) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

/* ヒーローのコピー群を画面中央〜やや下に配置 */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding-top: 0;
    padding-bottom: 2vh;
    transform: translateY(3vh);
}

.hero .container {
    padding-top: 0;
    padding-bottom: 0;
}

@media (max-width: 768px) {
    .hero-content {
        padding-top: 0;
        transform: translateY(2vh);
        min-height: calc(100vh - 120px);
    }
}

/* モバイル時：まずは ABOUT / SERVICE / NEWS / CONTACT を統一（左揃え・同幅・同フォント） */
@media (max-width: 768px) {
  /* トップレベルは全て同じ見た目・幅で左揃え */
  .nav-menu > a.nav-link,
  .nav-menu > .nav-dropdown { width: 100%; justify-content: flex-start; }
  .nav-link,
  .nav-dropdown-toggle { width: 100%; text-align: left; padding: 1rem 0; font-size: 1.125rem; font-weight: 500; }
  /* ドロップダウンは常時展開（親SERVICEの直下に表示） */
  .nav-dropdown-menu { position: static !important; transform: none !important; display: block !important; border: none !important; box-shadow: none !important; padding: 0 0 0 1.25rem !important; width: 100% !important; min-width: 100% !important; }
  /* サブリンクはインデントだけ付与し、余計なラベルは付けない */
  .nav-dropdown-menu .nav-sublink { display: block; width: 100%; text-align: left; padding: 0.5rem 0; font-size: 1.025rem; }
  .nav-dropdown-menu .nav-sublink::before { content: none !important; }
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--dark-gray);
    letter-spacing: -0.03em;
}

/* タイトルは常に2行に見えるよう改行を固定 */
.hero-title-break {
    display: inline;
}

/* 視覚センタリングの微調整（句読点の左右バランス補正） */
.hero-title-line {
    display: block;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.hero-title-first,
.hero-title-second {
    display: inline;
    white-space: nowrap;
}

/* スマホでの改行制御 - 2行目を1行に収めるための微調整 */
@media (max-width: 480px) {
    .hero-title-line {
        white-space: normal;
        word-break: keep-all;
        overflow-wrap: normal;
        text-align: center;
    }
    .hero-title-first {
        display: block;
        white-space: nowrap;
    }
    .hero-title-second {
        display: inline-block;
        white-space: nowrap;
        transform-origin: center center;
        transform: scaleX(0.98);
        letter-spacing: -0.005em;
    }
}

.text-gradient {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
}

.hero-subtitle {
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
    color: var(--gray);
    margin-bottom: 3rem;
    line-height: 1.7;
    font-weight: 400;
    opacity: 0.9;
    max-width: 100%;
    display: inline-block;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* サブコピーは常に1行で固定（はみ出し時はスケールで調整） */
.hero-subtitle {
    white-space: nowrap;
}

/* モバイルでの視認性を担保しつつ1行維持 */
@media (max-width: 480px) {
    .hero-subtitle {
        font-size: clamp(1rem, 4.8vw, 1.4rem);
        white-space: normal;         /* 折り返し許可 */
        word-break: keep-all;
        overflow-wrap: anywhere;
    }
}

/* サブコピー内バッジ（Evidence × AI） */
.hero-badge {
    display: inline-block;
    padding: 0.15em 0.5em;
    border: 2px solid rgba(61, 90, 128, 0.4);
    border-radius: 0.5rem;
    background: rgba(61, 90, 128, 0.08);
    box-shadow: 0 2px 8px rgba(61, 90, 128, 0.12);
    vertical-align: baseline;
}

@media (max-width: 480px) {
    .hero-badge {
        border-width: 1.5px;
        padding: 0.1em 0.4em;
    }
}

.hero-divider {
    font-size: 1.5rem;
    color: var(--primary-blue);
    opacity: 0.35;
    margin: -1rem auto 1.5rem;
}

.hero-description {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    color: var(--gray);
    line-height: 1.9;
    max-width: 860px;
    margin: clamp(5rem, 9vh, 14rem) auto 2rem;
}

.hero-desc-line { display: block; }

@media (max-width: 640px) {
    .hero-description { font-size: clamp(0.9rem, 3.2vw, 1.15rem); line-height: 1.82; }
    /* 親行は通常の折返し許可、各パートは改行させず2分割で強制改行 */
    .hero-desc-line { display: block; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
    .hero-desc-part { display: inline; white-space: nowrap; }
    .hero-desc-part--sp-break { display: block; white-space: nowrap; }
}

/* 極小画面でのヒーロー見切れ対策（タイトルサイズと中央揃え） */
@media (max-width: 480px) {
  /* 中央揃えで少し大きくしつつ見切れを防ぐ安全幅 */
  .hero-title {
    font-size: clamp(2.0rem, 8.2vw, 2.6rem);
    line-height: 1.3;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: normal;
  }
  .hero-title-inner { transform: none; }
  /* ヒーロー説明の左右見切れ防止（安全余白） */
  .hero .container { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 768px) {
    .hero-description {
        margin-top: 4rem;
    }
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

/* 小画面時：汎用ボタン（トップページへ戻る等）の横幅をやや狭める */
@media (max-width: 560px) {
    .btn { padding: 0.55rem 0.8rem; font-size: 0.9rem; }
    /* ページ下部の戻るボタン専用（各ページで .news-footer か .about-footer に配置） */
    .news-footer .btn,
    .about-footer .btn { padding: 0.48rem 0.7rem; font-size: 0.9rem; }
}
@media (max-width: 400px) {
    .btn { padding: 0.5rem 0.75rem; font-size: 0.88rem; }
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    filter: blur(100px);
    animation: morphing 20s ease-in-out infinite;
}

.gradient-bg::before,
.gradient-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.gradient-bg::before {
    top: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--primary-green) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite;
}

.gradient-bg::after {
    bottom: -30%;
    left: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, var(--primary-blue) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, -20px) scale(1.1); }
    66% { transform: translate(20px, -10px) scale(0.9); }
}

@keyframes morphing {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

/* フローティングピル背景 */
.floating-pills {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.pill {
    position: absolute;
    will-change: transform, opacity;
    transition: all 0.3s ease;
}

/* グラスモーフィズム効果 */
.pill-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* グロー効果 */
.pill-glow {
    filter: drop-shadow(0 0 10px currentColor);
}

.pill:hover {
    transform: scale(1.1) translateY(-5px);
    filter: brightness(1.2);
}



/* 医療系オブジェクト */
.medical-cross {
    width: 30px;
    height: 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.medical-cross::before,
.medical-cross::after {
    content: '';
    position: absolute;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: 4px;
}

.medical-cross::before {
    width: 100%;
    height: 40%;
}

.medical-cross::after {
    width: 40%;
    height: 100%;
}

.heartbeat {
    width: 50px;
    height: 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heartbeat::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-blue) 20%, var(--primary-green) 50%, var(--primary-blue) 80%, transparent 100%);
    border-radius: 2px;
}

.dna-helix {
    width: 35px;
    height: 45px;
    position: relative;
}

.dna-helix::before,
.dna-helix::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid;
    border-radius: 50%;
    border-color: var(--primary-blue) transparent var(--primary-green) transparent;
}

.dna-helix::before {
    transform: rotate(45deg);
}

.dna-helix::after {
    transform: rotate(-45deg);
    opacity: 0.6;
}

/* 波形アニメーション */
.wave-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%230891b2' fill-opacity='0.1' d='M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat;
    background-size: cover;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1440px;
    }
}

/* セクション共通スタイル */
section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: var(--radius-full);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* トップの ABOUT セクション専用調整 */
.about-summary .section-title { margin-bottom: 0.05rem; }
.about-summary .section-title::after { display: none; }
.about-summary .section-header { position: relative; padding-bottom: 1.6rem; }
.about-summary .section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: var(--radius-full);
}
.about-summary .section-subtitle {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem); /* もう少し大きく */
    color: var(--dark-gray);
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.35rem; /* 線を近づけるためさらに詰める */
}

@media (max-width: 480px) {
    .about-summary .section-header { padding-bottom: 2rem; }
}

/* SERVICE / NEWS のセクションヘッダーもABOUTと統一 */
.services .section-title::after,
.news .section-title::after { display: none; }
.services .section-header,
.news .section-header { position: relative; padding-bottom: 1.6rem; }
.services .section-header::after,
.news .section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: var(--radius-full);
}
.services .section-subtitle,
.news .section-subtitle {
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    color: var(--dark-gray);
    font-weight: 600;
    margin-top: 0.1rem;
    margin-bottom: 0.35rem;
}
.news .section-subtitle { letter-spacing: 0.02em; }

/* CONTACT も ABOUT と同じ配置・間隔に統一 */
.contact .section-title::after { display: none; }
.contact .section-title { margin-bottom: 0.05rem; }
.contact .section-header { position: relative; padding-bottom: 1.6rem; }
.contact .section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: var(--radius-full);
}
.contact .section-subtitle { 
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    color: var(--dark-gray);
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.35rem;
}

/* SERVICE / NEWS の間隔も ABOUT と同じに */
.services .section-title, .news .section-title { margin-bottom: 0.05rem; }
.services .section-subtitle, .news .section-subtitle { margin-top: 0; margin-bottom: 0.35rem; }

@media (max-width: 480px) {
    .contact .section-header, .services .section-header, .news .section-header { padding-bottom: 2rem; }
}

/* サービスセクション */
.services {
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-green) 0%, transparent 70%);
    opacity: 0.05;
    filter: blur(60px);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: var(--space-3xl);
}

.services-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .services-columns {
        grid-template-columns: 1fr;
    }
}

.services-category {
    margin-top: var(--space-2xl);
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    position: relative;
    overflow: hidden; /* 上部グラデーションラインのはみ出し防止 */
}

.services-category-title {
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    font-weight: 800;
    color: var(--dark-gray);
    letter-spacing: 0.01em;
    margin-bottom: 0.5rem;
    position: relative;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 50%, var(--primary-green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* サービスカテゴリのヘッダー行（タイトル + ボタン） */
.services-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.services-category-header .btn {
    padding: 0.6rem calc(1.1rem + 5mm); /* 大画面でも左右+5mm */
    font-size: 0.9rem;
}
/* タイトルのスタイルは上記定義に統合 */
/* グラデーション縁取りのゴーストボタン */
.btn-gradient-outline {
    background: linear-gradient(#ffffff, #ffffff) padding-box,
                linear-gradient(135deg, var(--primary-blue), var(--primary-green)) border-box;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    color: var(--primary-blue);
    font-weight: 700;
}
.btn-gradient-outline:hover {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green)) padding-box,
                linear-gradient(135deg, var(--primary-blue), var(--primary-green)) border-box;
    color: #fff;
}
@media (max-width: 480px) {
    .services-category-header { gap: 0.75rem; }
    .services-category-title { padding: 0.25rem 0.8rem; }
}

/* 小画面時：サービス見出しを1行維持するためボタン幅を調整 */
@media (max-width: 680px) {
    /* タイトルは左寄せ、ボタンは常に枠内（2カラムで安定配置） */
    .services-category-header { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem; }
    .services-category-title { white-space: nowrap; font-size: clamp(1.22rem, 4.8vw, 1.6rem); margin-right: 0.25rem; padding: 0; overflow: hidden; text-overflow: clip; }
    /* 短く太く（横幅は抑え、縦の厚みを増やす） */
    .services-category-header .btn {
        padding: 0.5rem calc(0.55rem + 3.5mm); /* さらに左右を微縮小 */
        font-size: clamp(0.8rem, 2.4vw, 0.88rem);
        white-space: nowrap;
        flex: 0 0 auto;
        min-width: 0; width: auto; inline-size: auto;
        max-width: 42vw; /* ボタン幅を抑えてタイトル領域を確保 */
    }
}
@media (max-width: 480px) {
    .services-category-header .btn { padding: 0.46rem calc(0.48rem + 3mm); font-size: 0.8rem; min-width: 0; max-width: 40vw; }
}
@media (max-width: 360px) {
    .services-category-header .btn { padding: 0.44rem calc(0.44rem + 2.5mm); font-size: 0.78rem; min-width: 0; max-width: 38vw; }
}

/* スマホ時はカード内パディングを少し詰めて余裕を確保 */
@media (max-width: 680px) {
  .services-category { padding: 1.5rem; }
}

.services-category::before {
    content: '';
    position: absolute;
    top: 1px;    /* 枠線の内側に収める */
    left: 1px;   /* 枠線の内側に収める */
    right: 1px;  /* 枠線の内側に収める */
    height: 3px; /* 厚みをわずかに調整 */
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.services-category .services-grid {
    margin-top: var(--space-lg);
}

.service-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
    border-color: var(--border-light);
}

/* Medirva カードの淡色青背景 */
.service-card--medirva {
    /* 空色っぽい淡い青 (#87CEFA) */
    background: rgba(135, 206, 250, 0.18);
    border-color: rgba(135, 206, 250, 0.45);
}
.
.service-card--medirva:hover { background: rgba(135, 206, 250, 0.18); }

.service-card:hover::before { transform: scaleX(0); }

.service-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    position: relative;
    transition: var(--transition);
}

.service-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.service-card:hover .service-icon { background: var(--bg-light); color: var(--primary-blue); transform: none; }

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--dark-gray);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.service-name {
    font-size: 1.25rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.service-desc {
    font-size: 0.98rem;
    color: var(--gray);
}

.service-logo {
    display: block;
    max-width: 520px;
    width: 100%;
    height: auto;
    margin: 0.25rem auto 0.5rem;
}

.service-subtitle {
    font-size: 0.9rem;
    color: var(--gray);
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.coming-soon {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    background: rgba(61, 90, 128, 0.06);
    border: 1px dashed rgba(61, 90, 128, 0.4);
    color: var(--primary-blue);
    font-weight: 600;
}

.service-card p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 0.95rem;
}
.service-card-cta { margin-top: 0.75rem; }

/* ミッションセクション */
.mission {
    background: var(--bg-light);
    position: relative;
}

.mission::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-blue) 0%, transparent 70%);
    opacity: 0.03;
    filter: blur(80px);
}

.mission-content { max-width: 1040px; margin: 0 auto; }

.mission-text { text-align: center; }

.mission-description {
    font-size: clamp(1.2rem, 2.2vw, 1.35rem);
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.mission-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    text-align: left;
    margin-top: var(--space-3xl);
    align-items: start;
}

/* 3番目のアイテムを見出し下に寄せる微調整（中〜大画面時） */
@media (min-width: 900px) {
    .feature-item--3 { margin-top: 0; }
}

.feature-item {
    position: relative;
    padding-left: 3rem;
}

.feature-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mission .section-subtitle { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }

.feature-item h4 {
    font-size: clamp(1.55rem, 2.6vw, 2.05rem);
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 50%, var(--primary-green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* 3. エビデンスに基づく信頼の途中改行を防止 */
.feature-item--3 h4 { white-space: nowrap; }
@media (max-width: 480px) {
    .feature-item--3 h4 { white-space: normal; }
}

/* デスクトップ時: 1と2はそのまま、3は下段センター（1,2の間） */
@media (min-width: 900px) {
    .mission-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7.5rem; }
    .feature-item--3 { grid-column: 1 / span 2; justify-self: center; max-width: 560px; margin-top: -0.5rem; }
    /* 1と2は同一行で改行させない */
    .feature-item--1 h4,
    .feature-item--2 h4 { white-space: nowrap; }
}

/* 明示的に改行させた1行目は途中改行させない */
.nowrap { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
@media (max-width: 520px) {
    .nowrap { white-space: normal; }
}

.feature-item p { color: var(--gray); line-height: 1.82; font-size: clamp(1.06rem, 1.9vw, 1.24rem); }

/* 会社概要セクション */
.about {
    background: var(--white);
    position: relative;
}

/* about.html のページヘッダーもABOUTと同一配置に */
.page-header .section-title::after { display: none; }
.page-header .section-title { margin-bottom: 0.05rem; }
.page-header .section-header { position: relative; padding-bottom: 1.6rem; text-align: center; }
.page-header .section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: var(--radius-full);
}
.page-header .section-subtitle {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    color: var(--dark-gray);
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.35rem;
    max-width: none;
}

/* ABOUT タグライン（トップ/遷移ページ共通） */
.about-tagline {
    text-align: center;
    max-width: 960px;
    margin: 0.75rem auto 1.75rem;
}
.about-tagline .tagline-line {
    display: inline-block;
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.45;
    position: relative;
    padding-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 50%, var(--primary-green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
@media (max-width: 480px) {
    .about-tagline { margin: 0.5rem auto 1.25rem; }
    .about-tagline .tagline-line { font-size: clamp(1.2rem, 3.8vw, 1.5rem); }
}

/* 代表メッセージの本文を見やすく拡大 */
.ceo-message .message-content {
    max-width: 900px;
    margin: 0 auto;
}
.ceo-message .message-content p {
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    line-height: 1.9;
    color: var(--dark-gray);
    margin-bottom: 1.1rem;
}

/* 代表メッセージ全体のビジュアル強化 */
.ceo-message {
    background: linear-gradient(180deg, var(--bg-light) 0%, rgba(61, 90, 128, 0.03) 100%);
    position: relative;
    overflow: hidden;
}
.ceo-message::before,
.ceo-message::after {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    pointer-events: none;
}
.ceo-message::before { top: -200px; right: -200px; background: radial-gradient(circle, var(--primary-green) 0%, transparent 70%); }
.ceo-message::after { bottom: -240px; left: -180px; background: radial-gradient(circle, var(--primary-blue) 0%, transparent 70%); }

.ceo-message .message-content {
    background: var(--white);
    padding: clamp(1.5rem, 3vw, 3rem);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xl);
    position: relative;
    margin-top: 1.5rem;
    overflow: hidden; /* 上部ラインの角丸外にはみ出さないように */
}
.ceo-message .message-content::before {
    content: '';
    position: absolute;
    top: 1px;   /* 枠線の内側に収める */
    left: 2px;  /* 両サイドのはみ出しをさらに抑制 */
    right: 2px; /* 両サイドのはみ出しをさらに抑制 */
    height: 3px;/* 厚みを微調整 */
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}
.ceo-message .message-content::after {
    content: '“';
    position: absolute;
    top: -18px;
    left: 10px;
    font-size: clamp(3.5rem, 9vw, 6rem);
    line-height: 1;
    color: rgba(61, 90, 128, 0.1);
    font-weight: 800;
    pointer-events: none;
}
.ceo-message .sign {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    text-align: right;
    font-weight: 700;
    color: var(--dark-gray);
}

@media (max-width: 768px) {
    .ceo-message .message-content { padding: 1.25rem; }
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.info-table th,
.info-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.info-table th {
    font-weight: 700;
    color: var(--dark-gray);
    width: 30%;
    background: var(--bg-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-table td ul {
    list-style: none;
}

.info-table td ul li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.info-table td ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-green);
}

/* 代表社員リストはビュレット非表示 */
.member-list { list-style: none; padding-left: 0; margin: 0; text-align: left; }
.member-list li { padding-left: 0; position: static; text-align: left; }
/* 表の他項目と左位置を揃える（li の左インデントを完全に無効化） */
.info-table td .member-list { padding-left: 0; margin-left: 0; }
.info-table td .member-list li { padding-left: 0 !important; margin-left: 0 !important; }
.member-list li::before { content: none !important; }

/* ニュースセクション */
.news {
    background: var(--white);
    position: relative;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
    margin-bottom: 1rem;
    text-decoration: none;
    color: inherit;
}
/* ホームのニュースカード内に万一aが入っても無効化 */
.news-item .news-content a { pointer-events: none; }

/* アンカー状態でも下線・色変更を無効化 */
a.news-item,
a.news-item:link,
a.news-item:visited,
a.news-item:hover,
a.news-item:active {
    text-decoration: none !important;
    color: inherit !important;
}

/* 子要素もアンカー装飾を継承させない */
a.news-item * {
    text-decoration: none !important;
    color: inherit !important;
}

.news-item:hover {
    background: var(--bg-light);
    transform: translateX(10px);
}

.news-item::after {
    content: '→';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: var(--transition);
    color: var(--primary-blue);
    font-size: 1.25rem;
}

.news-item:hover::after {
    opacity: 1;
    right: 1rem;
}

.news-date {
    font-size: 0.875rem;
    color: var(--gray);
    min-width: 100px;
    font-weight: 500;
}

.news-content {
    flex: 1;
}

.news-tag {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--bg-light);
    color: var(--primary-blue);
    font-size: 0.75rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-light);
}

.news-tag.tag-service {
    background: rgba(184, 213, 81, 0.1);
    color: var(--primary-green);
    border-color: var(--primary-green);
}

.news-tag.tag-press {
    background: rgba(61, 90, 128, 0.1);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.news-title {
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
/* 詳細ページも一覧と同サイズを適用（上書きなし） */

.news-excerpt {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-footer {
    text-align: center;
    margin-top: 2rem;
}

.btn-text {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-text:hover {
    color: var(--dark-blue);
    transform: translateX(5px);
}

/* お問い合わせセクション */
.contact {
    background: var(--bg-light);
    position: relative;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.contact-form .required-mark { color: #d33; font-weight: 700; font-size: 0.9em; margin-left: 0.25rem; }
.contact-form .form-error { color: #d33; font-size: 0.85rem; margin-top: 0.25rem; min-height: 1.1em; }
.contact-form .consent-row { margin-top: 0.75rem; text-align: left; }
.contact-form .checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    flex-wrap: nowrap; /* 先頭は同一行から開始 */
    writing-mode: horizontal-tb; /* 横書きを強制 */
}
.contact-form .checkbox input[type="checkbox"] {
    width: auto; /* .form-group input{width:100%} の上書き */
    height: 1.1rem;
    margin: 0;
    margin-right: 0.5rem; /* チェックボックスの右から文字開始 */
    flex: 0 0 auto;
    display: inline-block;
}
.contact-form .checkbox span { flex: 1 1 auto; }
.contact-form .checkbox span,
.contact-form .checkbox a {
    display: inline;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    writing-mode: horizontal-tb; /* 横書きの明示 */
    text-orientation: mixed;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-green) 0%, transparent 70%);
    opacity: 0.03;
    pointer-events: none;
}

.contact-form .btn {
    display: block;
    margin: 0 auto;
    width: fit-content;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition);
    background: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(61, 90, 128, 0.1);
}

/* フッター */
.footer {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.footer-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}
.footer-left { justify-self: start; text-align: left; }
.footer-center { justify-self: center; text-align: center; }
.footer-right { justify-self: end; text-align: right; }
.footer-legal { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-end; }
.footer-legal a { color: var(--white); opacity: 0.9; text-decoration: none; font-weight: 600; font-size: 0.95rem; display: block; }
.footer-legal a:hover { opacity: 1; text-decoration: underline; }

/* フッターサイトマップ */
.footer-sitemap {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.footer-sitemap a {
    color: var(--white);
    opacity: 0.9;
    text-decoration: none;
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
}
.footer-sitemap a:hover { opacity: 1; text-decoration: underline; }

.footer-company {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.footer-text {
    font-size: 0.875rem;
    opacity: 0.9;
    color: var(--white);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    :root {
        --space-xs: 0.375rem;
        --space-sm: 0.5rem;
        --space-md: 0.75rem;
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --space-3xl: 3rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    section {
        padding: 4rem 0;
    }

    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-left, .footer-center, .footer-right { justify-self: center; text-align: center; }
    .footer-legal { align-items: center; }
    /* 並び順: サイトマップ → 法務リンク → 会社名/コピーライト */
    .footer-center { order: 1; margin-bottom: 0.5rem; }
    .footer-right  { order: 2; margin-bottom: 0.75rem; }
    .footer-left   { order: 3; }
    
    .logo img {
        height: 40px;
    }
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }
    .nav-menu > a.nav-link, .nav-menu > .nav-dropdown { width: 100%; justify-content: flex-start; }
    .nav-dropdown-menu { position: static; transform: none; display: none; border: none; box-shadow: none; padding: 0.25rem 0; width: 100%; min-width: 100%; }
    .nav-dropdown:hover .nav-dropdown-menu { display: block; }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.125rem;
        padding: 1rem 0;
    }

    /* モバイル時のドロップダウン整列 */
    .nav-dropdown-toggle { width: 100%; text-align: left; padding: 1rem 0; }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .nav-dropdown-menu .nav-sublink { display: block; width: 100%; text-align: left; padding: 0.5rem 0 0.5rem 1.25rem; font-size: 1rem; }
    
    .nav-toggle {
        display: block;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .services-grid,
    .mission-features {
        grid-template-columns: 1fr;
    }
    
    .news-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .news-date {
        min-width: unset;
    }
    
    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
    }
    
    .info-table th {
        border-bottom: none;
    }
}

/* モバイル時：固定ヘッダーとの間隔を各ページで少し広げる */
@media (max-width: 768px) {
  /* ABOUT / SERVICE系（page-headerを持つセクション） */
  .page-header { padding-top: 5.25rem; }
  /* NEWS, CONTACT の最上部セクション */
  body .news:first-of-type { padding-top: 5.25rem; }
  body .contact:first-of-type { padding-top: 5.25rem; }
}

/* さらに小画面ではページ下部の戻るボタンだけ幅を自動にする */
@media (max-width: 560px) {
    .news-footer .btn,
    .about-footer .btn { width: auto !important; max-width: none !important; }
    /* ABOUTページの戻るボタンはさらに横幅を抑える */
    .about-footer .btn { padding: 0.45rem 0.6rem; }
    /* トップページ専用: ABOUTの「EviBuddyについて」とお問い合わせCTAのボタンを狭く */
    .about-summary .about-content .btn,
    #contact .btn {
        width: auto !important;
        max-width: none !important;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.9rem;
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* スクロールアニメーション用クラス */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

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

.scale-in {
    opacity: 0;
    animation: scaleIn 0.6s ease-out forwards;
}

.slide-in-left {
    opacity: 0;
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    opacity: 0;
    animation: slideInRight 0.8s ease-out forwards;
}

/* 遅延クラス */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Intersection Observerで表示された要素 */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
}

.animate-on-scroll.fade-up {
    transform: translateY(30px);
}

.animate-on-scroll.fade-up.is-visible {
    transform: translateY(0);
}

.animate-on-scroll.fade-left {
    transform: translateX(30px);
}

.animate-on-scroll.fade-left.is-visible {
    transform: translateX(0);
}

.animate-on-scroll.fade-right {
    transform: translateX(-30px);
}

.animate-on-scroll.fade-right.is-visible {
    transform: translateX(0);
}

.animate-on-scroll.zoom-in {
    transform: scale(0.95);
}

.animate-on-scroll.zoom-in.is-visible {
    transform: scale(1);
}

/* PWA (Progressive Web App) 用のスタイル */
@media all and (display-mode: standalone) {
    /* iOS SafariのPWAで背景が青くなる問題を解決 */
    html, body {
        background-color: #ffffff !important;
        background: #ffffff !important;
    }

    /* すべての背景要素を白に強制 */
    .hero, .hero-content, .hero-bg {
        background-color: #ffffff !important;
        background: #ffffff !important;
    }

    /* メインコンテンツエリアも白背景に */
    .container {
        background-color: transparent !important;
    }
}

/* Safari特有のPWA背景色問題の追加対策 */
@supports (-webkit-touch-callout: none) {
    .hero-bg {
        background: #ffffff !important;
    }
}

/* iOSホーム画面アイコンのための追加スタイル */
.apple-touch-icon-bg {
    background-color: #ffffff !important;
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #ffffff;
        --text-primary: #1f2937;
    }
}

/* ホーム画面追加時のスプラッシュスクリーン */
.apple-mobile-web-app-status-bar-style-black-translucent {
    status-bar-style: black-translucent;
}

.apple-mobile-web-app-status-bar-style-default {
    status-bar-style: default;
}