/* =============================== */
/* FAQ BLOG — Base                 */
/* =============================== */
.faq-blog {
    padding: 1.5rem 0.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden; 
}
/* =============================== */
/* Section Title                   */
/* =============================== */
.faq-section-title {
    display: inline-block;
    font-size: clamp(1.1rem, 4.5vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 0.8rem;
    width: fit-content;
    position: relative;
    text-align: center;
}
.faq-section-title {
    align-self: center;
}

.faq-blog a {
    color: currentColor;
    text-decoration: underline currentColor;
}

.faq-blog .container.container-width {
    padding-left: 0;
    padding-right: 0;
}

.faq-blog .faq-wrap,
.faq-blog .faq-title,
.faq-blog .faq-item,
.faq-blog .faq-content {
    max-width: clamp(20rem, 90vw, 56rem);
    width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
}

.faq-blog .container.container-width .faq-wrap .row {
    display: flex;
    flex-direction: column;
}

.faq-blog .container.container-width .faq-wrap .row .col {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.faq-blog .container.container-width .faq-wrap .row .col .faq-item {
    max-width: clamp(20rem, 90vw, 56rem);
    margin: clamp(0.3rem, 1vw, 0.5rem) auto;
}

.faq-blog svg {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: clamp(0.8rem, 2vw, 1.3rem);
    width: 70%;
}


/* =============================== */
/* Title                           */
/* =============================== */
.faq-title {
    text-align: center;
    margin: clamp(0.4rem, 1.5vw, 0.7rem) 0;
    font-size: clamp(1.2rem, 5vw, 1.6rem);
    position: relative;
    padding-bottom: 0rem;
}


/* =============================== */
/* Row layout                      */
/* =============================== */
.faq-blog .row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.faq-blog .row .col {
    width: 100%;
    transition: 0.3s;
}

.faq-blog .row .col .faq-item {
    width: 100%;
    margin: clamp(0.3rem, 1vw, 0.5rem) 0;
}


/* =============================== */
/* FAQ Item                        */
/* =============================== */
.faq-item {
    padding: 0;
    border-radius: clamp(0.3rem, 1vw, 0.5rem);
    border: 0.06em solid;
    box-shadow: 0 clamp(0.4em, 1.5vw, 0.8em) clamp(1em, 3vw, 2rem) rgba(7, 20, 40, 0.15);
    width: 100%;
    max-width: clamp(20rem, 90vw, 56rem);
    margin: clamp(0.3rem, 1vw, 0.5rem) auto;
    display: flex;
    flex-direction: column;
    font-weight: 700;
    font-size: clamp(0.8rem, 1vw, 1rem);
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
}

/* =============================== */
/* Scroll Reveal Animation         */
/* الأول يدخل من اليمين، التاني من الشمال، وهكذا بالتبادل */
/* =============================== */
.faq-item {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.faq-item:nth-of-type(odd) {
    transform: translateX(80px);
}

.faq-item:nth-of-type(even) {
    transform: translateX(-80px);
}

.faq-item.faq-visible {
    opacity: 1;
    transform: translateX(0);
}


/* =============================== */
/* Summary                         */
/* =============================== */
.faq-item summary {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    background: transparent;
    gap: clamp(0.4em, 1.5vw, 0.7em);
    list-style: none;
    padding: 0.2rem 0.5rem;
    min-height: clamp(2.8rem, 9vw, 3.5rem);
    line-height: 1.6;
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    font-weight: 800;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: none; }

.faq-item summary::before {
    font-family: "Font Awesome 6 Free";
    content: "\f078";
    font-weight: 900;
    font-size: clamp(0.6rem, 2vw, 0.75rem);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: clamp(1.3rem, 4.5vw, 1.7rem);
    height: clamp(1.3rem, 4.5vw, 1.7rem);
    border-radius: 50%;
    transition: 0.35s;
    transform: rotate(0deg);
    border: 0.1em solid;
}

.faq-item summary::before {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.35s ease,
                color 0.35s ease;
}

.faq-item.is-open-item summary::before {
    transform: rotate(180deg);
}


/* =============================== */
/* FAQ Content                     */
/* =============================== */
.faq-content {
    width: 100%;
    max-height: 0;
    opacity: 0;
    transform: translateY(22px);
    overflow: hidden;
    padding: 0 clamp(0.8em, 3vw, 1.2em);
    box-sizing: border-box;
    font-size: clamp(0.82rem, 2.8vw, 0.95rem);
    pointer-events: none;

    /* عند القفل: النص يختفي وينزل لتحت الأول، وبعدين الصندوق يقفل */
    transition:
        opacity 0.25s ease 0s,
        transform 0.25s ease 0s,
        max-height 0.4s ease 0.2s,
        padding 0.4s ease 0.2s;
}

.faq-content.is-open {
    padding: clamp(0.6em, 2vw, 0.9em) clamp(0.8em, 3vw, 1.2em) clamp(0.7em, 2.5vw, 1em);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    font-weight: 600;

    /* عند الفتح: الصندوق يفتح (الارتفاع والحواف) الأول، وبعد 0.35 ثانية النص يظهر ويتحرك لفوق */
    transition:
        max-height 0.4s ease 0s,
        padding 0.4s ease 0s,
        opacity 0.4s ease 0.35s,
        transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s;
}

.faq-content * { max-width: 100%; word-break: break-word; }

.faq-content ul {
    margin: clamp(0.3rem, 1vw, 0.5rem) 0;
}


/* =============================== */
/* Small Tablet  481px → 600px     */
/* =============================== */
@media (min-width: 481px) {
    .faq-title { font-size: clamp(1.3rem, 4vw, 1.7rem); }
    .faq-content { font-size: clamp(0.85rem, 2.5vw, 0.98rem); }
}

/* =============================== */
/* Medium Tablet  601px → 768px    */
/* =============================== */
@media (min-width: 601px) {
    .faq-title { font-size: clamp(1.4rem, 3.5vw, 1.8rem); }
    .faq-content { font-size: clamp(0.88rem, 2vw, 1rem); }
}

/* =============================== */
/* Large Tablet  769px → 1024px    */
/* =============================== */
@media (min-width: 769px) {
    .faq-title { font-size: clamp(1.5rem, 3vw, 1.9rem); }
    .faq-item summary { font-size: clamp(0.95rem, 1.8vw, 1.1rem); }
}

/* =============================== */
/* Small Desktop  1025px → 1280px  */
/* =============================== */
@media (min-width: 1025px) {
    .faq-title { font-size: clamp(1.6rem, 2.2vw, 2rem); }
    .faq-item summary { font-size: clamp(0.98rem, 1.3vw, 1.1rem); }
    .faq-content { font-size: clamp(0.9rem, 1.1vw, 1rem); }
    .faq-blog { padding: 1.5rem 1.5rem; }
}

/* =============================== */
/* Medium Desktop  1281px → 1440px */
/* =============================== */
@media (min-width: 1281px) {
    .faq-title { font-size: clamp(1.7rem, 2vw, 2.1rem); }
}

/* =============================== */
/* Large Desktop  1441px → 1920px  */
/* =============================== */
@media (min-width: 1441px) {
    .faq-title { font-size: clamp(1.8rem, 1.8vw, 2.2rem); }
}

/* =============================== */
/* Extra Large  1921px+            */
/* =============================== */
@media (min-width: 1921px) {
    .faq-title { font-size: clamp(2rem, 1.6vw, 2.6rem); }
    .faq-content { font-size: clamp(1rem, 0.9vw, 1.15rem); }
}


/* ============================================================
   COLOR THEMES
============================================================ */
.white-faq { background-color: var(--white); color: var(--helperColor); }
.white-faq .faq-title { color: var(--lightHelper); }
.white-faq .faq-title::after { background-image: linear-gradient(90deg, var(--white) 0%, var(--white) 100%); }
.white-faq .faq-item { border-color: rgba(255, 255, 255, 0.25); background-color: var(--lightHelper); color: var(--white); }
.white-faq .faq-item summary::before { color: var(--white); border-color: var(--white); }
.white-faq .faq-item[open] summary::before { background-color: var(--white); color: var(--lightHelper); }
.white-faq .faq-content { color: rgba(255, 255, 255, 0.9); }
.white-faq .faq-section-title::after { background-image: linear-gradient(90deg, var(--lightHelper) 0%, var(--lightHelper) 100%); }

.blue-faq { background-color: var(--lightHelper); color: var(--white); }
.blue-faq .faq-title { color: var(--white); }
.blue-faq .faq-title::after { background-image: linear-gradient(90deg, var(--lightHelper) 0%, var(--lightHelper) 100%); }
.blue-faq .faq-item { border-color: var(--lightHelper); background-color: var(--white); color: var(--helperColor); }
.blue-faq .faq-item summary::before { color: var(--lightHelper); border-color: var(--lightHelper); }
.blue-faq .faq-item[open] summary::before { background-color: var(--lightHelper); color: var(--white); }
.blue-faq .faq-content { color: var(--helperColor); }
.blue-faq .faq-section-title::after { background-image: linear-gradient(90deg, var(--white) 0%, var(--white) 100%); }

.white-faq .faq-item.is-open-item summary::before {
    background-color: var(--white);
    color: var(--lightHelper);
}

.blue-faq .faq-item.is-open-item summary::before {
    background-color: var(--lightHelper);
    color: var(--white);
}
