/*
Theme Name: FAB Divi Child
Theme URI: https://example.com/fab-divi-child
Description: Child theme for the Divi theme
Author: David Altuve
Author URI: https://amestudio.net
Template: Divi
Text Domain: divi
Version: 1.0.3
*/

/* Add your custom CSS here */

#fab-hide-show-on-scroll {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999999 !important;
  transition: transform 0.3s ease-in-out !important;
}

/* Admin bar de WordPress visible (usuario logueado) */
body.admin-bar #fab-hide-show-on-scroll {
  top: 32px; /* Altura del admin bar en desktop */
}

@media screen and (max-width: 782px) {
  body.admin-bar #fab-hide-show-on-scroll {
    top: 46px; /* Altura del admin bar en tablet/mobile ≤782px */
  }
}

@media screen and (max-width: 600px) {
  body.admin-bar #fab-hide-show-on-scroll {
    top: 0; /* En ≤600px el admin bar pasa a position:absolute (no fijo) */
  }
}

#fab-hide-show-on-scroll.fab-header-hidden {
  transform: translateY(-100%) !important;
}

/* -------------------------------------------------------
   Z-index: Causa raíz confirmada - La sección Divi del header
   tenía z-index:auto, perdiendo contra la sección del slider.
   -------------------------------------------------------- */

/* Elevar toda la sección header de Divi (Theme Builder) */
.et_pb_section_0_tb_header,
.et-l--header {
  position: relative;
  z-index: 99999 !important;
  overflow: visible !important;
}

/* Asegurar overflow:visible en la cadena del navbar */
#fab-hide-show-on-scroll,
.fab-navbar-menu-wrapper,
nav.navbar-menu,
.fab-navbar-menu-wrapper nav.navbar-menu > ul,
.fab-navbar-menu-wrapper nav.navbar-menu > ul > li {
  overflow: visible !important;
}

/* Submenús bien posicionados sobre todo lo demás */
.fab-navbar-menu-wrapper nav.navbar-menu > ul > li > ul.sub-menu {
  z-index: 9999 !important;
}

/* Menú colapsado en mobile */
.fab-navbar-collapse {
  z-index: 999998;
}
.fab-navbar-collapse.is-active {
  z-index: 999998;
}

/* Formulario de búsqueda transparente */
.fab-search-form-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}
.fab-search-form {
  width: 100%;
  margin: 0;
}
.fab-search-container {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 2px solid #fff;
  padding-bottom: 5px;
}
.fab-search-field {
  background-color: transparent !important;
  border: none !important;
  color: #fff !important;
  width: 100%;
  font-size: 18px !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 5px 35px 5px 0px !important;
  border-radius: 0 !important;
}
.fab-search-field::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}
.fab-search-field:focus {
  background-color: transparent !important;
}
.fab-search-submit {
  position: absolute;
  right: 0px;
  top: 45%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  cursor: pointer;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-search-submit:hover {
  background: transparent !important;
  opacity: 0.8;
}
.fab-search-submit svg {
  width: 22px;
  height: 22px;
}

/* Ocultar el botón "x" predeterminado para limpiar el campo de búsqueda */
.fab-search-field::-webkit-search-decoration,
.fab-search-field::-webkit-search-cancel-button,
.fab-search-field::-webkit-search-results-button,
.fab-search-field::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.fab-search-field::-ms-clear {
  display: none;
}

/* =======================================================
   FAB Navbar Menu Custom Styles
   ======================================================= */
.fab-navbar-menu-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #d84d43; /* Color rojo del fondo */
  height: 65px;
  box-sizing: border-box;
  font-family: inherit;
  position: relative;
  z-index: 1000;
}

/* Área del Logo */
.fab-navbar-menu-wrapper .logo {
  background-color: #fff;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 0 0 62px;
  flex-shrink: 0; /* Evita que el logo se comprima */
  width: 270px;
}
.fab-navbar-menu-wrapper .logo img {
  width: 174px;
  display: block;
}

/* Hamburger y Collapse wrappers por defecto (desktop) */
.fab-hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 15px;
  margin-right: 20px;
}
.fab-hamburger-box {
  width: 30px;
  height: 24px;
  display: inline-block;
  position: relative;
}
.fab-navbar-collapse {
  flex-grow: 1;
  display: flex;
  align-items: center;
  height: 100%;
}

