:root {
  /* ── Light Mode (Aesthetic 2.0 - Dark Green & White Edition) ── */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --accent: #064E3B;        /* Dark Green Petroleum */
  --accent-2: #10b981;      /* Bright Emerald */
  --accent-glow: rgba(6, 78, 59, 0.08);
  --border: rgba(0, 0, 0, 0.08);
  --shadow-premium: 0 4px 24px rgba(0,0,0,0.06);
  --glass-shimmer: rgba(255,255,255,0.15);

  --nav-bg: rgba(255, 255, 255, 0.95);
  --font-head: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --grid-color: rgba(6, 78, 59, 0.04);
}

.dark-mode {
  --bg: #020617;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --text: #f8fafc;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(2, 6, 23, 0.95);
  --shadow-premium: 0 4px 24px rgba(0,0,0,0.3);
}

/* ── Global Setup ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  position: relative;
}

p {
  text-align: justify;
  text-justify: inter-word;
}

.text-center p, 
p.text-center,
header p,
footer p {
  text-align: center;
}

.text-left p,
p.text-left {
  text-align: left !important;
}

body.no-scroll { overflow: hidden; }

body::before {
  content: "MANUFACTURING / LOGISTICS / SYSTEM V2.4";
  position: fixed;
  top: 100px;
  right: -50px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  opacity: 0.1;
  transform: rotate(90deg);
  letter-spacing: 5px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 0% 0%, var(--accent-glow) 0%, transparent 30%),
    radial-gradient(circle at 100% 100%, var(--accent-glow) 0%, transparent 30%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 5vw; }

h1, h2, h3 { 
  font-family: var(--font-head); 
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 800;
}

/* ── Typography & Category Tags ── */
.tag-category {
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.tag-category::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   NAVIGATION — Desktop First
═══════════════════════════════════════ */
.nav-master {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 18px 0;
  z-index: 1000;
  transition: all 0.4s var(--ease);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  z-index: 2001;
  position: relative;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  transition: color 0.3s var(--ease);
  white-space: nowrap;
}

.nav-links a:hover { color: var(--accent); }

/* Nav right actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  z-index: 2001;
  position: relative;
}

/* ── Hamburger Button ── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
  transition: border-color 0.3s var(--ease);
  position: relative;
  z-index: 2001;
}

.hamburger-btn:hover { border-color: var(--accent); }

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: all 0.35s var(--ease);
  transform-origin: center;
}

/* Hamburger → X animation */
.hamburger-btn.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger-btn.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Theme Switch */
.theme-switch {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  flex-shrink: 0;
}

.theme-switch:hover { border-color: var(--accent); }

.sun { display: none; }
.moon { display: block; }
.dark-mode .sun { display: block; }
.dark-mode .moon { display: none; }

/* ── Hero ── */
.hero-master {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.bg-industrial {
  background-image: 
    linear-gradient(rgba(16, 185, 129, 0.05) 2px, transparent 2px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.05) 2px, transparent 2px),
    radial-gradient(circle at 20% 30%, var(--accent-glow) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 177, 80, 0.05) 0%, transparent 50%);
  background-size: 100px 100px, 100px 100px, 100% 100%, 100% 100%;
}

.hero-master h1 { 
  font-size: clamp(2.2rem, 6vw, 5.5rem); 
  margin-bottom: 24px; 
  max-width: 900px;
}

.hero-master p { 
  font-size: clamp(1rem, 2.5vw, 1.25rem); 
  color: var(--text-2); 
  max-width: 600px; 
  margin-bottom: 40px;
}

/* ── Staggered Animations ── */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.reveal-stagger.active > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.active > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.active > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger.active > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger.active > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-stagger.active > *:nth-child(5) { transition-delay: 0.5s; }

/* ── Gradient Text ── */
.g-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 14px;
  font-weight: 700;
  transition: all 0.4s var(--ease);
  cursor: pointer;
  border: none;
  font-family: var(--font-head);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  background: var(--text);
  color: var(--bg);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--glass-shimmer);
  transform: rotate(35deg);
  transition: all 0.6s var(--ease);
  pointer-events: none;
  opacity: 0;
}

.btn-primary:hover::after {
  left: 100%;
  opacity: 1;
}

/* ── Benefit Cards ── */
.grid-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 80px;
}

.card-benefit {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 50px;
  border-radius: 24px;
  transition: all 0.5s var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card-benefit:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 40px 80px rgba(245, 158, 11, 0.15);
}

