/* ===== Cargo Master Logistics — CMS ===== */
/* Paleta extraída del sitio de referencia cargomasterinc.com */
:root {
  --navy: rgb(12, 28, 68);        /* azul marino: títulos / texto */
  --blue: rgb(28, 68, 132);       /* azul medio: acción / footer */
  --sky: rgb(0, 136, 203);        /* azul cielo */
  --teal: rgb(112, 178, 185);     /* turquesa */
  --grey: rgb(109, 115, 119);     /* gris texto */
  --grey-light: rgb(154, 159, 165);
  --line: rgb(216, 216, 216);
  --bg-soft: rgb(248, 248, 248);
  --white: #ffffff;
  --yellow: rgb(255, 203, 5);

  --font-head: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;

  --site-width: 1140px;
  --header-h: 84px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font-body);
  color: var(--grey);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 8px rgba(0,0,0,.04);
}
.header-inner {
  max-width: var(--site-width);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-logo { width: 46px; height: 46px; object-fit: contain; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 1px;
  font-size: 18px;
  color: var(--navy);
}

/* ===== NAV ===== */
.main-nav .nav-list { list-style: none; display: flex; align-items: center; }
.nav-item { position: relative; }
.nav-link {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .5px;
  color: var(--navy);
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}
.caret { font-size: 12px; transition: transform .2s ease; }
.nav-item.open .caret { transform: rotate(180deg); }

.submenu {
  list-style: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 210px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(12,28,68,.14);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .22s ease;
}
.nav-item.open .submenu,
.nav-item:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu li a {
  display: block;
  padding: 11px 22px;
  color: var(--navy);
  text-decoration: none;
  font-size: 15px;
  transition: background .15s ease, color .15s ease;
}
.submenu li a:hover { background: var(--bg-soft); color: var(--blue); }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 2px; transition: .2s; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background: url('assets/hero.jpg') center 30% / cover no-repeat;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(12,28,68,.62) 0%, rgba(12,28,68,.30) 55%, rgba(12,28,68,.15) 100%);
}
.hero-content {
  position: relative;
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  color: var(--white);
}
.hero h1 {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: clamp(44px, 8vw, 92px);
  line-height: 1.08;
  letter-spacing: -1px;
}
.hero-sub {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(16px, 2.4vw, 22px);
  letter-spacing: 3px;
  margin-top: 18px;
  text-transform: uppercase;
  opacity: .92;
}
.btn-outline {
  display: inline-block;
  margin-top: 30px;
  padding: 14px 34px;
  border: 2px solid var(--white);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 14px;
  transition: all .2s ease;
}
.btn-outline:hover { background: var(--white); color: var(--navy); }

/* ===== MODULE SECTIONS ===== */
.module-section { padding: 90px 0; background: var(--white); }
.module-section.alt { background: var(--bg-soft); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 46px; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sky);
  font-weight: 600;
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: clamp(34px, 5vw, 52px);
  color: var(--navy);
  line-height: 1.15;
}
.section-lead { margin-top: 14px; font-size: 17px; color: var(--grey); }

/* ===== PANEL ===== */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(12,28,68,.07);
  overflow: hidden;
}
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--navy);
  color: var(--white);
}
.panel-title { font-family: var(--font-head); font-weight: 500; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(112,178,185,.25); }
.panel-status {
  font-size: 13px;
  font-family: var(--font-head);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.12);
}
.panel-status.running { background: var(--yellow); color: var(--navy); }
.panel-status.done { background: var(--teal); color: var(--navy); }
.panel-status.error { background: rgb(237,28,36); color: var(--white); }

/* ===== PROCESS GRID ===== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 28px 24px;
}
.process-card {
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  font-family: var(--font-body);
}
.process-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(12,28,68,.12);
  border-color: var(--sky);
}
.process-card:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.proc-icon { font-size: 30px; }
.proc-name { font-family: var(--font-head); font-weight: 600; font-size: 17px; color: var(--navy); }
.proc-desc { font-size: 14px; color: var(--grey); }

/* ===== CONSOLE ===== */
.console { margin: 0 24px 28px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.console-head {
  background: #0d1424;
  color: var(--teal);
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 18px;
}
.console-body {
  background: #0a0f1c;
  color: #d6e2ff;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 13.5px;
  line-height: 1.7;
  padding: 18px;
  min-height: 130px;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== FOOTER ===== */
.site-footer { background: var(--blue); color: rgba(255,255,255,.85); padding: 60px 0 0; }
.footer-inner {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 24px 44px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer-logo { width: 54px; height: 54px; margin-bottom: 12px; }
.footer-brand h3 { font-family: var(--font-head); font-weight: 500; color: var(--white); font-size: 22px; }
.footer-slogan { margin-top: 6px; font-style: italic; color: rgba(255,255,255,.75); }
.footer-col h4 {
  font-family: var(--font-head);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: .5px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; font-size: 15px; }
.footer-col a { color: rgba(255,255,255,.85); text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  text-align: center;
  padding: 20px;
  font-size: 13px;
  letter-spacing: .5px;
  color: rgba(255,255,255,.7);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 400px; }
  .main-nav .nav-list { flex-direction: column; align-items: stretch; padding: 8px 0; }
  .nav-link { width: 100%; justify-content: space-between; }
  .submenu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-radius: 0;
    background: var(--bg-soft);
    max-height: 0; overflow: hidden; padding: 0;
    transition: max-height .25s ease;
  }
  .nav-item.open .submenu { max-height: 260px; padding: 6px 0; }
  .process-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero { min-height: 62vh; }
}