/* Menú Principal */
.fab-navbar-menu-wrapper nav.navbar-menu {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  padding-left: 0;
  height: 100%;
}
.fab-navbar-menu-wrapper nav.navbar-menu > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: 100%;
}
.fab-navbar-menu-wrapper nav.navbar-menu > ul > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.fab-navbar-menu-wrapper nav.navbar-menu > ul > li > a {
  color: #fff !important;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 500;
  padding: 0 15px;
  display: flex;
  align-items: center;
  height: 100%;
  transition: background 0.3s;
}
.fab-navbar-menu-wrapper nav.navbar-menu > ul > li > a:hover {
  background-color: rgba(255, 255, 255, 0.08); /* Fondo claro al pasar mouse */
}

/* Flechas de submenús */
.fab-navbar-menu-wrapper
  nav.navbar-menu
  > ul
  > li.menu-item-has-children
  > a::after {
  content: "\25BE"; /* Triangulito hacia abajo */
  font-size: 16px;
  margin-left: 6px;
  line-height: 1;
}

/* Submenús */
.fab-navbar-menu-wrapper nav.navbar-menu > ul > li > ul.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #d84d43; /* Mismo fondo rojo o ligeramente distinto */
  width: max-content;
  min-width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  z-index: 9999;
}
.fab-navbar-menu-wrapper nav.navbar-menu > ul > li:hover > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Elementos de submenú */
.fab-navbar-menu-wrapper nav.navbar-menu > ul > li > ul.sub-menu > li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Línea divisoria blanca */
}
.fab-navbar-menu-wrapper
  nav.navbar-menu
  > ul
  > li
  > ul.sub-menu
  > li:last-child {
  border-bottom: none;
}
.fab-navbar-menu-wrapper nav.navbar-menu > ul > li > ul.sub-menu > li > a {
  display: block;
  color: #fff !important;
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 20px;
  font-size: 14px;
  text-transform: uppercase;
  transition: background 0.3s;
}
.fab-navbar-menu-wrapper
  nav.navbar-menu
  > ul
  > li
  > ul.sub-menu
  > li
  > a:hover {
  background-color: rgba(0, 0, 0, 0.08); /* Ligeramente más oscuro en hover */
}

/* Formularios de búsqueda incrustados */
.fab-navbar-menu-wrapper .fab-search-form-wrapper {
  width: 200px;
  margin: 0 30px;
  display: block;
  order: 1; /* Desktop: aparece antes que el idioma (izquierda del idioma) */
}

/* Switcher de idioma */
.fab-navbar-menu-wrapper .language-switcher {
  margin-right: 30px;
  display: flex;
  align-items: center;
  order: 2; /* Desktop: aparece después del buscador (extremo derecho) */
}
.fab-navbar-menu-wrapper .language-switcher ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.fab-navbar-menu-wrapper .language-switcher ul li a {
  color: #fff !important;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 500;
}
.fab-navbar-menu-wrapper .language-switcher ul li a:hover {
  opacity: 0.8;
}

