/* === SUBMENÚ === */
.sub-menu {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sub-menu li {
  list-style: none;
  transition: background 0.3s ease; /* transición suave */
}

.sub-menu li:hover {
  background: rgb(236, 236, 236);
}

/* === MENÚ PRINCIPAL === */
.qc-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.qc-menu li {
  position: relative;
}

.qc-menu li a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  background: transparent;
}

/* === SUBMENÚS DESKTOP === */
@media (min-width: 769px) {
  .qc-menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    pointer-events: none;
  }

  .qc-menu li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .qc-menu li ul li ul {
    top: 0;
    left: 100%;
  }

  .qc-menu li.menu-item-has-children > a::after {
    content: "▾";
    color: #f46e1e;
    margin-left: 6px;
    font-size: 0.75em;
    vertical-align: middle;
  }
}

/* === RESPONSIVE: MÓVIL === */
@media (max-width: 768px) {
  .qc-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .qc-menu li {
    width: 100%;
  }

  .qc-menu li ul {
    position: static;
    border: none;
    box-shadow: none;
    background: none;
    padding-left: 15px;

    /* Transición animada para expandir/cerrar */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .qc-menu li.menu-open > ul {
    max-height: 500px; /* ajustar según cantidad de subitems */
  }

  .qc-menu li ul li a {
    background: none;
    border: none;
    padding-left: 20px;
  }

  .qc-menu li.menu-item-has-children > a::after {
    content: "▾";
    float: right;
    margin-left: 10px;
  }
}

/* ==== PREHEADER ==== */
.qc-preheader {
  background-color: #142c4e;
  color: #ffffff;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  gap: 10px;
}

.qc-preheader span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==== HEADER PRINCIPAL ==== */
.qc-mainheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.qc-logo img {
  height: auto;
  width: auto;
}

.qc-nav .qc-menu {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.qc-nav .qc-menu li a {
  text-decoration: none;
  color: #142c4e;
  font-weight: 600;
  font-size: 17px;
  text-align: left;
}

.qc-socials a {
  color: white;
  margin-left: 8px;
  font-size: 16px;
}

/* ==== FOOTER ==== */
.qc-footer {
  background-color: #142c4e;
  color: white;
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.qc-footer div {
  flex: 1;
  min-width: 250px;
  margin-bottom: 20px;
}

.qc-footer h3,
.qc-footer h4 {
  color: #f37021;
}

.qc-footer strong {
  font-weight: bold;
}

.qc-footer a {
  color: #f37021;
  margin-right: 10px;
  font-size: 20px;
}

/* ==== RESPONSIVE HEADER Y FOOTER ==== */
@media (max-width: 768px) {
  .qc-mainheader {
    flex-direction: column;
    align-items: center;
  }

  .qc-nav .qc-menu {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    margin-top: 15px;
  }
}

@media (max-width: 480px) {
  .qc-preheader {
    flex-direction: column;
    align-items: flex-start;
  }
}

.qc-footer img {
  height: auto;
  width: auto;
}

.qc-footer div {
  line-height: 1.6;
}

.qc-footer h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.qc-footer h4 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 18px;
}

.qc-footer p {
  margin-bottom: 8px;
}
