:root {
  --blue: #1c4d8f;
  --blue-active: #123a6e;
  --red: #cf1417;
  --red-hover: #a91013;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

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

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--white);
}

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

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-top: 2px solid #000;
  border-bottom: 3px solid var(--red);
  position: relative;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
}

.logo img {
  height: 90px;
  width: auto;
}

/* ---------- Nav (desktop default) ---------- */
.main-nav {
  background: var(--blue);
  position: relative;
}

.menu-toggle {
  display: none;
}

.btn-facturacion-mobile {
  display: none;
}

.nav-list {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-list li {
  display: flex;
}

.nav-list a {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.nav-list a:hover,
.nav-list a.active {
  background: var(--blue-active);
}

.nav-facturacion {
  margin-left: auto;
}

.nav-facturacion a {
  background: var(--red);
  font-weight: 700;
}

.nav-facturacion a:hover {
  background: var(--red-hover);
}

/* ---------- Hero ---------- */
.hero {
  width: 100%;
  line-height: 0;
  position: relative;
}

.hero-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Desktop: hero fills whatever space is left in the viewport
   (header + nav + hero + footer = 100vh, no leftover white gap) */
@media (min-width: 992px) {
  html, body {
    height: 100%;
  }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .site-header,
  .main-nav,
  .site-footer {
    flex-shrink: 0;
  }

  main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .hero {
    flex: 1;
    min-height: 0;
  }

  .hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue-active);
  color: var(--white);
  text-align: center;
  padding: 18px 16px;
  font-size: 13px;
}

/* ==========================================================
   Mobile / Responsive (< 992px) — matches mobile reference
   ========================================================== */
@media (max-width: 991px) {
  .logo img {
    height: 56px;
  }

  /* Blue bar becomes: hamburger left · Facturación button right */
  .main-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: var(--white);
    font-weight: 700;
    font-size: 17px;
    padding: 14px 18px;
    cursor: pointer;
    font-family: var(--font);
  }

  .menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 22px;
  }

  .menu-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--white);
    border-radius: 2px;
  }

  .btn-facturacion-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: var(--white);
    font-weight: 700;
    font-size: 15px;
    padding: 0 22px;
  }

  .btn-facturacion-mobile:hover {
    background: var(--red-hover);
  }

  /* Collapsible dropdown list */
  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--blue);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  }

  .nav-list.open {
    display: flex;
  }

  .nav-list li {
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.15);
  }

  .nav-list a {
    width: 100%;
    padding: 16px 20px;
  }

  /* Facturación already has its own always-visible button on mobile */
  .nav-list .nav-facturacion {
    display: none;
  }
}
