/* שאלות ותשובות - קלפים שמתהפכים */

.faq-section .section-title {
    margin-bottom: 60px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    max-width: 860px;
    margin: auto;
}

.faq-card {
    height: 250px;
    perspective: 1200px;
    cursor: pointer;
    outline: none;
}

.faq-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

/* היפוך בריחוף (במחשב) או בלחיצה (בכל מכשיר) */
.faq-card.flipped .faq-card-inner {
    transform: rotateY(180deg);
}

@media (hover: hover) {
    .faq-card:hover .faq-card-inner {
        transform: rotateY(180deg);
    }
}

.faq-card:focus-visible .faq-card-inner {
    box-shadow: 0 0 0 3px var(--green);
    border-radius: 24px;
}

/* שני צדי הקלף */
.faq-card-front,
.faq-card-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 28px;
    text-align: center;
    border-radius: 24px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* צד קדמי - השאלה */
.faq-card-front {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.25));
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.3);
}

.faq-card-front h3 {
    font-size: 20px;
    line-height: 1.5;
    color: white;
}

.faq-card-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--green);
    box-shadow: 0 0 0 6px rgba(3, 241, 162, 0.12), 0 0 18px rgba(3, 241, 162, 0.4);
}

/* צד אחורי - התשובה */
.faq-card-back {
    transform: rotateY(180deg);
    gap: 10px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 16px 35px rgba(15, 23, 42, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.faq-card-back .faq-card-icon {
    width: 38px;
    height: 38px;
    font-size: 20px;
}

.faq-card-back p {
    font-size: 16px;
    line-height: 1.8;
    color: white;
}

/* כפתור "למידע נוסף" בגב הקלף */
.faq-card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 50vh;
    color: var(--green);
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    background: rgba(15, 23, 42, 0.35);
    transition: background 0.3s, box-shadow 0.3s;
    pointer-events: none;
}

.faq-card-more i {
    transition: transform 0.3s;
}

.faq-card-more:hover {
    background: rgba(15, 23, 42, 0.55);
}

.faq-card-more:hover i {
    transform: translateX(-4px);
}

/* הכפתור לחיץ רק כשהצד של התשובה גלוי */
.faq-card.flipped .faq-card-more {
    pointer-events: auto;
}

@media (hover: hover) {
    .faq-card:hover .faq-card-more {
        pointer-events: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-card-inner {
        transition: none;
    }
}

@media (max-width: 700px) {
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .faq-card {
        height: 280px;
    }

    .faq-card-front h3 {
        font-size: 16px;
    }

    .faq-card-back p {
        font-size: 16px;
    }
}
