/* ==========================================================================
   PREGUNTAS FRECUENTES — Estilos propios ultra-premium (Usa tokens de home.css)
   ========================================================================== */

/* ---------- BOOTSTRAP ISOLATION ---------- */
/*
 * Bootstrap 5 carga DESPUÉS de home.css y pisa varias propiedades.
 *
 * Estrategia:
 *   - !important solo en propiedades estructurales que no se pueden ganar
 *     con especificidad (Bootstrap las declara en .navbar, mismo peso 0,1,0).
 *   - Colores y estilos visuales: 0,2,0 sin !important → home.css sigue
 *     actuando en sus reglas de hover que ya tienen especificidad 0,3,0
 *     (ej: .nav-dropdown:hover > .nav-link { color:#fff }).
 */

/* ---------- BOOTSTRAP ISOLATION & NAVBAR FIX ---------- */
.navbar {
  position: fixed !important;
  top: 38px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 100 !important;
  padding: 0 3rem !important;
  height: 72px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06) !important;
}

.nav-links {
  padding-left: 0;
  margin-bottom: 0;
}

.navbar .nav-link {
  color: var(--navy-dark, #0B2545);
  padding: 8px 18px;
  font-weight: 500;
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.navbar .nav-link:hover {
  color: var(--navy-brand, #00549A);
}

@media (max-width: 768px) {
  .navbar {
    top: 0 !important;
    padding: 0 1.5rem !important;
    height: 64px !important;
  }
}

/* ---------- HERO (Naranja degradado + patrón tenue de burbujas geométricas) ---------- */
.faq-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #7c2d12 0%, #c2410c 45%, #ea580c 100%);
  color: #fff;
  padding: 128px 2rem 64px;
  min-height: 400px;
}

.faq-hero-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg width='180' height='180' viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M25 35h55a14 14 0 0 1 14 14v25a14 14 0 0 1-14 14H52l-14 12v-12H25a14 14 0 0 1-14-14V49a14 14 0 0 1 14-14z'/%3E%3Cpath d='M105 85h45a12 12 0 0 1 12 12v20a12 12 0 0 1-12 12h-12l-10 10v-10h-23a12 12 0 0 1-12-12V97a12 12 0 0 1 12-12z'/%3E%3Ccircle cx='40' cy='61' r='2.5' fill='%23ffffff'/%3E%3Ccircle cx='52.5' cy='61' r='2.5' fill='%23ffffff'/%3E%3Ccircle cx='65' cy='61' r='2.5' fill='%23ffffff'/%3E%3Cpath d='M120 30a22 22 0 1 0 0 44 22 22 0 0 0 0-44z' stroke-dasharray='3 3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.faq-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.faq-hero-orb-1 {
  width: 480px;
  height: 480px;
  background: rgba(251, 146, 60, 0.25);
  top: -160px;
  right: -100px;
}

.faq-hero-orb-2 {
  width: 360px;
  height: 360px;
  background: rgba(234, 88, 12, 0.3);
  bottom: -140px;
  left: -80px;
}

.faq-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  text-align: left;
}

@media (min-width: 992px) {
  .faq-hero-inner {
    grid-template-columns: 1.5fr 1fr;
  }
}

.faq-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1rem;
  font-weight: 500;
}

.faq-breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.faq-breadcrumb a:hover {
  color: #ffffff;
}

.faq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fdba74;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.32rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 0.9rem;
}

.faq-eyebrow svg {
  width: 14px;
  height: 14px;
}

.faq-hero h1 {
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 0.85rem;
  color: #ffffff;
}

.faq-hero-lead {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
  margin-bottom: 1.25rem;
}

/* Buscador en vivo flotante compacto */
.faq-search-wrapper {
  position: relative;
  max-width: 540px;
  margin: 0;
}

.faq-search-wrapper svg {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px !important;
  height: 18px !important;
  stroke: #64748b;
  pointer-events: none;
}

