/* ============================================================
   Logistics Site - Base Styles
   Original design system (not derived from any reference site)
   ============================================================ */

:root {
  /* Official Ember Ascend Logistics brand colors */
  --navy: #0d1d3a;         /* dark navy - used for gradients/secondary dark surfaces */
  --navy-dark: #0b0b0f;    /* near-black - primary dark background, footer, topbar */
  --amber: #d4af37;        /* brand gold - primary accent */
  --amber-dark: #a5882a;   /* darker gold - hover states (derived from brand gold) */
  --amber-bright: #dec369; /* lighter gold - highlights/glow (derived from brand gold) */
  --silver: #c9ced6;       /* brand silver - secondary accent on dark backgrounds */
  --gray-50: #f7f9fb;
  --gray-100: #eef1f5;
  --gray-300: #cbd3dd;
  --gray-600: #5b6b7c;
  --gray-800: #263241;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(0,0,0,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; margin: 0 0 .6em; color: var(--navy); }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---- Top bar ---- */
.topbar { background: var(--navy-dark); color: var(--gray-300); font-size: .82rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 8px 24px; gap: 16px; flex-wrap: wrap; }
.topbar-rates strong { color: var(--amber); font-weight: 600; margin-left: 8px; }
.topbar-rates .ticker-updated { opacity: .65; font-size: .74rem; margin-left: 4px; }
.ticker-trend.up { color: #4caf50; }
.ticker-trend.down { color: #e05252; }
.ticker-trend.flat { color: var(--silver); }
.topbar-lang a { margin-left: 8px; padding: 2px 6px; border-radius: 4px; }
.topbar-lang a.active { background: var(--amber); color: var(--navy-dark); font-weight: 700; }

/* ---- Header ---- */
.site-header { background: var(--navy-dark); box-shadow: 0 2px 14px rgba(0,0,0,.4); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 24px; gap: 24px; }
.logo img { height: 52px; }
.logo-text { font-size: 1.4rem; font-weight: 800; color: var(--white); }
.main-nav { display: flex; align-items: center; gap: 22px; flex: 1; justify-content: center; }
.main-nav > a { font-weight: 600; font-size: .95rem; color: var(--silver); padding: 8px 0; position: relative; }
.main-nav > a.active, .main-nav > a:hover { color: var(--amber); }
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--navy-dark); box-shadow: var(--shadow); border-radius: var(--radius); min-width: 220px; padding: 8px; border: 1px solid rgba(255,255,255,.08); }
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 10px 12px; border-radius: 6px; font-weight: 500; font-size: .9rem; color: var(--silver); }
.dropdown-menu a:hover { background: rgba(255,255,255,.06); color: var(--amber); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--white); }

.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: .9rem; cursor: pointer; border: 2px solid transparent; transition: all .15s ease; }
.btn-primary { background: var(--amber); color: var(--navy-dark); }
.btn-primary:hover { background: var(--amber-dark); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-dark); }

/* ---- Hero ---- */
.hero { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-dark) 100%); color: var(--white); padding: 90px 0; position: relative; overflow: hidden; }
.hero-inner { max-width: 640px; }
.hero .eyebrow { color: var(--amber); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
.hero h1 { color: var(--white); font-size: 2.6rem; margin-top: 10px; }
.hero p.lead { color: var(--gray-300); font-size: 1.1rem; max-width: 520px; }
.hero-actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- Service cards ---- */
.section { padding: 70px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .eyebrow { color: var(--amber-dark); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .15s ease; }
.card:hover { transform: translateY(-4px); }
.card .icon { width: 52px; height: 52px; margin-bottom: 16px; }

/* ---- Stat tiles (trade data page) ---- */
.stat-tile { text-align: center; }
.stat-tile .stat-value { font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat-tile .stat-label { color: var(--gray-600); font-size: .88rem; margin-top: 6px; }
.trade-list { list-style: none; padding: 0; margin: 0; }
.trade-list li { padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: .93rem; color: var(--gray-800); }

/* ---- Feature cards (Services page "Why Ember Ascend" grid) ---- */
.feature-card { text-align: center; }
.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-dark);
}
.feature-icon svg { width: 30px; height: 30px; }
.feature-card h3 { font-size: 1.1rem; }
.feature-card p { color: var(--gray-600); font-size: .92rem; margin-bottom: 0; }
.trade-list li:last-child { border-bottom: none; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--gray-600); font-size: .95rem; margin-bottom: 12px; }
.card a.more { font-weight: 700; color: var(--amber-dark); font-size: .88rem; }

