/* ============================================================
   TMFA - オンライン診療受診施設協会 カスタムCSS
   ============================================================ */

/* ----- CSS Variables ----- */
:root {
  --tmfa-primary: #1A2744;
  --tmfa-secondary: #2B7A9E;
  --tmfa-accent: #3A9CC0;
  --tmfa-bg-white: #FFFFFF;
  --tmfa-bg-off: #F5F7FA;
  --tmfa-bg-highlight: #E8ECF1;
  --tmfa-text: #333333;
  --tmfa-text-sub: #666666;
  --tmfa-text-caption: #999999;
  --tmfa-border: #D0D5DD;
  --tmfa-footer-bg: #0F1A2E;
  --tmfa-max-width: 1100px;
  --tmfa-bronze: #CD7F32;
  --tmfa-silver: #C0C0C0;
  --tmfa-gold: #FFD700;
}

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { font-family: 'Noto Sans JP', sans-serif; scroll-behavior: smooth; }
body, body.custom-background {
  margin: 0; padding: 0;
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  font-size: 15px; font-weight: 400;
  background-color: #FFFFFF !important;
  line-height: 1.8; color: var(--tmfa-text);
  background: var(--tmfa-bg-white);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--tmfa-secondary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--tmfa-accent); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--tmfa-primary); line-height: 1.4; }

/* ----- Container ----- */
.tmfa-container {
  max-width: var(--tmfa-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   HEADER
   ============================================================ */

.tmfa-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--tmfa-bg-white);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* Utility Nav */
.tmfa-utility-nav {
  background: var(--tmfa-primary);
  padding: 4px 0;
}
.tmfa-utility-links {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: flex-end; gap: 20px;
}
.tmfa-utility-links li a {
  color: rgba(255,255,255,.85); font-size: 12px; font-weight: 400;
  text-decoration: none; transition: color .2s;
}
.tmfa-utility-links li a:hover { color: #fff; }

/* Main Header */
.tmfa-main-header { padding: 0; }
.tmfa-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}

/* Logo */
.tmfa-logo a {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--tmfa-primary);
}
.tmfa-logo-mark {
  font-size: 22px; font-weight: 700;
  background: var(--tmfa-primary); color: #fff;
  padding: 4px 10px; border-radius: 3px;
  letter-spacing: 2px;
}
.tmfa-logo-text {
  font-size: 13px; font-weight: 700; line-height: 1.4;
  color: var(--tmfa-primary);
}

/* Hamburger */
.tmfa-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 24px; position: relative; padding: 0; z-index: 1100;
}
.tmfa-hamburger span {
  display: block; width: 100%; height: 2px;
  background: var(--tmfa-primary);
  position: absolute; left: 0;
  transition: all .3s;
}
.tmfa-hamburger span:nth-child(1) { top: 0; }
.tmfa-hamburger span:nth-child(2) { top: 11px; }
.tmfa-hamburger span:nth-child(3) { top: 22px; }
.tmfa-hamburger.is-active span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.tmfa-hamburger.is-active span:nth-child(2) { opacity: 0; }
.tmfa-hamburger.is-active span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

/* Global Nav */
.tmfa-nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 0;
}
.tmfa-nav-list > li { position: relative; }
.tmfa-nav-list > li > a {
  display: block; padding: 8px 14px;
  font-size: 14px; font-weight: 500;
  color: var(--tmfa-primary); text-decoration: none;
  transition: color .2s, background .2s;
}
.tmfa-nav-list > li > a:hover { color: var(--tmfa-secondary); }

/* Nav CTA */
.tmfa-nav-cta {
  background: var(--tmfa-primary) !important;
  color: #fff !important;
  border-radius: 4px !important;
  padding: 8px 18px !important;
  font-size: 13px !important;
}
.tmfa-nav-cta:hover {
  background: var(--tmfa-secondary) !important;
}

