/* =========================================
   Preguntas Frecuentes - Jardín CESD
   ========================================= */

:root {
  --green: #0abfa0;
  --green-c: #4fe3cb;
  --green-mas-c: #8be8d6;
  --green-mas-c-2: #c2f2e9;
  --green-o: #008c71;
  --green-mas-o: #006652;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --text-primary: #1a1a1a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --border-radius: 10px;
  --border-radius-lg: 14px;
  --border-radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.25s ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: #f4faf8;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ---- Header ---- */
.faq-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--green-mas-c-2);
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.faq-header .header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.faq-header .logo img {
  height: 40px;
  width: auto;
}

.faq-header .header-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}

/* ---- Hero banner ---- */
.faq-hero {
  background: linear-gradient(135deg, var(--green-o) 0%, var(--green) 60%, var(--green-c) 100%);
  padding: 6rem 1.5rem 3rem;
  text-align: center;
  color: var(--white);
}

.faq-hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.faq-hero p {
  font-size: 1.1rem;
  opacity: 0.88;
  max-width: 540px;
  margin: 0 auto;
}

/* ---- Main content ---- */
.faq-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ---- Category group ---- */
.faq-group {
  margin-bottom: 2.5rem;
}

.faq-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green-o);
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

/* ---- Accordion items ---- */
.faq-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--green-mas-c-2);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-item.is-open {
  border-color: var(--green-mas-c);
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.1rem 1.25rem;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  line-height: 1.4;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--green-o);
}

.faq-item.is-open .faq-question {
  color: var(--green-o);
}

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), transform var(--transition-normal);
}

.faq-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--green-o);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--transition-fast);
}

.faq-item.is-open .faq-icon {
  background: var(--green-mas-c-2);
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.is-open .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.7;
  border-top: 1px solid var(--green-mas-c-2);
  padding-top: 1rem;
}

/* ---- Cover image ---- */
.faq-cover {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background-color: var(--green-o);
  margin-top: 65px; /* compensa el header fijo */
}

.faq-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Cuando la imagen no carga, muestra gradiente */
.faq-cover--placeholder .faq-cover-img {
  display: none;
}

.faq-cover--placeholder {
  background: linear-gradient(135deg, var(--green-mas-o) 0%, var(--green) 60%, var(--green-c) 100%);
}

.faq-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,70,52,0.35) 0%, rgba(0,70,52,0.72) 100%);
  display: flex;
  align-items: flex-end;
  padding: 2rem 2.5rem;
}

.faq-cover-text h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.faq-cover-text p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 600px) {
  .faq-cover {
    height: 220px;
  }

  .faq-cover-overlay {
    padding: 1.25rem 1.25rem;
  }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .faq-hero {
    padding: 5.5rem 1rem 2.5rem;
  }

  .faq-question {
    font-size: 0.95rem;
    padding: 1rem;
  }

  .faq-answer-inner {
    padding: 0 1rem 1rem;
    padding-top: 0.875rem;
  }
}