/* ---- About / split section ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.bg-tint { background: var(--gray-50); }

/* ---- Certifications strip ---- */
.cert-strip { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: center; padding: 40px 0; }
.cert-strip img { max-height: 60px; width: auto; opacity: .85; filter: grayscale(20%); }

/* ---- Forms ---- */
.form-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; max-width: 780px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: .88rem; color: var(--gray-800); }
input, select, textarea { padding: 12px 14px; border: 1px solid var(--gray-300); border-radius: 8px; font-family: var(--font); font-size: .95rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,138,0,.15); }
textarea { resize: vertical; min-height: 110px; }
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: .92rem; }
.alert-success { background: #e6f7ee; color: #1a7a45; border: 1px solid #b9e8cd; }
.alert-error { background: #fdeaea; color: #b3261e; border: 1px solid #f5c2c0; }

/* ---- Container types grid ---- */
.container-card { display: flex; gap: 18px; background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.container-card img { width: 110px; height: 90px; object-fit: cover; border-radius: 8px; background: var(--gray-100); }
.container-card .specs { font-size: .82rem; color: var(--gray-600); margin-top: 6px; }

/* ---- Footer ---- */
.site-footer { background: var(--navy-dark); color: var(--gray-300); padding: 56px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.footer-col a { display: inline-block; color: var(--gray-300); font-size: .9rem; margin-bottom: 8px; }
.footer-col a:hover { color: var(--amber); }
.social-links a { margin-right: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 24px; font-size: .82rem; text-align: center; color: var(--gray-600); }

/* ---- WhatsApp float ---- */
.whatsapp-float { position: fixed; bottom: 24px; right: 24px; background: #25d366; width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 100; }

/* ---- Animated mascot ---- */
@keyframes mascotFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}
@keyframes mascotWiggle {
  0%, 100% { transform: scale(1.08) rotate(0deg); }
  25%      { transform: scale(1.08) rotate(-8deg); }
  75%      { transform: scale(1.08) rotate(8deg); }
}
@keyframes mascotPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.85); }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Floating corner helper (all pages) */
.mascot-corner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}
.mascot-corner img {
  width: 92px;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.4));
  animation: mascotFloat 4s ease-in-out infinite;
  transition: transform .2s ease;
  transform-origin: bottom center;
}
.mascot-corner:hover img { animation: mascotWiggle .6s ease-in-out infinite; }
.mascot-corner:active img { animation: mascotPop .4s ease; }
.mascot-tooltip {
  position: absolute;
  bottom: 100%;
  margin-bottom: 12px;
  background: var(--navy-dark);
  color: var(--white);
  padding: 9px 16px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: all .2s ease;
  pointer-events: none;
  box-shadow: var(--shadow);
}
.mascot-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 26px;
  border: 6px solid transparent;
  border-top-color: var(--navy-dark);
}
.mascot-corner:hover .mascot-tooltip { opacity: 1; transform: translateY(0); }

/* Hero mascot (homepage) */
.hero-mascot {
  position: absolute;
  right: 4%;
  bottom: 0;
  width: 300px;
  max-width: 32%;
  z-index: 1;
  cursor: pointer;
}
.hero-mascot img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.5));
  animation: mascotFloat 5s ease-in-out infinite;
  transition: transform .25s ease;
  transform-origin: bottom center;
}
.hero-mascot:hover img { animation: mascotWiggle .6s ease-in-out infinite; }
.hero-mascot:active img { animation: mascotPop .4s ease; }

@media (max-width: 900px) {
  .hero-mascot { display: none; } /* avoid crowding the hero text on smaller screens */
  .mascot-corner img { width: 72px; }
}

/* ---- Blog ---- */
.post-card img { border-radius: var(--radius) var(--radius) 0 0; height: 180px; width: 100%; object-fit: cover; }
.post-card .card-body { padding: 20px; }
.post-meta { font-size: .8rem; color: var(--gray-600); margin-bottom: 8px; }