/* --- Ajustes Responsive Básicos --- */
@media (max-width: 1280px) {
  /* Mostrar hamburger y ocultar collapse por defecto */
  .fab-hamburger {
    display: block;
    z-index: 1001;
  }

  /* Configurar la animación del icono de hamburguesa (X) */
  .fab-hamburger .hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
  }
  .fab-hamburger .hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -1px;
  }
  .fab-hamburger .hamburger-inner,
  .fab-hamburger .hamburger-inner::before,
  .fab-hamburger .hamburger-inner::after {
    width: 30px;
    height: 2px;
    background-color: #fff;
    border-radius: 4px;
    position: absolute;
    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }
  .fab-hamburger .hamburger-inner::before,
  .fab-hamburger .hamburger-inner::after {
    content: "";
    display: block;
  }
  .fab-hamburger .hamburger-inner::before {
    top: -10px;
  }
  .fab-hamburger .hamburger-inner::after {
    bottom: -10px;
  }

  /* Estado activo de la X */
  .fab-hamburger.is-active .hamburger-inner {
    background-color: transparent !important;
  }
  .fab-hamburger.is-active .hamburger-inner::before {
    transform: translate3d(0, 10px, 0) rotate(45deg);
  }
  .fab-hamburger.is-active .hamburger-inner::after {
    transform: translate3d(0, -10px, 0) rotate(-45deg);
  }

  /* Contenedor colapsable */
  .fab-navbar-collapse {
    position: absolute;
    top: 100%; /* Justo debajo del header */
    left: 0;
    width: 100%;
    height: auto !important; /* CLAVE: sobrescribe el height:100% del desktop */
    background-color: transparent;
    flex-direction: column;
    align-items: flex-end;
    padding: 0;

    /* Animación de apertura/cierre */
    display: flex;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition:
      opacity 0.3s ease,
      max-height 0.4s ease,
      visibility 0.3s ease;
  }

  /* Efecto de fondo cuando está abierto, el mockup mostraba todo oscuro pero el contenedor era sin fondo sólido arriba. Usaremos un fondo solido oscuro o rojo oscuro */
  .fab-navbar-collapse.is-active {
    opacity: 1;
    visibility: visible;
    max-height: 2000px;
    background-color: #d84d43; /* Mismo rojo que el desktop */
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 0 30px;
  }

  /* Fondo del logo en móvil — mantener fondo blanco */
  .fab-navbar-menu-wrapper {
    background-color: #d84d43;
  }
  .fab-navbar-menu-wrapper .logo {
    background-color: #fff; /* Fondo blanco también en móvil */
    padding: 0 20px;
  }

  /* Menú */
  .fab-navbar-menu-wrapper nav.navbar-menu {
    width: 100%;
    justify-content: flex-end;
    height: auto !important; /* sobrescribe height:100% del desktop */
    flex-grow: 0;
  }
  .fab-navbar-menu-wrapper nav.navbar-menu > ul {
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    height: auto !important;
    padding: 0px 15px;
  }
  .fab-navbar-menu-wrapper nav.navbar-menu > ul > li {
    width: 100%;
    border-bottom: none;
    height: auto !important;
    flex-direction: column;
    align-items: flex-end;
  }
  .fab-navbar-menu-wrapper nav.navbar-menu > ul > li > a {
    padding: 12px 30px !important;
    width: 100%;
    justify-content: flex-end;
    box-sizing: border-box;
    height: auto !important; /* sobrescribe height:100% del desktop */
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  /* Flecha de submenú en mobile — a la izquierda del texto */
  .fab-navbar-menu-wrapper
    nav.navbar-menu
    > ul
    > li.menu-item-has-children
    > a::after {
    content: "\25BE";
    order: -1; /* lo empuja al inicio del flex row */
    margin-left: 0;
    margin-right: 10px;
    transition: transform 0.3s ease;
  }

  /* Submenú en móvil — override TOTAL de estilos desktop con !important */
  .fab-navbar-menu-wrapper nav.navbar-menu > ul > li > ul.sub-menu,
  .fab-navbar-menu-wrapper nav.navbar-menu > ul > li:hover > ul.sub-menu {
    position: static !important;
    width: 100% !important;
    background-color: #d63f35 !important; /* Mismo rojo del desktop */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: none !important;
    box-shadow: none !important;
    min-width: unset !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition:
      opacity 0.3s ease,
      max-height 0.35s ease !important;
    display: block !important;
  }
  /* Al abrir, mostrar el submenú */
  .fab-navbar-menu-wrapper
    nav.navbar-menu
    > ul
    > li.open-submenu
    > ul.sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    max-height: 600px !important;
  }
  .fab-navbar-menu-wrapper nav.navbar-menu > ul > li.open-submenu > a::after {
    transform: rotate(180deg);
  }
  /* Links del submenú iguales al desktop */
  .fab-navbar-menu-wrapper nav.navbar-menu > ul > li > ul.sub-menu > li > a {
    padding: 14px 40px;
    text-align: right;
    color: #fff !important;
    font-size: 12px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    display: block;
  }
  .fab-navbar-menu-wrapper
    nav.navbar-menu
    > ul
    > li
    > ul.sub-menu
    > li:last-child
    > a {
    border-bottom: none;
  }

  /* Idioma y Búsqueda — mobile: alineados igual que los items del menú */
  .fab-navbar-menu-wrapper .language-switcher {
    order: unset;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 30px;
    margin: 0;
    justify-content: flex-end;
  }
  .fab-navbar-menu-wrapper .language-switcher ul {
    justify-content: flex-end;
    padding: 0px 15px;
  }
  .fab-navbar-menu-wrapper .fab-search-form-wrapper {
    order: unset;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 42px;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* --- Mobile pequeño ≤ 480px: logo ocupa 50% del navbar --- */
@media (max-width: 480px) {
  .fab-navbar-menu-wrapper .logo {
    width: 50%;
    padding: 0 15px;
    box-sizing: border-box;
  }
}

/* =======================================================
   FAB Grid Loop Shortcode
   ======================================================= */

/* ===== GRID WRAPPER ===== */
.fab-grid-loop {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

/* ===== CARD ===== */
.fab-grid-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: #111;
}

.fab-grid-item__link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* ===== IMAGEN DE FONDO ===== */
.fab-grid-item__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: transform 0.45s ease;
}