.card-benefit i { font-size: 2.5rem; margin-bottom: 30px; display: block; }
.card-benefit h3 { margin-bottom: 20px; font-size: 1.5rem; }
.card-benefit p { color: var(--text-2); line-height: 1.7; }

/* ── Glass Frame Cards ── */
.glass-frame {
  transition: all 0.5s var(--ease);
}
.glass-frame:hover {
  transform: scale(1.02);
  border-color: var(--accent);
}

/* ═══════════════════════════════════════
   MODULOS GRID
═══════════════════════════════════════ */
.grid-eco {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 0;
}

.card-eco {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 36px 28px;
  border-radius: 20px;
  transition: all 0.5s var(--ease);
  position: relative;
  text-align: left;
  box-shadow: var(--shadow-premium);
}

.card-eco:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px var(--accent-glow);
}

.card-eco.featured {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(16, 185, 129, 0.03) 100%);
}

.tag-utility {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 5px;
}

.g-status {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-2);
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.7;
}

.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.module-list li {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
}

.module-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-weight: bold;
}

/* ═══════════════════════════════════════
   MUSEUM 3D GALLERY
═══════════════════════════════════════ */
.museum-gallery-container {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1800px;
  position: relative;
  width: 100%;
  height: 650px;
  margin-top: 50px;
}

.museum-frame {
  position: absolute;
  width: 260px;
  height: 520px;
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

.museum-artwork {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
  border: 4px solid var(--border);
  background: var(--surface);
}

.museum-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.museum-label {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  background: rgba(8, 12, 10, 0.85);
  color: white;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-head);
}

.museum-reflection {
  position: absolute;
  bottom: -30px;
  left: 10%;
  width: 80%;
  height: 30px;
  background: inherit;
  filter: blur(8px);
  opacity: 0.1;
}

.frame-left {
  --base-tx: -240px;
  transform: translateX(var(--base-tx)) translateZ(-200px) rotateY(25deg);
  opacity: 0.4;
  z-index: 1;
}

.frame-center {
  --base-tx: 0px;
  transform: translateX(var(--base-tx)) translateZ(50px) rotateY(0deg);
  opacity: 1;
  z-index: 10;
  box-shadow: 0 40px 100px rgba(16, 185, 129, 0.2);
}

.frame-right {
  --base-tx: 240px;
  transform: translateX(var(--base-tx)) translateZ(-200px) rotateY(-25deg);
  opacity: 0.4;
  z-index: 1;
}

.museum-frame:hover {
  transform: translateX(var(--base-tx)) translateY(-40px) translateZ(150px) rotateY(0deg) !important;
  opacity: 1;
  z-index: 100;
  box-shadow: 0 60px 130px rgba(16, 185, 129, 0.4);
}

.museum-glare {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to bottom right, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.05) 40%, transparent 100%);
  transform: rotate(30deg);
  pointer-events: none;
  transition: all 0.5s ease;
}

.museum-frame:hover .museum-glare {
  transform: rotate(30deg) translate(10%, 10%);
}

/* ═══════════════════════════════════════
   MOBILE/TABLET 3D CAROUSEL
═══════════════════════════════════════ */
.mobile-3d-carousel {
  display: none; /* Hidden on desktop, shown in media queries */
  position: relative;
  width: 100%;
  margin-top: 40px;
  padding-bottom: 20px;
  overflow: hidden;
}

.m3d-stage {
  position: relative;
  width: 100%;
  height: 480px;
  perspective: 900px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
}

.m3d-card {
  position: absolute;
  width: 220px;
  height: 420px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 3px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  transition: all 0.65s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.m3d-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* Labels */
.m3d-label {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 14px;
  background: rgba(2, 6, 23, 0.88);
  color: #fff;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.m3d-label--accent {
  background: var(--accent);
}

/* Card positions — set by JS via data-pos attribute */
.m3d-card[data-pos="center"] {
  transform: translateX(0) translateZ(40px) rotateY(0deg) scale(1);
  z-index: 10;
  opacity: 1;
  box-shadow: 0 30px 70px rgba(16, 185, 129, 0.25);
  border-color: var(--accent-2);
}

.m3d-card[data-pos="left"] {
  transform: translateX(-60%) translateZ(-80px) rotateY(18deg) scale(0.85);
  z-index: 5;
  opacity: 0.5;
  filter: brightness(0.7);
}

.m3d-card[data-pos="right"] {
  transform: translateX(60%) translateZ(-80px) rotateY(-18deg) scale(0.85);
  z-index: 5;
  opacity: 0.5;
  filter: brightness(0.7);
}

/* Arrows */
.m3d-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.m3d-arrow:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.m3d-arrow--prev { left: 8px; }
.m3d-arrow--next { right: 8px; }

/* Dot indicators */
.m3d-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.m3d-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--accent-2);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  padding: 0;
}

