/* =========================================================
   TAIMSAL S.A. DE C.V. — réplica fiel del sitio original
   Bai Jamjuree + azul marino #063a84 + cian #10a3c5, tema claro.
   ========================================================= */

@font-face {
  font-family: 'Bai Jamjuree';
  src: url('../fonts/baijamjuree-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bai Jamjuree';
  src: url('../fonts/baijamjuree-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bai Jamjuree';
  src: url('../fonts/baijamjuree-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bai Jamjuree';
  src: url('../fonts/baijamjuree-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* el sitio es de tema único (claro): le decimos al navegador que use controles
     nativos claros (select, scrollbar, etc.) aunque el sistema operativo esté en
     modo oscuro; si no, el desplegable del <select> sale oscuro con texto ilegible. */
  color-scheme: light;
  --navy: #063a84;
  --navy-dark: #052c63;
  --navy-darker: #041d45;
  --cyan: #10a3c5;
  --cyan-light: #29d8db;

  --ink: #232326;
  --text: #5e5e5f;
  --text-soft: #85898c;
  --white: #ffffff;
  --gray-bg: #f6f6f6;
  --line: #e6e7e9;

  --font: 'Bai Jamjuree', sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --container: 1240px;

  --shadow: 0 20px 50px -20px rgba(6, 30, 70, 0.25);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pattern: url('../img/brand/bg-pattern.png');
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
body, h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

body {
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
  position: relative;
  z-index: 1;
}
section { position: relative; }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
}
h2 { font-size: clamp(1.7rem, 1.35rem + 1.5vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem); }

.lede { font-size: clamp(0.98rem, 0.93rem + 0.2vw, 1.08rem); color: var(--text); max-width: 58ch; line-height: 1.7; }

.section-head { max-width: 700px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lede { margin-top: 12px; }
.section-head.center .lede { margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--cyan); border-radius: 2px; }
.section-head.on-dark .eyebrow, .section-head.on-dark h2, .section-head.on-dark .lede { color: var(--white); }
.section-head.on-dark .eyebrow { color: var(--cyan-light); }
.section-head.on-dark .eyebrow::before { background: var(--cyan-light); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px;
  font-family: var(--font); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.03em; text-transform: uppercase;
  white-space: nowrap; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn i { font-size: 0.95em; }
.btn:hover { transform: scale(1.05); }
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--navy); color: var(--white); box-shadow: 0 12px 26px -10px rgba(6, 58, 132, 0.55); }
.btn-primary:hover { background: var(--cyan); box-shadow: 0 14px 30px -8px rgba(16, 163, 197, 0.55); }

.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); }

.btn-on-dark { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-on-dark:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.8rem; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  background: transparent;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.scrolled { background: rgba(6, 58, 132, 0.97); box-shadow: 0 4px 20px rgba(0,0,0,0.12); backdrop-filter: blur(6px); }
.site-header:not(.on-hero) { background: var(--navy); }

.nav-row { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 32px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.nav-links a {
  padding: 9px 15px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase; color: rgba(255,255,255,0.88);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); background: rgba(255,255,255,0.14); }

.nav-cta { display: flex; align-items: center; gap: 12px; flex: none; }
.nav-cta .btn { padding: 10px 20px; font-size: 0.82rem; }
.nav-cta .btn-primary { background: var(--cyan); }
.nav-cta .btn-primary:hover { background: var(--cyan-light); }

.nav-phone-btn {
  display: none; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--cyan); background: transparent;
  font-size: 0.82rem; font-weight: 600; color: var(--white);
  transition: background 0.2s, border-color 0.2s;
}
.nav-phone-btn i { color: var(--cyan-light); }
.nav-phone-btn:hover { background: rgba(16, 163, 197, 0.15); border-color: var(--cyan-light); }

.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.4); color: var(--white); font-size: 1.05rem; z-index: 1; position: relative; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (min-width: 1180px) { .nav-phone-btn { display: inline-flex; } }

