body#page-top,
body#page-top p,
body#page-top h1,
body#page-top h2,
body#page-top h3,
body#page-top h4,
body#page-top h5,
body#page-top h6,
body#page-top li,
body#page-top a,
body#page-top span,
body#page-top strong,
body#page-top em,
body#page-top small {
  word-break: keep-all;
  overflow-wrap: break-word;
}

header.masthead {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

header.masthead .masthead-bg-layer {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transform: scale(1.4);
  transition: opacity 1.2s ease;
  will-change: transform, opacity;
  z-index: 0;
}

header.masthead .masthead-bg-layer.is-active {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 1.2s ease,
    transform 4s linear;
}

header.masthead .content-wrap {
  position: relative;
  z-index: 3;
}

header.masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.05) 40%,
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.slide-controls {
  position: static;

  margin-top: 4rem;
  display: flex;
  justify-content: start;
  gap: 1.5rem;
  z-index: 2;
}

.slide-btn {
  width: auto;
  height: auto;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  padding: 0.25rem 0.75rem;
  border-bottom: 2px solid transparent;
  transition:
    border-color 0.3s ease,
    color 0.3s ease;
}

.slide-btn:hover {
  border-color: #fff;
  color: #fff;
  background: none;
  transform: none;
}

#slide-pager {
  display: flex;
  gap: 1rem;
}

.pager-dot {
  width: 100px;
  height: 3px;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.pager-dot.active {
  background: #fff;
}

header.masthead .content-wrap {
  position: absolute;
  top: 30vh;
  left: 200px;
  width: 100%;
  margin: 0;
}

.navbar-brand .logo-img {
  width: 25px;
  vertical-align: -6px;
}

@media (max-width: 768px) {
  header.masthead .content-wrap {
    top: 40vh;
    left: 20px;
    right: auto;
  }

  .navbar-brand .logo-img {
    width: 30px !important;
  }

  .navbar-brand span {
    font-size: 1.2rem !important;
    vertical-align: 3px;
  }
}

#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #0d6efd;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease-in-out,
    visibility 0.3s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}

#scrollDownIndicator {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 998;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  text-decoration: none;
  opacity: 1;
  transition:
    opacity 0.4s ease-in-out,
    visibility 0.4s ease-in-out;
  visibility: visible;
}

#scrollDownIndicator.hide {
  opacity: 0;
  visibility: hidden;
}

#scrollDownIndicator .fa-computer-mouse {
  font-size: 2.5rem;
}

#scrollDownIndicator .fa-chevron-down {
  display: block;
  font-size: 1.2rem;
  margin-top: -5px;
  animation: app-start-bounce 2s infinite;
}

@keyframes app-start-bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-15px);
  }
  60% {
    transform: translateY(-8px);
  }
}

