/* ============================================================
   SOLUCIONES JURÍDICAS UY — FAQ CSS
   Paleta: #233E49 (bg) | #9C7F5B (dorado) | #FFFFFF
   Tipografía: Cormorant Garamond + Jost
   ============================================================ */

/* ── FAQ Shell ──────────────────────────────────────────────── */
.faq {
  position: relative;
  background-color: var(--color-bg);
  padding: 120px 0;
  overflow: hidden;
}

/* Fondo radial */
.faq::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 0%  40%, rgba(156, 127, 91, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 45% 55% at 100% 70%, rgba(22, 40, 48, 0.55)  0%, transparent 55%);
  pointer-events: none;
}

/* Línea ornamental derecha */
.faq::after {
  content: '';
  position: absolute;
  right: 0; top: 10%; bottom: 10%;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(156, 127, 91, 0.25) 30%,
    rgba(156, 127, 91, 0.25) 70%,
    transparent
  );
  pointer-events: none;
}

/* ── Container ──────────────────────────────────────────────── */
.faq .container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Header ─────────────────────────────────────────────────── */
.faq__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.faq__subtitle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.faq__subtitle::before,
.faq__subtitle::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold));
}
.faq__subtitle::after { transform: rotate(180deg); }

.faq__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.9rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--color-white);
  margin: 0;
}

.faq__title-highlight {
  font-style: italic;
  font-weight: 400;
  color: var(--color-gold-pale);
}

.faq__description {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-text-body);
  max-width: 560px;
}

/* ── Grid principal: acordeón + sidebar ─────────────────────── */
.faq__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* ── Acordeón ───────────────────────────────────────────────── */
.faq__accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(156, 127, 91, 0.12);
  border-radius: 3px;
  overflow: hidden;
}

/* ── Item ───────────────────────────────────────────────────── */
.faq__item {
  position: relative;
  border-bottom: 1px solid rgba(156, 127, 91, 0.1);
  transition: background var(--transition);
}

.faq__item:last-child {
  border-bottom: none;
}

/* Línea izquierda dorada cuando está abierto */
.faq__item.is-open {
  background: rgba(156, 127, 91, 0.04);
}

.faq__item.is-open::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-gold), transparent);
}

/* ── Pregunta (trigger) — es un <button>, resetear estilos ──── */
.faq__question {
  /* Reset button */
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;

  /* Layout */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 26px 28px;
  text-align: left;
  user-select: none;
  transition: background var(--transition);
}

.faq__question:hover {
  background: rgba(156, 127, 91, 0.04);
}

.faq__question:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: -2px;
}

.faq__question-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-white);
  margin: 0;
  transition: color var(--transition);
}

.faq__item.is-open .faq__question-title {
  color: var(--color-gold-pale);
}

/* Ícono +/× */
.faq__question-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(156, 127, 91, 0.08);
  border: 1px solid rgba(156, 127, 91, 0.2);
  border-radius: 50%;
  color: var(--color-gold);
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition), transform 0.4s ease;
}

.faq__item.is-open .faq__question-icon {
  background: rgba(156, 127, 91, 0.14);
  border-color: rgba(156, 127, 91, 0.4);
  transform: rotate(45deg);
}

.faq__question-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Respuesta — animación pura CSS con grid-template-rows ──── */
.faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}

.faq__item.is-open .faq__answer {
  grid-template-rows: 1fr;
}

/*
 * El div interno DEBE tener min-height: 0 para que grid-template-rows: 0fr
 * colapse completamente el contenido.
 */
.faq__answer-content {
  min-height: 0;
  overflow: hidden;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* El padding-bottom se anima junto con el grid */
  padding-bottom: 0;
  transition: padding-bottom 0.4s ease;
}

.faq__item.is-open .faq__answer-content {
  padding-bottom: 28px;
}

.faq__answer-content p {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--color-text-body);
  margin: 0;
}

/* Lista dentro de respuesta */
.faq__answer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq__answer-list li {
  font-family: var(--font-sans);
  font-size: 0.87rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-body);
  padding-left: 18px;
  position: relative;
}

.faq__answer-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  background: var(--color-gold);
  border-radius: 50%;
  opacity: 0.7;
}

.faq__answer-list li strong {
  font-weight: 500;
  color: var(--color-gold-pale);
}

/* Highlight callout */
.faq__answer-highlight {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(156, 127, 91, 0.07);
  border: 1px solid rgba(156, 127, 91, 0.18);
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-gold-pale);
  width: fit-content;
}

