.header-adr {
  width: 100%;
}

.header-background {
  width: 100%;
  background-color: #ffffff;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;

  .header-logo {
    max-width: 200px;

    img {
      width: 100%;
      height: auto;
    }
  }

  .header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;

    .header-menu {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      gap: 8px;

      .header-nav-link {
        color: var(--color-text-primary);
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s ease;
        padding: 8px;

        &:hover {
          color: #cccccc;
        }
      }
    }
  }

  .menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 100;

    .hamburger {
      display: block;
      width: 24px;
      height: 2px;
      background-color: var(--color-text-primary);
      position: relative;
      left: 0;
      right: 0;
      margin: auto;
      transition: all 0.3s ease;

      &::before,
      &::after {
        content: "";
        position: absolute;
        width: 24px;
        height: 2px;
        left: 0;
        background-color: var(--color-text-primary);
        transition: all 0.3s ease;
      }

      &::before {
        top: -6px;
      }

      &::after {
        bottom: -6px;
      }
    }
  }

  .mobile-menu-container {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .header-language-toggle {
    display: none;
  }
}

/* Responsive */
@media (max-width: 820px) {
  .header-adr {
    position: relative;

    .header-content {
      position: relative;
    }

    .menu-toggle {
      display: block;
      order: 3;
    }

    .mobile-menu-container {
      position: fixed;
      top: 0;
      right: 0;
      width: 100%;
      height: 100vh;
      background-color: #ffffff;
      padding: 80px 32px 32px;
      transform: translateX(100%);
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      z-index: 90;
      overflow-y: auto;
      flex-direction: column;
    }

    .header-nav {
      display: block;
      margin-bottom: 24px;
      width: 100%;
    }

    .header-menu {
      flex-direction: column;
      gap: 16px;
      text-align: center;
    }

    .header-nav-link {
      font-size: 1.2rem;
      display: block;
      padding: 12px !important;
    }

    .header-btn {
      text-align: center;
    }

    .header-language-toggle {
      display: block;
      text-align: center;
      margin-top: 16px;

      .language-switch {
        display: inline-block;
        padding: 8px 16px;
        background-color: transparent;
        color: var(--color-text-primary);
        text-decoration: none;
        font-weight: 600;
        font-size: 1.1rem;
        border: 2px solid var(--color-text-primary);
        border-radius: 4px;
        transition: all 0.3s ease;

        &:hover {
          background-color: var(--color-text-primary);
          color: #ffffff;
        }
      }
    }

    &.menu-open {
      .hamburger {
        background-color: transparent;

        &::before {
          transform: rotate(45deg);
          top: 0;
        }

        &::after {
          transform: rotate(-45deg);
          bottom: 0;
        }
      }

      .mobile-menu-container {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
      }
    }
  }
}

/* Igualar el ancho de los botones en el menú hamburguesa al del botón más ancho */
@media (max-width: 900px) {
  .mobile-menu-container {
    /* ...existing code... */
  }
  .mobile-menu-container .header-btn,
  .mobile-menu-container .header-language-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
  }
  .mobile-menu-container .btn-primary,
  .mobile-menu-container .language-switch {
    display: inline-block;
    min-width: 180px;
    width: auto;
    max-width: 90vw;
    box-sizing: border-box;
    text-align: center;
    font-size: 1rem;
    padding: 12px 24px;
    margin-bottom: 0;
  }
}

/* Mostrar/ocultar botones de contacto según dispositivo */
.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
}
