/* ================================================================
   HEXAGO LOGISTICS — VISUAL ENHANCEMENTS v2.0
   Preloader · Progress · Scroll Reveal · Particles · UI Extras
   ================================================================ */

/* ---- PRELOADER ---- */
#hexago-preloader {
  display: none !important;
}
#hexago-preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pre-hex-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin-bottom: 28px;
}
.pre-ring {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  animation: preRingSpin 1.1s linear infinite;
}
.pre-ring-1 { border-top-color: #FF6B35; }
.pre-ring-2 { inset: 12px; border-top-color: #0077b5; animation-duration: 0.8s; animation-direction: reverse; }
.pre-ring-3 { inset: 24px; border-top-color: rgba(255,255,255,0.6); animation-duration: 0.55s; }
@keyframes preRingSpin { to { transform: rotate(360deg); } }

.pre-brand {
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  animation: prePulse 1.2s ease-in-out infinite alternate;
}
.pre-brand span { color: #FF6B35; }
@keyframes prePulse { from { opacity: 0.55; } to { opacity: 1; } }

.pre-bar-wrap {
  width: 160px;
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  margin-top: 18px;
  overflow: hidden;
}
.pre-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6B35, #0077b5);
  border-radius: 10px;
  animation: preBarLoad 1.8s ease-in-out forwards;
}
@keyframes preBarLoad { from { width: 0; } to { width: 100%; } }

/* ---- READING PROGRESS BAR ---- */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #FF6B35, #e63946);
  z-index: 99998;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ---- BACK TO TOP ---- */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  z-index: 9001;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#back-to-top:hover { background: rgba(255, 107, 53, 0.85); box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3); transform: translateY(-4px); }

/* ---- FLOATING WHATSAPP/CALL BUTTON ---- */
.float-call {
  position: fixed;
  bottom: 90px;
  right: 28px;
  width: 54px;
  height: 54px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.55);
  z-index: 9001;
  animation: floatBob 3s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.float-call:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 32px rgba(37,211,102,0.7);
  color: #fff;
  animation: none;
}
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float-call .fc-tip {
  position: absolute;
  right: 62px;
  background: #1a1a2e;
  color: #fff;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  font-family: 'Inter', sans-serif;
}
.float-call:hover .fc-tip { opacity: 1; }

/* ---- SCROLL REVEAL ---- */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.75s ease, transform 0.75s ease;
}
[data-reveal="up"]    { transform: translateY(42px); }
[data-reveal="down"]  { transform: translateY(-32px); }
[data-reveal="left"]  { transform: translateX(-48px); }
[data-reveal="right"] { transform: translateX(48px); }
[data-reveal="fade"]  { transform: scale(0.94); }
[data-reveal].revealed { opacity: 1; transform: none; }

[data-stagger] > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-stagger] > *.revealed { opacity: 1; transform: none; }

/* ---- PARTICLES CANVAS (page-hero on inner pages) ---- */
.page-hero {
  position: relative;
  overflow: hidden;
}
.page-hero canvas.p-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.65;
}
.page-hero .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.page-hero .page-hero-content {
  position: relative;
  z-index: 3;
}

/* ---- HERO OVERLAY SHIMMER (index.html carousel) ---- */
.hero-slide .overlay {
  background: linear-gradient(
    135deg,
    rgba(0,0,0,0.52) 0%,
    rgba(0,40,85,0.44) 50%,
    rgba(0,0,0,0.52) 100%
  );
  background-size: 200% 200%;
  animation: heroShimmer 9s ease infinite;
}
@keyframes heroShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- GRADIENT TEXT ---- */
.gradient-text {
  background: linear-gradient(90deg, #FF6B35, #e63946, #0077b5, #FF6B35);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientFlow 4s linear infinite;
}
@keyframes gradientFlow {
  0%   { background-position: 0% center; }
  100% { background-position: 300% center; }
}

/* ---- SECTION HEADER ACCENT LINE ---- */
.section-header::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, #FF6B35, #e63946);
  border-radius: 3px;
  margin: 12px auto 0;
  animation: accentPulse 2.6s ease-in-out infinite alternate;
}
@keyframes accentPulse {
  from { width: 38px; opacity: 0.65; }
  to   { width: 80px; opacity: 1; }
}

/* ---- RIPPLE BASE (JS injects animation) ---- */
.reach-btn,
.cta-btn-primary,
.send-btn,
.sector-btn,
.services-cta a,
.unique-submit-btn {
  position: relative;
  overflow: hidden;
}

/* ---- STAT CARD GLOW ON HOVER ---- */
.stat-card {
  transition: transform 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}
.stat-card:hover {
  box-shadow: 0 14px 40px rgba(255,107,53,0.22);
}

/* ---- OWNER CARD IMAGE HOVER ---- */
.owner-image {
  transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}
.owner-card:hover .owner-image {
  box-shadow: 0 20px 45px rgba(0,119,181,0.38) !important;
}

/* ---- PAGE HERO BOTTOM FADE ---- */
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: linear-gradient(to top, #fff, transparent);
  pointer-events: none;
  z-index: 4;
}

/* ---- DETAIL ITEM ENHANCED ---- */
.detail-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.detail-item:hover {
  border-left-color: #004E89;
}

/* ---- BLOG CARD SHIMMER ---- */
.blog-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

/* ---- CONTACT FORM FOCUS GLOW ---- */
.form-control:focus,
.form-select:focus {
  border-color: #FF6B35 !important;
  box-shadow: 0 0 0 3px rgba(255,107,53,0.18) !important;
  outline: none;
}

/* ---- MOBILE (≤768px) ---- */
@media (max-width: 768px) {
  /* Preloader scaled for small screens */
  .pre-hex-wrap { width: 70px; height: 70px; margin-bottom: 20px; }
  .pre-brand    { font-size: 1.2rem; }
  .pre-bar-wrap { width: 130px; }

  /* Faster, shorter transitions on mobile */
  [data-reveal]       { transition-duration: 0.45s; }
  [data-stagger] > *  { transition-duration: 0.4s; }

  /* Smaller travel distance — looks better on small screens */
  [data-reveal="up"]    { transform: translateY(24px); }
  [data-reveal="left"]  { transform: translateX(-24px); }
  [data-reveal="right"] { transform: translateX(24px); }

  /* Buttons — safe tap target size (min 44px) */
  #back-to-top { bottom: 16px; right: 16px; width: 44px; height: 44px; font-size: 18px; }
  .float-call  { bottom: 70px; right: 16px; width: 48px; height: 48px; font-size: 22px; }
}

/* ---- SMALL PHONES (≤400px) ---- */
@media (max-width: 400px) {
  #back-to-top { width: 40px; height: 40px; font-size: 16px; bottom: 12px; right: 12px; }
  .float-call  { width: 44px; height: 44px; font-size: 20px; bottom: 62px; right: 12px; }
  .pre-hex-wrap { width: 60px; height: 60px; }
  .pre-brand    { font-size: 1.1rem; }
}

/* ---- TABLETS (769px – 1024px) ---- */
@media (min-width: 769px) and (max-width: 1024px) {
  [data-reveal] { transition-duration: 0.6s; }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  #hexago-preloader { display: none !important; }
  .float-call { animation: none !important; }
  .hero-slide .overlay { animation: none !important; }
  .gradient-text { animation: none !important; }
  .section-header::after { animation: none !important; }
  .pre-ring { animation: none !important; }
}
