body,
html {
  scroll-behavior: smooth;
  padding-top: 2.4rem;
  color: #5a5a5a;
  font-family: "Abel", sans-serif;
}
.parallax {
  background-attachment: fixed;
}
.bg-image {
  background-position: center;
  background-size: cover;
  -webkit-background-size: cover;
  -moz-background-size: cover;
}
.h-50vh {
  height: 70vh;
}
a:hover {
  text-decoration: none;
}
.overlay-1 {
  background: #00000030;
}
.overlay-2 {
  background: #00000090;
}
.hero h1 {
  font-size: 2em;
}
.hero h2 {
  font-size: 1.5rem;
}
@media (min-width: 768px) {
  .hero h1 {
    font-size: 3em;
  }
  .hero h2 {
    font-size: 2rem;
  }
}

/* --- Navbar --- */
/* Eliminar el fondo dorado de .bg-new en los items del nav */
.navbar-nav .nav-item {
  background-color: transparent !important;
  border-radius: 0.375rem;
}
.navbar-nav .nav-link {
  text-align: center;
  padding: 0.5em 0.85em;
  font-size: 1.1em;
  color: #333 !important;
  border-bottom: 2px solid transparent;
  border-radius: 0.375rem;
  transition: color 0.2s ease, border-bottom-color 0.2s ease, background-color 0.2s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #668532 !important;
  border-bottom-color: #ee7100;
  background-color: rgba(102, 133, 50, 0.07);
  text-decoration: none;
}
/* Estado activo en el nav colapsado (mobile) */
.navbar-collapse .navbar-nav .nav-link:active {
  color: #ee7100 !important;
  background-color: rgba(102, 133, 50, 0.12);
}

/* Soluciono problema del scroll */
section {
  scroll-margin-top: 84px;
}

/* --- Toast --- */
#toast {
  position: fixed;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  margin-bottom: 0;
  z-index: 99999;
  bottom: 0;
  height: 60px;
  font-size: 1.2em;
  display: none;
  line-height: 2em;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: transparent;
  color: white !important;
  border-bottom: 3px solid #ee7100 !important;
}
.text-muted {
  color: #cccccc99 !important;
}

/* --- Separadores entre secciones --- */
/* Ocultar hr del flujo principal para evitar grandes espacios en blanco */
main > hr {
  display: none;
}

