/* ======================================================
   Healthcare Portal — style.css
   ライトテーマ（清潔感・信頼感）
   ====================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0077B6;
  --primary-light: #90E0EF;
  --primary-dark: #023E8A;
  --accent: #00B4D8;
  --bg: #F8FAFE;
  --bg-card: #FFFFFF;
  --bg-section: #EDF2F7;
  --text: #1A202C;
  --text-muted: #718096;
  --text-light: #A0AEC0;
  --border: #E2E8F0;
  --success: #38A169;
  --warning: #DD6B20;
  --danger: #E53E3E;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --max-width: 1200px;
  --header-h: 60px;
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* --- Loading Overlay --- */
#loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg);
}
#loading-overlay.fade-out { opacity: 0; transition: opacity .3s; }
.loading-icon { font-size: 48px; margin-bottom: 16px; }
.loading-title { font-size: 16px; color: var(--text-muted); margin-bottom: 12px; }
.loading-bar-wrap {
  width: 200px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.loading-bar-fill {
  width: 0; height: 100%; background: var(--primary); border-radius: 2px; transition: width .2s;
}
.loading-pct { font-size: 12px; color: var(--text-light); margin-top: 8px; }

/* --- Header --- */
#header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; height: 100%; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.logo:hover { color: var(--primary); }
.logo-icon { font-size: 24px; }
.logo-text { font-size: 16px; white-space: nowrap; }
.header-nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  color: var(--text-muted); transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(0,119,182,.06); }
.mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 8px;
}
.mobile-menu-btn span {
  display: block; width: 22px; height: 2px; background: var(--text); border-radius: 1px;
  transition: var(--transition);
}

/* --- Main --- */
#app { flex: 1; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff; padding: 64px 0; text-align: center;
}
.hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.hero p { font-size: 18px; opacity: .9; max-width: 600px; margin: 0 auto 28px; }
.hero-search {
  max-width: 520px; margin: 0 auto; position: relative;
}
.hero-search input {
  width: 100%; padding: 14px 48px 14px 18px; border: none; border-radius: 50px;
  font-size: 16px; background: #fff; color: var(--text);
  box-shadow: var(--shadow-lg);
}
.hero-search input::placeholder { color: var(--text-light); }
.hero-search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.hero-search-btn:hover { background: var(--primary-dark); }

/* --- Category Cards --- */
.category-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.category-card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 28px 20px;
  text-align: center; border: 1px solid var(--border);
  box-shadow: var(--shadow); cursor: pointer; transition: var(--transition);
}
.category-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.category-card .cat-icon { font-size: 40px; margin-bottom: 12px; }
.category-card .cat-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.category-card .cat-count { font-size: 13px; color: var(--text-muted); }

