/* =========================================================
   BASE
========================================================= */

html,
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
}

body {
  overflow-x: hidden;
  background: #0d1117;
  color: #ffffff;
}

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

/* =========================================================
   HERO BACKGROUND
========================================================= */

.hero-bg {
  background-image:
    radial-gradient(
      circle at 15% 20%,
      rgba(213, 184, 115, 0.1),
      transparent 38%
    ),
    radial-gradient(
      circle at 85% 25%,
      rgba(213, 184, 115, 0.08),
      transparent 42%
    ),
    radial-gradient(
      circle at 60% 90%,
      rgba(37, 99, 235, 0.1),
      transparent 48%
    ),
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.03),
      transparent 40%
    ),
    linear-gradient(
      to bottom,
      rgba(13, 17, 23, 0.96),
      rgba(13, 17, 23, 1)
    );
}

/* =========================================================
   UTILITIES
========================================================= */

.text-justify {
  text-align: justify;
  text-justify: inter-word;
}

.iconbtn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mini svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

#langToggle {
  min-width: 88px;
}

/* =========================================================
   BUTTONS
========================================================= */

.btn-gold,
.btn-gold-outline {
  font-weight: 800;
  transition:
    background 0.28s ease,
    color 0.28s ease,
    border-color 0.28s ease,
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.btn-gold {
  background: #d5b873;
  color: #0d1117;
  border: 2px dashed rgba(213, 184, 115, 0.95);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.btn-gold:hover {
  background: #e2c57f;
  transform: translateY(-1px);

  box-shadow:
    0 0 0 1px rgba(213, 184, 115, 0.45),
    0 18px 50px rgba(0, 0, 0, 0.55);
}

.btn-gold-outline {
  background: transparent;
  color: #d5b873;
  border: 2px dashed rgba(213, 184, 115, 0.95);
}

.btn-gold-outline:hover {
  background: rgba(213, 184, 115, 0.08);
  transform: translateY(-1px);

  box-shadow:
    0 0 0 1px rgba(213, 184, 115, 0.28),
    0 14px 40px rgba(0, 0, 0, 0.45);
}

/* =========================================================
   CARD SYSTEM
========================================================= */

.kaen-card {
  background: rgba(26, 31, 58, 0.55);
  border: 1px solid #2d3748;

  transition:
    border-color 0.28s ease,
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.kaen-card:hover {
  border-color: rgba(213, 184, 115, 0.82);

  transform: translateY(-2px);

  box-shadow:
    0 0 0 1px rgba(213, 184, 115, 0.18),
    0 18px 50px rgba(0, 0, 0, 0.55);
}

/* =========================================================
   CUSTOM BULLETS
========================================================= */

.sec-bullet::before {
  content: "●";
  color: #d5b873;
  margin-right: 10px;
  font-size: 12px;
  position: relative;
  top: -1px;
}

/* =========================================================
   PROJECT CARD SYSTEM
========================================================= */

.project-card {
  position: relative;

  flex: 0 0 calc(25% - 15px);
  width: calc(25% - 15px);
  min-width: calc(25% - 15px);

  height: 220px;

  overflow: hidden;
  border-radius: 22px;

  background: #111827;
  border: 1px solid rgba(255,255,255,0.06);

  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  transition: transform 0.45s ease;
}

/* =========================================================
   OVERLAY
========================================================= */

.project-overlay {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  padding: 16px 14px;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.78),
    rgba(0,0,0,0.25),
    transparent
  );

  backdrop-filter: blur(1px);
}

/* =========================================================
   TITLE
========================================================= */

.project-card .title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;

  color: #fff;

  text-align: center;

  overflow-wrap: break-word;
}

/* =========================================================
   HOVER
========================================================= */

.project-card:hover {
  transform: translateY(-5px);

  border-color: rgba(213, 184, 115, 0.55);

  box-shadow:
    0 18px 45px rgba(0,0,0,0.38);
}

