/* HEADER AND FOOTER */
body {
  background-color: #fff;
}

#headerContainer {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1030;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  background-color: #fff;
}

/* Color naranja personalizado */
.bg-orange {
  background-color: #e4812b;
}

.text-orange {
  color: #e4812b;
}

/* Navbar */
.navbar {
  padding-top: 1rem;
  padding-bottom: 1rem;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.navbar .nav-link {
  color: #000;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar .nav-link:hover {
  color: #e4812b;
}

.navbar .nav-link.active {
  background-color: #e4812b;
  color: #fff !important;
  border-radius: 0.25rem;
}

.navbar-nav .nav-item {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

/* Marca */
.navbar-brand strong {
  font-size: 1.2rem;
}

/* Dropdown general */
.navbar .dropdown-menu {
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  background-color: #ffffff;
  min-width: 250px;
  padding: 0.3rem 0;
}

/* Dropdown items: letra más pequeña y bloque completo */
.navbar .dropdown-item {
  padding: 0.55rem 1rem;
  font-weight: 500;
  font-size: 0.9rem; /* Tamaño de letra más pequeño */
  color: #000;
  white-space: normal;
  transition: background-color 0.2s ease, color 0.2s ease;
  width: 100%; /* Ocupa todo el ancho */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Hover y active: naranja fondo y blanco texto/flechita */
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: #e4812b;
  color: #fff;
}

.navbar .dropdown-item:hover .dropdown-toggle,
.navbar .dropdown-item:hover i {
  color: #fff;
}

/* Active state */
.navbar .dropdown-item.active,
.navbar .dropdown-item.active:hover {
  background-color: #e4812b;
  color: #fff;
}

/* Submenu toggle link (flecha) */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > div > .dropdown-toggle {
  padding: 0;
  color: #555;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

/* Submenu posicionamiento */
.dropdown-submenu > .dropdown-menu {
  position: absolute;
  top: 0;
  left: 100%;
  right: auto;
  margin-top: -1px;
  display: none; /* oculto por defecto, se muestra al hover o click */
  z-index: 1050;
}

/* Mostrar submenu al hacer hover (escritorio) */
.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

/* Posición del submenu hacia la izquierda cuando no hay espacio */
.dropdown-submenu.open-left > .dropdown-menu {
  left: auto !important;
  right: 100% !important;
}

/* Barra superior */
.top-bar {
  background-color: #e4812b;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  padding-top: 1rem;
  padding-bottom: 1rem;
  height: 60px;
  line-height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Buscador personalizado */
.custom-search {
  border: 1px solid #fff;
  border-radius: 50px;
  overflow: hidden;
  background-color: transparent;
  display: flex;
  align-items: center;
}

.custom-search .form-control {
  border: none;
  background-color: transparent;
  color: #fff;
  font-style: italic;
  padding-left: 1rem;
  font-size: 0.9rem;
}

.custom-search .form-control::placeholder {
  color: #fff;
  font-style: italic;
  font-size: 0.7rem;
}

.custom-search .form-control:focus {
  box-shadow: none;
  outline: none;
}

.custom-search .input-group-text {
  background-color: transparent;
  border: none;
  color: #fff;
  padding-right: 1rem;
  cursor: pointer;
}

/* Texto "Contáctanos" */
.contact-search > span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-right: 1rem;
}

/* Iconos sociales */
.social-icons a {
  text-decoration: none;
  color: #fff;
  margin-right: 1rem;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #000;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  /* Ocultar top-bar */
  .top-bar {
    display: none !important;
  }

  /* Navbar ajustes */
  .navbar-nav .nav-item {
    margin: 0.25rem 0;
  }

  .navbar .nav-link {
    padding: 0.5rem 1rem;
  }

  .navbar .nav-link.active {
    display: inline-block;
    border-radius: 0.5rem;
  }

  /* Ajustar buscador */
  .contact-search {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 1rem;
  }

  .contact-search > span {
    margin-bottom: 0.5rem;
    color: #e4812b;
    font-weight: 700;
  }

  .custom-search {
    width: 100%;
  }

  .custom-search .form-control {
    color: #e4812b;
  }

  .custom-search .form-control::placeholder {
    color: #e4812b;
  }

  .social-icons {
    margin-bottom: 0.5rem;
  }

  /* Submenús debajo en móvil */
  .dropdown-submenu > .dropdown-menu {
    position: relative !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 0 !important;
    display: none !important;
  }

  /* Mostrar submenu al abrir con JS en móvil */
  .dropdown-submenu.open > .dropdown-menu {
    display: block !important;
  }
}

/* En móvil, para que al abrir con click funcione */
.dropdown-submenu.open > .dropdown-menu {
  display: block;
}

/*footer --------------------------------------------------------------------------------------------*/

/* Sección con fondo ---------------------------------------------------------------------------*/
.escribenos-section {
  background: url('../image/home/header-min.webp') no-repeat center top;
  background-size: cover;
  min-height: 150px;
  padding: 30px 0 50px;
  position: relative;
  z-index: 1;
}

.escribenos-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  filter: grayscale(100%);
  z-index: 0;
}

.col-md-5 {
  padding-top: 10px;
  padding-bottom: 10px;
}

.titulo-escribenos {
  display: block;
  font-size: 2.8rem;
  color: #fff;
  margin-bottom: 3rem;
  /* aumentado para mayor separación */
  position: relative;
  text-align: left;
}

.titulo-escribenos::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background-color: #e77c1f;
  margin-top: 10px;
  margin-left: 0;
}

.contenido-escribenos {
  color: #fff;
  font-weight: 500;
  margin-bottom: 15px;
}

.escribenos-content {
  position: relative;
  z-index: 2;
}

.btn-gradiente {
  background: linear-gradient(to right, #d15731, #dd7e34);
  color: white;
  border: none;
  padding: 0.4rem 2.0rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: background 0.3s ease;
}


.btn-gradiente:hover {
  background: linear-gradient(to right, #d15731, #dd7e34);
  color: rgb(0, 0, 0);
}

/* ESCRÍBENOS */
.escribenos-section .col-md-3 {
  width: 100%;
  margin-bottom: 1rem;
}

.escribenos-section button {
  font-size: 0.9rem;
}

.compact-cols > [class^="col-"] {
  padding-left: 8px;
  padding-right: 8px;
}

/* FOOTER */

.footer {
  background-color: #D75A29;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 500;
  padding-top: 3rem;
  padding-bottom: 1rem;
  position: relative;
  z-index: 10;
}

.footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #fa9a55;
  text-decoration: underline;
}

.footer h6 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* Listas del footer */
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer ul li {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Separadores */
.footer hr {
  border-top: 3px solid #fff;
  opacity: 1;
  margin: 1rem 0;
}

/* Teléfono */
.footer .fa-phone {
  color: #D75A29;
  font-size: 20px;
}

.footer .phone-container {
  display: inline-flex;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  margin-right: 10px;
  align-items: center;
  justify-content: center;
}

/* Redes sociales footer */
.footer .text-md-end a {
  margin-left: 0.75rem;
  transition: color 0.3s ease;
}

.footer .text-md-end a:hover {
  color: #fa9a55;
}

/* Botón subir */
.position-fixed.bottom-0.end-0.p-3 a.btn {
  border-radius: 15%;
  padding: 0.4rem 0.5rem;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.position-fixed.bottom-0.end-0.p-3 a.btn:hover {
  background-color: #fa9a55;
  color: #fff;
  text-decoration: none;
}

/* RESPONSIVE */

@media (max-width: 767.98px) {
  .footer .row > div {
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .footer .col-md-2,
  .footer .col-md-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .footer .text-md-end {
    text-align: center !important;
    margin-top: 1rem;
  }

  .footer .phone-container {
    margin: 0 auto 10px;
  }
}
