:root {
  color-scheme: dark;
  --ink: #f6fbff;
  --muted: #9daabe;
  --line: rgba(128, 214, 255, 0.2);
  --paper: #080d14;
  --panel: rgba(15, 24, 36, 0.86);
  --panel-strong: #111b29;
  --soft: #0d1521;
  --accent: #4ad7ff;
  --accent-2: #8df0c8;
  --gold: #f4c76a;
  --rose: #ff6d8e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --hero-bg: url("assets/hero-education.jpg");
  --courses-bg: url("assets/courses/atmosphere-fmcg-marketing.jpg");
  --about-bg: url("assets/courses/atmosphere-3c-digital.jpg");
  --contact-bg: url("assets/courses/atmosphere-dairy-brand.jpg");
}

@supports (background-image: image-set(url("assets/hero-education.webp") type("image/webp"))) {
  :root {
    --hero-bg: image-set(url("assets/hero-education.webp") type("image/webp"), url("assets/hero-education.jpg") type("image/jpeg"));
    --courses-bg: image-set(url("assets/courses/atmosphere-fmcg-marketing.webp") type("image/webp"), url("assets/courses/atmosphere-fmcg-marketing.jpg") type("image/jpeg"));
    --about-bg: image-set(url("assets/courses/atmosphere-3c-digital.webp") type("image/webp"), url("assets/courses/atmosphere-3c-digital.jpg") type("image/jpeg"));
    --contact-bg: image-set(url("assets/courses/atmosphere-dairy-brand.webp") type("image/webp"), url("assets/courses/atmosphere-dairy-brand.jpg") type("image/jpeg"));
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(74, 215, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 8%, rgba(141, 240, 200, 0.12), transparent 30rem),
    linear-gradient(180deg, #060911 0%, #0a1019 44%, #070a10 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK",
    "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.65;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 16, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-picture {
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}

.brand-mark {
  display: block;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(74, 215, 255, 0.45);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 26px rgba(74, 215, 255, 0.25);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.main-nav a {
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.main-nav a.active,
.main-nav a[aria-current="page"] {
  border-color: rgba(74, 215, 255, 0.42);
  background: rgba(74, 215, 255, 0.12);
  color: var(--ink);
  box-shadow: 0 0 18px rgba(74, 215, 255, 0.14);
}

.lang-toggle {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(74, 215, 255, 0.34);
  border-radius: 8px;
  background: rgba(74, 215, 255, 0.1);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  min-height: calc(100vh - 190px);
}

.section {
  padding: clamp(42px, 6vw, 82px) clamp(18px, 4vw, 56px);
}

.container {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero {
  min-height: 680px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(6, 9, 17, 0.96) 0%, rgba(6, 9, 17, 0.82) 48%, rgba(6, 9, 17, 0.5) 100%),
    linear-gradient(180deg, rgba(6, 9, 17, 0.22), rgba(6, 9, 17, 0.78)),
    var(--hero-bg) center center/cover;
}

.hero-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 62px clamp(18px, 4vw, 56px);
}

.page-hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(6, 9, 17, 0.96) 0%, rgba(6, 9, 17, 0.84) 46%, rgba(6, 9, 17, 0.58) 100%),
    linear-gradient(180deg, rgba(6, 9, 17, 0.42), rgba(6, 9, 17, 0.86)),
    var(--hero-bg) center 42%/cover;
  position: relative;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 24%, rgba(74, 215, 255, 0.14), transparent 24rem),
    radial-gradient(circle at 78% 14%, rgba(141, 240, 200, 0.1), transparent 28rem);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero.courses-hero {
  background:
    linear-gradient(90deg, rgba(6, 9, 17, 0.96) 0%, rgba(6, 9, 17, 0.8) 48%, rgba(6, 9, 17, 0.5) 100%),
    linear-gradient(180deg, rgba(6, 9, 17, 0.32), rgba(6, 9, 17, 0.88)),
    var(--courses-bg) center 34%/cover;
}

.page-hero.about-hero {
  background:
    linear-gradient(90deg, rgba(6, 9, 17, 0.97) 0%, rgba(6, 9, 17, 0.82) 45%, rgba(6, 9, 17, 0.56) 100%),
    linear-gradient(180deg, rgba(6, 9, 17, 0.3), rgba(6, 9, 17, 0.86)),
    var(--about-bg) center 44%/cover;
}

.page-hero.contact-hero {
  background:
    linear-gradient(90deg, rgba(6, 9, 17, 0.97) 0%, rgba(6, 9, 17, 0.84) 50%, rgba(6, 9, 17, 0.6) 100%),
    linear-gradient(180deg, rgba(6, 9, 17, 0.36), rgba(6, 9, 17, 0.9)),
    var(--contact-bg) center 40%/cover;
}

.eyebrow {
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
}

h1,
h2,
h3 {
  line-height: 1.16;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 84px);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(27px, 4vw, 46px);
}

