/* ===== FAQ PAGE - PURACERÁMICA STYLE ===== */

/* Layout Container */
.faq-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

@media (min-width: 768px) {
  .faq-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* ===== Hero Section ===== */
main > h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.5px;
  margin: 3rem 0 1.5rem;
  text-align: center;
  color: #000;
}

/* ===== Tab Navigation ===== */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 2rem auto 3rem;
  max-width: 900px;
  padding: 0 1rem;
}

.tab {
  background: #fff;
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  border: 1.5px solid #d0d0d0;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.tab:hover {
  background-color: #000;
  color: #fff;
  border-color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tab.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* ===== FAQ Section Headers ===== */
.faq-list {
  margin-top: 0;
  padding: 0;
  scroll-margin-top: 120px;
}

.faq-list h2 {
  font-size: 1.5rem;
  font-weight: 400;
  text-align: left;
  margin-bottom: 1.5rem;
  color: #000;
  letter-spacing: 0.5px;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #000;
}

/* ===== FAQ Items ===== */
.faq-item {
  background: #fff;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  padding: 0;
  overflow: hidden;
  transition: all 0.25s ease;
}

.faq-item:hover {
  border-color: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.faq-item.open {
  border-color: #000;
  background: #fafafa;
}

/* Question Button */
.question {
  background: transparent;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  color: #000;
  width: 100%;
  text-align: left;
  padding: 1.25rem 3rem 1.25rem 1.25rem;
  cursor: pointer;
  position: relative;
  display: block;
  line-height: 1.5;
  transition: color 0.25s ease;
}

.faq-item:hover .question {
  color: #333;
}

.faq-item.open .question {
  padding-bottom: 0.75rem;
}

/* Plus/Minus Icon */
.question::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.3s ease;
}

.faq-item.open .question::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

/* Answer */
.answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms ease, padding 400ms ease;
  padding: 0 1.25rem;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.7;
  font-weight: 300;
}

.faq-item.open .answer {
  padding: 0 1.25rem 1.25rem 1.25rem;
  max-height: 500px;
}

.answer strong {
  font-weight: 500;
  color: #000;
}

.answer br {
  display: block;
  content: "";
  margin: 0.5rem 0;
}

/* ===== Visual Enhancements ===== */

main {
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  padding: 2rem 0 4rem;
}

.faq-list h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 24px;
  background: #000;
  margin-right: 0.75rem;
  vertical-align: middle;
}

.answer u {
  text-decoration: none;
  border-bottom: 2px solid #000;
  padding-bottom: 2px;
}

/* ===== Mobile Optimization ===== */
@media (max-width: 768px) {
  main {
    padding: 1.5rem 0 3rem;
  }

  main > h1 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
  }

  .tabs {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
    margin: 1.5rem auto 2rem;
  }

  .tab {
    width: 100%;
    text-align: center;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  .faq-container {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  .faq-list {
    scroll-margin-top: 100px;
  }

  .faq-list h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .faq-list h2::before {
    height: 20px;
    margin-right: 0.5rem;
  }

  .faq-item {
    margin-bottom: 0.6rem;
  }

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

  .question::after {
    right: 1rem;
    font-size: 1.5rem;
  }

  .answer {
    font-size: 0.9rem;
    padding: 0 1rem;
  }

  .faq-item.open .answer {
    padding: 0 1rem 1rem 1rem;
  }
}

/* ===== Accessibility ===== */
.question:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* ===== Animation on Load ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-item {
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}

.faq-item:nth-child(1) { animation-delay: 0.05s; }
.faq-item:nth-child(2) { animation-delay: 0.1s; }
.faq-item:nth-child(3) { animation-delay: 0.15s; }
.faq-item:nth-child(4) { animation-delay: 0.2s; }
.faq-item:nth-child(5) { animation-delay: 0.25s; }
.faq-item:nth-child(6) { animation-delay: 0.3s; }
.faq-item:nth-child(7) { animation-delay: 0.35s; }
.faq-item:nth-child(8) { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .faq-item {
    animation: none;
    opacity: 1;
  }
}