:root {
  --blue: #2a82e4;
  --blue-dark: #00244f;
  --blue-text: #003e87;
  --ink: #19212b;
  --text: #29577e;
  --muted: #6b7d91;
  --panel: #eff6ff;
  --line: #d9e8fb;
  --white: #fff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Noto Sans TC", Arial, sans-serif;
  line-height: 1.65;
  background: #f7f9fa;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: 18px clamp(20px, 6vw, 90px);
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(0, 62, 135, .08);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--blue-dark);
}

.brand img { width: 118px; height: auto; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: var(--white);
  font-size: 28px;
  font-weight: 800;
  background: var(--blue);
}

.brand strong, .brand small { display: block; line-height: 1.2; }
.brand small { color: var(--blue-text); font-size: 12px; text-transform: uppercase; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 36px);
  color: var(--blue-dark);
  font-size: 18px;
  font-weight: 650;
}

.nav a { padding: 8px 2px; }
.nav a:hover { color: var(--blue); }
.nav .lang { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 14px; white-space: nowrap; }
.nav .lang img { width: 18px; height: 12px; object-fit: cover; }

.menu-toggle { display: none; border: 0; background: transparent; color: var(--blue-dark); font-size: 28px; }

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 62px 0;
}

.hero {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 50px;
  align-items: center;
  min-height: calc(100vh - 92px);
  padding-top: 34px;
}

.eyebrow {
  margin: 0;
  color: var(--blue-text);
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 800;
}

.subline {
  margin: 6px 0 18px;
  color: var(--blue-text);
  font-size: 18px;
  font-weight: 700;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 20px;
  color: var(--blue-dark);
  font-size: clamp(42px, 5.6vw, 65px);
  line-height: 1.25;
  font-weight: 850;
}

.lead { margin-bottom: 48px; color: var(--blue-text); font-size: 20px; font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
}

.button.primary { color: var(--white); background: var(--blue); }
.button.primary:hover { background: #045dc7; }
.button.ghost { color: var(--ink); background: transparent; }

.hero-visual {
  position: relative;
  min-height: 500px;
  padding: 30px 30px 80px;
  border-radius: 48px;
  background: var(--panel);
}

.hero-visual img {
  height: 500px;
  width: 100%;
  object-fit: contain;
}

.quote {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: min(82%, 470px);
  transform: translateX(-50%);
  padding: 22px 18px;
  color: var(--blue-dark);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(42, 130, 228, .13);
}

.quote-mark { color: var(--blue); font-family: Georgia, serif; font-size: 46px; line-height: 0; vertical-align: -15px; }
.quote-mark-end { margin-left: 4px; }

.centered h2 {
  margin-bottom: 32px;
  color: var(--blue-text);
  font-size: 28px;
  font-weight: 500;
  text-align: center;
}

.centered h2::before, .centered h2::after { content: " —— "; }

.soft-panel {
  padding: clamp(30px, 5vw, 50px);
  color: var(--text);
  font-weight: 550;
  text-align: center;
  background: var(--panel);
  border-radius: 20px;
}

.soft-panel p:last-child { margin-bottom: 0; }

.logo-marquee {
  overflow: hidden;
  max-width: 925px;
  margin: 0 auto;
  padding: 16px 0 28px;
}

.logo-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 20px 34px;
  align-items: center;
}

.logo-marquee { max-width: 1080px; }
.logo-track { grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 12px 18px; }
.logo-track img { max-height: 120px; }

@media (min-width: 761px) {
  .logo-track { display: flex; width: max-content; animation: logo-scroll 34s linear infinite; }
  .logo-track img { width: 185px; flex: 0 0 185px; }
  .logo-track::after { content: ""; }
}

@keyframes logo-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.logo-track img {
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  filter: saturate(.95);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 36px 0 24px;
  background: var(--panel);
}

.service-card {
  padding: 0 28px 28px;
  text-align: justify;
}

.service-card img {
  width: 86%;
  height: 210px;
  margin: -34px auto 18px;
  object-fit: cover;
  border-radius: 8px;
}

.service-card h3 {
  margin-bottom: 22px;
  color: var(--blue-text);
  font-size: 18px;
  text-align: center;
}

.service-card p { color: var(--blue-dark); }

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 34px 24px 28px;
  background: var(--panel);
}

.process-grid article {
  min-height: 230px;
  padding: 20px 28px;
  text-align: center;
}

.process-grid span {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  color: var(--white);
  font-weight: 800;
  border-radius: 8px;
  background: var(--blue);
}

.process-grid h3 { margin-bottom: 8px; color: var(--blue-dark); font-size: 22px; }
.process-grid p { color: var(--blue-dark); }
.process-grid .feature-icon { width: 56px; height: 56px; margin-bottom: 14px; }

.footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 58px clamp(20px, 6vw, 90px);
  color: #0d55bf;
  background: #ebf5ff;
}