h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.lead {
  max-width: 780px;
  margin: 0 0 28px;
  color: #c1cbd9;
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-consult-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(720px, 100%);
  padding: 8px;
  border: 1px solid rgba(74, 215, 255, 0.28);
  border-radius: 8px;
  background: rgba(244, 248, 251, 0.09);
  box-shadow: var(--shadow);
}

.hero-consult-form input {
  min-width: 0;
  min-height: 56px;
  border: 0;
  padding: 15px 16px;
  border-radius: 6px;
  outline: 0;
  background: rgba(235, 241, 246, 0.94);
  color: #667085;
}

.hero-consult-form input::placeholder {
  color: #8f99a6;
}

.hero-consult-form .btn {
  width: auto;
  min-width: 132px;
  min-height: 56px;
  white-space: nowrap;
}

.hero-support-copy {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-tags span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cdd7e4;
  background: rgba(15, 24, 36, 0.72);
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: linear-gradient(135deg, #4ad7ff, #78ecc3);
  color: #071019;
  cursor: pointer;
  font-weight: 900;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-color: var(--line);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn.danger {
  background: rgba(255, 109, 142, 0.12);
  border-color: rgba(255, 109, 142, 0.4);
  color: #ffd9e2;
}

.btn.danger:hover {
  background: rgba(255, 109, 142, 0.18);
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-grid {
  margin-top: 24px;
  align-items: start;
}

.course-card,
.policy-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 29, 44, 0.94), rgba(12, 19, 30, 0.94));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.25);
}

.course-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto;
}

.course-media {
  display: block;
  height: 260px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #0d1118;
}

.course-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 260ms ease;
}

.course-media picture,
.detail-image picture {
  display: block;
  width: 100%;
  height: 100%;
}

.course-card:hover .course-media img {
  transform: scale(1.035);
}

.course-body {
  padding: 20px 22px 0;
}

.course-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin-bottom: 12px;
}

.course-title-row h3 {
  flex: 1;
  min-width: 220px;
  margin: 0;
}

.category {
  display: inline-flex;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(141, 240, 200, 0.32);
  border-radius: 6px;
  background: rgba(141, 240, 200, 0.1);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.course-card p,
.policy-block p,
.detail-list li {
  color: var(--muted);
}

.course-card p {
  margin: 0;
  line-height: 1.55;
}

.price {
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
}

.course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 22px;
}

.course-actions span:last-child,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 34px;
  align-items: start;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 36px;
  align-items: center;
}

.detail-hero {
  background:
    linear-gradient(135deg, rgba(74, 215, 255, 0.12), transparent 45%),
    linear-gradient(180deg, #0e1724, #080d14);
  border-bottom: 1px solid var(--line);
}

.detail-image {
  margin: 0;
  max-height: 680px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #05080d;
  box-shadow: var(--shadow);
}

.detail-image img {
  width: 100%;
  height: 100%;
  max-height: 680px;
  object-fit: cover;
  object-position: top center;
}

.policy-block {
  padding: 22px;
}

.policy-block.wide {
  grid-column: 1 / -1;
}

.policy-block p.delivery-coaching {
  color: var(--accent-2);
  font-weight: 900;
}

.course-detail-preview {
  padding: 0;
  overflow: hidden;
}

.course-detail-preview h2 {
  padding: 22px 22px 0;
}

.course-detail-preview picture {
  display: block;
  width: 100%;
}

.course-detail-preview img {
  width: 100%;
  max-height: 980px;
  object-fit: contain;
  object-position: top center;
  background: #0b111a;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.stat strong {
  display: block;
  color: var(--accent);
  font-size: 32px;
}

.detail-list {
  padding-left: 22px;
}

.checkout-box {
  position: static;
}

.checkout-box > picture {
  display: block;
}

.checkout-thumb {
  width: 100%;
  height: 440px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  object-position: top center;
}

.checkout-single {
  width: min(1120px, 100%);
}

.payment-section {
  padding-top: clamp(28px, 7vw, 72px);
}

.payment-card {
  max-width: 620px;
  margin: 0 auto;
}

.payment-card h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.payment-lead,
.payment-small {
  margin: 0;
  color: var(--muted);
}

.payment-summary {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.payment-summary div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.payment-summary span {
  color: var(--muted);
  font-size: 13px;
}

.payment-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.payment-card .btn {
  width: 100%;
}

.payment-small {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
}

.checkout-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 26px 0 16px;
}

.checkout-buy-row .price {
  margin: 0;
}

.checkout-buy-row .btn {
  min-width: 260px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(128, 214, 255, 0.22);
  border-radius: 8px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.92);
  color: #101821;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.notice {
  margin-top: 14px;
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  background: rgba(74, 215, 255, 0.1);
  color: #cfeeff;
}

