/*!-> Page Header */
.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
      url("../img/faq.webp");
    background-size: cover;
    background-position: center;
    padding: 4rem 1rem;
    text-align: center;
    color: white;
}
  
.page-header__title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}
  
.page-header__text {
    animation: fadeInUp 1s ease-out;
}

.faq {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 1rem;
}

.faq__container {
    background: var(--color-background-alt-dark);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: var(--shadow-md);
}

.faq__category {
    margin-bottom: 1rem;
}

.faq__category:last-child {
    margin-bottom: 0;
}

.faq__category-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary-light);
}

.faq__item {
    display: flex;
    flex-direction: column;
    justify-content: center;    
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-background-alt);
}

.faq__item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq__question {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.faq__answer {
    color: var(--color-text-light);
    line-height: 1.6;
}

/*! Preguntas y respuestas */
details {
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

summary {
    font-size: 1.125rem;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
    position: relative;
}

summary::after {
    content: "▼";
    color: var(--color-primary);
    margin-top: 0.15rem;
    font-size: 1rem;
    position: absolute;
    right: 10px;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(180deg);
}

.faq__answer {
    padding-top: 10px;
    color: #666;
    line-height: 1.6;
}

details .faq__answer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    animation: fadeInDown 1s ease-out;
}

/*! Cuando el details está abierto */
details[open] .faq__answer {
    max-height: 200px; 
    opacity: 1;
    transition: max-height 0.6s ease-in-out, opacity 0.4s ease-in;
}