/* ═══════════════════════════════════════════════════════════════
   NAVBAR
════════════════════════════════════════════════════════════════ */
body.navbar-menu-open {
  overflow: hidden;
}

.navbar-berger {
  width: 100vw;
  height: 76px;
  background-color: #ffffff;
  border-bottom: 1px solid #eeeeee;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.navbar-berger.scrolled {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.navbar-container {
  width: min(1200px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─────────────────────────────────────────────
   LOGO
───────────────────────────────────────────── */
.navbar-logo {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
}

.navbar-logo img {
  display: block;
  width: auto;
  height: auto;
  max-height: 75px;
  object-fit: contain;
}

/* ─────────────────────────────────────────────
   MENÚ
───────────────────────────────────────────── */
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-links>li {
  position: relative;
}

.navbar-links a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 28px 10px;
  color: #333333;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.navbar-links a:hover {
  color: #008A3D;
}

/* ─────────────────────────────────────────────
   ENLACE ACTIVO
───────────────────────────────────────────── */
.navbar-links a.active {
  color: #008A3D;
  font-weight: 600;
}

.navbar-links a.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 17px;
  height: 2px;
  background-color: #008A3D;
}

/* ─────────────────────────────────────────────
   DROPDOWN
───────────────────────────────────────────── */
.navbar-dropdown-toggle i {
  font-size: 0.65rem;
  transition: transform 0.3s ease;
}

.navbar-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background-color: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.navbar-dropdown-menu a {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border-radius: 5px;
  font-size: 0.88rem;
}

.navbar-dropdown-menu a::after {
  display: none;
}

.navbar-dropdown:hover .navbar-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar-dropdown:hover .navbar-dropdown-toggle i {
  transform: rotate(180deg);
}

/* ─────────────────────────────────────────────
   CTA
───────────────────────────────────────────── */
.navbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: 15px;
  padding: 13px 21px;
  background-color: #008A3D;
  border: 1px solid #008A3D;
  border-radius: 120px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.navbar-cta:hover {
  background-color: #1f6f3c;
  border-color: #1f6f3c;
  color: #ffffff;
  transform: translateY(-2px);
}

.navbar-cta i {
  color: #ffffff;
  font-size: 18px;
}

/* ═══════════════════════════════════════════════════════════════
   BOTÓN MÓVIL
════════════════════════════════════════════════════════════════ */
.navbar-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 8px;
  background: transparent;
  border: 1px solid #dddddd;
  border-radius: 6px;
  cursor: pointer;
}

.navbar-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background-color: #333333;
  transition: transform 0.3s ease, opacity 0.3s ease;
}


/* ═══════════════════════════════════════════════════════════════
   CABECERA MENÚ MÓVIL
════════════════════════════════════════════════════════════════ */
.navbar-mobile-header {
  display: none;
}

.navbar-mobile-overlay {
  display: none;
}


/* ═══════════════════════════════════════════════════════════════
   FILA DROPDOWN
════════════════════════════════════════════════════════════════ */
.navbar-dropdown-row {
  display: flex;
  align-items: center;
}

.navbar-dropdown-row>a {
  display: flex;
  align-items: center;
}

/* El botón de flecha es invisible como botón en escritorio */
.navbar-dropdown-row .navbar-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 28px 10px;
  border: none;
  background: transparent;
  color: #333333;
  cursor: pointer;
}

/* La flecha mantiene el mismo comportamiento visual */
.navbar-dropdown-row .navbar-dropdown-toggle i {
  font-size: 0.65rem;
  transition: transform 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .navbar-container {
    width: min(100% - 30px, 1200px);
  }

  .navbar-menu {
    gap: 15px;
  }

  .navbar-links a {
    padding-left: 7px;
    padding-right: 7px;
    font-size: 0.87rem;
  }
}

