/* ===== Dr.Foot — Modern Design System ===== */
/* Google Fonts loaded via preload in HTML head */

:root{
  --bg:#F6F3EA;
  --bg-alt:#E7EFEA;
  --fg:#0b1220;
  --muted:#6b7280;
  --line:#d6e4dd;
  --brand:#0F3D2E;
  --brand2:#1B5A43;
  --brand-light:rgba(15,61,46,.06);
  --brand-glow:rgba(27,90,67,.22);
  --card:#ffffff;
  --radius:16px;
  --shadow:0 4px 24px rgba(17,24,39,.06);
  --shadow-lg:0 16px 48px rgba(17,24,39,.10);
  --transition:0.25s cubic-bezier(.4,0,.2,1);
}
*{box-sizing:border-box}

body{
  margin:0;
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background:var(--bg);
  color:var(--fg);
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
a{color:inherit; text-decoration:none}
img{max-width:100%; height:auto; display:block}
.container{max-width:1120px; margin:0 auto; padding:0 20px}

.skip{position:absolute; left:-9999px}
.skip:focus{left:16px; top:16px; z-index:1000; background:#fff; padding:8px 10px; border:1px solid var(--line); border-radius:10px}

/* ===== Header ===== */
header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(180%) blur(12px);
  -webkit-backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--line);
}
.topbar{display:flex; align-items:center; gap:16px; padding:14px 0}
.topbar .btn.primary{white-space:nowrap}
.logo{display:flex; align-items:center; gap:6px; font-weight:900; font-size:15px; letter-spacing:.02em}
.logo span{ white-space:nowrap; }
.logo-img{
  height:36px; width:auto; object-fit:contain;
  filter:drop-shadow(0 1px 3px rgba(15,61,46,.15));
}
.logo-badge-img{
  height:36px; width:auto; object-fit:contain;
}
.logo-badge{
  width:36px; height:36px; border-radius:10px;
  background:linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow:0 2px 8px var(--brand-glow);
}
.grow{flex:1}
nav ul{list-style:none; padding:0; margin:0; display:flex; gap:2px; flex-wrap:nowrap}
nav a{
  font-size:13px; font-weight:500; white-space:nowrap;
  color:var(--muted); padding:7px 12px; border-radius:8px;
  transition:color var(--transition), background var(--transition);
}
nav a:hover{color:var(--brand); background:var(--brand-light)}

/* ===== Buttons ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:11px 22px; border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:700; font-size:14px;
  gap:8px;
  transition:all var(--transition);
  cursor:pointer;
  position:relative;
  overflow:hidden;
}
.btn:hover{
  border-color:var(--brand);
  color:var(--brand);
  box-shadow:0 4px 16px var(--brand-glow);
  transform:translateY(-1px);
}
.btn:active{transform:translateY(0)}
.btn.primary{
  border-color:transparent;
  color:#fff;
  background:linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow:0 6px 20px var(--brand-glow);
}
.btn.primary:hover{
  box-shadow:0 8px 32px var(--brand-glow);
  transform:translateY(-2px);
}
.btn.ghost{background:transparent}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 12px; border-radius:999px;
  background:var(--brand-light);
  color:var(--brand);
  font-weight:700; font-size:12px;
  border:1px solid rgba(15,61,46,.12);
}

/* ===== Hero ===== */
.hero{
  padding:56px 0 40px;
  background:linear-gradient(170deg, rgba(15,61,46,.08) 0%, rgba(27,90,67,.04) 40%, transparent 70%);
  position:relative;
  overflow:hidden;
}
.hero::before{
  content:'';
  position:absolute;
  top:-80px; right:-120px;
  width:400px; height:400px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(27,90,67,.08), transparent 70%);
  pointer-events:none;
}
.hero h1{
  font-size:32px;
  font-weight:900;
  letter-spacing:-.01em;
  background:linear-gradient(135deg, var(--fg) 30%, var(--brand));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:20px;
  align-items:stretch;
}
@media (max-width: 920px){ .hero-grid{grid-template-columns:1fr} }

.panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px;
  box-shadow:var(--shadow);
}
h1{font-size:28px; margin:10px 0 10px; line-height:1.25}
.lead{margin:0; color:#374151}
.kicker{margin:8px 0 0; color:var(--muted); font-weight:700; font-size:13px; text-transform:uppercase; letter-spacing:.06em}
.cta-row{display:flex; flex-wrap:wrap; gap:10px; margin-top:16px}

/* ===== Section ===== */
.section{padding:48px 0}
.section h2{
  font-size:22px; font-weight:900;
  margin:0 0 24px;
  padding-bottom:12px;
  border-bottom:2px solid transparent;
  border-image:linear-gradient(90deg, var(--brand), var(--brand2), transparent) 1;
  letter-spacing:-.01em;
}
.muted{color:var(--muted)}

/* ===== Grid ===== */
.grid{display:grid; grid-template-columns:repeat(3,1fr); gap:20px}
@media (max-width: 920px){ .grid{grid-template-columns:1fr} }

/* ===== Card ===== */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:20px;
  transition:all var(--transition);
  position:relative;
}
.card:hover{
  box-shadow:var(--shadow-lg);
  border-color:rgba(15,61,46,.18);
  transform:translateY(-3px);
}
.card h3{margin:0 0 8px; font-size:16px; font-weight:700}
.card p{margin:0; color:#4b5563; font-size:14px; line-height:1.7}
.card .actions{margin-top:14px}
.split{display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start}
@media (max-width: 920px){ .split{grid-template-columns:1fr} }

/* ===== News ===== */
.news-item{
  display:flex; justify-content:space-between; gap:12px;
  padding:12px 0; border-bottom:1px solid var(--line);
  font-size:14px;
  transition:background var(--transition);
}
.news-item:last-child{border-bottom:none}
.news-item:hover{background:var(--brand-light); margin:0 -8px; padding:12px 8px; border-radius:8px}

.notice{
  background:#fff;
  border:1px solid rgba(245,158,11,.35);
  border-radius:var(--radius);
  padding:14px;
}

/* ===== Footer ===== */
footer{
  position:relative;
  padding:0;
  background:linear-gradient(170deg, #08261D 0%, #0B3228 40%, #0F3D2E 100%);
  color:rgba(255,255,255,.85);
  overflow:hidden;
}
footer::before{
  content:'';
  position:absolute;
  top:-60px; right:-80px;
  width:320px; height:320px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(27,90,67,.15), transparent 70%);
  pointer-events:none;
}
footer::after{
  content:'';
  position:absolute;
  bottom:-40px; left:-60px;
  width:240px; height:240px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(27,90,67,.10), transparent 70%);
  pointer-events:none;
}
.foot-wave{
  display:block; width:100%; height:48px;
  background:var(--bg);
  position:relative;
}
.foot-wave::after{
  content:'';
  position:absolute;
  bottom:0; left:0; right:0;
  height:48px;
  background:linear-gradient(170deg, #08261D 0%, #0B3228 40%, #0F3D2E 100%);
  border-radius:50% 50% 0 0 / 100% 100% 0 0;
}
.foot-inner{
  position:relative;
  z-index:1;
  padding:40px 0 0;
}
.foot-brand{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:20px;
}
.foot-brand .logo-badge{
  width:44px; height:44px; border-radius:12px;
  background:linear-gradient(135deg, #1B5A43, #5CB88A);
  box-shadow:0 4px 16px rgba(27,90,67,.35);
  flex-shrink:0;
}
.foot-brand .foot-logo-img{
  height:44px; width:auto; object-fit:contain;
  flex-shrink:0;
  filter:drop-shadow(0 2px 8px rgba(255,255,255,.15));
}
.foot-brand span{
  font-weight:900; font-size:18px; color:#fff;
  letter-spacing:.03em;
}
.foot-desc{
  color:rgba(255,255,255,.6);
  font-size:13.5px;
  line-height:1.8;
  margin:0 0 18px;
  max-width:340px;
}
.foot-cta{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:8px;
  padding:12px 24px;
  width:100%;
  max-width:340px;
  box-sizing:border-box;
  border-radius:999px;
  background:linear-gradient(135deg, #1B5A43, #5CB88A);
  color:#08261D;
  font-weight:700;
  font-size:14px;
  transition:all var(--transition);
  box-shadow:0 4px 20px rgba(27,90,67,.3);
}
.foot-cta svg{flex-shrink:0}
.foot-cta:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 28px rgba(27,90,67,.45);
  color:#08261D;
}
.footgrid{
  display:grid;
  grid-template-columns:1.8fr 1fr 1fr 1fr 1fr;
  gap:32px;
}
@media (max-width: 920px){ .footgrid{grid-template-columns:1fr 1fr} }
@media (max-width: 500px){ .footgrid{grid-template-columns:1fr} }
.footgrid h4{
  margin:0 0 14px;
  font-size:13px;
  font-weight:700;
  color:rgba(255,255,255,.45);
  text-transform:uppercase;
  letter-spacing:.1em;
}
.footgrid a{
  display:block;
  color:rgba(255,255,255,.7);
  font-size:13.5px;
  padding:5px 0;
  transition:color var(--transition), padding-left var(--transition);
}
.footgrid a:hover{color:#5CB88A; padding-left:6px}
.foot-bottom{
  margin-top:36px;
  padding:20px 0;
  border-top:1px solid rgba(255,255,255,.1);
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
}
.copyright{
  font-size:12px;
  color:rgba(255,255,255,.4);
  margin:0;
}
.foot-back{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:rgba(255,255,255,.5);
  padding:6px 14px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:999px;
  transition:all var(--transition);
}
.foot-back:hover{
  color:#5CB88A;
  border-color:rgba(92,184,138,.4);
  transform:translateY(-2px);
}

/* ===== FAQ Accordion ===== */
.faq-item {
  border-top: 1px solid var(--line);
}
.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 0;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--brand); }

.faq-icon {
  font-size: 20px;
  transition: transform 0.25s ease;
  color: var(--brand);
}

.faq-answer {
  display: none;
  padding-bottom: 16px;
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* ===== Course Image ===== */
.course-image {
  margin: 24px 0;
  text-align: center;
}

.course-image img {
  max-width: 560px !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: auto !important;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  margin: 0 auto;
}

/* ===== Card Images ===== */
.card img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin-bottom: 12px;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  transition: transform var(--transition);
}
.card:hover img {
  transform: scale(1.03);
}

.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: transform var(--transition);
}
.card:hover .card-img {
  transform: scale(1.03);
}