.faq-search-input {
  width: 100%;
  padding: 0.75rem 1.15rem 0.75rem 2.8rem;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: #ffffff;
  color: var(--text-primary, #0f172a);
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.faq-search-input:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.3), 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.faq-search-input::placeholder {
  color: #94a3b8;
}

/* Glass Badge para el hero de FAQ (idéntico a responsabilidad social) */
.faq-hero-badge {
  position: relative;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  max-width: 280px;
  margin: 0 auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.faq-hero-badge:hover {
  transform: translateY(-4px);
  border-color: rgba(253, 186, 116, 0.45);
}

.faq-hero-badge-icon {
  width: 56px !important;
  height: 56px !important;
  margin: 0 auto 1rem !important;
  background: rgba(251, 146, 60, 0.18);
  border: 1px solid rgba(253, 186, 116, 0.35);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.faq-hero-badge-icon svg {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  stroke: #fdba74;
  display: block;
}

.faq-hero-badge h3 {
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.faq-hero-badge p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 768px) {
  .faq-hero {
    padding: 96px 1.25rem 48px;
    min-height: auto;
  }
  .faq-hero-badge {
    display: none;
  }
}

/* ---------- SUBNAV STICKY DE CATEGORÍAS ---------- */
/* top = topbar (38px) + navbar (72px) del chrome premium */
.faq-subnav {
  position: sticky;
  top: 110px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.faq-subnav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.faq-subnav-inner::-webkit-scrollbar {
  display: none;
}

.faq-subnav-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  white-space: nowrap;
  margin-right: 0.25rem;
}

.faq-chip {
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-page);
  border: 1px solid var(--card-border);
  padding: 0.45rem 1rem;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.faq-chip:hover {
  color: var(--navy-brand);
  border-color: rgba(0, 84, 154, 0.25);
  background: var(--navy-light);
  text-decoration: none;
}

.faq-chip.active {
  color: #ffffff;
  background: var(--navy-brand);
  border-color: var(--navy-brand);
  box-shadow: 0 4px 14px -4px rgba(0, 84, 154, 0.4);
}

@media (max-width: 768px) {
  .faq-subnav {
    top: 64px;
  }

  .faq-subnav-label {
    display: none;
  }
}

/* ---------- CONTENIDO Y CATEGORÍAS ---------- */
.faq-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.faq-section {
  scroll-margin-top: 170px;
  margin-bottom: 3rem;
}

.faq-cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.faq-cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 16px -4px rgba(0, 84, 154, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-spring);
}

.faq-cat-header:hover .faq-cat-icon {
  transform: scale(1.08) rotate(3deg);
}

.faq-cat-icon svg {
  width: 24px;
  height: 24px;
}

.faq-cat-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin: 0;
  letter-spacing: -0.3px;
}

/* Banner de construcción */
.faq-banner-dev {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: 0 6px 20px -6px rgba(217, 119, 6, 0.12);
}

.faq-banner-dev-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff1b8;
  color: #d46b08;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.faq-banner-dev-icon svg {
  width: 20px;
  height: 20px;
}

.faq-banner-dev h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #873800;
  margin-bottom: 0.3rem;
}

.faq-banner-dev p {
  font-size: 0.88rem;
  color: #612500;
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.faq-banner-dev a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy-brand);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.faq-banner-dev a:hover {
  background: var(--navy-accent);
  color: #ffffff;
}

/* ---------- ACORDEÓN ULTRA-PREMIUM ---------- */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  --bs-accordion-bg: transparent;
  --bs-accordion-border-width: 0;
}

.faq-accordion .accordion-item {
  background: #ffffff;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  box-shadow: 0 4px 16px -6px rgba(0, 84, 154, 0.05);
  transition: all 0.35s var(--ease-smooth);
}

.faq-accordion .accordion-item:hover {
  border-color: rgba(0, 84, 154, 0.18) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 84, 154, 0.1);
  transform: translateY(-2px);
}

.faq-accordion .accordion-button {
  background: #ffffff;
  color: var(--navy-dark);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 1.1rem 1.35rem;
  box-shadow: none !important;
  border: none;
  transition: all 0.3s ease;
}

