/* ===================================================================================

* Theme Name: Biddut Child
* Theme URI: https://wp.hixstudio.net/biddut/
* Author: theme_pure 
* Author URI: https://themeforest.net/user/theme_pure
* Description: Biddut - Electricity Services WordPress Theme 
* Version: 1.0.0
* Template: biddut
* License: GNU General Public License version 3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Tags: one-column, right-sidebar, left-sidebar, custom-menu, featured-images, post-formats, sticky-post, translation-ready

* We encourage you to create Child theme for any modifications you will want to do.

* Why use Child theme?

* Because of future updates we may provide for this theme that will overwrite your
* modifications and all your custom work.

* If you are not familiar with Child Themes, you can read about it here:
* http://codex.wordpress.org/Child_Themes
* http://wp.tutsplus.com/tutorials/theme-development/child-themes-basics-and-creating-child-themes-in-wordpress/

====================================================================================== */ 
/* ============================================================
   YAVEGAS — correcciones de menú
   El tema no marca visualmente qué entradas tienen submenú y el
   desplegable depende solo de :hover. Aquí se añade el indicador,
   se refuerza la apertura y se permite abrir con teclado o toque.
   ============================================================ */

/* 1. Flecha en las entradas que SÍ tienen submenú */
.tp-header-main-menu nav > ul > li.menu-item-has-children > a::after {
  content: "\25BE";
  display: inline-block;
  margin-left: 7px;
  font-size: 0.8em;
  line-height: 1;
  transition: transform .3s ease;
  opacity: .85;
}
.tp-header-main-menu nav > ul > li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

/* 2. Apertura reforzada: cursor, foco de teclado y toque */
.tp-header-main-menu nav ul li.menu-item-has-children:hover > .submenu,
.tp-header-main-menu nav ul li.menu-item-has-children:focus-within > .submenu,
.tp-header-main-menu nav ul li.menu-item-has-children.abierto > .submenu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: scaleY(1) !important;
  pointer-events: auto !important;
}

/* 3. Puente invisible: evita que el submenú se cierre al bajar el cursor */
.tp-header-main-menu nav > ul > li.menu-item-has-children::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 24px;
}
.tp-header-main-menu nav > ul > li { position: relative; }

/* 4. Submenú legible sobre el fondo oscuro del tema */
.tp-header-main-menu nav ul li .submenu { min-width: 250px; }
.tp-header-main-menu nav ul li .submenu > li > a { white-space: normal; line-height: 1.4; }

/* ============================================================
   YAVEGAS — menú en UNA SOLA LÍNEA
   El tema da al menú una columna col-xl-8 (~760px). Con 6 entradas
   se partía en dos renglones, y al partirse el desplegable quedaba
   TAPADO por el segundo renglón (se abre con top:100%).
   ============================================================ */

/* 1. nunca partir el menú */
.tp-header-main-menu nav > ul {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-end;
}
.tp-header-main-menu nav > ul > li { white-space: nowrap; flex: 0 0 auto; }

/* 2. espaciado más compacto para que quepan las 6 */
.tp-header-main-menu nav > ul > li > a {
  padding-left: 13px !important;
  padding-right: 13px !important;
}

/* 3. darle más ancho a la columna del menú, quitándoselo a la del botón */
.tp-header-area .row > .col-xl-8 { flex: 0 0 auto; width: 74%; }
.tp-header-area .row > [class*="col-xl-2"]:last-child { flex: 0 0 auto; width: 13%; }
.tp-header-area .row > [class*="col-xl-2"]:first-child { flex: 0 0 auto; width: 13%; }

/* 4. el submenú SIEMPRE por encima de todo */
.tp-header-main-menu nav ul li .submenu { z-index: 99999 !important; }
.tp-header-main-menu nav > ul > li.menu-item-has-children { position: relative; }

/* 5. en pantallas medianas, reducir un poco la letra antes de partir */
@media (min-width: 1200px) and (max-width: 1500px) {
  .tp-header-main-menu nav > ul > li > a { font-size: 15px; padding-left: 9px !important; padding-right: 9px !important; }
}

/* ============================================================
   YAVEGAS — CAUSA REAL de que los desplegables no abrieran
   ------------------------------------------------------------
   El buscador (.search__popup) se oculta SOLO desplazandose fuera
   de pantalla: transform: translateY(calc(-100% - 80px)), pero
   conserva z-index 99999, overflow visible y pointer-events auto.
   Eso funciona mientras su contenido quepa en su height:45%.
   Al sustituir su logo por el de Yavegas a resolucion completa
   (2064x670) SIN limitar el tamano, la imagen se dibujaba a
   1061x344 px y desbordaba 159 px hacia abajo, quedando invisible
   pero ENCIMA de toda la barra de navegacion. El raton nunca
   llegaba a los <li>, asi que :hover jamas se disparaba.
   El tema no trae ninguna regla para .search__logo porque su logo
   demo era pequeno y nunca desbordaba.
   ============================================================ */

/* 1. CAUSA: el logo del buscador, a un tamano sensato */
.search__popup .search__logo img {
  max-width: 180px;
  height: auto;
}

/* 2. BLINDAJE: con el buscador cerrado nada suyo puede recibir el
      raton, desborde lo que desborde. Asi el fallo no puede repetirse
      si manana se cambia otra imagen de ese panel. */
.search__popup:not(.search-opened) {
  pointer-events: none;
}
.search__popup.search-opened {
  pointer-events: auto;
}
