/* Contenedor */
.faq-search { 
  width: 100%; 
  position: relative;
  margin-bottom: 20px!important;
}

/* Wrapper del input y dropdown */
.faq-search__wrapper {
  position: relative;
}

/* Input de búsqueda */
.faq-search__input {
  width: 100%;
  border: 1px solid #d6d6d6;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 18px;
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
  outline: none;
  transition: border-color 0.2s ease;
}

.faq-search__input:focus {
  border: 1px solid #2563EB;
  box-shadow: 0px 0px 7px 0px #2563EB;
}

input[type=search]:-webkit-autofill,
input[type=search]:-webkit-autofill:hover, 
input[type=search]:-webkit-autofill:focus, 
input[type=search]:-webkit-autofill:active{
    -webkit-background-clip: text;
    -webkit-text-fill-color: #252525;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: inset 0 0 20px 20px #ffffff40;
}

/* Cuando está activo - input se une al dropdown */
.faq-search__wrapper.active .faq-search__input {
  border: 1px solid #2563EB;
  border-radius: 24px 24px 0 0;
  border-bottom: 0; /* Sin borde inferior para unirse seamlessly */
  box-shadow: 0px 0px 7px 0px #2563EB;
  font-weight: 600; /* Bold en el texto del input */
  background: white; /* Fondo blanco, no azul */
}

.faq-search__wrapper.active .faq-search__input:focus {
  box-shadow: 0px 0px 7px 0px #2563EB; /* Misma sombra en focus */
  background: white; /* Fondo blanco en focus también */
}

/* Cruz roja nativa del input search */
.faq-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dc2626'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}

/* Dropdown de resultados */
.faq-search__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  margin-top: 0px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}

/* Cuando está activo */
.faq-search__wrapper.active .faq-search__dropdown {
  display: block;
  z-index: 1;
  border: 1px solid #2563EB !important;
  border-top: 0 !important;
  box-shadow: 0px 0px 7px 0px #2563EB !important;
  border-radius: 0 0 24px 24px;
}

.faq-search__wrapper.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 15px;
  left: 1px;
  right: 1px;
  background: linear-gradient(0deg, white, transparent);
  z-index: 138;
  border-bottom: 1px solid #d0d0d0;
}

/* Items de resultado */
.faq-search__item, .faq-search__no-results {
  display: block;
    width: 100%;
    text-align: left;
    border: 0;
    /* border-bottom: 1px solid #f3f4f6; */
    padding: 9px 20px;
    background: white;
    cursor: pointer;
    transition: background-color 0.15s ease;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 400;
    position: relative;
}

.faq-search__wrapper.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 16px;
  left: 1px;
  right: 1px;
  background: linear-gradient(0deg, white, transparent);
  z-index: 138;
  border-bottom: 1px solid #d0d0d0;
}

.faq-search__item:not(.faq-search__item:last-child)::after {
  content: "";
  position: absolute;
  bottom: 0px;
  height: 1px;
  left: 20px;
  right: 20px;
  background-color: #d0d0d0;
}

.faq-search__dropdown-inner {
  padding: 5px 0;
  overflow-x: hidden;
}

.faq-search__item:first-child {
  /* padding-top: 14px; */
}

.faq-search__item:last-child {
  border-bottom: 0;
}

.faq-search__item:hover {
  background: #f8fafc;
}

.faq-search__item:focus {
  background: #ebf2fa;
  /* outline: 2px solid #090909; */
  outline-offset: -2px;
}

/* Highlight de match en resultados - azul en lugar de amarillo */
.faq-search__item .match {
  color: #3b82f6;
  font-weight: 700; /* Extra bold para matches */
}

/* Mensaje cuando no hay resultados - igual que un item */
/* .faq-search__no-results {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  padding: 12px 14px;
  background: white;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  color: #6b7280;
} */

.faq-search__no-results strong {
  color: #374151;
  font-weight: 700; /* Extra bold para la primera palabra */
}

/* Highlight temporal al hacer scroll */
.faq-search__hit-blink {
  animation: faqHitBlink 1.2s ease-out 1;
}

@keyframes faqHitBlink {
  0%   { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
  100% { box-shadow: 0 0 0 12px rgba(59,130,246,0); }
}

/* Accesibilidad */
.screen-reader-text {
  position: absolute!important;
  height: 1px; 
  width: 1px;
  overflow: hidden; 
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap; 
  border: 0; 
  padding: 0; 
  margin: -1px;
}

/* navigation */
.faq-navigation {
  margin-top: 0!important;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px 20px;
  justify-content: center;
  letter-spacing: .3px;
  padding: 20px 0;
}

.faq-navigation h3 {
  margin: 0;
  color: #7E7E7E;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 400;
  margin-top: 1px;
}

.faq-navigation a {
  color: #7E7E7E;
  font-weight: 500;
  text-decoration: none;
  font-size: 17px;
}

.faq-navigation .items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 20px;
  justify-content: center;
}

/* pruebas */

@media (min-width: 768px) {
  .faq-navigation, .faq-navigation + hr {
      display: none;
  }
  body .faq-search__wrapper {
    padding-left: 60px;
    background: linear-gradient(90deg, #1427e6 40%, transparent);
    border-radius: 38px;
  }
  
  body input#faq-search-input {
    padding: 16px 25px;
  }
  
  body .faq-search__wrapper::before {
    content: "";
    height: 45px;
    aspect-ratio: 1;
    position: absolute;
    left: 9px;
    top: 5px;
    bottom: 0;
    background-image: url(https://pogoenergy.com/wp-content/uploads/2025/08/Frame.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  body .faq-search__wrapper.active .faq-search__dropdown {
    left: 60px;
    border-radius: 0 0 28px 28px;
  }
  
  body .faq-search__wrapper.active::after {
    left: 61px;
  }
  
  body .faq-search__wrapper.active .faq-search__input {
    border-radius: 28px 28px 0 0;
  }
  
  body.search1.search2 .faq-search__wrapper::before {
    background-image: url(https://pogoenergy.com/wp-content/uploads/2025/08/Frame-1.png);
  }
  
  body.search1.search2 .faq-search__wrapper {
    background: #87DB29;
  }
}

/* mqs */
@media (max-width: 767px) {
  .faq-search__item, .faq-search__no-results {
      font-size: 16px;
      font-weight: 300;
  }

  .faq-search__wrapper.active .faq-search__input {
      font-size: 16px;
      font-weight: 500;
  }

  .faq-search__dropdown {
      max-height: unset;
  }
}