/* ── Traction Servicios — Split Screen + Diagonal Aesthetic ── */

:root {
  --navy: #001845;
  --navy-dark: #000814;
  --cyan: #00CED1;
  --cyan-bright: #2eeef1;
  --cyan-glow: rgba(0, 206, 209, 0.45);
  --white: #ffffff;
  --gray-600: #94a3b8;
  --font: 'Outfit', system-ui, sans-serif;
  --nav-h: 76px;
  --split-angle: -12deg;
  --transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  --img-clima: url('../static/images/bg-climatizacion.png');
  --img-trans: url('../static/images/bg-transporte.png');
}

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

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

body {
  font-family: var(--font);
  color: var(--navy);
  background: var(--navy-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar--hero {
  background: linear-gradient(180deg, rgba(0, 8, 20, 0.65) 0%, transparent 100%);
}

.navbar.scrolled {
  background: rgba(0, 8, 20, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(0, 206, 209, 0.12);
}

.navbar.scrolled .navbar__toggle span { background: var(--white); }

.navbar.scrolled .navbar__menu a { color: var(--white); }
.navbar.scrolled .navbar__menu a:hover { color: var(--cyan); }

.navbar__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.navbar__brand-logo {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  background: var(--white);
  border-radius: 8px;
  padding: 4px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
}

.navbar__brand-logo--footer {
  width: 40px;
  height: 40px;
}

.navbar__brand-logo img {
  width: 100%;
  height: auto;
  min-height: 120%;
  object-fit: cover;
  object-position: top center;
}

.navbar__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.navbar__brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
}

.navbar__brand-tag {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 2px;
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.navbar__toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
  transform-origin: center;
}

.navbar.scrolled .navbar__toggle span { background: var(--white); }

.navbar__toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.navbar__toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar__toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.navbar__menu {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}

.navbar__menu a {
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  position: relative;
  padding: 0.35rem 0;
  transition: color var(--transition);
}

.navbar.scrolled .navbar__menu a { color: var(--white); }
.navbar.scrolled .navbar__menu a:hover { color: var(--cyan); }

.navbar__menu a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transform: skewX(-20deg);
  transition: width var(--transition);
}

.navbar__menu a:hover::before { width: 100%; }

.navbar__menu a:hover { color: var(--cyan); }
.navbar.scrolled .navbar__menu a:hover { color: var(--cyan); }

/* ── Split Screen Hero ── */
.split-hero {
  position: relative;
  margin-top: 0;
  height: 100vh;
  min-height: 560px;
  max-height: 960px;
  display: flex;
  overflow: hidden;
}

.split-hero__stripes {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(
    var(--split-angle),
    transparent,
    transparent 80px,
    rgba(0, 206, 209, 0.03) 80px,
    rgba(0, 206, 209, 0.03) 81px
  );
}

.split-hero__slash {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 6px;
  z-index: 10;
  pointer-events: none;
  transform: translateX(-50%) skewX(-12deg);
  background: linear-gradient(180deg, transparent, var(--cyan) 20%, var(--cyan-bright) 50%, var(--cyan) 80%, transparent);
  box-shadow:
    -3px 0 0 rgba(0, 206, 209, 0.3),
    3px 0 0 rgba(0, 206, 209, 0.3),
    0 0 40px var(--cyan-glow);
}

.split-hero__slash::before,
.split-hero__slash::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.split-hero__slash::before { left: -14px; }
.split-hero__slash::after { right: -14px; }

.split-hero__panel {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: var(--white);
  transition: flex var(--transition);
}

.split-hero__panel--clima {
  clip-path: polygon(0 0, 100% 0, calc(100% - 8vw) 100%, 0 100%);
  z-index: 2;
  margin-right: -4vw;
}

.split-hero__panel--trans {
  clip-path: polygon(8vw 0, 100% 0, 100% 100%, 0 100%);
  z-index: 1;
  margin-left: -4vw;
  align-items: flex-end;
  justify-content: flex-end;
}

.split-hero__panel:hover { flex: 1.08; }
.split-hero__panel--clima:hover { z-index: 3; }
.split-hero__panel--trans:hover { z-index: 3; }

.split-hero__bg {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.split-hero__bg--clima {
  background-image: var(--img-clima);
  background-position: 60% center;
}

.split-hero__bg--trans {
  background-image: var(--img-trans);
  background-position: center;
}

.split-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  transition: opacity var(--transition);
}

.split-hero__bg--clima::after {
  background: linear-gradient(
    160deg,
    rgba(0, 8, 20, 0.55) 0%,
    rgba(0, 24, 69, 0.7) 50%,
    rgba(0, 206, 209, 0.25) 100%
  );
}

.split-hero__bg--trans::after {
  background: linear-gradient(
    200deg,
    rgba(0, 206, 209, 0.15) 0%,
    rgba(0, 8, 20, 0.65) 40%,
    rgba(0, 24, 69, 0.85) 100%
  );
}

.split-hero__panel:hover .split-hero__bg {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.split-hero__content {
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 8vh, 5rem);
  max-width: 520px;
}

.split-hero__panel--trans .split-hero__content {
  text-align: right;
  margin-left: auto;
}

.split-hero__index {
  display: block;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 206, 209, 0.5);
  margin-bottom: -0.5rem;
  letter-spacing: -0.02em;
}

