@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Montserrat:wght@500;600;700;800&display=swap");

:root {
  --zf-navy: #0b3c5d;
  --zf-blue: #1e6f9f;
  --zf-gold: #d4af37;
  --zf-surface: #f1f5f9;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .modal,
  .success-icon,
  .route-card,
  .service-card,
  .card-hover,
  .z-card,
  .call-now-fab,
  .call-now-fab__icon,
  .zalo-fab,
  .zalo-fab__icon {
    transition: none !important;
    animation: none !important;
  }
  .route-card:hover,
  .service-card:hover,
  .card-hover:hover,
  .z-card:hover {
    transform: none;
  }
  .hero-bg {
    background-attachment: scroll !important;
  }

  .call-now-fab:hover,
  .zalo-fab:hover {
    transform: none !important;
  }
}

body {
  font-family: "Lato", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.mobile-menu-open {
  overflow: hidden;
  touch-action: none;
}

/* Mobile full-screen nav */
.mobile-nav-overlay {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-link {
  display: block;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #d4af37;
}

.safe-top {
  padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
}

.heading-font {
  font-family: "Montserrat", sans-serif;
  letter-spacing: -0.02em;
}

::selection {
  background: rgba(212, 175, 55, 0.35);
  color: #0f172a;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--zf-gold);
  outline-offset: 2px;
}

/* ——— Header ——— */
.site-header {
  background: linear-gradient(
    180deg,
    rgba(11, 60, 93, 0.97) 0%,
    rgba(11, 60, 93, 0.92) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px -8px rgba(11, 60, 93, 0.55);
}

.site-header .lang-btn {
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.site-header .lang-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.12);
}

.lang-btn.active {
  background-color: var(--zf-gold);
  color: var(--zf-navy);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.35);
}

.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--zf-gold), rgba(212, 175, 55, 0.3));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ——— Hero (image + cinematic overlay) ——— */
.hero-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  isolation: isolate;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    125deg,
    rgba(11, 60, 93, 0.94) 0%,
    rgba(11, 60, 93, 0.78) 38%,
    rgba(30, 111, 159, 0.42) 62%,
    rgba(11, 60, 93, 0.88) 100%
  );
  pointer-events: none;
}

.hero-bg > * {
  position: relative;
  z-index: 1;
}

.hero-bg--home {
  background-image: url("https://source.unsplash.com/random/1920x1080/?cargo-ship-africa");
}

.hero-bg--about {
  background-image: url("https://source.unsplash.com/random/1920x1080/?logistics-africa-vietnam");
}

.hero-bg--routes {
  background-image: url("https://source.unsplash.com/random/1920x1080/?world-map-africa-asia");
}

.hero-bg--services {
  background-image: url("https://source.unsplash.com/random/1920x1080/?container-ship-port");
}

.hero-bg--contact {
  background-image: url("https://source.unsplash.com/random/1920x1080/?logistics-contact");
}

.hero-bg--project {
  background-image: url("https://source.unsplash.com/random/1920x1080/?heavy-machinery-port");
}

@media (min-width: 1024px) {
  .hero-bg {
    background-attachment: fixed;
  }
}

/* ——— Cards & motion ——— */
.route-card,
.service-card,
.card-hover {
  transition:
    transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1),
    box-shadow 0.4s ease,
    border-color 0.3s ease;
}

.route-card:hover,
.service-card:hover,
.card-hover:hover {
  transform: translateY(-10px);
  box-shadow:
    0 25px 50px -12px rgba(11, 60, 93, 0.22),
    0 0 0 1px rgba(212, 175, 55, 0.12);
}

.z-card {
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.z-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 45px -15px rgba(11, 60, 93, 0.15);
}