/* ---------- menú móvil: pantalla completa ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 200;
  width: min(420px, 100%);
  margin-left: auto;
  background-color: #0e4088;
  background-image: linear-gradient(180deg, rgba(6,20,50,0.4), rgba(4,14,38,0.55)), var(--pattern);
  background-size: cover, auto;
  display: flex; flex-direction: column;
  padding: 22px 26px 28px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-backdrop {
  position: fixed; inset: 0; z-index: 190;
  background: rgba(2, 6, 14, 0.6);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.mobile-menu-backdrop.open { opacity: 1; visibility: visible; }

.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mobile-menu-top .brand img { height: 30px; }
.mobile-menu-close {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.05rem; flex: none;
}

.mobile-nav-list { display: flex; flex-direction: column; margin-top: 18px; }
.mobile-nav-list a {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 4px; border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--white); font-weight: 600; font-size: 1.02rem;
}
.mobile-nav-list a:last-child { border-bottom: 0; }
.mnl-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan-light); font-size: 0.95rem; flex: none;
}
.mnl-label { flex: 1; }
.mnl-chevron { font-size: 0.75rem; color: rgba(255,255,255,0.4); }

.mobile-menu-social { display: flex; gap: 10px; margin-top: 22px; }
.mobile-menu-social a {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1rem;
}
.mobile-menu-social a:hover { border-color: var(--cyan); color: var(--cyan-light); }

.mobile-menu-cta { margin-top: 22px; }

.mobile-menu-info { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.mobile-menu-info a, .mobile-menu-info span {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; color: rgba(255,255,255,0.75);
}
.mobile-menu-info i { color: var(--cyan-light); width: 16px; flex: none; }
.mobile-menu-info a:hover { color: var(--white); }

@media (max-width: 420px) { .mobile-menu { width: 100%; } }

/* ---------- shape dividers ---------- */
.shape-divider { position: absolute; left: 0; right: 0; line-height: 0; overflow: hidden; z-index: 2; pointer-events: none; }
.shape-divider.top { top: -1px; }
.shape-divider.bottom { bottom: -1px; transform: rotate(180deg); }
.shape-divider svg { width: 100%; height: 60px; display: block; }
@media (max-width: 720px) { .shape-divider svg { height: 32px; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: center; overflow: visible; background: var(--navy-darker); }
.hero-chevron {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 3;
  height: 22px; background: var(--navy);
}
.hero-chevron span {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 78px solid transparent;
  border-right: 78px solid transparent;
  border-top: 46px solid var(--navy);
}
@media (max-width: 640px) {
  .hero-chevron span { border-left-width: 46px; border-right-width: 46px; border-top-width: 28px; }
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,20,45,0.72) 0%, rgba(4,20,45,0.55) 45%, rgba(4,20,45,0.85) 100%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; padding-block: 110px 70px; }
.hero-split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero-split > * { min-width: 0; }

.hero-headlines { color: var(--white); }
/* La altura de .rotating-line la fija JS (main.js) midiendo el texto activo real,
   así nunca se corta sin importar el idioma, el ancho de pantalla o cuántas líneas ocupe. */
.rotating-line { position: relative; overflow: hidden; transition: height 0.3s var(--ease); }
.rotating-line .rot-item {
  position: absolute; inset: 0; opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  display: flex; align-items: center;
  overflow-wrap: break-word;
}
.rotating-line .rot-item.active { opacity: 1; transform: translateY(0); }
.rotating-line .rot-measurer { position: absolute; visibility: hidden; top: 0; left: 0; width: 100%; display: block; pointer-events: none; }
.hero-service-rotator { font-family: var(--font); font-weight: 700; font-size: clamp(1.3rem, 1.05rem + 1.2vw, 2rem); line-height: 1.3; color: var(--cyan-light); text-transform: uppercase; letter-spacing: 0.01em; }
.hero-slogan-rotator { margin-top: 8px; font-family: var(--font); font-weight: 700; font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); line-height: 1.25; }