.split-hero__title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.split-hero__title::after {
  content: '';
  display: block;
  width: 72px;
  height: 4px;
  background: var(--cyan);
  margin-top: 1rem;
  transform: skewX(-20deg);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.split-hero__panel--trans .split-hero__title::after {
  margin-left: auto;
}

.split-hero__content p {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 300;
  opacity: 0.88;
  max-width: 340px;
}

.split-hero__panel--trans .split-hero__content p {
  margin-left: auto;
}

.split-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition);
}

.split-hero__cta svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.split-hero__panel:hover .split-hero__cta {
  opacity: 1;
  transform: translateY(0);
}

/* ── Sections ── */
.section {
  position: relative;
  overflow: hidden;
}

.section__inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 8rem) clamp(1.5rem, 5vw, 4rem);
}

.section__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.section__bg--clima {
  background-image: var(--img-clima);
  background-position: 55% center;
}

.section__bg--clima::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(248, 250, 252, 0.97) 0%,
    rgba(248, 250, 252, 0.92) 45%,
    rgba(0, 24, 69, 0.75) 100%
  );
}

.section__bg--trans {
  background-image: var(--img-trans);
}

.section__bg--trans::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    225deg,
    rgba(0, 8, 20, 0.88) 0%,
    rgba(0, 24, 69, 0.82) 50%,
    rgba(0, 8, 20, 0.92) 100%
  );
}

.section__diag {
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 3;
  pointer-events: none;
}

.section__diag--top {
  top: 0;
  background: var(--navy-dark);
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 100%);
  height: 80px;
}

.section__diag--bottom {
  bottom: 0;
  background: var(--navy-dark);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  height: 100px;
}

.section__diag--contact {
  top: 0;
  height: 90px;
  background: var(--navy-dark);
  clip-path: polygon(0 0, 100% 0, 100% 20%, 0 100%);
}

.section__header {
  margin-bottom: 3rem;
  position: relative;
}

.section__header--right {
  text-align: right;
}

.section__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  transform: skewX(-8deg);
}

.section__tag--light { color: var(--cyan-bright); }