.bg-tm {
  background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bg-cm {
  background: linear-gradient(135deg, #0f5132 0%, #198754 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bg-pm {
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bg-am {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.service-card {
  color: #fff;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    filter 0.3s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  filter: brightness(1.05);
}

.metric-cards {
  margin-top: 0.4rem;
}

.metric-card {
  height: 122px;
  border-radius: 16px;
  padding: 0.9rem 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.14);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.metric-card-1 {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
}

.metric-card-2 {
  background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
}

.metric-card-3 {
  background: linear-gradient(145deg, #ecfeff 0%, #cffafe 100%);
}

.metric-card-4 {
  background: linear-gradient(145deg, #fdf4ff 0%, #fae8ff 100%);
}

.metric-title {
  margin: 0 0 0.55rem 0;
  color: #0f172a;
  font-size: 1.02rem;
  line-height: 1.25;
}

.metric-value {
  margin: 0;
  color: #334155;
  font-size: 0.8rem;
  line-height: 1.35;
}

.gradient-icon {
  font-size: 3rem;
  background: linear-gradient(135deg, #00ffa3, #00b3ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.list-group-item {
  border-left: 0 !important;
  border-right: 0 !important;
}

.list-group-item a:hover {
  color: #0d6efd;
}

.notice-modal {
  --notice-ink: #0f172a;
  --notice-muted: #475569;
  --notice-border: #e2e8f0;
  --notice-bg: #f8fafc;
  --notice-accent: #2563eb;
}

.notice-modal .modal-dialog {
  max-width: 860px;
}

.notice-modal-content {
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, var(--notice-bg) 100%);
}

.notice-modal-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 65%, #2563eb 100%);
  padding: 1.15rem 1.4rem;
  border-bottom: 0;
}

.notice-modal-title {
  color: #f8fafc;
  font-size: 1.15rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-right: 0.75rem;
}

.notice-modal-body {
  color: var(--notice-ink);
  line-height: 1.72;
  font-size: 1rem;
  padding: 1.5rem 1.5rem 1rem;
}

.notice-modal-body h5 {
  color: #0b3b94;
  font-size: 1.06rem;
  line-height: 1.5;
}

.notice-modal-body p {
  color: var(--notice-muted);
  margin-bottom: 0.9rem;
}

.notice-modal-body ul {
  padding-left: 1.2rem;
  color: var(--notice-muted);
}

.notice-modal-body li {
  margin-bottom: 0.5rem;
}

.notice-modal-body .update-item {
  margin-top: 1.1rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--notice-border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.notice-modal-body .update-item h5 {
  margin-bottom: 0.45rem;
}

.notice-modal-body .notice-ending {
  margin-top: 1.1rem;
  padding-left: 0.8rem;
  border-left: 3px solid rgba(37, 99, 235, 0.32);
}

.notice-modal-footer {
  border-top: 1px solid var(--notice-border);
  background: #ffffff;
  padding: 0.95rem 1.5rem 1.2rem;
}

.notice-close-btn {
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.92rem;
  background: #0f172a;
  border-color: #0f172a;
}

.notice-close-btn:hover {
  background: #1e293b;
  border-color: #1e293b;
}

@media (max-width: 991.98px) {
  #mainNav {
    background-color: #fff !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
  }

  #mainNav .navbar-brand,
  #mainNav .navbar-nav .nav-item .nav-link {
    color: #212529 !important;
  }

  #mainNav .navbar-collapse {
    margin-top: 0.65rem;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 12px;
    padding: 0.55rem 0.8rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  }
}

@media (max-width: 768px) {
  header.masthead {
    min-height: 72svh;
  }

  header.masthead .content-wrap {
    top: 50%;
    left: 1rem;
    right: 1rem;
    width: auto;
    transform: translateY(-50%);
  }

  header.masthead .content-wrap .fs-3 {
    font-size: 1.35rem !important;
  }

  header.masthead .content-wrap .fs-1 {
    font-size: 2rem !important;
    line-height: 1.2;
  }

  header.masthead .content-wrap .fs-5 {
    font-size: 1.02rem !important;
    line-height: 1.45;
  }

  header.masthead .content-wrap .btn-lg {
    font-size: 0.95rem;
    padding: 0.65rem 1.05rem;
  }

  .slide-controls {
    margin-top: 1.4rem;
  }

  .pager-dot {
    width: 56px;
  }

  #scrollDownIndicator {
    display: none;
  }

  .page-section {
    padding: 3.2rem 0;
  }

  #about h2,
  #services h2,
  #strengths h2,
  #timeline h2,
  #notice h2 {
    font-size: 1.58rem;
    line-height: 1.35;
  }

  #about h5,
  #services h5,
  #strengths h5,
  #timeline h5 {
    font-size: 0.98rem;
    line-height: 1.55 !important;
  }

  #services .service-card {
    height: auto !important;
    min-height: 280px;
    padding: 1.25rem !important;
    margin-bottom: 0.9rem;
  }

  #services .row.gx-4.gx-lg-5 {
    row-gap: 1.15rem;
  }

  .metric-cards {
    margin-top: 0.65rem;
    --bs-gutter-x: 0.32rem;
    --bs-gutter-y: 0.32rem;
  }

  .metric-card {
    height: 92px;
    border-radius: 12px;
    padding: 0.52rem 0.2rem 0.48rem;
  }

  .metric-title {
    font-size: 0.78rem;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
  }

  .metric-value {
    font-size: 0.62rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
  }

  #services .service-card img {
    width: 92px !important;
    height: 92px !important;
  }

  #services .mt-4.text-start {
    margin-top: 1rem !important;
    font-size: 0.9rem;
    line-height: 1.65 !important;
  }

  #strengths .rounded-circle {
    max-width: 132px !important;
  }

  #strengths .gradient-icon {
    font-size: 2.45rem !important;
  }

  #strengths p.text-muted {
    font-size: 0.92rem;
  }

  .row.row-cols-3.row-cols-lg-5.g-0 .d-flex {
    height: 92px !important;
  }

  .row.row-cols-3.row-cols-lg-5.g-0 img {
    padding: 0.75rem !important;
  }

  #timeline .timeline > li {
    margin-bottom: 2.3rem;
  }

  #notice .list-group {
    font-size: 0.92rem !important;
  }

  #notice .list-group-item {
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
  }

  footer .col-lg-8 > div {
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .notice-modal-header {
    padding: 1rem 1rem;
  }

  .notice-modal-title {
    font-size: 1.02rem;
  }

  .notice-modal-body {
    padding: 1.1rem 1rem 0.8rem;
    font-size: 0.95rem;
    line-height: 1.66;
  }

  .notice-modal-footer {
    padding: 0.8rem 1rem 1rem;
  }
}