/* Dropdown */
.tmfa-dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: #fff; min-width: 220px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  border-top: 2px solid var(--tmfa-secondary);
  list-style: none; margin: 0; padding: 8px 0; z-index: 100;
}
.has-dropdown:hover .tmfa-dropdown { display: block; }
.tmfa-dropdown li a {
  display: block; padding: 8px 20px;
  font-size: 13px; color: var(--tmfa-text);
  transition: background .2s, color .2s;
}
.tmfa-dropdown li a:hover {
  background: var(--tmfa-bg-off); color: var(--tmfa-secondary);
}

/* ============================================================
   PAGE HEADER (breadcrumb + H1 area)
   ============================================================ */

.tmfa-page-header {
  background: var(--tmfa-bg-off);
  padding: 30px 0 35px;
  border-bottom: 1px solid var(--tmfa-border);
}
.tmfa-page-header h1 {
  font-size: 28px; font-weight: 700; margin: 0;
  color: var(--tmfa-primary);
}

/* Breadcrumb */
.tmfa-breadcrumb { margin-bottom: 12px; }
.tmfa-breadcrumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0;
  font-size: 13px; color: var(--tmfa-text-caption);
}
.tmfa-breadcrumb li::after { content: '>'; margin: 0 8px; color: var(--tmfa-border); }
.tmfa-breadcrumb li:last-child::after { display: none; }
.tmfa-breadcrumb a { color: var(--tmfa-text-sub); }
.tmfa-breadcrumb a:hover { color: var(--tmfa-secondary); }

/* ============================================================
   PAGE CONTENT
   ============================================================ */

.tmfa-page-content {
  padding: 60px 0 80px;
}
/* ページ内コンテンツでの .tmfa-section は上下パディングを縮小 */
.tmfa-page-content .tmfa-section {
  padding: 0 0 48px;
}
.tmfa-page-content .tmfa-section:last-child {
  padding-bottom: 0;
}

/* ============================================================
   HERO SECTION (front-page)
   ============================================================ */

.tmfa-hero {
  position: relative;
  background-image: url('library/images/hero-bg.jpg');
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
  min-height: 500px; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 80px 20px;
}
/* 画像の上に暗いオーバーレイ */
.tmfa-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(10,35,66,.72) 0%, rgba(5,20,40,.60) 100%);
}
.tmfa-hero-inner { position: relative; z-index: 1; }
.tmfa-hero-inner { max-width: 700px; }
.tmfa-hero h1 {
  color: #fff; font-size: 28px; font-weight: 700;
  margin: 0 0 16px; line-height: 1.5;
}
.tmfa-hero-sub {
  color: rgba(255,255,255,.8); font-size: 16px;
  margin: 0 0 32px; line-height: 1.7;
}
.tmfa-hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.tmfa-btn {
  display: inline-block; padding: 12px 28px;
  font-size: 14px; font-weight: 600;
  border-radius: 4px; text-decoration: none;
  transition: all .2s; cursor: pointer;
}
.tmfa-btn-outline {
  border: 2px solid #fff; color: #fff; background: transparent;
}
.tmfa-btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; }
.tmfa-btn-white {
  background: #fff; color: var(--tmfa-primary); border: 2px solid #fff;
}
.tmfa-btn-white:hover { background: var(--tmfa-bg-off); color: var(--tmfa-primary); }
.tmfa-btn-primary {
  background: var(--tmfa-primary); color: #fff; border: 2px solid var(--tmfa-primary);
}
.tmfa-btn-primary:hover { background: var(--tmfa-secondary); border-color: var(--tmfa-secondary); color: #fff; }

/* ============================================================
   SECTIONS
   ============================================================ */

.tmfa-section { padding: 80px 0; }
.tmfa-section-off { background: var(--tmfa-bg-off); }
.tmfa-section-navy {
  background: linear-gradient(135deg, var(--tmfa-primary), var(--tmfa-footer-bg));
}
.tmfa-section-title {
  font-size: 24px; font-weight: 700;
  color: var(--tmfa-primary); margin: 0 0 40px;
  text-align: center;
}
.tmfa-section-title-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 30px;
}
.tmfa-section-title-row h2 { margin: 0; text-align: left; }
.tmfa-more-link { font-size: 14px; color: var(--tmfa-secondary); white-space: nowrap; }

/* ============================================================
   CARDS (3 pillars)
   ============================================================ */