/* ——— Modal (index) ——— */
.modal {
  animation: modalFadeIn 0.35s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.success-icon {
  animation: successPop 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes successPop {
  0% {
    transform: scale(0.35);
  }
  55% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-footer a {
  transition: color 0.2s ease;
}

/* ——— Call Now floating button ——— */
.call-now-fab {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 9999px;
  background: linear-gradient(145deg, #e8c858 0%, var(--zf-gold) 45%, #b8922a 100%);
  color: var(--zf-navy);
  box-shadow:
    0 4px 18px rgba(11, 60, 93, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.25) inset;
  text-decoration: none;
  overflow: visible;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  animation: call-now-glow 2.5s ease-out infinite;
}

.call-now-fab:hover {
  transform: scale(1.08);
  animation: none;
  box-shadow:
    0 8px 28px rgba(11, 60, 93, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 0 24px rgba(212, 175, 55, 0.45);
}

.call-now-fab:active {
  transform: scale(0.96);
}

.call-now-fab__icon {
  font-size: 1.35rem;
  animation: call-now-ring 4.5s ease-in-out infinite;
}

@keyframes call-now-glow {
  0%,
  100% {
    box-shadow:
      0 4px 18px rgba(11, 60, 93, 0.35),
      0 0 0 0 rgba(212, 175, 55, 0.5),
      0 0 0 1px rgba(255, 255, 255, 0.25) inset;
  }
  55% {
    box-shadow:
      0 6px 26px rgba(11, 60, 93, 0.42),
      0 0 0 14px rgba(212, 175, 55, 0),
      0 0 0 1px rgba(255, 255, 255, 0.25) inset;
  }
}

@keyframes call-now-ring {
  0%,
  88%,
  100% {
    transform: rotate(0deg);
  }
  90% {
    transform: rotate(-14deg);
  }
  92% {
    transform: rotate(14deg);
  }
  94% {
    transform: rotate(-8deg);
  }
  96% {
    transform: rotate(0deg);
  }
}

@media (min-width: 768px) {
  .call-now-fab {
    width: 4.125rem;
    height: 4.125rem;
    bottom: 1.75rem;
    right: 1.75rem;
  }

  .call-now-fab__icon {
    font-size: 1.5rem;
  }

  .zalo-fab {
    width: 4.125rem;
    height: 4.125rem;
    right: 1.75rem;
    bottom: calc(1.75rem + 4.125rem + 0.75rem);
  }

  .zalo-fab__icon {
    width: 1.65rem;
    height: 1.65rem;
  }
}

/* ——— Zalo chat floating button ——— */
.zalo-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: calc(max(1rem, env(safe-area-inset-bottom, 0px)) + 3.75rem + 0.75rem);
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 9999px;
  background: linear-gradient(145deg, #2b8cff 0%, #0068ff 50%, #0054cc 100%);
  color: #fff;
  box-shadow:
    0 4px 18px rgba(0, 104, 255, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  text-decoration: none;
  overflow: visible;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  animation: zalo-fab-glow 2.8s ease-out infinite;
}

.zalo-fab:hover {
  transform: scale(1.08);
  animation: none;
  box-shadow:
    0 8px 28px rgba(0, 104, 255, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 0 26px rgba(0, 168, 255, 0.45);
}

.zalo-fab:active {
  transform: scale(0.96);
}

.zalo-fab__icon {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
  animation: zalo-icon-nudge 3.2s ease-in-out infinite;
}

@keyframes zalo-fab-glow {
  0%,
  100% {
    box-shadow:
      0 4px 18px rgba(0, 104, 255, 0.45),
      0 0 0 0 rgba(0, 168, 255, 0.55),
      0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  }
  50% {
    box-shadow:
      0 6px 26px rgba(0, 104, 255, 0.55),
      0 0 0 16px rgba(0, 168, 255, 0),
      0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  }
}

@keyframes zalo-icon-nudge {
  0%,
  82%,
  100% {
    transform: translateY(0) scale(1);
  }
  86% {
    transform: translateY(-3px) scale(1.06);
  }
  90% {
    transform: translateY(0) scale(1);
  }
  94% {
    transform: translateY(-2px) scale(1.04);
  }
}

