/* ========== Base ==========
   Garra-IO — Transporte de Carga en México
*/
:root {
  --primary: #00bcd4;
  --primary-600: #00a2b7;
  --dark: #062a3b; /* Footer */
  --bg: #ffffff;
  --muted: #f3f6fa;
  --text: #111111;
  --text-muted: #555b66;
  --border: #e6eef5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
section { scroll-margin-top: 96px; }

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.section { padding: 72px 0; }
.section-title {
  font-size: clamp(24px, 3.2vw, 36px);
  margin: 0 0 12px 0;
  line-height: 1.2;
}
.section-subtitle { color: var(--text-muted); margin: 0 0 28px; }

/* ========== Header ==========
   Sticky white header with active underline
*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 4px 16px rgba(6,42,59,.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.logo { font-weight: 700; font-size: 22px; color: var(--text); text-decoration: none; }
.logo-mark { color: var(--text); }
.logo-accent { color: var(--primary); }

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0; padding: 0;
}
.primary-nav a {
  position: relative;
  display: inline-block;
  padding: 10px 2px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px; background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.primary-nav a:hover::after, .primary-nav a.active::after { transform: scaleX(1); }
.primary-nav a.cta { color: var(--primary); }

.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #222; margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }

/* ========== Hero ==========
   Background image with overlay
*/
.hero { position: relative; min-height: 82vh; display: grid; place-items: center; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.45), rgba(6,42,59,.65)),
    url('../Camprin.png') center/cover no-repeat;
}
.hero-content { position: relative; text-align: center; color: #fff; padding: 0 12px; }
.hero-title { font-size: clamp(26px, 4vw, 48px); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin: 0 0 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 20px; border-radius: 10px; border: 2px solid transparent;
  text-decoration: none; font-weight: 600; transition: transform .15s ease, box-shadow .15s ease, background .2s ease, color .2s ease;
}
.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,188,212,.32); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: rgba(0,188,212,.1); }

/* ========== Cards & Grids ========== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px; box-shadow: 0 2px 10px rgba(6,42,59,.04); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(6,42,59,.12); }

/* Services */
.services .icon { width: 44px; height: 44px; color: var(--primary); margin-bottom: 12px; }
.services h3 { margin: 6px 0 6px; font-size: 18px; }
.services p { margin: 0; color: var(--text-muted); }

/* Units */
.units { background: var(--muted); }
.unit-card .media { border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; background: #e9f1f6; border: 1px solid var(--border); }
.unit-card h3 { margin: 14px 0 10px; font-size: 18px; }
.specs { list-style: none; margin: 0; padding: 0; color: var(--text-muted); }
.specs li { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.specs li:last-child { border-bottom: 0; }

/* Coverage */
.coverage { background: #fff; }
.coverage-inner { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 32px; }
.coverage .media { border-radius: 16px; overflow: hidden; border: 0; }
.coverage .section-title { position: relative; padding-left: 18px; }
.coverage .section-title::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 4px; border-radius: 2px; background: #dfe3e8; }
.coverage .section-subtitle { color: var(--text-muted); }
.coverage .btn-outline { background: var(--primary); color: #fff; border-color: var(--primary); }
.coverage .btn-outline:hover { box-shadow: 0 8px 20px rgba(0,188,212,.32); }

/* Why (Tabs) */
.why .tabs { margin-top: 8px; }
.why .section-title { text-transform: uppercase; letter-spacing: .5px; }
.tab-list { display: flex; gap: 28px; margin-bottom: 14px; border-bottom: 3px solid #eaeef3; }
.tab { background: transparent; border: 0; color: #9aa3ad; padding: 8px 0; cursor: pointer; font-weight: 600; font-size: clamp(18px, 3vw, 28px); position: relative; }
.tab.active { color: var(--primary); }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--primary); border-radius: 3px; }
.tab-panels { background: transparent; border: 0; padding: 12px 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* About */
.about-inner { display: grid; grid-template-columns: 1fr; gap: 24px; }
.about .content p { color: var(--text-muted); max-width: 70ch; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
.contact-form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 6px; }
label { font-size: 14px; color: #39434d; }
input, textarea { padding: 12px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; }
input:focus, textarea:focus { outline: 2px solid rgba(0,188,212,.35); border-color: var(--primary); }
.form-actions { display: flex; gap: 10px; align-items: center; }
.contact-card h2 { margin-top: 0; }
.contact-info h3 { margin: 0 0 8px; }
.contact-list { list-style: none; padding: 0; margin: 8px 0 0; }
.contact-list li { padding: 4px 0; color: var(--text-muted); }
.socials { display: flex; gap: 10px; margin-top: 10px; }
.social { width: 36px; height: 36px; display: grid; place-items: center; color: #1b2a35; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.social:hover { color: var(--primary); border-color: var(--primary); }

/* Footer */
.site-footer { background: var(--dark); color: #e9eef3; margin-top: 36px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 24px; padding: 36px 0; }
.footer-grid a { color: #c8d8e6; text-decoration: none; }
.footer-grid a:hover { color: #fff; }
.footer-logo .logo-mark { color: #e9eef3; }
.footer-logo .logo-accent { color: var(--primary); }
.site-footer h4 { margin: 8px 0; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 12px; color: #a9b9c6; }

/* WhatsApp Floating */
.whatsapp-float {
  position: fixed; left: 16px; bottom: 16px; z-index: 1001;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25D366; color: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.25);
  transition: transform .15s ease;
}
.whatsapp-float:hover { transform: translateY(-2px) scale(1.03); }

/* ========== Reveal Animations ========== */
/* Default: visible. JS will add .js class to enable reveal */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: translateY(0); }

/* ========== Responsive ==========
   Breakpoints: 900px, 640px
*/
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .coverage-inner { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: inline-block; }
  .primary-nav { position: absolute; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); display: none; }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav a { padding: 14px 20px; display: block; }

  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