.hero-subhead { margin-top: 20px; font-weight: 400; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); color: rgba(255,255,255,0.88); max-width: 34ch; }
.hero-actions { margin-top: 30px; }

/* request form card */
.request-card {
  background: linear-gradient(165deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -20px rgba(2,8,20,0.55), inset 0 1px 0 rgba(255,255,255,0.18);
  padding: 28px;
}
.request-card h4 { font-size: 1rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--white); }
.request-card .card-divider { height: 2px; width: 46px; background: var(--cyan-light); margin: 10px 0 18px; border-radius: 2px; }
/* respaldo sólido si el navegador no soporta backdrop-filter (legibilidad garantizada) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .request-card { background: linear-gradient(165deg, rgba(6,20,45,0.92), rgba(4,14,34,0.95)); }
}

@media (max-width: 980px) {
  .hero-split { grid-template-columns: 1fr; gap: 34px; }
  .hero-inner { padding-block: 120px 56px; }
}

/* ---------- trust strip ---------- */
.trust-strip { background: var(--gray-bg); border-bottom: 1px solid var(--line); }
.trust-row { display: flex; align-items: center; gap: 20px; padding-block: 24px; flex-wrap: wrap; }
.trust-label { font-family: var(--font); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); flex: none; }
.trust-marquee { display: flex; flex-wrap: wrap; gap: 8px 6px; flex: 1; }
.trust-marquee span { font-weight: 600; font-size: 0.88rem; color: var(--text); padding: 7px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }

/* ---------- about (light gray) ---------- */
.about-section { background: var(--gray-bg); }
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: stretch; }
.about-art { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 320px; }
.about-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.about-badge {
  position: absolute; right: 20px; bottom: 20px; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  background: rgba(6, 13, 26, 0.55); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  color: var(--white);
}
.about-badge .num { font-family: var(--font); font-weight: 700; font-size: 2.2rem; color: var(--cyan-light); line-height: 1; }
.about-badge .label { font-size: 0.72rem; line-height: 1.25; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.about-copy { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; }
.about-copy .eyebrow { margin-bottom: 10px; }
.about-copy h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }
.about-copy .lede { margin: 14px 0 28px; }
.about-copy .tabs { border: 0; border-radius: 0; flex: 1; display: flex; flex-direction: column; }
.about-copy .tab-nav { background: transparent; border-bottom: 0; padding: 0; gap: 8px; }
.about-copy .tab-nav button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--gray-bg); color: var(--text-soft);
}
.about-copy .tab-nav button i { font-size: 0.85em; }
.about-copy .tab-nav button.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.about-copy .tab-panels { padding: 22px 0 0; flex: 1; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-art { min-height: 240px; }
  .about-copy { padding: 26px; }
}
.soft-band { background: linear-gradient(180deg, #ffffff 0%, #f4f6f8 45%, #eef1f4 100%); }

/* ---------- services band (navy + textura) ---------- */
.services-band {
  background-color: var(--navy);
  background-image: linear-gradient(rgba(6,58,132,0.82), rgba(6,58,132,0.82)), var(--pattern);
  background-size: auto, cover;
  background-position: center, center;
  background-repeat: repeat, no-repeat;
  color: var(--white);
}
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex; flex-direction: column; gap: 14px;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), border-color .25s;
}
.service-card:hover { background: rgba(255,255,255,0.13); transform: translateY(-4px); border-color: var(--cyan-light); }
.service-icon {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cyan); color: var(--white); font-size: 1.3rem; flex: none;
}
.service-card h3 { color: var(--white); font-size: 1.02rem; }
.service-card p { color: rgba(255,255,255,0.78); font-size: 0.9rem; flex: 1; }
.service-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--white); margin-top: 2px; }
.service-link i { font-size: 0.75em; transition: transform 0.2s; }
.service-card:hover .service-link i, .service-link:hover i { transform: translateX(3px); }

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

