/* ==========================================================
   Land Colombia S.A.S. E.S.P. — Sitio web
   ========================================================== */

:root {
  --orange: #F25C05;
  --orange-2: #FF7A1A;
  --orange-3: #F04E0A;
  --orange-text: #D64500;
  --orange-soft: #FFE7D1;
  --teal: #063F55;
  --teal-900: #042C3C;
  --teal-2: #0B4F66;
  --ink: #10212B;
  --muted: #4B5C66;
  --muted-2: #5A6B75;
  --muted-3: #3E4F59;
  --on-dark: #CFE3EC;
  --on-dark-2: #8FB3C2;
  --bg: #F4F7FA;
  --bg-2: #EAF1F6;
  --white: #ffffff;
  --line: rgba(6, 63, 85, 0.08);
  --line-2: rgba(6, 63, 85, 0.16);
  --green: #0E7A3E;
  --green-bg: #D9F7E5;
  --red: #B42318;
  --red-dot: #D92D20;
  --red-bg: #FEECEB;
  --wa: #14A04F;
  --shadow: 0 20px 40px rgba(6, 63, 85, 0.12);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1280px;
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--orange-text); }
a:hover { color: #A83600; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
:focus-visible { outline: 3px solid var(--orange-2); outline-offset: 3px; border-radius: 8px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange-text); }
.h2 { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 800; color: var(--teal); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; border: 0;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(6, 63, 85, .18); }
.btn .arr { transition: transform .25s ease; }
.btn:hover .arr { transform: translateX(4px); }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { color: #fff; }
.btn--dark { background: var(--teal); color: #fff; }
.btn--dark:hover { color: #fff; }
.btn--ghost { background: #fff; border: 1px solid var(--line-2); color: var(--teal); }
.btn--ghost:hover { color: var(--teal); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 247, 250, .86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  animation: slideDown .7s var(--ease) both;
  transition: box-shadow .3s ease, background-color .3s ease;
}
.header.is-scrolled { background: rgba(255, 255, 255, .92); box-shadow: 0 8px 30px rgba(6, 63, 85, .08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); padding-top: 12px; padding-bottom: 12px; }
.brand img { height: 50px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.nav a { padding: 8px 16px; border-radius: 999px; color: var(--ink); text-decoration: none; transition: background-color .3s ease, color .3s ease; }
.nav a:hover { background: var(--bg-2); }
.nav a.is-active { background: var(--teal); color: #fff; }
.header__actions { display: flex; align-items: center; gap: 10px; }
.emergency { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--red); text-decoration: none; font-size: 14px; font-weight: 600; }
.emergency:hover { color: var(--red); background: var(--red-bg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red-dot); animation: pulse 1.8s ease-out infinite; }
.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--teal); align-items: center; justify-content: center; cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 24px; }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); font-size: 13px; font-weight: 500; color: var(--teal-2); }
.badge span { padding: 2px 10px; border-radius: 999px; background: var(--green-bg); color: var(--green); font-weight: 600; }
.hero h1 { font-size: clamp(40px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; color: var(--teal); }
.grad { background: linear-gradient(90deg, var(--orange-2), var(--orange-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { font-size: 18px; color: var(--muted); max-width: 540px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__media { position: relative; }
.hero__img { overflow: hidden; border-radius: 32px; background: #9AAAB2; animation: fadeIn 1s ease both .15s; }
.hero__img img { width: 100%; height: 540px; object-fit: cover; object-position: 38% 60%; animation: kenburns 2.2s var(--ease) both; }
.float-card {
  position: absolute; left: 20px; bottom: 20px; max-width: 360px; width: calc(100% - 40px);
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background: #fff; border-radius: 22px; box-shadow: 0 18px 40px rgba(6, 63, 85, .16);
  animation: fadeUp .9s var(--ease) .7s both, float 5s ease-in-out 1.8s infinite;
}
.float-card__icon { flex: 0 0 48px; height: 48px; border-radius: 14px; background: var(--red-bg); color: var(--red); display: flex; align-items: center; justify-content: center; }
.float-card small { display: block; font-size: 13px; color: var(--muted-2); line-height: 1.3; }
.float-card a { font-size: 20px; font-weight: 700; color: var(--teal); text-decoration: none; }

/* ---------- Quick actions ---------- */
.quick { padding: 24px 0 88px; }
.quick__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.qcard {
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  min-height: 190px; padding: 28px; border-radius: 26px; text-decoration: none;
  background: #fff; border: 1px solid var(--line); color: var(--teal);
}
.qcard:hover { color: var(--teal); }
.qcard__top { display: flex; justify-content: space-between; align-items: flex-start; }
.qcard__icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.qcard strong { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.qcard small { display: block; font-size: 14px; color: var(--muted-2); }
.qcard--pay { background: linear-gradient(135deg, #FF8A1F 0%, var(--orange-3) 100%); border: 0; color: #fff; }
.qcard--pay:hover { color: #fff; }
.qcard--pay small { color: #fff; opacity: .92; }
.qcard--pay .qcard__icon { background: rgba(255, 255, 255, .2); }
.qcard--video .qcard__icon { background: var(--teal); color: #fff; }
.qcard--pqrs .qcard__icon { background: var(--green-bg); color: var(--green); }
.qcard--phone { background: var(--teal); border: 0; color: #fff; }
.qcard--phone:hover { color: #fff; }
.qcard--phone strong { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.qcard--phone small { color: var(--on-dark); }
.qcard--phone .qcard__icon { background: rgba(255, 255, 255, .12); }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--muted); }

.lift { transition: transform .4s var(--ease), box-shadow .4s ease, border-color .4s ease; }
.lift:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.lift .corner { transition: transform .3s ease; }
.lift:hover .corner { transform: translate(3px, -3px); }

/* ---------- Nosotros ---------- */
.about { padding: 88px 0; background: #fff; }
.about__head { max-width: 680px; margin-bottom: 48px; }
.about__head .eyebrow { margin-bottom: 12px; }
.about__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.about__media { position: relative; min-height: 480px; }
.about__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mv { display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 28px; background: var(--bg); }
.mv__head { display: flex; align-items: center; gap: 12px; }
.mv__icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.mv__icon--o { background: var(--orange-soft); color: var(--orange-text); }
.mv__icon--g { background: var(--green-bg); color: var(--green); }
.mv h3 { font-size: 24px; font-weight: 700; color: var(--teal); }
.mv p { color: var(--muted-3); font-size: 15px; }
.values { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 16px; padding: 28px 32px; border-radius: 28px; background: var(--teal); color: #fff; }
.values h3 { font-size: 18px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); font-size: 14px; transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.chip:hover { background: var(--orange-2); border-color: var(--orange-2); color: var(--teal); }

.zoom { overflow: hidden; border-radius: 28px; }
.zoom img { transition: transform 1.2s var(--ease); }
.zoom:hover img { transform: scale(1.05); }
.about__photo { position: relative; height: 100%; min-height: 480px; }
.about__photo img { width: 100%; height: 100%; min-height: 480px; object-fit: cover; object-position: center 40%; background: #CFE0E8; }
.dots { position: absolute; width: 180px; height: auto; opacity: .55; pointer-events: none; animation: drift 9s ease-in-out infinite; }
.dots--bl { left: -28px; bottom: -28px; }
.dots--tr { right: -24px; top: -28px; width: 160px; }

/* ---------- Servicios ---------- */
.services { padding: 96px 0; background: var(--teal); color: #fff; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.section-head .eyebrow { margin-bottom: 12px; }
.services .eyebrow { color: #FFA24D; }
.services .h2 { color: #fff; }
.section-head p { max-width: 420px; color: var(--on-dark); }
.services__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.svc {
  display: flex; flex-direction: column; gap: 18px; min-height: 240px; padding: 24px; border-radius: 26px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  transition: transform .4s var(--ease), background-color .4s ease, border-color .4s ease;
}
.svc:hover { transform: translateY(-6px); background: rgba(255, 255, 255, .11); border-color: rgba(255, 122, 26, .6); }
.svc__top { display: flex; justify-content: space-between; align-items: center; }
.svc__icon { width: 52px; height: 52px; border-radius: 16px; background: var(--orange-2); color: var(--teal); display: flex; align-items: center; justify-content: center; transition: transform .4s var(--ease); }
.svc:hover .svc__icon { transform: rotate(-8deg) scale(1.08); }
.svc__num { font-size: 14px; font-weight: 600; color: var(--on-dark-2); }
.svc h3 { margin-top: auto; font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.svc p { color: var(--on-dark); font-size: 15px; }

/* ---------- Ventajas ---------- */
.adv { padding: 96px 0; }
.adv__grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 56px; align-items: start; }
.adv__intro { display: flex; flex-direction: column; gap: 20px; }
.adv__intro p { color: var(--muted); }
.adv__media { position: relative; margin-top: 8px; }
.adv__media .zoom { position: relative; }
.adv__media img { width: 100%; height: 320px; object-fit: cover; object-position: 40% 72%; background: #DDE7EE; }
.adv__list { display: flex; flex-direction: column; gap: 12px; }
.adv__item {
  display: flex; gap: 20px; align-items: flex-start; padding: 24px 26px; border-radius: 22px;
  background: #fff; border: 1px solid var(--line);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.adv__item:hover { transform: translateX(6px); border-color: rgba(214, 69, 0, .35); box-shadow: 0 10px 24px rgba(6, 63, 85, .07); }
.adv__num { flex: 0 0 auto; font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: var(--orange-text); }
.adv__item strong { display: block; font-size: 18px; font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.adv__item span { color: var(--muted); font-size: 15px; }

/* ---------- Contacto ---------- */
.contact { padding: 0 0 96px; }
.contact__card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px; border-radius: 36px; background: #fff; border: 1px solid var(--line); }
.contact__info { display: flex; flex-direction: column; gap: 28px; }
.contact__info .eyebrow { margin-bottom: 12px; }
.contact__info .h2 { font-size: clamp(30px, 3.4vw, 40px); }
.info-list { display: flex; flex-direction: column; }
.info-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid #E6EDF2; }
.info-row:last-child { border-bottom: 0; }
.info-row svg { flex: 0 0 24px; color: var(--orange-text); }
.info-row small { display: block; font-size: 13px; color: var(--muted-2); }
.info-row b { font-weight: 600; }
.info-row a { font-weight: 600; word-break: break-all; }
.lines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.line { display: block; padding: 14px 16px; border-radius: 16px; background: var(--bg); color: var(--teal); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.line:hover { color: var(--teal); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(6, 63, 85, .12); }
.line small { display: block; font-size: 12px; color: var(--muted-2); }
.line b { font-weight: 700; }
.line--sos { background: var(--red-bg); color: #7A1A12; }
.line--sos:hover { color: #7A1A12; }
.line--sos small { color: #9B2C20; }

.map { position: relative; min-height: 440px; border-radius: 26px; overflow: hidden; background: var(--bg-2); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__card {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 20px; background: #fff; border-radius: 20px; box-shadow: 0 14px 34px rgba(6, 63, 85, .14);
}
.map__card .eyebrow { font-size: 12px; letter-spacing: .12em; }
.map__card b { display: block; color: var(--teal); }
.map__card small { color: var(--muted-2); font-size: 13px; }
.map__btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Entidades ---------- */
.regs { padding: 0 0 72px; }
.regs__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.regs__inner .eyebrow { color: var(--muted); }
.regs__logos { display: flex; flex-wrap: wrap; gap: 16px; }
.reg { width: 220px; height: 88px; padding: 10px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.reg img { max-height: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .3s ease, opacity .3s ease; }
.reg:hover img { filter: none; opacity: 1; }

/* ---------- Footer ---------- */
.footer { padding: 64px 0 32px; background: var(--teal-900); color: var(--on-dark); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.footer__brand { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.footer__logo { align-self: flex-start; padding: 10px 16px; border-radius: 16px; background: #fff; }
.footer__logo img { height: 44px; width: auto; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 56px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer__col strong { color: #fff; font-weight: 600; margin-bottom: 4px; }
.footer__col a { color: var(--on-dark); text-decoration: none; }
.footer__col a:hover { color: #fff; }
.footer__col a.sos { color: #FDA29B; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: var(--on-dark-2); }
.footer__bottom .btn { color: #fff; border: 1px solid rgba(255, 255, 255, .2); background: transparent; }

/* ---------- Floating buttons ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 96px; z-index: 40;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--teal); border: 1px solid var(--line-2); box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: var(--teal); }
.wa {
  position: fixed; right: 24px; bottom: 24px; z-index: 40; isolation: isolate;
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--wa); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22); transition: transform .25s ease;
}
.wa:hover { color: #fff; transform: scale(1.05); }
.wa__ring { position: absolute; inset: 0; z-index: -1; border-radius: 999px; background: var(--wa); animation: ring 2.2s ease-out infinite; }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 45, 32, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(217, 45, 32, 0); } }
@keyframes ring { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(10px, -10px); } }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: none; } }

.in { animation: fadeUp .9s var(--ease) both; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .22s; } .d3 { animation-delay: .34s; } .d4 { animation-delay: .46s; } .d5 { animation-delay: .58s; }

/* Scroll reveal (JS adds .reveal-ready to <html>, then .is-visible per element) */
.reveal-ready .rv { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-ready .rv.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1279px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 16px; right: 16px; top: calc(100% + 8px);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border-radius: 20px;
    box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav a { padding: 12px 16px; font-size: 16px; }
  .header.menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  .header__inner { position: relative; }
}
@media (max-width: 960px) {
  .hero__grid, .about__grid, .adv__grid, .contact__card { grid-template-columns: 1fr; }
  .hero__img img { height: 420px; }
  .about__media, .about__photo, .about__photo img { min-height: 380px; }
}
@media (max-width: 720px) {
  .header__actions .emergency { display: none; }
  .header__actions .btn--primary span { display: none; }
  .header__actions .btn--ghost span { display: none; }
  .brand img { height: 40px; }
  .hero { padding-top: 32px; }
  .hero__img img { height: 340px; object-position: 30% 78%; }
  .svc h3 { font-size: 22px; }
  .about__cards, .lines { grid-template-columns: 1fr; }
  .services__grid, .quick__grid { grid-template-columns: 1fr; }
  .contact__card { padding: 24px; border-radius: 28px; }
  .map { min-height: 420px; }
  .reg { width: 100%; }
  .regs__logos { width: 100%; }
  .wa__label { display: none; }
  .wa { padding: 0 16px; }
  .dots { width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .rv { opacity: 1; transform: none; }
}

/* Footer compliance link */
.compliance { display: inline-flex; align-items: center; gap: 8px; color: var(--on-dark); text-decoration: none; font-size: 13px; }
.compliance:hover { color: #fff; }

/* ==========================================================
   Correcciones de la cabecera
   ========================================================== */

/* 1. El logo no se deforma nunca.
   Causa: `.brand` es un item flex y encogía (flex-shrink: 1) cuando la
   cabecera no cabía en su contenedor. Al encoger, la regla global
   `img { max-width: 100% }` le recortaba el ancho a la imagen mientras
   `height: 50px` la mantenía alta: el logo salía a 95x50 en vez de
   192x50 — el 49% de su ancho.
   `flex: 0 0 auto` impide que el hueco encoja y `max-width: none` deja
   que la imagen conserve su proporción (396x103) pase lo que pase. */
.brand { flex: 0 0 auto; }
.brand img { max-width: none; }

/* 2. «Iniciar sesión» salía DOS veces en escritorio: como último enlace
   del menú y como botón de `.header__actions`. En el menú sólo hace
   falta cuando éste se vuelve desplegable, que es donde el botón de la
   cabecera se queda sin su etiqueta. */
.nav .nav__login { display: none; }

/* 3. Las etiquetas de la cabecera no se parten en dos líneas. */
.nav a,
.header__actions .emergency,
.header__actions .btn { white-space: nowrap; }

/* 4. La cabecera completa necesita ~1390px y el contenedor general está
   topado en 1280px. Se le da su propia medida; el resto del sitio
   conserva la suya. */
.header .container { max-width: 1440px; }

/* 5. Entre el menú desplegable y las pantallas anchas la cabecera va
   justa: se aprieta un poco, en vez de recortar «Pagar factura» o
   deformar el logo. */
@media (min-width: 1280px) and (max-width: 1400px) {
  .header__inner { gap: 10px; }
  .nav { gap: 1px; padding: 4px; }
  .nav a { padding: 8px 10px; }
  .header__actions { gap: 6px; }
  .header__actions .btn { padding: 0 13px; gap: 7px; }
  .header__actions .emergency { padding: 0 7px; gap: 7px; }
}

/* 6. El menú horizontal completo no cabe por debajo de 1280px: ahí manda
   el desplegable (el umbral estaba en 1080px, y entre 1080 y 1280 la
   cabecera desbordaba). Dentro del desplegable sí se muestra el acceso. */
@media (max-width: 1279px) {
  .nav .nav__login { display: block; }
}
