/* ========================================
   SHARED FAQ ACCORDION COMPONENT
   ----------------------------------------
   Reusable FAQ styles shared across generic
   templates (1, 3, 6, 7). Rendered from a
   Hygraph section list where each item has a
   title (question) and description (answer).
   Class names keep the `t7-faq-` prefix so
   the markup stays identical to template7.
   ======================================== */

.t7-faq-section {
    padding: 40px 0;
}

.t7-faq-list {
    max-width: 820px;
    margin: 0 auto;
}

.t7-faq-item {
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.t7-faq-item:last-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

/* The clickable question row */
.t7-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 4px;
    cursor: pointer;
    list-style: none;
    font-size: 20px;
    font-weight: 300;
    color: var(--global-colour-black);
    line-height: 1.4;
}

/* Hide default disclosure triangle */
.t7-faq-question::-webkit-details-marker {
    display: none;
}

.t7-faq-question:hover .t7-faq-question-text {
    color: var(--global-colour-green);
}

.t7-faq-question-text {
    flex: 1;
    transition: color 0.2s ease;
}

/* Plus / minus icon built with pseudo-elements */
.t7-faq-icon {
    position: relative;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.t7-faq-icon::before,
.t7-faq-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background-color: var(--global-colour-green);
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.t7-faq-icon::before {
    width: 20px;
    height: 2px;
}

.t7-faq-icon::after {
    width: 2px;
    height: 20px;
}

/* When the item is open, rotate the vertical bar away to form a minus */
.t7-faq-item[open] .t7-faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

/* The answer panel */
.t7-faq-answer {
    padding: 0 4px 28px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--global-colour-grey);
    font-weight: 300;
    overflow-wrap: break-word;
    word-break: break-word;
}

.t7-faq-answer p {
    margin-bottom: 16px;
}

.t7-faq-answer p:last-child {
    margin-bottom: 0;
}

.t7-faq-answer a {
    color: var(--global-colour-green);
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {
    .t7-faq-section {
        padding: 24px 0;
    }

    .t7-faq-question {
        font-size: 18px;
        padding: 20px 4px;
    }
}

@media (max-width: 480px) {
    .t7-faq-question {
        font-size: 17px;
    }
}