/* ---------- service detail list (servicios.php, sobre blanco) ---------- */
.service-detail { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; padding-block: 44px; border-top: 1px solid var(--line); align-items: start; }
.service-detail:first-of-type { border-top: 0; }
.service-detail .idx { font-weight: 700; color: var(--cyan); font-size: 0.85rem; }
.service-detail .head { display: flex; align-items: flex-start; gap: 16px; margin-top: 12px; }
.service-detail .head .service-icon { background: var(--navy); width: 54px; height: 54px; font-size: 1.4rem; }
.service-detail h3 { color: var(--navy); }
.service-detail-body p { color: var(--text); }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.service-tags span { font-size: 0.75rem; font-weight: 600; padding: 6px 13px; border-radius: 999px; background: var(--gray-bg); color: var(--navy); }
@media (max-width: 820px) { .service-detail { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- bento (nosotros teaser, blanco) ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(140px, auto); gap: 18px; }
.bento-card { border-radius: var(--radius); padding: 30px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.bento-card.span-4 { grid-column: span 4; }
.bento-card.span-2 { grid-column: span 2; }
.bento-card.tall { grid-row: span 2; }
.bento-card.plain { background: var(--gray-bg); border: 1px solid var(--line); }
.bento-card.accent { background: linear-gradient(155deg, var(--navy), var(--navy-darker)); color: var(--white); }
.bento-card.accent p, .bento-card.accent .service-link { color: rgba(255,255,255,0.85); }
.bento-card.accent .service-link { color: var(--cyan-light); }
.bento-card.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.bento-card.photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,20,45,0.9), rgba(4,20,45,0.1) 65%); z-index: 0; }
.bento-card.photo { color: var(--white); }
.bento-card > * { position: relative; z-index: 1; }
.bento-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.bento-card.photo h3 { color: var(--white); }
.bento-card p { color: var(--text); font-size: 0.9rem; }
.bento-card.photo p { color: rgba(255,255,255,0.85); }
.bento-card .num { font-family: var(--font); font-size: 2.6rem; color: var(--navy); font-weight: 700; line-height: 1; margin-bottom: 8px; }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card.span-4, .bento-card.span-2 { grid-column: span 2; }
  .bento-card.tall { grid-row: span 1; }
}

/* ---------- tabs (misión/visión/valores/experiencia) ---------- */
.tabs { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.tab-nav { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--gray-bg); }
.tab-nav button { padding: 17px 24px; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-soft); border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.tab-nav button.active { color: var(--navy); border-color: var(--cyan); }
.tab-panels { padding: 38px; }
.tab-panel { display: none; max-width: 65ch; }
.tab-panel.active { display: block; }
.tab-panel p { color: var(--text); }
.tab-panel ul { display: grid; gap: 12px; margin-top: 4px; }
.tab-panel ul li { color: var(--text); display: flex; gap: 10px; }
.tab-panel ul li strong { color: var(--ink); }
.tab-panel ul li i { color: var(--cyan); margin-top: 5px; flex: none; }
@media (max-width: 640px) { .tab-panels { padding: 26px 22px; } .tab-nav button { padding: 13px 16px; font-size: 0.76rem; } }