.fab-grid-item:hover .fab-grid-item__bg {
  transform: scale(1.04);
}

/* ===== OVERLAY ===== */
/* Sin fondo propio: el gradiente va en __meta para no tocar la imagen */
.fab-grid-item__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
}

/* ===== METADATA ===== */
.fab-grid-item__meta {
  padding: 28px 20px 18px;
  width: 100%;
  box-sizing: border-box;
  /* Gradiente estrictamente dentro del área de texto */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.5) 25%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.fab-grid-item__date {
  display: block;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.fab-grid-item__title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #e8e8e8;
  margin: 0 0 8px;
  transition: color 0.25s ease;
}

/* Hover sobre el título → blanco puro */
.fab-grid-item:hover .fab-grid-item__title,
.fab-grid-item__link:hover .fab-grid-item__title {
  color: #ffffff;
}

.fab-grid-item__author {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== RESPONSIVE ===== */
/* < 768 px → 1 sola columna */
@media (max-width: 767px) {
  .fab-grid-loop {
    grid-template-columns: 1fr;
  }
  .fab-grid-item {
    aspect-ratio: 16 / 9;
  }
}

/* ===== ESTADO SIN POSTS ===== */
.fab-grid-no-posts {
  padding: 20px;
  color: #888;
  font-style: italic;
}

/* =======================================================
   FAB Grid Noticias Shortcode  [fab_grid_noticias]
   ======================================================= */

/* Wrapper principal: 2 columnas + divider central */
.fab-gn-wrapper {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0 32px;
  width: 100%;
  box-sizing: border-box;
}

/* Divider vertical */
.fab-gn-divider {
  background-color: #d84d43;
  width: 1px;
  align-self: stretch;
}

/* Columna */
.fab-gn-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Post individual */
.fab-gn-post {
  display: flex;
  flex-direction: row;
  align-items: center; /* textos centrados verticalmente respecto a la imagen */
  gap: 18px;
  padding: 20px 0;
}

.fab-gn-col > .fab-gn-post:first-child {
  padding-top: 0;
}

.fab-gn-col > .fab-gn-post:last-child {
  padding-bottom: 0;
}

/* Imagen thumbnail — máximo 30% del ancho del post, escala proporcional */
.fab-gn-thumb-link {
  flex: 0 0 30%;
  max-width: 30%;
  aspect-ratio: 270 / 230;
  display: block;
  overflow: hidden;
  border-radius: 0;
}

.fab-gn-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.fab-gn-post:hover .fab-gn-thumb {
  transform: scale(1.04);
}

/* Placeholder (sin imagen) */
.fab-gn-thumb-placeholder {
  background-color: #d0d0d0;
}

/* Metadata: fecha + título + categorías */
.fab-gn-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Fecha */
.fab-gn-date {
  display: block;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #000000;
  text-transform: uppercase;
  line-height: 1;
}

/* Título */
.fab-gn-title {
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: inherit;
}

.fab-gn-title a {
  color: #000000;
  text-decoration: none;
  transition: color 0.25s ease;
}

.fab-gn-title a:hover {
  color: #d84d43;
  text-decoration: none;
}

/* Categorías */
.fab-gn-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 2px;
}

.fab-gn-cat {
  font-size: 18px;
  font-weight: 500;
  color: #000000;
  text-decoration: none;
  transition: color 0.2s ease;
}

.fab-gn-cat:hover {
  color: #d84d43;
  text-decoration: none;
}