.success {
  border-left-color: var(--accent-2);
  background: rgba(141, 240, 200, 0.1);
  color: #d8fff0;
}

.error {
  border-left-color: var(--rose);
  background: rgba(255, 109, 142, 0.12);
  color: #ffd9e2;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.compact-table table {
  min-width: 760px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: rgba(255, 255, 255, 0.05);
  color: #c8d3df;
}

.status {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(244, 199, 106, 0.14);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.status.paid,
.status.delivered {
  background: rgba(141, 240, 200, 0.12);
  color: var(--accent-2);
}

.status.failed,
.status.cancelled {
  background: rgba(255, 109, 142, 0.12);
  color: var(--rose);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.92);
}

.site-footer p {
  margin: 6px 0 0;
  color: var(--muted);
}

.footer-contact {
  max-width: 760px;
  font-size: 13px;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.loading-card {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.07) 48%, transparent 100%),
    var(--panel);
  background-size: 240% 100%;
  animation: loading-shimmer 1.3s ease-in-out infinite;
}

@keyframes loading-shimmer {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-layout {
  display: grid;
  gap: 18px;
}

.admin-panel {
  display: grid;
  gap: 14px;
}

.admin-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.admin-section-head h2 {
  margin-bottom: 6px;
}

.admin-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-course-form {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 29, 44, 0.94), rgba(12, 19, 30, 0.94));
}

.admin-course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-course-grid .span-2 {
  grid-column: span 2;
}

.admin-course-grid textarea {
  min-height: 90px;
}

.admin-form-actions,
.admin-pagination,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-form-actions {
  margin-top: 14px;
}

.admin-form-actions .notice {
  margin: 0;
}

.admin-pagination {
  justify-content: flex-end;
}

.admin-pagination span {
  color: var(--muted);
  font-size: 14px;
}

.table-btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

@media (max-width: 980px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid.two,
  .grid.three,
  .split,
  .detail-layout,
  .loading-grid,
  .stats,
  .admin-course-grid {
    grid-template-columns: 1fr;
  }

  .admin-course-grid .span-2 {
    grid-column: auto;
  }

  .hero {
    min-height: 620px;
    background:
      linear-gradient(180deg, rgba(6, 9, 17, 0.98) 0%, rgba(6, 9, 17, 0.88) 66%, rgba(6, 9, 17, 0.7) 100%),
      var(--hero-bg) center center/cover;
  }

}

@media (max-width: 560px) {
  .hero {
    align-items: start;
    min-height: auto;
  }

  .hero-inner {
    padding-top: 34px;
    padding-bottom: 46px;
  }

  .main-nav {
    width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    flex: 0 0 auto;
    padding: 6px 7px;
    font-size: 14px;
    white-space: nowrap;
  }

  .lang-toggle {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 10px;
    white-space: nowrap;
  }

  .brand {
    min-width: 0;
  }

  .hero-consult-form {
    gap: 8px;
    padding: 7px;
  }

  .hero-consult-form input {
    min-height: 52px;
    padding-inline: 12px;
  }

  .hero-consult-form .btn {
    min-width: 104px;
    min-height: 52px;
    padding-inline: 12px;
  }

  .course-actions,
  .course-actions span:last-child,
  .hero-actions,
  .checkout-buy-row {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .course-media {
    height: 240px;
  }

  .course-title-row h3 {
    min-width: 100%;
  }
}
