/* ============================================================
   IKT Homepage — Hand-coded styles (no Bricks dependency)
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --ikt-primary:  #32a2c1;
  --ikt-base:     #0a2434;
  --ikt-black:    #212121;
  --ikt-white:    #ffffff;
  --ikt-gray:     #f5f5f5;
  --ikt-text-muted: #616161;
  --ikt-shadow:   4px 4px 20px rgba(0,0,0,.12);
  --ikt-radius:   10px;
  --ikt-nav-h:    40px;
  --ikt-font:     -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body.ikt-homepage {
  font-family: var(--ikt-font);
  color: var(--ikt-black);
  background: var(--ikt-white);
  overflow-x: hidden;
}
body.ikt-homepage img { max-width: 100%; display: block; }
body.ikt-homepage a  { color: inherit; text-decoration: none; }
body.ikt-homepage ul { list-style: none; }

/* ---------- Skip link ---------- */
.ikt-skip { position: absolute; left: -999px; }
.ikt-skip:focus { left: 10px; top: 10px; z-index: 99999; background: #fff; padding: 8px 16px; }

/* ============================================================
   HEADER — floating pill nav
   ============================================================ */
.ikt-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  pointer-events: none; /* let clicks pass through transparent area */
}

/* The pill */
.ikt-nav-pill {
  pointer-events: all;
  position: fixed;
  top: 30px;
  width: 500px;
  height: var(--ikt-nav-h);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: var(--ikt-white);
  border-radius: var(--ikt-radius);
  box-shadow: var(--ikt-shadow);
  padding: 0 8px;
  z-index: 10001;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s ease;
}
.ikt-nav-pill.nav--hidden {
  transform: translateY(-110px);
  opacity: 0;
  pointer-events: none;
}

/* Logo block inside pill */
.ikt-nav-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 0;
  margin-right: 15px;
  height: var(--ikt-nav-h);
  width: 100px;
  justify-content: flex-end;
}
.ikt-nav-logo img {
  width: 35px;
  padding: 8px 2px;
}
.ikt-nav-logo-text {
  padding: 8px 2px;
  font-weight: 600;
  color: var(--ikt-black);
  font-size: 14px;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Hamburger button */
.ikt-hamburger {
  width: var(--ikt-nav-h);
  height: var(--ikt-nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  color: var(--ikt-black);
  margin-left: 5px;
  flex-shrink: 0;
}
.ikt-hamburger svg { width: 18px; height: 18px; }
.ikt-hamburger .icon-close { display: none; }
.ikt-hamburger[aria-expanded="true"] .icon-open  { display: none; }
.ikt-hamburger[aria-expanded="true"] .icon-close { display: block; }

/* ============================================================
   OFF-CANVAS MENU
   ============================================================ */
.ikt-offcanvas {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.ikt-offcanvas[aria-hidden="false"] {
  transform: translateY(0);
}

/* Off-canvas inner */
.ikt-offcanvas-inner {
  padding: 20px 40px 40px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Off-canvas top bar (close | brand center | spacer) */
.ikt-offcanvas-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: var(--ikt-nav-h);
  margin-bottom: 30px;
  position: relative;
}
.ikt-offcanvas-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--ikt-nav-h);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.ikt-offcanvas-logo img { width: 35px; }
.ikt-offcanvas-logo-text {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  padding-left: 4px;
}
.ikt-close {
  width: var(--ikt-nav-h);
  height: var(--ikt-nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ikt-black);
  padding: 10px;
}
.ikt-close svg { width: 18px; height: 18px; }

/* Off-canvas nav menu */
.ikt-offcanvas-nav ul {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.ikt-offcanvas-nav > ul > li > a,
.ikt-offcanvas-nav > ul > li > details > summary {
  font-size: 30px;
  font-weight: 300;
  color: var(--ikt-black);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}
.ikt-offcanvas-nav > ul > li > details > summary::-webkit-details-marker { display: none; }
.ikt-offcanvas-nav > ul > li > details > summary svg {
  width: 14px; height: 14px;
  transition: transform .2s;
  flex-shrink: 0;
}
.ikt-offcanvas-nav > ul > li > details[open] > summary svg {
  transform: rotate(180deg);
}
.ikt-offcanvas-nav .sub-menu {
  padding: 0 22px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ikt-offcanvas-nav .sub-menu a {
  font-size: 22px;
  font-weight: 200;
  color: var(--ikt-black);
  line-height: 3;
  letter-spacing: 1px;
  display: block;
  text-align: center;
}
.ikt-offcanvas-nav .sub-menu a:hover { color: var(--ikt-primary); }

/* Off-canvas footer secondary nav */
.ikt-offcanvas-footer-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 32px 0 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: auto;
}
.ikt-offcanvas-footer-nav a {
  font-size: 13px;
  color: var(--ikt-text-muted);
  letter-spacing: 0.5px;
}
.ikt-offcanvas-footer-nav a:hover { color: var(--ikt-primary); }

/* Backdrop */
.ikt-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 9999;
}
.ikt-backdrop.is-active { display: block; }

/* ============================================================
   MAIN
   ============================================================ */
.ikt-main { padding-top: 0; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.ikt-hero {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  overflow: hidden;
}

.ikt-hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 60px 60px;
}

.ikt-hero-cat {
  display: inline-block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ikt-primary);
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.ikt-hero-cat a:hover { text-decoration: underline; }

.ikt-hero-title {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--ikt-black);
  margin-bottom: 24px;
}

.ikt-hero-excerpt {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ikt-text-muted);
  margin-bottom: 32px;
}