/* Separador entre categorías */
.fab-gn-cat + .fab-gn-cat::before {
  content: ",";
  margin-right: 4px;
  color: #999;
}

/* Sin posts */
.fab-gn-no-posts {
  padding: 20px;
  color: #888;
  font-style: italic;
}

/* ===== RESPONSIVE ===== */

/* ≤ 1366px: imagen y textos alineados al tope */
@media (max-width: 1366px) {
  .fab-gn-post {
    align-items: flex-start;
  }
}

/* Entre 1281px y 1366px: reducir padding de los links del menú desktop */
@media (min-width: 1281px) and (max-width: 1366px) {
  .fab-navbar-menu-wrapper nav.navbar-menu > ul > li > a {
    padding: 0 8px;
  }
}

/* Entre 1281px y 1460px: reducir ancho del buscador en desktop estrecho */
@media (min-width: 1281px) and (max-width: 1460px) {
  .fab-navbar-menu-wrapper .fab-search-form-wrapper {
    width: 120px;
  }
}

/* ≤ 1024px: 2 columnas se mantienen, pero post apilado (imagen arriba, texto abajo) */
@media (max-width: 1024px) {
  /* Post apilado: imagen arriba, texto abajo */
  .fab-gn-post {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Imagen ocupa todo el ancho disponible dentro de la columna */
  .fab-gn-thumb-link {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* ≤ 767px: layout de 1 columna */
@media (max-width: 767px) {
  .fab-gn-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .fab-gn-divider {
    display: none;
  }

  .fab-gn-col > .fab-gn-post:last-child {
    padding-bottom: 20px;
  }
}

/* =======================================================
   FAB Grid Podcast Home  [fab_grid_podcast_home]
   ======================================================= */

/* ── Grid ───────────────────────────────────────────────── */
.fab-gph-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

/* ── Card ────────────────────────────────────────────────── */
.fab-gph-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Thumbnail ───────────────────────────────────────────── */
.fab-gph-thumb-link {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0;
  background: #ddd;
  flex-shrink: 0;
}
.fab-gph-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.fab-gph-card:hover .fab-gph-thumb-link img {
  transform: scale(1.04);
}

/* Placeholder (sin imagen) */
.fab-gph-thumb-placeholder {
  background-color: #d0d0d0;
}

/* ── Meta ────────────────────────────────────────────────── */
.fab-gph-meta {
  padding: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fab-gph-ep-date {
  font-size: 0.72rem;
  color: #000000;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.3;
}
.fab-gph-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.fab-gph-title a {
  color: #000000;
  text-decoration: none;
  transition: color 0.25s ease;
}
.fab-gph-title a:hover {
  text-decoration: none;
  color: #d84d43;
}
.fab-gph-duration {
  font-size: 0.78rem;
  color: #888;
  margin: 0;
}

/* Sin posts */
.fab-gph-no-posts {
  padding: 20px;
  color: #888;
  font-style: italic;
}

/* ══ Breakpoints ════════════════════════════════════════════
   El contenedor ocupa ~50 % del viewport hasta 768 px.
   A ≤768 px el bloque ya ocupa el 100 %, por eso se "reinicia"
   a 3 columnas en ese punto.
════════════════════════════════════════════════════════════ */

/* ≤1280 px → 2 columnas (50 % del viewport se estrecha) */
@media (max-width: 1280px) {
  .fab-gph-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ≤990 px → 1 columna */
@media (max-width: 990px) {
  .fab-gph-grid {
    grid-template-columns: 1fr;
  }
}

/* ≤768 px → 2 columnas (el contenedor ya ocupa 100 %) */
@media (max-width: 768px) {
  .fab-gph-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ≤580 px → 2 columnas */
@media (max-width: 580px) {
  .fab-gph-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ≤480 px → 1 columna */
@media (max-width: 480px) {
  .fab-gph-grid {
    grid-template-columns: 1fr;
  }
}

/* =======================================================
   FAB Latest Podcast  [fab_latest_podcast]
   ======================================================= */

/* ── Wrapper: lista vertical ────────────────────────────── */
.fab-lp-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Card ────────────────────────────────────────────────── */
.fab-lp-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Thumbnail ───────────────────────────────────────────── */
.fab-lp-thumb-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0;
  background: #ddd;
  flex-shrink: 0;
}
.fab-lp-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.fab-lp-card:hover .fab-lp-thumb-link img {
  transform: scale(1.04);
}

/* Placeholder (sin imagen) */
.fab-lp-thumb-placeholder {
  background-color: #d0d0d0;
}

/* ── Meta info ──────────────────────────────────────────── */
.fab-lp-meta {
  padding: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Fecha — rojo/naranja como en el diseño */
.fab-lp-date {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #d84d43;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

/* Título */
.fab-lp-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.fab-lp-title a {
  color: #000000;
  text-decoration: none;
  transition: color 0.25s ease;
}
.fab-lp-title a:hover {
  color: #d84d43;
  text-decoration: none;
}

/* Sin posts */
.fab-lp-no-posts {
  padding: 20px;
  color: #888;
  font-style: italic;
}

/* Categorías del post */
.fab-lp-categories {
  margin: -8px 0 0;
  font-size: 16px;
  color: #000000;
}

.fab-lp-categories a {
  color: #000000;
  text-decoration: none;
  transition: color 0.2s ease;
}

.fab-lp-categories a:hover {
  color: #d84d43;
  text-decoration: none;
}

/* =======================================================
   Utilidad: Efecto zoom en imágenes Divi  .fab-image-scale
   Agregar la clase al módulo de imagen en Divi.
   ======================================================= */

/* El span que genera Divi necesita overflow:hidden para recortar el zoom */
.fab-image-scale .et_pb_image_wrap {
  display: block;
  overflow: hidden;
}

.fab-image-scale .et_pb_image_wrap img {
  display: block;
  transition: transform 0.4s ease;
  will-change: transform;
}

.fab-image-scale:hover .et_pb_image_wrap img {
  transform: scale(1.05);
}

.fab-image-16-9 {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.fab-image-1-1 {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.fab-image-1-1 a,
.fab-image-1-1 .et_pb_image_wrap {
  display: block;
  width: 100%;
  height: 100%;
}

.fab-image-1-1 img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
}

.fab-image-1-1 .et_pb_image_wrap img {
  width: 150% !important;
  height: 150% !important;
  object-fit: cover;
  object-position: center;
}

.fab-image-1-1 a .et_pb_image_wrap img {
  width: 150% !important;
  height: 150% !important;
  object-fit: cover;
  object-position: center;
}

/* =======================================================
   FAB Grid Noticias 4 items  [fab_grid_noticias_4]
   ======================================================= */

/* Wrapper: 2 columnas, sin divider, orden horizontal */
.fab-gn4-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: 100%;
  box-sizing: border-box;
}

/* Post individual: imagen a la izquierda, meta a la derecha */
.fab-gn4-post {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
}

/* Imagen thumbnail */
.fab-gn4-thumb-link {
  flex: 0 0 28%;
  max-width: 28%;
  aspect-ratio: 270 / 230;
  display: block;
  overflow: hidden;
  border-radius: 0;
}

.fab-gn4-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.fab-gn4-post:hover .fab-gn4-thumb {
  transform: scale(1.04);
}

/* Placeholder (sin imagen) */
.fab-gn4-thumb-placeholder {
  background-color: #d0d0d0;
}

/* Metadata */
.fab-gn4-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Línea 1: Fecha / ● categorías */
.fab-gn4-date-cats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 18px;
  line-height: 1.4;
}

.fab-gn4-date {
  font-weight: 500;
  color: #d84d43;
  letter-spacing: 0.02em;
}

/* Emoji 🏷 antes de las categorías */
.fab-gn4-cat-emoji {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 3px 0 2px;
  vertical-align: middle;
  flex-shrink: 0;
}

.fab-gn4-cat {
  font-size: 15px;
  font-weight: 500;
  color: #000000;
  text-decoration: none;
  transition: color 0.2s ease;
}

.fab-gn4-cat:hover {
  color: #d84d43;
  text-decoration: none;
}

/* Título */
.fab-gn4-title {
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: inherit;
}

.fab-gn4-title a {
  color: #000000;
  text-decoration: none;
  transition: color 0.25s ease;
}

.fab-gn4-title a:hover {
  color: #d84d43;
  text-decoration: none;
}

/* Autor */
.fab-gn4-author {
  display: block;
  font-size: 18px;
  font-weight: 400;
  color: #444444;
  margin-top: 2px;
}

/* Sin posts */
.fab-gn4-no-posts {
  padding: 20px;
  color: #888;
  font-style: italic;
}

/* ===== RESPONSIVE ===== */

/* ≤ 1024px: posts apilados (imagen arriba, texto abajo) */
@media (max-width: 1024px) {
  .fab-gn4-post {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .fab-gn4-thumb-link {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* ≤ 767px: 1 sola columna */
@media (max-width: 767px) {
  .fab-gn4-wrapper {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .fab-image-1-1 {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    overflow: hidden;
  }

  .fab-image-1-1 .et_pb_image_wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
  }
}

/* -----------------------------------------------------------------------
   fab-grid-noticias-4 — Botón "Cargar más"
----------------------------------------------------------------------- */
.fab-gn4-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.fab-gn4-load-more-btn {
  background-color: #d84d43;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 12px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    opacity 0.2s ease;
}

.fab-gn4-load-more-btn:hover {
  background-color: #c03d34;
}

.fab-gn4-load-more-btn:active {
  background-color: #a83329;
}

.fab-gn4-load-more-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* =======================================================
   FAB Archive — Categorías
   ======================================================= */

/* Layout principal del archive */
.fab-archive-main {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 0 60px;
  box-sizing: border-box;
}

/* Contenido con 95% de ancho */
.fab-archive-content {
  width: 95%;
  max-width: 95%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Encabezado del archive */
.fab-archive-header {
  margin-bottom: 40px;
}

.fab-archive-title {
  font-size: 32px;
  font-weight: 800;
  color: #000000;
  margin: 0 0 8px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.fab-archive-description {
  font-size: 16px;
  font-weight: 400;
  color: #555555;
  line-height: 1.6;
  margin: 0;
}

.fab-archive-description p {
  margin: 0;
}

/* ===== RESPONSIVE ===== */

/* ≤ 767px: reducir padding y fuente del título */
@media (max-width: 767px) {
  .fab-archive-main {
    padding: 24px 0 40px;
  }

  .fab-archive-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }

  .fab-archive-title {
    font-size: 24px;
  }
}

/* =======================================================
   FAB Search Results — Página de búsqueda
   ======================================================= */

/* Encabezado de búsqueda */
.search-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
}

.search-title {
  font-size: 28px;
  font-weight: 700;
  color: #000000;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Ajustes específicos para items de búsqueda */
.fab-search-item {
  position: relative;
}

.fab-search-item .fab-gn4-meta {
  padding-top: 8px;
}

/* Mensaje de no resultados */
.fab-search-no-results {
  text-align: center;
  padding: 60px 20px;
}

.fab-search-no-results h2 {
  font-size: 24px;
  font-weight: 700;
  color: #333333;
  margin: 0 0 16px;
}

.fab-search-no-results p {
  font-size: 16px;
  color: #666666;
  margin: 0 0 24px;
}

/* =======================================================
   FAB Search Pagination — Paginación de resultados
   ======================================================= */
#main-content .container:before {
  width: 0px !important;
}

#fab-search-results {
  margin-bottom: 60px;
}

.fab-search-pagination {
  margin-top: 48px;
  padding-top: 24px;
}

.fab-search-pagination ul {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.fab-search-pagination ul li {
  margin: 0;
}

.fab-search-pagination ul li a,
.fab-search-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: #333333;
  background-color: #f5f5f5;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.fab-search-pagination ul li a:hover {
  background-color: #d84d43;
  color: #ffffff;
}

.fab-search-pagination ul li span.current {
  background-color: #d84d43;
  color: #ffffff;
  font-weight: 600;
}

.fab-search-pagination ul li span.dots {
  background-color: transparent;
  color: #999999;
  min-width: auto;
  padding: 0 8px;
}

.fab-search-pagination ul li a.prev,
.fab-search-pagination ul li a.next {
  padding: 0 16px;
  font-weight: 600;
}

/* ===== RESPONSIVE de búsqueda ===== */

@media (max-width: 767px) {
  .search-header {
    margin-bottom: 24px;
  }

  .search-title {
    font-size: 22px;
  }

  .fab-search-pagination ul li a,
  .fab-search-pagination ul li span {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }

  .fab-search-pagination ul li a.prev,
  .fab-search-pagination ul li a.next {
    padding: 0 12px;
  }
}