.footer h2 { margin-bottom: 12px; color: var(--blue-dark); font-size: 18px; }
.footer p { margin-bottom: 8px; }
.footer a { color: #00589b; font-weight: 700; }

.qr-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 14px;
  align-items: start;
}

.qr-list figure { margin: 0; }
.qr-list img { width: 100%; border-radius: 8px; background: var(--white); }
.qr-list figcaption { margin-top: 6px; color: var(--blue-dark); font-size: 13px; font-weight: 700; text-align: center; }

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  filter: drop-shadow(0 14px 22px rgba(18, 141, 53, .28));
  transition: transform .2s ease;
}

.whatsapp-float:hover { transform: translateY(-4px) scale(1.04); }
.whatsapp-float img { width: 100%; height: 100%; }
.feature-icon { display: inline-flex; width: 54px; height: 54px; margin-bottom: 16px; color: var(--blue); }
.feature-icon svg { width: 100%; height: 100%; }

.page-hero { min-height: 310px; padding: 78px max(20px, calc((100% - 1180px) / 2)); color: var(--white); background: var(--blue-dark); }
.page-hero .eyebrow { color: #9fd0ff; font-size: 18px; }
.page-hero h1 { margin: 6px 0 12px; color: var(--white); font-size: 48px; }
.page-hero p:last-child { max-width: 620px; margin: 0; font-size: 19px; }
.service-page-hero { position: relative; overflow: hidden; background: linear-gradient(90deg, #00244f 0%, #00244f 45%, rgba(0, 36, 79, .35)), url("assets/hero-consulting.png") center right / auto 124% no-repeat, #00244f; }
.service-grid-page { gap: 20px; padding: 0; background: transparent; }
.service-grid-page .service-card, .timeline article, .time-grid div, .contact-card, .news-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.service-grid-page .service-card { padding: 0 0 22px; overflow: hidden; }
.service-grid-page .service-card h2, .service-grid-page .service-card p { padding: 0 22px; }
.service-grid-page .service-card h2 { margin-top: 22px; color: var(--blue-dark); font-size: 20px; }
.timeline { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.timeline article, .time-grid div, .contact-card, .news-card { padding: 26px; }
.timeline b { color: var(--blue); font-size: 28px; }
.timeline h2 { margin: 8px 0; color: var(--blue-dark); font-size: 22px; }
.timeline h3 { margin: 8px 0; color: var(--blue-dark); font-size: 22px; }
.timeline em { display: inline-block; margin-bottom: 8px; color: var(--blue); font-size: 14px; font-style: normal; font-weight: 700; }
.timeline p, .contact-card p { margin-bottom: 0; }
.time-grid, .contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.notice-grid, .advantage-grid, .pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.notice-grid div, .advantage-grid article, .pricing div { padding: 26px; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.notice-grid strong, .notice-grid span, .pricing span, .pricing strong { display: block; }
.notice-grid strong, .advantage-grid h3, .pricing span { color: var(--blue-dark); }
.notice-grid span { margin-top: 8px; }
.advantage-grid b { color: var(--blue); font-size: 28px; }
.advantage-grid .feature-icon { padding: 15px; border-radius: 50%; background: var(--panel); }
.notice-grid .feature-icon { margin-bottom: 10px; }
.advantage-grid h3 { margin: 8px 0; font-size: 21px; }
.advantage-grid p { margin-bottom: 0; }
.dormitory { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; padding: 42px; color: var(--blue-dark); background: var(--panel); border-radius: 8px; }
.dormitory .eyebrow { font-size: 17px; }
.dormitory h2 { margin-bottom: 16px; font-size: 31px; }
.dormitory ul { padding-left: 20px; }
.dormitory li { margin-bottom: 8px; }
.dormitory img { width: 100%; min-height: 420px; object-fit: cover; border-radius: 8px; }
.pricing { grid-template-columns: repeat(4, 1fr); }
.pricing strong { margin-top: 10px; color: var(--blue); font-size: 22px; }
.pricing-note { margin-top: 24px; }
.faq { max-width: 900px; margin: 0 auto; text-align: left; }
.faq details { margin-bottom: 10px; padding: 0 20px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.faq summary { padding: 18px 0; color: var(--blue-dark); font-weight: 700; cursor: pointer; }
.faq p { margin: 0 0 18px; }
.time-grid strong, .time-grid span { display: block; }
.time-grid strong { margin-bottom: 6px; color: var(--blue-dark); font-size: 19px; }
.contact-card h2 { color: var(--blue-dark); }
.contact-card .button { margin-top: 18px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-card { min-height: 338px; padding: 0; overflow: hidden; }
.news-image { display: block; height: 210px; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.news-image:hover img { transform: scale(1.04); }
.news-card-body { display: flex; min-height: 180px; flex-direction: column; padding: 20px 22px 22px; }
.news-card h2 { margin: 5px 0 10px; color: var(--blue-dark); font-size: 21px; line-height: 1.35; }
.news-card h2 a:hover, .read-more:hover { color: var(--blue); }
.news-card > p:not(.news-date) { margin-bottom: 20px; }
.news-date, .article-date { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.read-more { margin-top: auto; color: var(--blue-text); font-weight: 700; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 38px; }
.pagination button { width: 40px; height: 40px; color: var(--blue-text); font: inherit; font-weight: 700; border: 1px solid var(--line); border-radius: 6px; background: var(--white); cursor: pointer; }
.pagination button:hover, .pagination button.is-current { color: var(--white); border-color: var(--blue); background: var(--blue); }
.article { width: min(820px, calc(100% - 40px)); padding-top: 78px; padding-bottom: 88px; }
.article h1 { margin: 10px 0 34px; font-size: 42px; }
.article-content { color: var(--ink); font-size: 18px; }
.article-content p { margin-bottom: 22px; }
.article-feature { width: 100%; max-height: 440px; margin: 0 0 34px; object-fit: cover; border-radius: 8px; }
.back-link { display: inline-block; margin-bottom: 30px; color: var(--blue-text); font-weight: 700; }
.form-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: start; padding: 48px; background: var(--panel); border-radius: 8px; }
.form-section h2 { color: var(--blue-dark); font-size: 30px; }
.contact-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.contact-form label { color: var(--blue-dark); font-size: 15px; font-weight: 700; }
.contact-form input, .contact-form textarea { width: 100%; margin-top: 6px; padding: 11px 12px; color: var(--ink); font: inherit; border: 1px solid #bcd4ee; border-radius: 6px; background: var(--white); }
.contact-form label:nth-of-type(3), .contact-form label:nth-of-type(4), .contact-form button { grid-column: 1 / -1; }
.form-feedback { grid-column: 1 / -1; min-height: 1.65em; margin: 0; font-weight: 700; }
.form-feedback.is-error { color: #b42318; }
.form-feedback.is-success { color: #087443; }
.not-found { display: grid; min-height: 100vh; place-content: center; padding: 24px; text-align: center; }
.not-found p { margin-bottom: 18px; }

.nav a { position: relative; }
.nav a:not(.lang)::after { position: absolute; right: 0; bottom: 2px; left: 0; height: 2px; content: ""; background: var(--blue); transform: scaleX(0); transform-origin: right; transition: transform .24s ease; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.button { transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0, 62, 135, .18); }
.service-card, .timeline article, .advantage-grid article, .pricing div, .news-card, .contact-card, .time-grid div { transition: transform .26s ease, box-shadow .26s ease, border-color .26s ease; }
.service-card:hover, .timeline article:hover, .advantage-grid article:hover, .pricing div:hover, .news-card:hover, .contact-card:hover, .time-grid div:hover { transform: translateY(-7px); border-color: #9bc9f7; box-shadow: 0 18px 36px rgba(0, 62, 135, .1); }
.hero-visual img { animation: hero-drift 5.5s ease-in-out infinite; }
.quote { animation: quote-rise 900ms 450ms both; }
.dormitory img { animation: image-drift 6s ease-in-out infinite; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 620ms ease var(--reveal-delay, 0ms), transform 620ms cubic-bezier(.2,.75,.25,1) var(--reveal-delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes hero-drift { 50% { transform: translateY(-10px); } }
@keyframes image-drift { 50% { transform: translateY(-7px) scale(1.01); } }
@keyframes quote-rise { from { opacity: 0; transform: translate(-50%, 18px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 2; }
  .hero-actions { justify-content: center; }
  .hero-visual { border-radius: 24px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 0; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .notice-grid, .advantage-grid, .pricing { grid-template-columns: repeat(2, 1fr); }
  .footer { grid-template-columns: 1fr; text-align: center; }
  .qr-list { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 760px) {
  .site-header { min-height: 76px; padding: 14px 20px; }
  .brand small { display: none; }
  .menu-toggle { display: block; }
  .nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; }
  .section { width: min(100% - 30px, 1180px); padding: 45px 0; }
  .hero { min-height: auto; padding-top: 18px; }
  .hero-visual { min-height: auto; padding: 0 26px 92px; }
  .hero-visual img { height: 310px; }
  .quote { bottom: 24px; font-size: 18px; }
  .service-grid, .process-grid, .logo-track { grid-template-columns: 1fr; }
  .timeline, .news-grid, .time-grid, .contact-grid { grid-template-columns: 1fr; }
  .notice-grid, .advantage-grid, .pricing, .dormitory, .form-section, .contact-form { grid-template-columns: 1fr; }
  .dormitory, .form-section { gap: 28px; padding: 28px; }
  .dormitory img { min-height: 240px; }
  .page-hero { min-height: 250px; padding: 56px 20px; }
  .page-hero h1, .article h1 { font-size: 34px; }
  .service-card img { width: 100%; }
}