/* ---------- values grid ---------- */
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.value-card { padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.value-card .letter { font-weight: 700; color: var(--white); background: var(--navy); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.value-card h4 { font-size: 1rem; margin-bottom: 6px; }
.value-card p { color: var(--text); font-size: 0.88rem; }
@media (max-width: 900px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .value-grid { grid-template-columns: 1fr; } }

/* ---------- clients wall ---------- */
.logo-marquee { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); margin-top: 32px; }
.logo-track { display: flex; align-items: center; gap: 20px; width: max-content; will-change: transform; }
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-slide {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  width: 190px; height: 100px; padding: 18px 22px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.logo-slide:hover { border-color: var(--cyan); box-shadow: var(--shadow); transform: translateY(-3px); }
.logo-slide img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(1) opacity(0.72); transition: filter .25s; }
.logo-slide:hover img { filter: grayscale(0) opacity(1); }
@media (max-width: 640px) { .logo-slide { width: 148px; height: 80px; padding: 12px 16px; } }

/* ---------- projects gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; gap: 18px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,20,45,0.85) 0%, transparent 45%); }
.gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 18px; z-index: 1; font-weight: 700; color: var(--white); font-size: 0.92rem; }
.gallery-item.big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } .gallery-item.big { grid-column: span 2; } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } .gallery-item.big { grid-column: span 1; grid-row: span 1; } }

.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(4,10,24,0.95); display: none; align-items: center; justify-content: center; padding: 40px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 86vh; border-radius: var(--radius-sm); object-fit: contain; }
.lightbox-cap { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; font-size: 0.85rem; color: var(--white); }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); color: var(--white); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.flip { transform: scaleX(-1); }
@media (max-width: 640px) { .lightbox-prev, .lightbox-next { width: 38px; height: 38px; } }

/* ---------- stats band ---------- */
.stats-band { background: var(--gray-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 38px 26px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .num { font-size: clamp(1.7rem, 1.4rem + 1vw, 2.3rem); color: var(--navy); font-weight: 700; }
.stat .label { color: var(--text-soft); font-size: 0.84rem; margin-top: 6px; }
@media (max-width: 820px) { .stats-row { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(3) { border-left: 0; } .stat { border-top: 1px solid var(--line); } .stat:nth-child(1), .stat:nth-child(2) { border-top: 0; } }
@media (max-width: 480px) { .stats-row { grid-template-columns: 1fr; } .stat { border-left: 0 !important; } }

/* ---------- CTA band (navy + textura) ---------- */
.cta-band {
  border-radius: 20px;
  background-color: var(--navy);
  background-image: linear-gradient(135deg, rgba(6,58,132,0.92), rgba(4,32,80,0.96)), var(--pattern);
  background-size: auto, cover; background-position: center, center; background-repeat: repeat, no-repeat;
  padding: 52px 46px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; color: var(--white);
}
.cta-band h2 { color: var(--white); max-width: 20ch; }
.cta-band .lede { color: rgba(255,255,255,0.85); margin-top: 10px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-band .btn-primary { background: var(--cyan); }
.cta-band .btn-primary:hover { background: var(--cyan-light); }

/* ---------- contact ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; }
.field label { font-size: 0.82rem; font-weight: 700; color: var(--ink); }
.field .hint { font-size: 0.74rem; color: var(--text-soft); }
.field input, .field select, .field textarea {
  background: var(--white); border: 1px solid #d7dae0; border-radius: var(--radius-sm);
  padding: 12px 15px; color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(6, 30, 70, 0.06);
}
.field input::placeholder, .field textarea::placeholder { color: #b7b9bc; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(16, 163, 197, 0.15); }
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-error { font-size: 0.76rem; color: #ff9d9d; display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #c23a3a; }
.field.has-error .field-error { display: block; }
.form-note { font-size: 0.8rem; color: var(--text-soft); margin-top: 10px; }

/* ---------- formulario compacto tipo "glass" (campos translúcidos, texto blanco) ---------- */
.form-compact .field-row { gap: 14px; }
.field-u { margin-bottom: 12px; gap: 6px; }
.field-u label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.8);
}
.field-u .req { color: #ff9d9d; text-transform: none; }
.field-u-count { font-size: 0.65rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: rgba(255,255,255,0.45); white-space: nowrap; }
.field-u-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 11px 18px;
  transition: border-color 0.2s, background 0.2s;
}
.field-u-row:focus-within { border-color: var(--cyan-light); background: rgba(255,255,255,0.14); }
.field-u-row i { color: rgba(255,255,255,0.65); font-size: 0.85rem; flex: none; }
.field-u-row input, .field-u-row select, .field-u-row textarea {
  border: 0; background: transparent; box-shadow: none; padding: 2px 0; width: 100%; min-width: 0; color: var(--white);
}
.field-u-row input::placeholder, .field-u-row textarea::placeholder { color: rgba(255,255,255,0.4); }
.field-u-row select { appearance: none; -webkit-appearance: none; cursor: pointer; color-scheme: light; }
.field-u-row select option { background: #ffffff; color: var(--ink); }
.field-u-row-top { align-items: flex-start; border-radius: var(--radius-sm); padding-top: 12px; }
.field-u-row-top i { margin-top: 3px; }
.field-u-row textarea { resize: none; min-height: 40px; line-height: 1.4; }
.field-u.has-error .field-u-row { border-color: #ff9d9d; background: rgba(255,80,80,0.1); }

.agent-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; transition: border-color .2s, box-shadow .2s; background: var(--white); box-shadow: 0 10px 26px -18px rgba(6,30,70,0.22); }
.agent-card:hover { border-color: var(--cyan); box-shadow: 0 14px 30px -14px rgba(6,30,70,0.3); }
.agent-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--white); flex: none; font-size: 0.85rem; }
.agent-info { min-width: 0; flex: 1 1 auto; }
.agent-info h4 { font-size: 0.9rem; overflow-wrap: break-word; }
.agent-info p { font-size: 0.78rem; color: var(--text-soft); }
.agent-card .btn { margin-left: auto; padding: 8px 14px; font-size: 0.78rem; flex: none; }

@media (max-width: 900px) { .field-row { grid-template-columns: 1fr; } }

.news-date { font-weight: 600; font-size: 0.76rem; color: var(--cyan); }

/* ---------- footer (una sola línea, fiel al original) ---------- */
.site-footer { background: var(--navy); padding-block: 22px; text-align: center; }
.site-footer p { color: rgba(255,255,255,0.85); font-size: 0.85rem; }
.site-footer a { color: var(--cyan-light); }
.site-footer a.credit-link { color: #d9b064; font-weight: 700; transition: color 0.2s; }
.site-footer a.credit-link:hover { color: #ecc987; }

/* ---------- whatsapp float ---------- */
.wa-float { position: fixed; left: 18px; bottom: 18px; z-index: 200; }
.wa-float-btn { width: 44px; height: 44px; border-radius: 14px; background: #25d366; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.6); color: var(--white); font-size: 1.15rem; }
.wa-panel {
  position: absolute; bottom: 58px; left: 0; width: 300px;
  background: linear-gradient(165deg, #ffffff 0%, #f4f6f8 55%, #eceff3 100%);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: none;
}
.wa-panel.open { display: block; }
.wa-panel h4 { font-size: 0.85rem; margin-bottom: 12px; color: var(--text); }
@media (max-width: 480px) { .wa-panel { width: 82vw; } }

.scroll-top-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.15);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), background 0.2s, visibility 0.25s;
}
.scroll-top-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top-btn:hover { background: var(--cyan); }

/* ---------- utility ---------- */
.section { padding-block: 88px; position: relative; }
.section-tight { padding-block: 60px; }
#enviacv { padding-top: 0; }
@media (max-width: 780px) { .section { padding-block: 60px; } .section-tight { padding-block: 40px; } }

.agents-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 900px; margin-inline: auto; }
@media (max-width: 900px) { .agents-grid { grid-template-columns: 1fr; } }

[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 999; background: var(--cyan); color: var(--white); padding: 12px 18px; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* =========================================================
   GALERÍA DENSA (proyectos, a todo el ancho)
   ========================================================= */
.gallery-wide { max-width: 1600px; margin-inline: auto; padding-inline: 12px; }
.gallery-dense { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.gallery-dense .gallery-item { aspect-ratio: 1 / 1; border-radius: var(--radius-sm); box-shadow: none; }
.gallery-dense .gallery-cap { padding: 12px 14px; font-size: 0.82rem; }
@media (max-width: 640px) { .gallery-dense { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px; } }

/* =========================================================
   CARRUSEL DE NOTICIAS (desplazamiento horizontal + pantalla completa)
   ========================================================= */
.news-carousel { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.news-track { display: flex; gap: 22px; width: max-content; will-change: transform; }
.news-carousel:hover .news-track { animation-play-state: paused; }
.news-slide {
  flex: 0 0 340px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; background: var(--white); cursor: pointer; box-shadow: 0 10px 30px -18px rgba(6,30,70,0.25);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.news-slide:hover { border-color: var(--cyan); box-shadow: var(--shadow); transform: translateY(-4px); }
.news-slide img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 16px; }
.news-slide .news-date { font-weight: 600; font-size: 0.76rem; color: var(--cyan); }
.news-slide h3 { margin-top: 8px; color: var(--navy); font-size: 1.05rem; }
.news-slide p { color: var(--text); margin-top: 8px; font-size: 0.9rem; }
@media (prefers-reduced-motion: reduce) { .news-track { animation: none; } }
@media (max-width: 640px) { .news-slide { flex-basis: 82vw; } }

.news-fullscreen { position: fixed; inset: 0; z-index: 300; background: var(--white); display: none; overflow-y: auto; }
.news-fullscreen.open { display: block; }
.news-fullscreen-inner { max-width: 820px; margin-inline: auto; padding: 90px 24px 80px; }
.news-fullscreen img { width: 100%; border-radius: var(--radius); margin-bottom: 28px; }
.news-fullscreen .news-date { font-weight: 600; color: var(--cyan); }
.news-fullscreen h1 { color: var(--navy); margin-top: 10px; }
.news-fullscreen p { color: var(--text); margin-top: 18px; font-size: 1.02rem; line-height: 1.8; }
.news-fullscreen-close {
  position: fixed; top: 22px; right: 24px; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--white); font-size: 1.1rem;
}

/* =========================================================
   CARRUSEL DE MAQUINARIA
   ========================================================= */
.machine-carousel { position: relative; }
.machine-viewport { overflow: hidden; border-radius: var(--radius); }
.machine-track { display: flex; transition: transform 0.5s var(--ease); }
.machine-slide { flex: 0 0 33.3333%; padding-inline: 8px; }
.machine-slide img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.machine-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; color: var(--navy); z-index: 2; }
.machine-nav.prev { left: -20px; }
.machine-nav.next { right: -20px; }
@media (max-width: 900px) { .machine-slide { flex-basis: 50%; } }
@media (max-width: 600px) { .machine-slide { flex-basis: 100%; } .machine-nav.prev { left: 4px; } .machine-nav.next { right: 4px; } }

/* =========================================================
   MAPA + FOOTER (banda navy con textura, fiel al original)
   ========================================================= */
.contact-band {
  background-color: var(--navy);
  background-image: linear-gradient(rgba(6,58,132,0.85), rgba(6,58,132,0.85)), var(--pattern);
  background-size: auto, cover; background-position: center, center; background-repeat: repeat, no-repeat;
  color: var(--white); padding-block: 60px 0;
}
.map-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.map-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 3px solid var(--white); }
#osmMap { height: 380px; width: 100%; background: var(--gray-bg); }
@media (max-width: 640px) { #osmMap { height: 280px; } }

.contact-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; align-items: center; padding-block: 44px; margin-top: 44px; border-top: 1px solid rgba(255,255,255,0.15); }
.contact-footer-grid h5 { font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan-light); margin-bottom: 12px; }
.contact-footer-grid p { color: rgba(255,255,255,0.85); font-size: 0.92rem; margin-bottom: 2px; }
.contact-footer-social { display: flex; gap: 10px; }
.contact-footer-social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35); display: flex; align-items: center; justify-content: center; color: var(--white); transition: background .2s, border-color .2s; }
.contact-footer-social a:hover { background: var(--cyan); border-color: var(--cyan); }
@media (max-width: 860px) { .contact-footer-grid { grid-template-columns: 1fr; text-align: center; gap: 24px; } .contact-footer-social { justify-content: center; } }