.tmfa-cards-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.tmfa-card {
  border: 1px solid var(--tmfa-border);
  padding: 32px 24px; text-align: center;
  background: #fff; transition: box-shadow .2s;
}
.tmfa-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.tmfa-card-icon {
  font-size: 40px; color: var(--tmfa-secondary);
  margin-bottom: 16px;
}
.tmfa-card-icon .material-icons-outlined { font-size: 48px; }
.tmfa-card h3 {
  font-size: 18px; margin: 0 0 12px; color: var(--tmfa-primary);
}
.tmfa-card p { font-size: 14px; color: var(--tmfa-text-sub); margin: 0 0 16px; line-height: 1.7; }
.tmfa-card-link {
  font-size: 14px; color: var(--tmfa-secondary); font-weight: 500;
}

/* ============================================================
   PHOTO CARDS（背景画像付きカード）
   ============================================================ */
.tmfa-card-photo {
  position: relative; overflow: hidden;
  border: none !important;
  min-height: 300px;
  background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 32px 28px !important;
  border-radius: 4px;
}
/* グラデーションオーバーレイ（下が濃く、上が薄い） */
.tmfa-card-photo::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 18, 40, 0.88) 0%,
    rgba(8, 18, 40, 0.60) 50%,
    rgba(8, 18, 40, 0.30) 100%
  );
  transition: background .3s;
}
.tmfa-card-photo:hover::before {
  background: linear-gradient(
    to top,
    rgba(8, 18, 40, 0.92) 0%,
    rgba(8, 18, 40, 0.68) 50%,
    rgba(8, 18, 40, 0.40) 100%
  );
}
/* ホバー時に画像を少し拡大 */
.tmfa-card-photo::after {
  content: '';
  position: absolute; inset: 0;
  background-image: inherit;
  background-size: cover; background-position: center;
  transition: transform .4s ease;
  z-index: -1;
}
/* コンテンツをオーバーレイの上に */
.tmfa-card-photo > * { position: relative; z-index: 1; }