.faq__answer-highlight svg {
  flex-shrink: 0;
  color: var(--color-gold);
  opacity: 0.8;
}

.faq__answer-highlight--warning {
  background: rgba(156, 127, 91, 0.05);
  border-color: rgba(156, 127, 91, 0.22);
}

/* Features chips */
.faq__answer-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.faq__feature {
  display: inline-block;
  padding: 5px 12px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.faq__feature:hover {
  color: var(--color-gold-pale);
  background: rgba(156, 127, 91, 0.08);
  border-color: rgba(156, 127, 91, 0.25);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.faq__sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 32px;
}

/* ── Tarjeta de contacto ────────────────────────────────────── */
.faq__contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 36px 28px;
  background: linear-gradient(
    160deg,
    var(--color-bg-mid) 0%,
    var(--color-bg-dark) 50%,
    rgba(156, 127, 91, 0.06) 100%
  );
  border: 1px solid rgba(156, 127, 91, 0.28);
  border-radius: 3px;
  overflow: hidden;
  box-shadow:
    0 6px 28px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(156, 127, 91, 0.1);
}

/* Esquina ornamental */
.faq__contact-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: linear-gradient(225deg, rgba(156, 127, 91, 0.1) 0%, transparent 55%);
  pointer-events: none;
}

/* Línea dorada superior */
.faq__contact-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), var(--color-gold-light), transparent);
}

.faq__contact-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(156, 127, 91, 0.09);
  border: 1px solid rgba(156, 127, 91, 0.22);
  border-radius: 50%;
  color: var(--color-gold);
}

.faq__contact-icon svg {
  width: 28px;
  height: 28px;
}

.faq__contact-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-white);
  margin: 0;
}

.faq__contact-description {
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text-body);
  margin: 0;
}

/* Botones del sidebar */
.faq__contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.faq__contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  padding: 13px 20px;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.faq__contact-btn svg {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq__contact-btn:hover svg {
  transform: translateX(4px);
}

.faq__contact-btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.faq__contact-btn--primary {
  color: var(--color-bg-deeper);
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  border: 1px solid transparent;
  box-shadow: 0 4px 16px rgba(156, 127, 91, 0.3);
}

.faq__contact-btn--primary:hover {
  box-shadow: 0 6px 24px rgba(156, 127, 91, 0.45);
  transform: translateY(-2px);
}

.faq__contact-btn--secondary {
  color: var(--color-gold-pale);
  background: transparent;
  border: 1px solid rgba(156, 127, 91, 0.32);
}

.faq__contact-btn--secondary:hover {
  color: var(--color-white);
  border-color: rgba(156, 127, 91, 0.6);
  background: rgba(156, 127, 91, 0.07);
}

/* ── Stats del sidebar ──────────────────────────────────────── */
.faq__stats {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(156, 127, 91, 0.15);
  border: 1px solid rgba(156, 127, 91, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.faq__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  background: var(--color-bg-mid);
  transition: background var(--transition);
}

.faq__stat:hover {
  background: rgba(30, 53, 63, 0.85);
}

.faq__stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-gold-pale);
  letter-spacing: -0.02em;
}

.faq__stat-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .faq { padding: 96px 0; }
  .faq .container { padding: 0 24px; }

  .faq__grid {
    grid-template-columns: 1fr 300px;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .faq { padding: 72px 0; }
  .faq .container { padding: 0 20px; }
  .faq__header { margin-bottom: 48px; }

  .faq__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .faq__sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .faq__stats {
    flex-direction: row;
    background: none;
    border: none;
    gap: 0;
  }

  .faq__stat {
    border: 1px solid rgba(156, 127, 91, 0.15);
    border-radius: 3px;
  }

  .faq__question { padding: 20px 20px; }
  .faq__answer-content { padding: 0 20px; }
  .faq__item.is-open .faq__answer-content { padding-bottom: 22px; }
}

@media (max-width: 480px) {
  .faq { padding: 56px 0; }
  .faq .container { padding: 0 16px; }

  .faq__sidebar {
    grid-template-columns: 1fr;
  }

  .faq__stats {
    flex-direction: column;
    background: rgba(156, 127, 91, 0.15);
    border: 1px solid rgba(156, 127, 91, 0.15);
    border-radius: 3px;
    overflow: hidden;
    gap: 1px;
  }

  .faq__stat {
    border: none;
    border-radius: 0;
  }

  .faq__question-title { font-size: 0.97rem; }
  .faq::after { display: none; }
}