/* --- Section Titles --- */
.section-title {
  font-size: 22px; font-weight: 700; margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* --- Service Cards --- */
.service-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.service-card {
  background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: var(--transition);
  display: flex; flex-direction: column;
}
.service-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.service-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.service-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.service-card-icon {
  width: 48px; height: 48px; border-radius: var(--radius); background: var(--bg-section);
  display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0;
}
.service-card-title { font-size: 16px; font-weight: 700; line-height: 1.4; }
.service-card-company { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* --- Favorite Button --- */
.fav-btn {
  background: none; border: none; cursor: pointer; font-size: 20px; line-height: 1;
  color: var(--text-light); padding: 4px; flex-shrink: 0; transition: var(--transition);
  border-radius: 50%;
}
.fav-btn:hover { color: #e53e3e; transform: scale(1.2); }
.fav-btn.active { color: #e53e3e; }
.fav-toggle-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-size: 14px; color: var(--text-muted);
}
.fav-toggle-bar label { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.fav-toggle-bar input[type="checkbox"] { accent-color: #e53e3e; }
.service-card-summary { font-size: 14px; color: var(--text-muted); line-height: 1.6; flex: 1; margin-bottom: 12px; }
.service-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- Badges / Tags --- */
.badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 50px;
  font-size: 12px; font-weight: 600; line-height: 1.6;
}
.badge-category { background: rgba(0,119,182,.1); color: var(--primary); }
.badge-type { background: var(--bg-section); color: var(--text-muted); }
.badge-medical { background: rgba(56,161,105,.1); color: var(--success); }
.badge-status-active { background: rgba(56,161,105,.08); color: var(--success); }
.badge-status-beta { background: rgba(221,107,32,.1); color: var(--warning); }
.badge-status-closed { background: rgba(229,62,62,.08); color: var(--danger); }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px;
  background: var(--bg-section); color: var(--text-muted);
}

/* --- Catalog Layout --- */
.catalog-layout { display: flex; gap: 24px; }
.catalog-sidebar {
  width: 260px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 16px);
  align-self: flex-start; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto;
}
.catalog-main { flex: 1; min-width: 0; }

/* --- Filters --- */
.filter-panel {
  background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border);
  padding: 20px; box-shadow: var(--shadow);
}
.filter-group { margin-bottom: 20px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group-title {
  font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 10px;
}
.filter-option {
  display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer;
  font-size: 14px; color: var(--text);
}
.filter-option input[type="checkbox"] { accent-color: var(--primary); }
.filter-option .count { margin-left: auto; font-size: 12px; color: var(--text-light); }

.filter-reset {
  display: block; width: 100%; padding: 8px; border: 1px solid var(--border);
  border-radius: var(--radius); background: none; color: var(--text-muted);
  font-size: 13px; cursor: pointer; transition: var(--transition); margin-top: 16px;
}
.filter-reset:hover { background: var(--bg-section); color: var(--text); }

/* --- Search Bar (Catalog) --- */
.catalog-search {
  position: relative; margin-bottom: 20px;
}
.catalog-search input {
  width: 100%; padding: 12px 44px 12px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 15px; background: var(--bg-card);
  transition: var(--transition);
}
.catalog-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,119,182,.1); }
.catalog-search-icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); font-size: 16px; pointer-events: none;
}
.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
  flex-wrap: wrap; gap: 8px;
}
.catalog-result-count { font-size: 14px; color: var(--text-muted); }
.catalog-sort { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.catalog-sort select {
  padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; background: var(--bg-card); color: var(--text); cursor: pointer;
}
.filter-option input[type="radio"] { accent-color: var(--primary); }
.filter-region-group {
  background: var(--bg-section); border-radius: var(--radius); padding: 12px !important;
}
.filter-region-select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--primary-light); border-radius: var(--radius);
  font-size: 14px; background: var(--bg-card); color: var(--text); cursor: pointer;
}
.filter-region-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,119,182,.15); }
.filter-region-note { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* --- Detail Page --- */
.detail-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff; padding: 48px 0;
}
.detail-back { color: rgba(255,255,255,.8); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px; }
.detail-back:hover { color: #fff; }
.detail-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.detail-company { font-size: 16px; opacity: .85; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.detail-badges .badge { background: rgba(255,255,255,.2); color: #fff; }

.detail-content { padding: 32px 0; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.detail-main {}
.detail-aside {}

.detail-section { margin-bottom: 32px; }
.detail-section h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.detail-section p { font-size: 15px; line-height: 1.8; color: var(--text); }

.detail-info-card {
  background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border);
  padding: 24px; box-shadow: var(--shadow); position: sticky; top: calc(var(--header-h) + 16px);
}
.detail-info-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.detail-info-row:last-child { border-bottom: none; }
.detail-info-label { color: var(--text-muted); font-weight: 500; flex-shrink: 0; margin-right: 12px; }
.detail-info-value { text-align: right; }

.detail-link-btn {
  display: block; width: 100%; padding: 12px; border-radius: var(--radius);
  background: var(--primary); color: #fff; text-align: center; font-weight: 600;
  font-size: 15px; margin-top: 20px; transition: var(--transition);
}
.detail-link-btn:hover { background: var(--primary-dark); color: #fff; }

/* --- About Page --- */
.about-content { max-width: 800px; margin: 0 auto; }
.about-content h2 { font-size: 24px; font-weight: 700; margin: 32px 0 16px; color: var(--text); }
.about-content h3 { font-size: 18px; font-weight: 700; margin: 24px 0 12px; color: var(--text); }
.about-content p { font-size: 15px; line-height: 1.8; margin-bottom: 16px; }
.about-content ul { padding-left: 24px; margin-bottom: 16px; }
.about-content li { font-size: 15px; line-height: 1.8; margin-bottom: 4px; }

/* --- Empty State --- */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state-text { font-size: 16px; color: var(--text-muted); }

/* --- Submit Page (タレコミ) --- */
.submit-intro { margin-bottom: 40px; }
.submit-intro p { font-size: 15px; line-height: 1.8; margin-bottom: 8px; }
.submit-types { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.submit-type-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; box-shadow: var(--shadow);
}
.submit-type-icon { font-size: 36px; margin-bottom: 8px; }
.submit-type-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.submit-type-card p { font-size: 13px; color: var(--text-muted); }

.submit-form-section { margin-bottom: 40px; }
.submit-form { }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-label .required { color: var(--danger); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; background: var(--bg-card); transition: var(--transition);
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,119,182,.1);
}
.form-textarea { resize: vertical; }
.form-radio-group, .form-checkbox-group { display: flex; flex-wrap: wrap; gap: 16px; }
.form-radio, .form-checkbox {
  display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer;
}
.form-radio input, .form-checkbox input { accent-color: var(--primary); }
.form-actions { margin-top: 24px; }
.form-submit-btn {
  padding: 14px 36px; background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius); font-size: 16px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.form-submit-btn:hover { background: var(--primary-dark); }

.submit-success { text-align: center; padding: 40px 0; }
.submit-success-icon { font-size: 48px; margin-bottom: 16px; }
.submit-success h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.submit-success p { color: var(--text-muted); }

.submit-criteria { margin-bottom: 20px; }
.submit-criteria ul { padding-left: 24px; }
.submit-criteria li { font-size: 14px; line-height: 1.8; margin-bottom: 4px; }
.submit-criteria-note { font-size: 13px; color: var(--text-muted); margin-top: 12px; }

/* --- Columns Page (コラム・取材記事) --- */
.column-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.column-tab {
  padding: 8px 20px; border: 1px solid var(--border); border-radius: 50px;
  background: var(--bg-card); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: var(--transition);
}
.column-tab:hover { border-color: var(--primary); color: var(--primary); }
.column-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.column-list { display: flex; flex-direction: column; gap: 16px; }
.column-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow); cursor: pointer; transition: var(--transition);
}
.column-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.column-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.column-card-date { font-size: 13px; color: var(--text-light); }
.column-card-title { font-size: 17px; font-weight: 700; line-height: 1.5; margin-bottom: 8px; }
.column-card-summary { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 8px; }
.column-card-author { font-size: 13px; color: var(--text-light); }

.badge-column { background: rgba(0,119,182,.1); color: var(--primary); }
.badge-interview { background: rgba(221,107,32,.1); color: var(--warning); }

.column-cta {
  margin-top: 40px; padding: 32px; background: var(--bg-section); border-radius: var(--radius-lg);
  text-align: center;
}
.column-cta h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.column-cta p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }

/* --- Home Columns Cards --- */
.home-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.home-column-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 20px; text-align: center; cursor: pointer; transition: var(--transition);
  box-shadow: var(--shadow);
}
.home-column-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.home-column-icon { font-size: 36px; margin-bottom: 10px; }
.home-column-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.home-column-card p { font-size: 13px; color: var(--text-muted); }

/* --- Mobile Filter Drawer --- */
.filter-overlay {
  display: none; position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.4);
}
.filter-overlay.open { display: block; }
.filter-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 300px; z-index: 201;
  background: var(--bg); overflow-y: auto; padding: 20px;
  transform: translateX(100%); transition: transform .3s ease;
}
.filter-overlay.open .filter-drawer { transform: translateX(0); }
.filter-drawer-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.filter-drawer-header h3 { font-size: 18px; font-weight: 700; }
.filter-drawer-close {
  background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted);
}
.mobile-filter-btn {
  display: none; padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); font-size: 14px; cursor: pointer; margin-bottom: 16px;
}

/* --- Footer --- */
#footer {
  background: #1A202C; color: rgba(255,255,255,.7); padding: 32px 0; margin-top: auto;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; text-align: center; }
.footer-disclaimer { font-size: 12px; line-height: 1.8; margin-bottom: 16px; opacity: .7; }
.footer-links { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,.6); font-size: 13px; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; opacity: .5; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .header-nav.open {
    display: flex; flex-direction: column; position: absolute; top: var(--header-h);
    left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px; box-shadow: var(--shadow-md);
  }
  .mobile-menu-btn { display: flex; margin-left: auto; }

  .hero h1 { font-size: 24px; }
  .hero p { font-size: 15px; }
  .hero { padding: 40px 0; }

  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-card { padding: 20px 12px; }
  .category-card .cat-icon { font-size: 32px; }

  .service-list { grid-template-columns: 1fr; }

  .catalog-layout { flex-direction: column; }
  .catalog-sidebar { display: none; width: 100%; position: static; max-height: none; }
  .mobile-filter-btn { display: block; }

  .detail-grid { grid-template-columns: 1fr; }
  .detail-info-card { position: static; }
  .detail-title { font-size: 22px; }

  .submit-types { grid-template-columns: 1fr; }
  .home-columns { grid-template-columns: 1fr; }
  .form-radio-group, .form-checkbox-group { flex-direction: column; gap: 8px; }

  .section { padding: 32px 0; }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .category-card { padding: 16px 10px; }
  .category-card .cat-icon { font-size: 28px; }
  .category-card .cat-name { font-size: 14px; }
}
