/* Menú de bienes raíces - Estilo liviano con SVG */
.real-estate-menu {
  position: absolute;
  top: 20px;
  font-family: Arial, sans-serif;
  z-index: 1000;
}

/* Para escritorio (min-width: 768px) */
@media (min-width: 768px) {
  .real-estate-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  .menu-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  
  .menu-item {
    flex: 1;
    min-width: 0;
    text-align: center;
    border-bottom: none;
    border-right: 1px solid #e0e0e0;
  }
  
  .menu-item:last-child {
    border-right: none;
  }
  
  .menu-link {
    padding: 15px 5px;
    justify-content: center;
    white-space: nowrap;
  }
  
  .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    opacity: 0;
    max-height: 0;
    display: block !important;
    visibility: hidden;
  }
  
  .menu-item:hover .sub-menu {
    opacity: 1;
    max-height: 500px;
    visibility: visible;
  }
  
  .menu-item:hover .arrow {
    transform: rotate(180deg);
  }
  
  .sub-menu a {
    padding: 10px 16px;
  }
}

/* Lista del menú */
.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

/* Elementos del menú */
.menu-item {
  border-bottom: 1px solid #e0e0e0;
  position: relative;
}

.menu-item:last-child {
  border-bottom: none;
}

/* Enlace del menú */
.menu-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  background: #ffcc00;
  transition: background 0.2s;
  cursor: pointer;
}

.menu-link:hover {
  background: #ffbb00;
}

.menu-link:focus {
  outline: 2px solid #ff9900;
}

/* Contenedor del icono SVG */
.menu-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

/* Estilo para los SVG inline */
.menu-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: #333;
  fill: none;
  transition: stroke 0.2s;
}

.menu-link:hover .menu-icon svg {
  stroke: #000;
}

/* Estilos para las flechas */
.arrow {
  margin-left: auto;
  font-size: 18px;
  color: #333;
  transition: transform 0.3s ease;
}

/* Submenú - Oculto por defecto */
.sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f5e6a5;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  max-height: 0;
}

/* En móvil, el submenú se muestra con clase active */
@media (max-width: 767px) {
  .real-estate-menu {
    position: relative;
    top: 0;
    width: 100%;
  }
  
  .sub-menu {
    display: none;
    max-height: 0;
    opacity: 0;
  }
  
  .menu-item.active .sub-menu {
    display: block;
    max-height: 500px;
    opacity: 1;
  }
  
  .menu-item.active .arrow {
    transform: rotate(180deg);
  }
  
  .menu-link {
    padding: 10px 22px;
  }
}

/* Elementos del submenú */
.sub-menu li {
  border-bottom: 1px solid #e0e0e0;
}

.sub-menu li:last-child {
  border-bottom: none;
}

.sub-menu a {
  display: block;
  padding: 10px 16px 10px 48px;
  text-decoration: none;
  color: #333;
  background: #f5e6a5;
  transition: background 0.2s;
}

.sub-menu a:hover {
  background: #f0d995;
  color: #000;
}

/* Para móviles (max-width: 767px) */
@media (max-width: 767px) {
  .menu-title {
    font-size: 1.1rem;
  }
  
  .sub-menu a {
    padding: 12px 16px 12px 48px;
    font-size: 1rem;
  }
}

/* Dispositivos pequeños (max-width: 480px) */
@media (max-width: 480px) {
  .menu-title {
    font-size: 1.05rem;
  }
  
  .sub-menu a {
    font-size: 0.95rem;
    padding: 12px 16px 12px 44px;
  }
  
  .menu-icon {
    margin-right: 10px;
  }
  
  .menu-icon svg {
    width: 18px;
    height: 18px;
  }
}