/* ===== LINE CTA ===== */
.line-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
}

.line-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.cta-sub {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.cta-line-group {
  align-items: center;
}

/* ===== Hamburger Menu ===== */
.menu-toggle{
  display:none;
  background:none; border:none; cursor:pointer;
  width:40px; height:40px;
  flex-shrink:0;
  position:relative;
  z-index:60;
}
.menu-toggle span{
  display:block; width:22px; height:2px;
  background:var(--fg);
  border-radius:2px;
  margin:5px auto;
  transition:all .3s ease;
}
.menu-toggle.active span:nth-child(1){
  transform:rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2){
  opacity:0;
}
.menu-toggle.active span:nth-child(3){
  transform:rotate(-45deg) translate(5px, -5px);
}

/* ===== Smooth Scroll ===== */
html { scroll-behavior: smooth; }

/* ===== Selection Color ===== */
::selection {
  background: rgba(15,61,46,.15);
  color: var(--fg);
}

/* ===== Mobile Navigation ===== */
@media (max-width: 768px) {
  .menu-toggle{ display:block !important; }

  nav{
    position:fixed !important;
    top:0 !important; left:0 !important; right:0 !important; bottom:0 !important;
    width:100vw !important;
    height:100vh !important;
    background:#fff !important;
    z-index:9999 !important;
    display:none !important;
    flex-direction:column;
    align-items:center;
    justify-content:center;
  }
  nav.open{
    display:flex !important;
  }
  nav ul{
    flex-direction:column !important;
    align-items:center !important;
    gap:4px;
    padding:0;
    margin:0;
    list-style:none;
  }
  nav a{
    display:block;
    font-size:18px;
    font-weight:700;
    padding:14px 32px;
    color:var(--fg);
    text-align:center;
    border-radius:10px;
  }
  nav a:hover{
    color:var(--brand);
    background:var(--brand-light);
  }

  .menu-toggle{
    z-index:10000 !important;
  }

  .topbar{ gap:6px; padding:10px 0; flex-wrap:nowrap; }
  .topbar .btn.primary{ padding:6px 10px; font-size:11px; white-space:nowrap; flex-shrink:0; }
  .logo span{ font-size:12px; }
  .logo-img{ height:28px; }
}

/* ===== Language Switcher (Dropdown) ===== */
.lang-switch{
  position:relative;
  margin-left:4px;
  flex-shrink:0;
}
.lang-current{
  display:flex; align-items:center; gap:4px;
  background:none; border:1.5px solid var(--line);
  border-radius:8px; padding:5px 8px;
  font-size:12px; font-weight:700;
  color:var(--muted); cursor:pointer;
  transition:all var(--transition);
}
.lang-current:hover{
  color:var(--brand); border-color:var(--brand);
}
.lang-current svg:first-child{ width:14px; height:14px; flex-shrink:0; }
.lang-arrow{ transition:transform .2s ease; }
.lang-switch:hover .lang-arrow,
.lang-switch.open .lang-arrow{ transform:rotate(180deg); }
.lang-dropdown{
  display:none;
  position:absolute; top:calc(100% + 4px); right:0;
  background:#fff; border:1px solid var(--line);
  border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,.1);
  min-width:70px; z-index:100;
  overflow:hidden;
}
.lang-switch:hover .lang-dropdown,
.lang-switch.open .lang-dropdown{
  display:block;
}
.lang-dropdown a{
  display:block; padding:8px 14px;
  font-size:12px; font-weight:700;
  text-decoration:none; color:var(--muted);
  transition:all var(--transition);
}
.lang-dropdown a:hover{
  color:var(--brand); background:rgba(15,61,46,.06);
}