@media (max-width: 991px) {
  .navbar-berger {
    height: 76px;
  }

  .navbar-container {
    width: calc(100% - 30px);
  }

  .navbar-logo img {
    max-height: 52px;
  }

  /* ─────────────────────────────────────────────
     HAMBURGUESA
  ───────────────────────────────────────────── */
  .navbar-toggle {
    display: block;
    position: relative;
    z-index: 10002;
  }

  /* ─────────────────────────────────────────────
     OVERLAY
  ───────────────────────────────────────────── */
  .navbar-mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  /* ─────────────────────────────────────────────
     MENÚ
  ───────────────────────────────────────────── */
  .navbar-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(390px, 88vw);
    height: 100dvh;
    padding: 25px 25px 30px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 25px;
    background-color: #ffffff;
    border: none;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s ease, visibility 0s linear 0.35s;
    z-index: 10001;
  }

  /* Menú abierto */
  .navbar-menu.menu-abierto {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.35s ease, visibility 0s linear 0s;
  }

  .navbar-mobile-overlay.menu-abierto {
    opacity: 1;
    visibility: visible;
  }

  /* ─────────────────────────────────────────────
     CABECERA
  ───────────────────────────────────────────── */
  .navbar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #eeeeee;
  }

  .navbar-mobile-header>span {
    color: #008A3D;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
  }

  /* ─────────────────────────────────────────────
     BOTÓN CERRAR
  ───────────────────────────────────────────── */
  .navbar-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dddddd;
    border-radius: 50%;
    background-color: #ffffff;
    color: #333333;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  }

  .navbar-close:hover {
    background-color: #008A3D;
    border-color: #008A3D;
    color: #ffffff;
  }

  /* ─────────────────────────────────────────────
     ENLACES
  ───────────────────────────────────────────── */
  .navbar-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .navbar-links>li {
    width: 100%;
    border-bottom: 1px solid #eeeeee;
  }

  .navbar-links a {
    width: 100%;
    padding: 17px 5px;
    color: #222222;
    font-size: 1rem;
    font-weight: 500;
  }

  .navbar-links a.active {
    color: #008A3D;
  }

  .navbar-links a.active::after {
    display: none;
  }

  /* ─────────────────────────────────────────────
     PROYECTOS
  ───────────────────────────────────────────── */
  .navbar-dropdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .navbar-dropdown-row>a {
    flex: 1;
  }

  .navbar-dropdown-row .navbar-dropdown-toggle {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #333333;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
  }

  .navbar-dropdown-row .navbar-dropdown-toggle i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
  }

  .navbar-dropdown.dropdown-abierto .navbar-dropdown-toggle i {
    transform: rotate(180deg);
  }

  /* ─────────────────────────────────────────────
     SUBMENÚ
  ───────────────────────────────────────────── */
  .navbar-dropdown-menu {
    position: static;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 0 8px 15px;
    display: none;
    border: none;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .navbar-dropdown.dropdown-abierto .navbar-dropdown-menu {
    display: block;
  }

  .navbar-dropdown-menu li {
    list-style: none;
  }

  .navbar-dropdown-menu a {
    padding: 11px 10px;
    color: #666666;
    font-size: 0.88rem;
  }

  .navbar-dropdown-menu a:hover {
    color: #008A3D;
  }

  /* ─────────────────────────────────────────────
     CTA WHATSAPP
  ───────────────────────────────────────────── */
  .navbar-cta {
    width: 100%;
    min-height: 50px;
    margin: auto 0 0;
    padding: 14px 20px;
    border-radius: 6px;
    font-size: 0.82rem;
  }

  /* ─────────────────────────────────────────────
     ANIMACIÓN HAMBURGUESA
  ───────────────────────────────────────────── */
  .navbar-toggle.menu-activo span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .navbar-toggle.menu-activo span:nth-child(2) {
    opacity: 0;
  }

  .navbar-toggle.menu-activo span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .navbar-toggle.menu-activo {
    opacity: 0;
    pointer-events: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   TABLET PEQUEÑA
════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .navbar-container {
    width: calc(100% - 24px);
  }

  .navbar-menu {
    width: min(390px, 92vw);
    padding: 22px 20px 25px;
  }
}