/* アイコン */
.tmfa-card-photo .tmfa-card-icon {
  color: rgba(255,255,255,0.85);
  margin-bottom: 14px;
}
.tmfa-card-photo .tmfa-card-icon .material-icons-outlined {
  font-family: 'Material Icons Outlined' !important;
  font-size: 42px;
  display: block; line-height: 1;
  font-style: normal; font-weight: normal;
  letter-spacing: normal; word-spacing: normal;
  white-space: nowrap; direction: ltr;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* タイトル */
.tmfa-card-photo h3 {
  color: #fff !important;
  font-size: 20px; font-weight: 700;
  margin: 0 0 10px; line-height: 1.4;
}

/* 説明文 */
.tmfa-card-photo p {
  color: rgba(255,255,255,0.82) !important;
  font-size: 13px; line-height: 1.75;
  margin: 0 0 18px;
}

/* リンク */
.tmfa-card-photo .tmfa-card-link {
  color: #fff;
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.45);
  padding-bottom: 2px;
  transition: border-color .2s;
}
.tmfa-card-photo .tmfa-card-link:hover { border-bottom-color: #fff; }

/* ホバー時のスケールエフェクト */
.tmfa-card-photo:hover { box-shadow: 0 8px 32px rgba(0,0,0,.25); transform: translateY(-2px); }

/* 各カードの背景画像 */
.tmfa-card--bg-1 { background-image: url('library/images/image-1.jpg'); }
.tmfa-card--bg-2 { background-image: url('library/images/image-2.jpg'); }
.tmfa-card--bg-3 { background-image: url('library/images/image-3.jpg'); }

/* ============================================================
   NEWS LIST
   ============================================================ */

.tmfa-news-list { list-style: none; margin: 0; padding: 0; }
.tmfa-news-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--tmfa-border);
}
.tmfa-news-item:first-child { border-top: 1px solid var(--tmfa-border); }
.tmfa-news-date { font-size: 14px; color: var(--tmfa-text-caption); white-space: nowrap; min-width: 90px; }
.tmfa-news-cat {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: 2px; white-space: nowrap;
  color: #fff;
}
.cat-news { background: var(--tmfa-primary); }
.cat-event { background: var(--tmfa-secondary); }
.cat-certification { background: #2E8B57; }
.cat-media { background: #888; }
.cat-report { background: #6B5B95; }
.tmfa-news-title { font-size: 15px; }
.tmfa-news-title a { color: var(--tmfa-text); }
.tmfa-news-title a:hover { color: var(--tmfa-secondary); }

/* News archive tabs */
.tmfa-news-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 30px;
}
.tmfa-news-tabs a {
  display: inline-block; padding: 6px 16px;
  font-size: 13px; border: 1px solid var(--tmfa-border);
  border-radius: 4px; color: var(--tmfa-text);
  transition: all .2s;
}
.tmfa-news-tabs a:hover,
.tmfa-news-tabs a.is-active {
  background: var(--tmfa-primary); color: #fff; border-color: var(--tmfa-primary);
}

/* ============================================================
   CERTIFICATION GRADES (front-page)
   ============================================================ */

.tmfa-cert-overview {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: center;
}
.tmfa-cert-text h3 { font-size: 20px; margin: 0 0 16px; }
.tmfa-cert-text p { color: var(--tmfa-text-sub); margin: 0 0 20px; }

.tmfa-grades-visual { display: flex; flex-direction: column; gap: 16px; }
.tmfa-grade-badge {
  padding: 16px 20px; border-radius: 4px;
  border-left: 4px solid; display: flex; align-items: center; gap: 12px;
}
.tmfa-grade-badge.bronze { border-color: var(--tmfa-bronze); background: #faf5ef; }
.tmfa-grade-badge.silver { border-color: var(--tmfa-silver); background: #f7f7f7; }
.tmfa-grade-badge.gold { border-color: var(--tmfa-gold); background: #fffdf0; }
.tmfa-grade-stars { font-size: 18px; color: var(--tmfa-gold); min-width: 50px; }
.tmfa-grade-name { font-size: 15px; font-weight: 600; color: var(--tmfa-primary); }
.tmfa-grade-desc { font-size: 13px; color: var(--tmfa-text-sub); margin-left: auto; }

/* ============================================================
   CHAIRMAN MESSAGE
   ============================================================ */

.tmfa-chairman {
  display: flex; gap: 32px; align-items: flex-start;
}
.tmfa-chairman-photo {
  width: 200px; height: 200px; min-width: 200px;
  background: var(--tmfa-bg-highlight);
  display: flex; align-items: center; justify-content: center;
  color: var(--tmfa-text-caption); font-size: 13px;
}
.tmfa-chairman-name { font-size: 20px; margin: 0 0 4px; }
.tmfa-chairman-title { font-size: 13px; color: var(--tmfa-text-sub); margin: 0 0 16px; }
.tmfa-chairman-msg { color: var(--tmfa-text-sub); font-size: 15px; margin: 0 0 16px; line-height: 1.8; }

/* ============================================================
   CTA SECTION (navy)
   ============================================================ */

.tmfa-cta-section {
  text-align: center; padding: 60px 20px;
}
.tmfa-cta-section h2 { color: #fff; font-size: 22px; margin: 0 0 12px; }
.tmfa-cta-section p { color: rgba(255,255,255,.8); margin: 0 0 24px; font-size: 15px; }

/* ============================================================
   INFO TABLE
   ============================================================ */

.tmfa-info-table {
  width: 100%; border-collapse: collapse; margin-bottom: 40px;
}
.tmfa-info-table th,
.tmfa-info-table td {
  padding: 14px 20px; border-bottom: 1px solid var(--tmfa-border);
  font-size: 15px; text-align: left;
}
.tmfa-info-table th {
  background: var(--tmfa-bg-off); font-weight: 600;
  width: 200px; color: var(--tmfa-primary);
}

/* ============================================================
   MEMBERSHIP TABLE
   ============================================================ */

.tmfa-membership-table {
  width: 100%; border-collapse: collapse; margin-bottom: 40px;
}
.tmfa-membership-table th,
.tmfa-membership-table td {
  padding: 12px 16px; border: 1px solid var(--tmfa-border);
  font-size: 14px; text-align: left;
}
.tmfa-membership-table thead th {
  background: var(--tmfa-primary); color: #fff; font-weight: 600;
}
.tmfa-membership-table tbody tr:nth-child(even) { background: var(--tmfa-bg-off); }

/* ============================================================
   OFFICERS GRID
   ============================================================ */

.tmfa-officers-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.tmfa-officer-card {
  display: flex; gap: 20px; padding: 24px;
  border: 1px solid var(--tmfa-border); background: #fff;
}
.tmfa-officer-photo {
  width: 120px; height: 120px; min-width: 120px;
  background: var(--tmfa-bg-highlight);
  display: flex; align-items: center; justify-content: center;
  color: var(--tmfa-text-caption); font-size: 12px;
}
.tmfa-officer-info h3 { font-size: 18px; margin: 0 0 4px; }
.tmfa-officer-role { font-size: 13px; color: var(--tmfa-secondary); font-weight: 600; margin-bottom: 4px; }
.tmfa-officer-title { font-size: 13px; color: var(--tmfa-text-sub); }

/* ============================================================
   ACCORDION
   ============================================================ */

.tmfa-accordion { border: 1px solid var(--tmfa-border); margin-bottom: -1px; }
.tmfa-accordion-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; cursor: pointer;
  background: #fff; transition: background .2s;
  font-size: 15px; font-weight: 600; color: var(--tmfa-primary);
}
.tmfa-accordion-header:hover { background: var(--tmfa-bg-off); }
.tmfa-accordion-header::after {
  content: '+'; font-size: 20px; font-weight: 400;
  color: var(--tmfa-text-caption); transition: transform .2s;
}
.tmfa-accordion.is-open .tmfa-accordion-header::after { content: '−'; }
.tmfa-accordion-body {
  display: none; padding: 0 20px 20px;
  font-size: 14px; color: var(--tmfa-text-sub); line-height: 1.8;
}
.tmfa-accordion.is-open .tmfa-accordion-body { display: block; }

/* ============================================================
   FLOW (Steps)
   ============================================================ */

.tmfa-flow { position: relative; padding-left: 56px; }
.tmfa-flow-step {
  position: relative; padding-bottom: 36px;
  padding-left: 20px; border-left: 2px solid var(--tmfa-border);
}
.tmfa-flow-step:last-child { border-left-color: transparent; padding-bottom: 0; }
.tmfa-flow-num {
  position: absolute; left: -68px; top: 0;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--tmfa-primary); color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.tmfa-flow-num-label { font-size: 8px; font-weight: 700; letter-spacing: 0.5px; line-height: 1; }
.tmfa-flow-num-value { font-size: 20px; font-weight: 700; line-height: 1; }
.tmfa-flow-step h3 { font-size: 16px; margin: 6px 0 4px; }
.tmfa-flow-step p { font-size: 14px; color: var(--tmfa-text-sub); margin: 0; }

/* ============================================================
   LINK CARDS (2x2 grid)
   ============================================================ */

.tmfa-link-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.tmfa-link-card {
  display: block; padding: 24px;
  border: 1px solid var(--tmfa-border);
  background: #fff; transition: box-shadow .2s, border-color .2s;
  text-decoration: none;
}
.tmfa-link-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  border-color: var(--tmfa-secondary);
}
.tmfa-link-card h3 {
  font-size: 16px; margin: 0 0 4px;
  color: var(--tmfa-primary);
}
.tmfa-link-card p { font-size: 13px; color: var(--tmfa-text-sub); margin: 0; }
.tmfa-link-card .tmfa-arrow {
  color: var(--tmfa-secondary); font-size: 14px; margin-top: 8px; display: block;
}

/* ============================================================
   BUSINESS ITEMS (alternating layout)
   ============================================================ */

.tmfa-business-items { margin-top: 40px; }
.tmfa-business-item {
  display: flex; gap: 48px; align-items: center;
  padding: 48px 0; border-bottom: 1px solid var(--tmfa-border);
}
.tmfa-business-item:last-child { border-bottom: none; }
.tmfa-business-item.reverse { flex-direction: row-reverse; }
.tmfa-business-icon {
  width: 180px; min-width: 180px; height: 160px;
  background: var(--tmfa-bg-off); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.tmfa-business-icon .material-icons-outlined {
  font-family: 'Material Icons Outlined' !important;
  font-size: 64px; color: var(--tmfa-secondary);
  font-style: normal; font-weight: normal;
  display: inline-block; line-height: 1;
  letter-spacing: normal; word-spacing: normal;
  white-space: nowrap; direction: ltr;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}
.tmfa-business-text { flex: 1; }
.tmfa-business-text h3 { font-size: 20px; margin: 0 0 12px; color: var(--tmfa-primary); }
.tmfa-business-text p { color: var(--tmfa-text-sub); margin: 0 0 16px; line-height: 1.8; }
.tmfa-link { font-size: 14px; color: var(--tmfa-secondary); font-weight: 600; text-decoration: none; }
.tmfa-link:hover { text-decoration: underline; }

/* ============================================================
   CERTIFICATION GRADE CARDS (detail page)
   ============================================================ */

.tmfa-grade-card {
  border-left: 4px solid; padding: 24px 28px; margin-bottom: 20px;
  background: #fff;
}
.tmfa-grade-card.bronze { border-color: var(--tmfa-bronze); background: #fdf8f2; }
.tmfa-grade-card.silver { border-color: var(--tmfa-silver); background: #f9f9f9; }
.tmfa-grade-card.gold { border-color: var(--tmfa-gold); background: #fffef5; }
.tmfa-grade-card h3 { font-size: 20px; margin: 0 0 8px; }
.tmfa-grade-card p { color: var(--tmfa-text-sub); margin: 0 0 4px; font-size: 14px; }
.tmfa-grade-card .tmfa-review-method {
  font-size: 13px; color: var(--tmfa-text-caption); margin-top: 8px;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */

.tmfa-form { max-width: 700px; }
.tmfa-form-group { margin-bottom: 20px; }
.tmfa-form-group label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--tmfa-primary); margin-bottom: 6px;
}
.tmfa-form-group label .required {
  color: #d9534f; font-size: 12px; margin-left: 4px;
}
.tmfa-form-group input[type="text"],
.tmfa-form-group input[type="email"],
.tmfa-form-group input[type="tel"],
.tmfa-form-group select,
.tmfa-form-group textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--tmfa-border); border-radius: 4px;
  font-size: 15px; font-family: inherit;
  transition: border-color .2s;
}
.tmfa-form-group input:focus,
.tmfa-form-group select:focus,
.tmfa-form-group textarea:focus {
  outline: none; border-color: var(--tmfa-secondary);
  box-shadow: 0 0 0 3px rgba(43,122,158,.1);
}
.tmfa-form-group textarea { min-height: 160px; resize: vertical; }
.tmfa-form-submit {
  display: inline-block; padding: 14px 40px;
  background: var(--tmfa-primary); color: #fff;
  border: none; border-radius: 4px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .2s;
}
.tmfa-form-submit:hover { background: var(--tmfa-secondary); }

/* ============================================================
   MAP PLACEHOLDER
   ============================================================ */

.tmfa-map-embed {
  width: 100%; height: 400px;
  background: var(--tmfa-bg-highlight);
  display: flex; align-items: center; justify-content: center;
  color: var(--tmfa-text-caption); font-size: 14px;
  margin: 24px 0;
}

/* ============================================================
   PDF DOWNLOAD
   ============================================================ */

.tmfa-pdf-download {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; background: var(--tmfa-bg-off);
  border: 1px solid var(--tmfa-border); border-radius: 4px;
  font-size: 14px; color: var(--tmfa-text); transition: all .2s;
  margin-bottom: 30px;
}
.tmfa-pdf-download:hover { border-color: var(--tmfa-secondary); color: var(--tmfa-secondary); }

/* ============================================================
   NOTICE BOX
   ============================================================ */

.tmfa-notice {
  padding: 24px; background: var(--tmfa-bg-off);
  border: 1px solid var(--tmfa-border); border-radius: 4px;
  font-size: 14px; color: var(--tmfa-text-sub);
  text-align: center;
}

/* ============================================================
   SITEMAP
   ============================================================ */

.tmfa-sitemap-list {
  list-style: none; margin: 0; padding: 0;
}
.tmfa-sitemap-list > li { margin-bottom: 24px; }
.tmfa-sitemap-list > li > a {
  font-size: 16px; font-weight: 600; color: var(--tmfa-primary);
}
.tmfa-sitemap-list ul {
  list-style: none; padding-left: 20px; margin-top: 8px;
}
.tmfa-sitemap-list ul li { margin-bottom: 6px; }
.tmfa-sitemap-list ul li a { font-size: 14px; color: var(--tmfa-text-sub); }

/* ============================================================
   PAGINATION
   ============================================================ */

.tmfa-pagination {
  display: flex; justify-content: center; gap: 4px;
  margin-top: 40px;
}
.tmfa-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--tmfa-border);
  font-size: 14px; color: var(--tmfa-text);
  transition: all .2s;
}
.tmfa-pagination .page-numbers.current,
.tmfa-pagination .page-numbers:hover {
  background: var(--tmfa-primary); color: #fff; border-color: var(--tmfa-primary);
}
.nav-links { display: flex; justify-content: center; gap: 4px; margin-top: 40px; }
.nav-links .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--tmfa-border);
  font-size: 14px; color: var(--tmfa-text); transition: all .2s;
}
.nav-links .page-numbers.current,
.nav-links .page-numbers:hover {
  background: var(--tmfa-primary); color: #fff; border-color: var(--tmfa-primary);
}

/* ============================================================
   PRIVACY POLICY
   ============================================================ */

.tmfa-privacy h2 {
  font-size: 18px; margin: 32px 0 12px;
  padding-bottom: 8px; border-bottom: 2px solid var(--tmfa-bg-highlight);
}
.tmfa-privacy p { margin: 0 0 16px; }

/* ============================================================
   SINGLE NEWS
   ============================================================ */

.tmfa-single-meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.tmfa-single-content { line-height: 1.9; }
.tmfa-single-content h2 {
  font-size: 20px; margin: 32px 0 12px;
  padding-bottom: 8px; border-bottom: 2px solid var(--tmfa-bg-highlight);
}
.tmfa-single-content p { margin: 0 0 16px; }
.tmfa-back-link {
  display: inline-block; margin-top: 40px;
  padding: 10px 24px; border: 1px solid var(--tmfa-border);
  border-radius: 4px; font-size: 14px; color: var(--tmfa-text);
  transition: all .2s;
}
.tmfa-back-link:hover { border-color: var(--tmfa-secondary); color: var(--tmfa-secondary); }

/* ============================================================
   FOOTER
   ============================================================ */

.tmfa-footer { background: var(--tmfa-primary); color: rgba(255,255,255,.8); }
.tmfa-footer-main { padding: 48px 0 32px; }
.tmfa-footer-columns {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.tmfa-footer-col h4 {
  color: #fff; font-size: 14px; font-weight: 700;
  margin: 0 0 16px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.tmfa-footer-col ul { list-style: none; margin: 0; padding: 0; }
.tmfa-footer-col li { margin-bottom: 8px; }
.tmfa-footer-col a {
  color: rgba(255,255,255,.7); font-size: 13px;
  transition: color .2s;
}
.tmfa-footer-col a:hover { color: #fff; }

.tmfa-footer-sns {
  display: flex; gap: 12px; margin-top: 16px;
}
.tmfa-sns-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.8);
  transition: background .2s;
}
.tmfa-sns-icon:hover { background: rgba(255,255,255,.2); color: #fff; }

.tmfa-footer-bottom {
  background: var(--tmfa-footer-bg);
  padding: 16px 0; text-align: center;
}
.tmfa-footer-bottom p {
  margin: 0; font-size: 12px; color: rgba(255,255,255,.5);
}

/* ============================================================
   RESPONSIVE: Tablet (768px - 1099px)
   ============================================================ */

@media (max-width: 1099px) {
  .tmfa-cards-3 { grid-template-columns: repeat(2, 1fr); }
  .tmfa-cert-overview { grid-template-columns: 1fr; }
  .tmfa-footer-columns { grid-template-columns: repeat(2, 1fr); }
  .tmfa-officers-grid { grid-template-columns: 1fr; }
  .tmfa-link-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE: Smartphone (767px以下)
   ============================================================ */

@media (max-width: 767px) {
  /* Utility nav hidden on SP */
  .tmfa-utility-nav { display: none; }

  /* Header */
  .tmfa-header-inner { height: 56px; }
  .tmfa-logo-text { font-size: 11px; }
  .tmfa-logo-mark { font-size: 18px; padding: 3px 8px; }

  /* Hamburger visible */
  .tmfa-hamburger { display: block; }

  /* Global nav - mobile overlay */
  .tmfa-global-nav {
    display: none; position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5); z-index: 1050;
  }
  .tmfa-global-nav.is-open { display: block; }
  .tmfa-nav-list {
    flex-direction: column; align-items: stretch;
    background: #fff; width: 280px; height: 100vh;
    position: absolute; right: 0; top: 0;
    padding: 70px 0 20px; overflow-y: auto;
    box-shadow: -4px 0 12px rgba(0,0,0,.1);
  }
  .tmfa-nav-list > li > a { padding: 12px 20px; font-size: 15px; }
  .tmfa-dropdown {
    position: static; display: none;
    box-shadow: none; border-top: none;
    background: var(--tmfa-bg-off);
  }
  .has-dropdown.is-open .tmfa-dropdown { display: block; }
  .tmfa-dropdown li a { padding: 10px 32px; }
  .tmfa-nav-cta {
    margin: 8px 20px !important; text-align: center;
    border-radius: 4px !important;
  }

  /* Hero */
  .tmfa-hero { min-height: 300px; padding: 40px 20px; }
  .tmfa-hero h1 { font-size: 22px; }
  .tmfa-hero-sub { font-size: 14px; }

  /* Sections */
  .tmfa-section { padding: 40px 0; }
  .tmfa-section-title { font-size: 20px; margin-bottom: 24px; }

  /* Cards */
  .tmfa-cards-3 { grid-template-columns: 1fr; gap: 16px; }
  .tmfa-card { padding: 24px 20px; }

  /* Chairman */
  .tmfa-chairman { flex-direction: column; align-items: center; text-align: center; }
  .tmfa-chairman-photo { width: 150px; height: 150px; min-width: 150px; }

  /* Business items */
  .tmfa-business-item,
  .tmfa-business-item.reverse { flex-direction: column; gap: 20px; }
  .tmfa-business-icon { width: 100%; min-width: unset; height: 120px; }

  /* Tables */
  .tmfa-info-table th { width: 120px; padding: 10px 12px; font-size: 13px; }
  .tmfa-info-table td { padding: 10px 12px; font-size: 13px; }
  .tmfa-membership-table { font-size: 12px; }
  .tmfa-membership-table th,
  .tmfa-membership-table td { padding: 8px 10px; }

  /* Footer */
  .tmfa-footer-columns { grid-template-columns: 1fr; gap: 24px; }
  .tmfa-footer-main { padding: 32px 0 16px; }

  /* Page header */
  .tmfa-page-header { padding: 20px 0 24px; }
  .tmfa-page-header h1 { font-size: 22px; }

  /* Page content */
  .tmfa-page-content { padding: 32px 0 48px; }

  /* Officers */
  .tmfa-officers-grid { grid-template-columns: 1fr; }
  .tmfa-officer-card { flex-direction: column; align-items: center; text-align: center; }
  .tmfa-officer-photo { width: 100px; height: 100px; min-width: 100px; }

  /* Flow */
  .tmfa-flow { padding-left: 44px; }
  .tmfa-flow-num { left: -56px; width: 44px; height: 44px; }
  .tmfa-flow-num-label { font-size: 7px; }
  .tmfa-flow-num-value { font-size: 17px; }

  /* News */
  .tmfa-news-item { flex-wrap: wrap; gap: 4px 12px; }

  /* Link cards */
  .tmfa-link-cards { grid-template-columns: 1fr; }

  /* Cert overview */
  .tmfa-cert-overview { gap: 24px; }
}

/* ============================================================
   UTILITY
   ============================================================ */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