.faq-accordion .accordion-button:hover {
  color: var(--navy-brand);
}

.faq-accordion .accordion-button:not(.collapsed) {
  background: var(--navy-light);
  color: var(--navy-brand);
  font-weight: 700;
}

.faq-accordion .accordion-body {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  padding: 1.1rem 1.35rem 1.35rem;
  border-top: 1px solid rgba(0, 84, 154, 0.08);
  background: #ffffff;
}

.faq-accordion .accordion-body p {
  margin-bottom: 0.75rem;
}

.faq-accordion .accordion-body p:last-child {
  margin-bottom: 0;
}

.faq-accordion .accordion-body ul,
.faq-accordion .accordion-body ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.faq-accordion .accordion-body li {
  margin-bottom: 0.35rem;
}

.faq-accordion .accordion-body strong {
  color: var(--navy-dark);
  font-weight: 700;
}

/* Badge de referencia legal */
.faq-ref-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-sans);
  background: var(--navy-light);
  color: var(--navy-brand);
  border: 1px solid rgba(0, 84, 154, 0.18);
  border-radius: 100px;
  padding: 0.2rem 0.65rem;
  white-space: nowrap;
  line-height: 1.3;
}

.faq-link {
  color: var(--navy-brand);
  font-weight: 700;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.faq-link:hover {
  color: var(--navy-accent);
}

/* Mensaje sin resultados */
.faq-no-results {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 3rem 1.5rem;
  text-align: center;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.faq-no-results svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
  margin: 0 auto 1rem;
}

.faq-no-results h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.35rem;
}

.faq-no-results p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- TUTORIALES EN VIDEO ---------- */
.faq-tutorials-section {
  background: #ffffff;
  border-top: 1px solid var(--card-border);
  padding: 4rem 1.5rem;
}

.faq-tutorials-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.faq-tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.faq-tutorial-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 6px 20px -8px rgba(0, 84, 154, 0.08);
  display: flex;
  flex-direction: column;
  transition: all 0.35s var(--ease-smooth);
}

.faq-tutorial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 84, 154, 0.18);
  box-shadow: 0 16px 36px -12px rgba(0, 84, 154, 0.14);
}

.faq-tutorial-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.faq-tutorial-thumb-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-brand) 100%);
  opacity: 0.85;
}

.faq-tutorial-play {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-spring);
}

.faq-tutorial-play svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
  margin-left: 2px;
}

.faq-tutorial-card:hover .faq-tutorial-play {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.35);
}

.faq-tutorial-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  z-index: 2;
}

.faq-tutorial-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.faq-tutorial-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.faq-tutorial-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: none;
  cursor: not-allowed;
}

.faq-tutorial-btn svg {
  width: 14px;
  height: 14px;
}

/* ---------- SECCIÓN CONTACTO / AYUDA ---------- */
.faq-contact-section {
  background: linear-gradient(180deg, var(--bg-page) 0%, var(--navy-light) 100%);
  padding: 4rem 1.5rem;
}

.faq-contact-card {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  box-shadow: 0 20px 50px -20px rgba(0, 84, 154, 0.12);
}

.faq-contact-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--navy-light);
  color: var(--navy-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.faq-contact-icon svg {
  width: 28px;
  height: 28px;
}

.faq-contact-card h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.faq-contact-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.faq-contact-info-box {
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  text-align: left;
  max-width: 380px;
  margin: 0 auto 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-contact-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.faq-contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--navy-brand);
  flex-shrink: 0;
  margin-top: 2px;
}

.faq-contact-item-title {
  font-weight: 700;
  color: var(--navy-dark);
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.faq-contact-item-desc {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.faq-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--navy-brand);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s var(--ease-spring);
  box-shadow: 0 8px 24px -8px rgba(0, 84, 154, 0.4);
}

.faq-contact-btn:hover {
  background: var(--navy-accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(0, 84, 154, 0.5);
}

.faq-contact-btn svg {
  width: 18px;
  height: 18px;
}