.section__header h2 {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.section--clima .section__header h2 { color: var(--navy); }
.section--trans .section__header h2 { color: var(--white); }

.section__subtitle {
  margin-top: 1rem;
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 520px;
  line-height: 1.7;
}

.section--clima .section__subtitle { color: var(--gray-600); }
.section--trans .section__subtitle { color: rgba(255, 255, 255, 0.7); margin-left: auto; }

/* ── Service cards ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.services-grid--transport {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.service-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  box-shadow: 0 8px 32px rgba(0, 24, 69, 0.12);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card--glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.service-card:hover {
  transform: translateY(-6px) skewY(-0.5deg);
  box-shadow: 0 20px 48px rgba(0, 24, 69, 0.2);
}

.service-card--glass:hover {
  box-shadow: 0 20px 48px rgba(0, 206, 209, 0.15);
  border-color: rgba(0, 206, 209, 0.3);
}

.service-card__img {
  height: 190px;
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
  transition: clip-path var(--transition);
}

.service-card__img--clima {
  background-image: var(--img-clima);
  background-position: 40% center;
}

.service-card__img--clima-alt {
  background-image: var(--img-clima);
  background-position: 70% 30%;
  filter: saturate(1.1);
}

.service-card__img--trans {
  background-image: var(--img-trans);
  background-position: center 40%;
}

.service-card:hover .service-card__img {
  clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%);
}

.service-card__body {
  padding: 1.25rem 1.5rem 1.75rem;
}

.service-card__body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.section--clima .service-card__body h3 { color: var(--navy); }
.section--clima .service-card__body p { color: var(--gray-600); font-size: 0.88rem; font-weight: 300; margin-top: 0.35rem; }

.service-card--glass .service-card__body h3 { color: var(--white); }

/* ── Contact ── */
.section--contact {
  position: relative;
  background: var(--navy-dark);
  color: var(--white);
  padding: clamp(5rem, 10vw, 7rem) clamp(1.5rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
}

.contact-split {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-list svg {
  width: 22px;
  height: 22px;
  fill: var(--cyan);
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-list strong {
  display: block;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 0.2rem;
}

.contact-list a {
  color: var(--white);
  transition: color var(--transition);
}

.contact-list a:hover { color: var(--cyan-bright); }

.cert-badge {
  margin-top: 2rem;
  padding: 0.85rem 1.25rem;
  border-left: 3px solid var(--cyan);
  background: rgba(0, 206, 209, 0.06);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.contact-map {
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 92%);
  overflow: hidden;
  min-height: 380px;
  border: 1px solid rgba(0, 206, 209, 0.2);
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  filter: grayscale(40%) contrast(1.05) brightness(0.9);
}

/* ── Footer ── */
.footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(0, 206, 209, 0.1);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer p {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}

/* ── WhatsApp flotante ── */
.whatsapp-float {
  position: fixed;
  bottom: clamp(1.25rem, 3vw, 2rem);
  right: clamp(1.25rem, 3vw, 2rem);
  z-index: 999;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 20px rgba(37, 211, 102, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: var(--white);
}

.whatsapp-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow:
    0 8px 28px rgba(37, 211, 102, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

.whatsapp-float:active {
  transform: scale(0.96);
}

/* ── Mobile ── */
@media (max-width: 900px) {
  .split-hero {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    max-height: none;
  }

  .split-hero__slash {
    top: 50%;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 5px;
    transform: translateY(-50%) skewY(-3deg);
  }

  .split-hero__slash::before { left: 20%; top: -12px; width: 30%; height: 2px; bottom: auto; }
  .split-hero__slash::after { right: 20%; top: auto; bottom: -12px; width: 30%; height: 2px; }

  .split-hero__panel {
    flex: 1;
    min-height: 50vh;
    margin: 0 !important;
  }

  .split-hero__panel--clima {
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    align-items: flex-end;
  }

  .split-hero__panel--trans {
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
    align-items: flex-start;
    justify-content: flex-start;
  }

  .split-hero__panel--trans .split-hero__content {
    text-align: left;
    margin-left: 0;
    padding-top: 2.5rem;
  }

  .split-hero__panel--trans .split-hero__title::after,
  .split-hero__panel--trans .split-hero__content p {
    margin-left: 0;
  }

  .split-hero__panel:hover { flex: 1; }

  .split-hero__cta { opacity: 1; transform: none; }

  .section__bg { background-attachment: scroll; }

  .contact-split { grid-template-columns: 1fr; }

  .section--trans .section__header--right { text-align: left; }
  .section--trans .section__subtitle { margin-left: 0; }
}

@media (max-width: 768px) {
  .navbar__toggle { display: flex; }

  .navbar__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 88vw);
    height: 100vh;
    background: var(--navy-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
    transition: right var(--transition);
  }

  .navbar__menu.open { right: 0; }
  .navbar__menu a { color: var(--white) !important; font-size: 0.9rem; }

  .services-grid,
  .services-grid--transport {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .section__bg { background-attachment: scroll; }
}