.m3d-dot--active {
  background: var(--accent-2);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* ═══════════════════════════════════════
   LIVE DASHBOARD ANIMATIONS
═══════════════════════════════════════ */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); opacity: 0.9; box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer-text {
  background: linear-gradient(90deg, var(--text) 25%, var(--accent-2) 50%, var(--text) 75%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 5s infinite linear;
}

/* ═══════════════════════════════════════
   TABLET — ≤ 1024px
═══════════════════════════════════════ */
@media (max-width: 1024px) {

  /* NAV */
  .hamburger-btn { display: flex; }

  /* ── ICON & CARD CENTERING (tablet) ── */
  .card-eco {
    text-align: center;
  }
  .card-eco h3,
  .card-eco p,
  .card-eco .tag-utility,
  .card-eco .g-status {
    text-align: center;
  }
  .card-eco .module-list {
    display: inline-block;
    text-align: left;
  }
  .card-eco h3 > span:first-child { /* emoji icon */
    display: block;
    font-size: 2.2rem;
    margin-bottom: 8px;
  }

  .glass-frame {
    text-align: center;
  }
  .glass-frame > div:first-child { /* emoji icon */
    display: flex;
    justify-content: center;
  }
  
  .nav-links {
    /* Full-screen mobile menu overlay */
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: var(--nav-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    z-index: 1500;
    /* Hidden off-screen to the right */
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.85, 0, 0.15, 1);
    /* Important: must be flex but hidden via transform */
    display: flex;
    pointer-events: none;
  }

  .nav-links::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.6;
    pointer-events: none;
  }

  .nav-links.active {
    transform: translateX(0);
    pointer-events: all;
  }

  .nav-links a {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-family: var(--font-head);
    font-weight: 800;
    padding: 18px 40px;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.3s;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a:last-child { border-bottom: none; }

  .nav-links.active a {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links.active a:nth-child(1) { transition-delay: 0.08s; }
  .nav-links.active a:nth-child(2) { transition-delay: 0.16s; }
  .nav-links.active a:nth-child(3) { transition-delay: 0.24s; }
  .nav-links.active a:nth-child(4) { transition-delay: 0.32s; }
  .nav-links.active a:nth-child(5) { transition-delay: 0.40s; }

  /* Hide desktop CTA in nav on tablet/mobile */
  .nav-actions .btn-primary { display: none; }

  /* HERO */
  .hero-master h1 { font-size: clamp(2rem, 6vw, 3.8rem); }

  /* SECTIONS */
  section { padding: 80px 0 !important; }

  /* MODULOS - 2 cols on tablet */
  .grid-eco { grid-template-columns: 1fr 1fr; }

  /* ECOSISTEMA section grid */
  .ecosistema-grid {
    grid-template-columns: 1fr !important;
  }

  /* GALLERY — use 3D mobile carousel on tablet too */
  .museum-gallery-container { display: none; }
  .gallery-controls { display: none; }
  .mobile-3d-carousel { display: block; }
  .m3d-card { width: 210px; height: 410px; }
  .m3d-stage { height: 460px; perspective: 850px; }
}

/* ═══════════════════════════════════════
   MOBILE — ≤ 640px
═══════════════════════════════════════ */
@media (max-width: 640px) {

  /* ── ICON & CARD CENTERING (mobile) ── */
  .card-eco,
  .glass-frame {
    text-align: center;
    align-items: center;
  }

  /* Center emoji icons inside cards */
  .card-eco h3,
  .glass-frame h3 {
    justify-content: center;
  }

  /* Module list stays left-aligned but centered as block */
  .card-eco .module-list {
    display: inline-block;
    text-align: left;
    margin: 0 auto;
  }

  /* Características glass cards — center icon div */
  .glass-frame > div[style*="font-size: 2.5rem"] {
    display: flex !important;
    justify-content: center;
  }

  /* tag-category centers */
  .tag-category {
    justify-content: center;
  }
  .tag-category::before { display: none; }

  /* tag-utility & g-status center inside card */
  .tag-utility,
  .g-status {
    text-align: center;
  }

  /* CTA benefit items — center icon circle */
  .benefit-item-icon {
    margin: 0 auto;
  }

  /* Footer logo area centers */
  .footer-logo-col {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-logo-col p {
    text-align: justify !important;
    text-align-last: center;
  }
  .footer-logo-col > div:first-child {
    justify-content: center;
    width: 100%;
  }
  .footer-logo-col > div[style*="inline-block"] {
    display: inline-block !important;
    margin: 0 auto 20px;
  }

  .text-center-override {
    text-align: center !important;
  }

  /* Section headers — ensure centered */
  section .text-center,
  section [style*="text-align: center"] {
    text-align: center !important;
  }

  .container { padding: 0 20px; }

  /* NAV */
  .nav-master { padding: 14px 0; }
  .logo img { height: 36px !important; }

  /* HERO */
  .hero-master {
    padding-top: 110px;
    text-align: center;
    min-height: 100svh;
  }
  .hero-master .container {
    align-items: center;
  }
  .hero-master p {
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
  }
  .hero-master img[alt="Lacak Estación Combustible"] {
    height: 80px !important;
  }
  .tag-category { justify-content: center; }

  /* CTA Buttons — stack vertically */
  .hero-cta-group {
    flex-direction: column !important;
    align-items: center !important;
    width: 100%;
  }
  .hero-cta-group .btn {
    width: 100%;
    max-width: 320px;
  }

  /* SECTIONS */
  section { padding: 60px 0 !important; }

  /* ECOSISTEMA section — single col */
  .ecosistema-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    text-align: center;
  }
  .ecosistema-grid p {
    text-align: justify !important;
    text-align-last: center;
  }
  .ecosistema-grid .tag-category {
    justify-content: center;
  }

  /* Dashboard stats — stack */
  .dashboard-stats-row {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 20px !important;
  }
  .dashboard-stats-row > div {
    text-align: center !important;
    width: 100%;
  }
  #total-sale { font-size: 1.8rem !important; }
  #total-gallonage { font-size: 1.5rem !important; }

  /* MODULOS — single col */
  .grid-eco { grid-template-columns: 1fr; gap: 16px; }

  /* CARACTERISTICAS - single col forced */
  .caracteristicas-grid {
    grid-template-columns: 1fr !important;
  }

  /* MUSEUM GALLERY — use 3D mobile carousel */
  .museum-gallery-container { display: none; }
  .gallery-controls { display: none; }
  .mobile-3d-carousel { display: block; }
  .m3d-card { width: 190px; height: 380px; }
  .m3d-stage { height: 430px; perspective: 700px; }

  /* FOOTER CTA section — single col */
  .footer-cta-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    text-align: center;
  }
  .footer-cta-grid div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-cta-grid p {
    text-align: justify !important;
    text-align-last: center;
    max-width: 100% !important;
  }
  .footer-cta-grid h2 {
    text-align: center !important;
  }
  /* Keep benefit list items slightly more readable but centered as a block */
  .footer-cta-grid div[style*="display: flex; gap: 16px"] {
    text-align: left;
    max-width: 400px;
  }

  /* FOOTER columns — single col */
  .footer-columns {
    flex-direction: column !important;
    gap: 40px !important;
  }

  /* Justify and center paragraphs in footer by default */
  .footer-columns p {
    text-align: justify !important;
    text-align-last: center;
  }

  /* Heading sizes */
  h2 { font-size: clamp(1.8rem, 7vw, 2.8rem) !important; }
  h3 { font-size: clamp(1.2rem, 4vw, 1.6rem) !important; }
}

/* Specific fix for the CTA footer when in 1 column */
@media (max-width: 1024px) {
  .footer-cta-grid {
    text-align: center;
  }
  .footer-cta-grid div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-cta-grid p {
    text-align: justify !important;
    text-align-last: center;
    max-width: 100% !important;
  }
  .footer-cta-grid h2 {
    text-align: center !important;
  }
  /* Keep benefit list items slightly more readable but centered as a block */
  .footer-cta-grid div[style*="display: flex; gap: 16px"] {
    text-align: left;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ═══════════════════════════════════════
   VERY SMALL — ≤ 380px
═══════════════════════════════════════ */
@media (max-width: 380px) {
  .logo > div { 
    font-size: 0.8rem !important; 
    display: block; 
  }
  .logo img { height: 32px !important; }
  .nav-actions .theme-switch { padding: 6px; }
}