/* ---- Pagination-esque status pills (used in admin display too) ---- */
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.pill-new { background: #e3f1ff; color: #0b5cad; }
.pill-in_progress { background: #fff4de; color: #b3760a; }
.pill-quoted { background: #e6f7ee; color: #1a7a45; }
.pill-closed { background: #eee; color: #666; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-dark); flex-direction: column; align-items: flex-start; padding: 16px 24px; box-shadow: var(--shadow); display: none; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .dropdown-menu { position: static; box-shadow: none; padding-left: 12px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .topbar-inner { font-size: .72rem; }

/* ============================================================
   NEW HOMEPAGE — additions only.
   Append everything below to the END of assets/css/style.css.
   Nothing here overrides existing rules; it only adds new classes
   used by the new index.php (hero live-rate chip, animated stat
   counters, rotating facts strip, port teaser, CTA banner, and a
   lightweight scroll-reveal effect).
   ============================================================ */

/* ---- Hero: floating mascot + live-rate chip ---- */
.hero-dynamic {
  position: relative;
  overflow: hidden;
}

.float-mascot img {
  animation: emberFloat 4.5s ease-in-out infinite;
}

@keyframes emberFloat {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-14px); }
  100% { transform: translateY(0px); }
}

@media (prefers-reduced-motion: reduce) {
  .float-mascot img { animation: none; }
}

.hero-live-rate {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.25rem;
  padding: .55rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--silver, #c9ced6);
}

.hero-live-rate-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ecf7a;
  box-shadow: 0 0 0 rgba(62, 207, 122, 0.6);
  animation: emberPulse 2s infinite;
  flex-shrink: 0;
}

@keyframes emberPulse {
  0%   { box-shadow: 0 0 0 0 rgba(62, 207, 122, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(62, 207, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 122, 0); }
}

.hero-live-rate-label {
  opacity: .75;
}

.hero-live-rate-value {
  color: var(--amber-bright, #dec369);
  font-weight: 700;
}

.hero-live-rate-updated {
  opacity: .55;
  font-size: .75rem;
}

/* ---- Industry snapshot: animated stat counters ---- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
}

.snapshot-grid .stat-tile-value {
  font-variant-numeric: tabular-nums;
}

.snapshot-footnote {
  margin-top: 1.5rem;
  text-align: center;
  font-size: .85rem;
  color: var(--gray-600, #8891a3);
}

.snapshot-footnote a {
  color: var(--amber, #d4af37);
  font-weight: 600;
}

/* ---- Rotating "did you know" facts strip ---- */
.fact-ticker {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
  min-height: 3.25rem;
}

.fact-ticker-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.fact-ticker-slides {
  position: relative;
  flex: 1;
  min-height: 2.6rem;
}

.fact-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .5s ease, transform .5s ease;
  font-size: 1rem;
  line-height: 1.5;
}

.fact-slide.is-active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
}

/* ---- Trust strip (logo + tagline under About Us) ---- */
.trust-strip-mini {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-strip-logo {
  max-height: 32px;
  width: auto;
}

.trust-strip-logo-text {
  font-weight: 700;
  color: var(--amber, #d4af37);
}

.trust-strip-tagline {
  font-size: .85rem;
  color: var(--gray-600, #8891a3);
}

/* ---- Port database teaser ---- */
.port-teaser {
  text-align: center;
}

.port-teaser-copy {
  max-width: 640px;
  margin: 0 auto;
}

.port-teaser-copy p {
  margin-bottom: 1.5rem;
}

/* ---- Bottom CTA banner ---- */
.cta-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--navy, #0d1d3a), var(--navy-dark, #0b0b0f));
  border-radius: 20px;
  padding: 2.5rem;
}

.cta-banner-mascot {
  height: 96px;
  width: auto;
  flex-shrink: 0;
}

.cta-banner-inner h2 {
  margin: 0 0 .5rem;
}

.cta-banner-inner p {
  margin: 0;
  color: var(--silver, #c9ced6);
}

.btn-lg {
  padding: .9rem 1.75rem;
  font-size: 1.05rem;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .cta-banner-inner { flex-direction: column; text-align: center; }
}

/* ---- Scroll-reveal (progressive enhancement) ---- */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.reveal-pending {
  opacity: 0;
  transform: translateY(24px);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.reveal-pending {
    opacity: 1;
    transform: none;
    transition: none;
  }
}