.ikt-hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--ikt-text-muted);
}
.ikt-hero-views { display: flex; align-items: center; gap: 4px; }

.ikt-hero-img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  overflow: hidden;
}
.ikt-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.ikt-hero:hover .ikt-hero-img img {
  transform: scale(1.03);
}

/* ============================================================
   SLIDER SECTION
   ============================================================ */
.ikt-slider-section {
  padding: 40px 0;
  background: var(--ikt-white);
  overflow: hidden;
}

/* Splide overrides */
.ikt-slider .splide__slide {
  padding: 0 8px;
}
.ikt-slider .splide__track {
  padding: 8px 0 !important;
}
.ikt-slide-card {
  cursor: pointer;
  display: block;
  overflow: hidden;
}
.ikt-slide-card:hover .ikt-slide-img img {
  transform: scale(1.05);
}
.ikt-slide-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.ikt-slide-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.ikt-slide-info {
  padding: 12px 4px;
}
.ikt-slide-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ikt-black);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.ikt-slide-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--ikt-text-muted);
}

/* ============================================================
   BANNER SECTION
   ============================================================ */
.ikt-banner {
  width: 100%;
  display: block;
}
.ikt-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
.ikt-footer {
  background: var(--ikt-white);
  border-top: 1px solid #eee;
  padding: 48px 40px 32px;
}

.ikt-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Footer top row: logo + desc */
.ikt-footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ikt-footer-brand img { width: 48px; height: auto; }
.ikt-footer-brand-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--ikt-black);
}
.ikt-footer-desc {
  font-size: 14px;
  color: var(--ikt-text-muted);
  line-height: 1.7;
  max-width: 480px;
}

/* Footer bottom row */
.ikt-footer-bottom {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}
.ikt-footer-copy {
  font-size: 13px;
  color: var(--ikt-text-muted);
}

/* Social icons */
.ikt-social {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ikt-social a, .ikt-social span {
  font-size: 20px;
  color: var(--ikt-text-muted);
  transition: color .2s;
}
.ikt-social a:hover { color: var(--ikt-primary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .ikt-nav-pill { width: 300px; }

  .ikt-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .ikt-hero-text {
    padding: 120px 24px 40px;
    order: 1;
  }
  .ikt-hero-img {
    order: 0;
    min-height: 260px;
  }

  .ikt-offcanvas-inner { padding: 16px 24px 32px; }
  .ikt-offcanvas-nav > ul { gap: 10px; }
  .ikt-offcanvas-nav > ul > li > a,
  .ikt-offcanvas-nav > ul > li > details > summary { font-size: 20px; }

  .ikt-footer { padding: 40px 24px 24px; }
  .ikt-footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 478px) {
  .ikt-nav-pill { width: calc(100% - 140px); }
  .ikt-hero-text { padding: 100px 16px 32px; }
  .ikt-hero-title { font-size: 1.3rem; }
  .ikt-offcanvas-nav > ul > li > a,
  .ikt-offcanvas-nav > ul > li > details > summary { font-size: 18px; }
  .ikt-offcanvas-nav .sub-menu a { font-size: 18px; }
}