/* --- Secciones: espaciado --- */
main > section {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

/* --- FAQ --- */
dl.faq button {
  margin: 0;
  padding: 0.5em 0.5em 0.5em 0;
  margin-top: 0.75em;
  font-weight: bold;
  font-size: 110%;
  border: thin solid transparent;
  background-color: transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
  width: 100%;
  text-align: left;
}

dl dd {
  margin: 0;
  padding: 0;
  margin-left: 0.25em;
}

dl.faq .desc {
  margin: 0.25em 0 0.5em 0;
  padding: 0.85em 1em;
  font-size: 105%;
  display: none;
  background-color: #eef2e6;
  border-left: 3px solid #668532;
  border-radius: 0 0.375rem 0.375rem 0;
  color: #3a3a3a;
}

dl.faq button:hover,
dl.faq button:focus {
  background-color: rgba(102, 133, 50, 0.08);
  color: #668532;
  text-decoration: none;
  outline: none;
}

dl.faq button:focus {
  border-color: #668532;
  box-shadow: 0 0 0 2px rgba(102, 133, 50, 0.25);
}

dl.faq button:active {
  background-color: rgba(102, 133, 50, 0.15);
  color: #4a5e24;
}

/* Icono de flecha con CSS en lugar de imágenes externas */
dl.faq button[aria-expanded="false"]::before {
  content: "▶";
  display: inline-block;
  font-size: 0.7em;
  margin-right: 0.5em;
  color: #668532;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

dl.faq button[aria-expanded="true"]::before {
  content: "▼";
  display: inline-block;
  font-size: 0.7em;
  margin-right: 0.5em;
  color: #ee7100;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

/* --- Footer --- */
.footer-pdt {
  background: linear-gradient(160deg, #1a0a04 0%, #200b05 100%);
  color: #f6f5c2;
  border-top: 3px solid #ee7100;
  font-size: 0.92em;
}
.footer-pdt .footer-brand {
  font-size: 1.15em;
  font-weight: bold;
  color: #f6f5c2;
  letter-spacing: 0.02em;
}
.footer-pdt .footer-list {
  list-style: none;
  padding: 0;
  margin: 0.4em 0 0 0;
  color: #d8d59a;
}
.footer-pdt .footer-list li {
  margin-bottom: 0.2em;
}
.footer-pdt .footer-dev {
  color: #d8d59a;
}
.footer-pdt .footer-dev a {
  color: #ee7100;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-pdt .footer-dev a:hover {
  color: #f6f5c2;
  text-decoration: underline;
}
.footer-pdt .footer-divider {
  border-color: rgba(246, 245, 194, 0.15);
  margin: 0.75rem 0;
}

/* --- Botón volver arriba --- */
#btn-volver-arriba {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  background-color: #668532;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
#btn-volver-arriba.visible {
  opacity: 1;
  pointer-events: auto;
}
#btn-volver-arriba:hover {
  background-color: #ee7100;
  transform: translateY(-3px);
}
/* Evitar cambio de color al recibir foco tras hacer click (mouse) */
#btn-volver-arriba:focus:not(:focus-visible) {
  background-color: #668532;
  outline: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
/* Indicador de foco accesible para navegación por teclado */
#btn-volver-arriba:focus-visible {
  background-color: #668532;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* --- Imágenes con clase .izquierda / .derecha / .item / .longa --- */
/* Pantallas grandes */
@media only screen and (min-width: 601px) {
  img.izquierda {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
    width: 50vw;
    max-width: 360px;
    border-radius: 0.5rem;
  }
  img.derecha {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    width: 30vw;
    max-width: 360px;
    border-radius: 0.5rem;
  }
  img.item {
    float: left;
    margin-right: 0.5rem;
    width: 5vw;
    max-width: 48px;
  }
  img.longa {
    display: block;
    margin: 0.75rem auto;
    width: 40vw;
    max-width: 500px;
  }
}

/* Pantallas chicas */
@media only screen and (max-width: 600px) {
  img.izquierda {
    display: block;
    margin: 0 auto 1rem auto;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
  }
  img.derecha {
    display: block;
    margin: 0 auto 1rem auto;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
  }
  img.item {
    float: left;
    margin-right: 0.4rem;
    width: 2rem;
    height: auto;
  }
  img.longa {
    display: block;
    margin: 0.75rem auto;
    width: 90%;
    height: auto;
  }
  /* Sección hero: altura reducida en mobile */
  .h-50vh {
    height: 55vh;
  }
  /* Paralaje desactivado en mobile para mejor rendimiento */
  .parallax {
    background-attachment: scroll;
  }
  /* Texto del hero más pequeño en mobile */
  .hero h1 {
    font-size: 1.6em;
  }
  .hero h2 {
    font-size: 1.1rem;
  }
  /* Columnas de dos en dos: apilado en mobile */
  section .row > .col,
  section .row > .col-md-6,
  section .row > .col-lg-6 {
    margin-bottom: 1rem;
  }
  /* El container con mx-5 no debe desbordarse en mobile */
  .container.mx-5 {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* Secciones con bg-image: altura mínima aceptable */
  .bg-image.h-50vh {
    min-height: 280px;
    height: auto;
    padding: 0;
  }

  /* Sección pistachos: altura automática para evitar superposición con siguiente sección */
  #pistachos.h-50vh {
    height: auto;
  }

  /* Títulos más compactos en mobile */
  #pistachos h2 {
    font-size: 1.3rem;
  }
  section h1 {
    font-size: 1.4rem;
  }
  #FAQ h1 {
    font-size: 1.3rem;
  }

  /* Espaciado reducido entre secciones en mobile */
  main > section {
    padding-top: 1.25rem;
    padding-bottom: 0.5rem;
  }

  /* SVG más grande en mobile */
  .svg-container svg {
    width: 95%;
    height: auto;
  }
}