.project-card:hover img {
  transform: scale(1.04);
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

  .project-card {
    flex-basis: calc(50% - 10px);
    width: calc(50% - 10px);
    min-width: calc(50% - 10px);

    height: 210px;
  }

}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

  .project-card {
    flex-basis: 82%;
    width: 82%;
    min-width: 82%;

    height: 210px;
  }

  .project-overlay {
    padding: 14px 12px;
  }

  .project-card .title {
    font-size: 16px;
  }

}

/* =========================================================
   GLOBAL RESPONSIVE FIXES
========================================================= */

html,
body,
section {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

  .max-w-6xl,
  .max-w-7xl {
    padding-left: 20px;
    padding-right: 20px;
  }

  #one-stop .grid.md\:grid-cols-4,
  #services .md\:grid-cols-3,
  #management .md\:grid-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    flex-basis: calc(50% - 10px);
    width: calc(50% - 10px);
    min-width: calc(50% - 10px);
    height: 220px;
  }

  #ongoingTrack,
  #upcomingTrack,
  #completedTrack {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

  .max-w-6xl,
  .max-w-7xl,
  section .max-w-6xl,
  section .max-w-7xl {
    padding-left: 18px;
    padding-right: 18px;
  }

  section .py-14 {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }

  h1 {
    font-size: 32px !important;
    line-height: 1.05 !important;
  }

  h2 {
    font-size: 30px !important;
    line-height: 1.15 !important;
  }

  p {
    line-height: 1.7;
    word-break: break-word;
  }

  html[lang="zh"] p,
  html[lang="zh"] div,
  html[lang="zh"] span {
    line-height: 1.65;
  }

  html[lang="zh"] h1 .text-kaen-gold {
    margin-top: -12px !important;
  }

  #one-stop .flex.items-end.justify-between,
  #services .flex.items-end.justify-between,
  #projects .flex.items-end.justify-between,
  #management .flex.items-end.justify-between,
  #faq .flex.items-end.justify-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  #one-stop .grid.md\:grid-cols-4,
  #services .md\:grid-cols-3,
  #services .md\:grid-cols-2,
  #management .md\:grid-cols-3,
  #faq .md\:grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .hero-bg .grid.grid-cols-1.sm\:flex,
  .hero-bg .grid.grid-cols-1.sm\:flex a {
    width: 100%;
  }

  .iconbtn {
    width: 42px;
    height: 42px;
    padding: 0 !important;
    justify-content: center;
  }

  .iconbtn span.hidden.sm\:inline {
    display: none !important;
  }

  #ongoingTrack,
  #upcomingTrack,
  #completedTrack {
    gap: 12px;
    padding-left: 4px;
    padding-right: 18px;
  }

  .project-card {
    flex-basis: 88%;
    width: 88%;
    min-width: 88%;
    height: 220px;
    border-radius: 22px;
  }

  .project-card img {
    height: 100%;
  }

  .project-overlay {
    padding: 12px 10px;
  }

  .project-card .title {
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
  }

  #ongoingPrev,
  #ongoingNext,
  #upcomingPrev,
  #upcomingNext,
  #completedPrev,
  #completedNext {
    width: 34px;
    height: 34px;
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.08);
  }

  #ongoingPrev,
  #upcomingPrev,
  #completedPrev {
    left: -6px;
  }

  #ongoingNext,
  #upcomingNext,
  #completedNext {
    right: -6px;
  }

  footer .max-w-6xl {
    align-items: center !important;
    text-align: center;
    gap: 20px;
  }

  footer .flex.items-center.gap-3 {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  footer img {
    height: 26px;
  }

  footer .text-sm {
    text-align: center;
    line-height: 1.7;
  }

  footer .flex-wrap {
    justify-content: center;
    row-gap: 10px;
    column-gap: 18px;
  }

  footer a {
    white-space: nowrap;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

  h1 {
    font-size: 30px !important;
  }

  h2 {
    font-size: 28px !important;
  }

  .btn-gold,
  .btn-gold-outline {
    width: 100%;
  }

  .project-card {
    flex-basis: 90%;
    width: 90%;
    min-width: 90%;
    height: 205px;
  }

  .project-card .title {
    font-size: 15px;
  }
}