/*
Theme Name: Radio Carve theme Child
Theme URI: https://www.carve.uy
Template: carve_theme
Author: radiocarve
Author URI: http://www.carve.uy
Description: Radio Carve theme.
Version: 1.0.1756259826
Updated: 2025-08-27 01:57:06

*/
/* Flechita para los items padre del menú */
.nav-sections > li.menu-item-has-children > a {
  position: relative;
  padding-right: 14px; /* espacio para la flecha */
}

.nav-sections > li.menu-item-has-children > a .down{
  display: inline-block;
  margin-left: 8px;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor; /* misma tinta que el texto */
  vertical-align: middle;
}

/* por si algún estilo del padre las ocultaba */
.nav-sections > li.menu-item-has-children > a .down { 
  opacity: 1 !important; 
}
/* Chevron fino para items con submenú */
header.main-header .nav-sections > li.menu-item-has-children > a::after{
  content:"";
  display:inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  margin-bottom: 2px;         /* ajústalo si querés bajar/subir el chevron */
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);   /* forma de “V” hacia abajo */
  vertical-align: middle;
  opacity: .9;                /* opcional: suavizar */
}
/* Ajustes visuales del archivo de etiquetas */
.archive-tag .card-img-top { object-fit: cover; }
.archive-tag h1 { font-weight: 700; }
.archive-tag .card-title a { color: inherit; }
.archive-tag .card-title a:hover { text-decoration: underline; }

/* --- FLYOUT PARA SUBMENÚS DE SEGUNDO NIVEL (DESKTOP) --- */
@media (min-width: 992px) {
  /* Asegura referencia de posicionamiento para todos los <li> */
  header.main-header .nav-sections li {
    position: relative;
  }

  /* Mostrar cualquier submenú al hacer hover del padre */
  header.main-header .nav-sections li:hover > .sub-menu {
    display: block;
  }

  /* El submenú de primer nivel (ya lo tenés) suele caer hacia abajo.
     El submenú de segundo nivel debe volar hacia la derecha */
  header.main-header .nav-sections .sub-menu .sub-menu {
    position: absolute;
    top: 0;               /* alineado arriba del item padre */
    left: 100%;           /* a la derecha del primer submenú */
    margin-left: 6px;     /* pequeño gap visual */
    z-index: 9999;        /* encima de todo */
    display: none;        /* se muestra al hover del padre */
  }

  /* Mostrar el submenú “nieto” solo cuando se hace hover en su <li> padre */
  header.main-header .nav-sections .sub-menu li:hover > .sub-menu {
    display: block;
  }

  /* Opcional: indicadores en items que tienen hijos dentro del submenú */
  header.main-header .nav-sections .sub-menu li.menu-item-has-children > a::after {
    content: '›';
    margin-left: 8px;
    font-weight: 700;
    opacity: .6;
  }

  /* Opcional: estilos coherentes del contenedor del submenú */
  header.main-header .nav-sections .sub-menu {
    min-width: 240px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    padding: 8px 0;
  }

  header.main-header .nav-sections .sub-menu a {
    display: block;
    padding: 10px 14px;
    white-space: nowrap;
  }
}
/* Acordeón de submenús en móvil */
@media (max-width: 991.98px) {
  header.main-header .nav-sections li.menu-item-has-children > a {
    position: relative;
    padding-right: 36px; /* espacio para el botón */
  }

  header.main-header .nav-sections .sub-menu {
    display: none; /* cerrado por defecto */
  }
  header.main-header .nav-sections li.is-open > .sub-menu {
    display: block; /* abierto al tocar */
  }

  /* Botoncito para desplegar (lo inyecta el JS de abajo) */
  header.main-header .nav-sections .toggle-sub {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    line-height: 1;
    font-size: 16px;
    opacity: .7;
  }
}
/* Permitir que los textos largos en submenús hagan salto de línea */
@media (min-width: 992px) {
  header.main-header .nav-sections .sub-menu {
    min-width: 240px;        /* ancho mínimo del dropdown */
    max-width: 320px;        /* evita menús gigantes; ajustá si querés */
  }

  header.main-header .nav-sections .sub-menu a {
    display: block;
    padding: 10px 14px;
    line-height: 1.25;
    white-space: normal;      /* <— clave: permite salto */
    overflow-wrap: anywhere;  /* quiebra si hay palabras largas */
    word-break: break-word;   /* respaldo para navegadores */
    hyphens: auto;            /* guionado automático si el idioma lo soporta */
  }
}