/* ===== English header adjustments ===== */
html[lang="en"] .topbar{ gap:12px; }
html[lang="en"] .logo span{ font-size:12px; }
html[lang="en"] nav a{ font-size:12.5px; }
html[lang="en"] nav ul{ gap:2px; }
html[lang="en"] .btn.primary{ font-size:12.5px; padding:10px 18px; }

/* ===== Chinese (Traditional) header adjustments ===== */
html[lang="zh-Hant"] .topbar{ gap:12px; }
html[lang="zh-Hant"] .logo span{ font-size:15px; }
html[lang="zh-Hant"] nav a{ font-size:13px; }
html[lang="zh-Hant"] nav ul{ gap:4px; }
html[lang="zh-Hant"] .btn.primary{ font-size:13px; padding:10px 18px; }

/* ===== Very small mobile ===== */
@media (max-width: 380px) {
  .topbar{ gap:4px; }
  .topbar .btn.primary{ padding:5px 8px; font-size:10px; }
  .logo span{ display:none; }
  .logo-img{ height:26px; }
  .lang-current span{ display:none; }
  .lang-arrow{ display:none; }
  .lang-current{ padding:4px; }
}

/* ===== Responsive Typography ===== */
@media (max-width: 600px) {
  .hero { padding: 36px 0 28px; }
  .hero h1 { font-size: 24px; }
  .section { padding: 32px 0; }
  .section h2 { font-size: 19px; }
  .card { padding: 16px; }
  .grid { grid-template-columns: 1fr !important; }
  .cta-row { justify-content: center; }
}
