/* ==========================================================================
   SSS — sitedeki tüm SSS alanları (ana sayfa, hizmet/sayfa soruları, yazı içi SSS, SSS bloğu)
   Şablon: resources/views/partials/faq.blade.php · Davranış: assets/js/mg-faq.js
   :not(#_) → tema ve yazı stillerinin (h2/h3/p) önüne geçmek için.
   ========================================================================== */
.m4-faq {
    --faq-ac: #6E4A86; --faq-ac2: #6e4a86; --faq-line: #E6E5EB; --faq-h: 84px; --faq-ease: cubic-bezier(.2, .8, .2, 1);
    container-type: inline-size; clear: both; text-align: left;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: #1B1A20; line-height: normal;
}
.m4-faq, .m4-faq * { box-sizing: border-box; }

/* İç sayfalar ve yazılar (ana sayfa kendi boşluklarını satır içi verir) */
.m4-faq-wrap { display: flex; flex-direction: column; gap: 32px; padding: 40px 0 48px; }
.m4-faq-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.m4-faq:not(#_) .m4-faq-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; line-height: normal; color: var(--faq-ac); }
.m4-faq:not(#_) .m4-faq-title {
    margin: 0; padding: 0; border: 0; font-family: inherit; font-weight: 700; font-size: clamp(26px, 2.6vw, 38px);
    line-height: 1.15; letter-spacing: -.03em; color: #1B1A20; text-align: center; text-transform: none; scroll-margin-top: 110px;
}
.m4-faq:not(#_) :is(.m4-faq-title, summary h3)::before, .m4-faq:not(#_) :is(.m4-faq-title, summary h3)::after { content: none; }

.m4-faq-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; align-items: start; }
.m4-faq-cols--one { grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 820px; margin: 0 auto; }
.m4-faq-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* SSS kartları düz: sol kenar şeridi ve gölge kullanılmaz, durum yalnızca kenarlık rengiyle gösterilir */
.m4-faq details {
    position: relative; overflow: hidden; margin: 0; background: #fff; border: 1px solid var(--faq-line); border-radius: 16px;
    transition: border-color .3s ease, transform .35s var(--faq-ease);
}
.m4-faq details:not(.is-open):not([open]):hover { border-color: #CDB9DC; transform: translateY(-2px); }
.m4-faq details:is(.is-open, [open]:not([data-js])) { border-color: var(--faq-ac); }

.m4-faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    min-height: var(--faq-h); margin: 0; padding: 16px 22px 16px 26px;
    list-style: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.m4-faq summary::-webkit-details-marker { display: none; }
.m4-faq:not(#_) summary h3 {
    flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; font-family: inherit; font-size: 16.5px; font-weight: 700; line-height: 1.45;
    letter-spacing: normal; text-align: left; text-transform: none; color: #1B1A20; text-wrap: pretty; transition: color .3s ease;
    scroll-margin-top: 110px;
}
.m4-faq:not(#_) details:is(.is-open, [open]:not([data-js])) summary h3 { color: var(--faq-ac2); }
/* Klavye odağı kartın içine ikinci bir çerçeve çizmek yerine +/– ikonunun çevresinde gösterilir */
.m4-faq:not(#_) summary:focus-visible { outline: none; }
.m4-faq summary:focus-visible::after { outline: 2px solid var(--faq-ac); outline-offset: 3px; }

/* İkon: iki çubuk (yatay + dikey) gradyanla çizilir → kutunun tam ortasında, glyph kayması yok.
   36px kutu, 14×2px çubuklar: (36−14)/2 = 11px, (36−2)/2 = 17px → tam piksele oturur. */
.m4-faq summary::after {
    content: ""; flex: none; width: 36px; height: 36px; border-radius: 50%;
    color: #1B1A20; background-color: #fff;
    background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
    background-position: center, center; background-repeat: no-repeat; background-size: 14px 2px, 2px 14px;
    box-shadow: inset 0 0 0 1px #D5D1DE;
    transition: transform .5s var(--faq-ease), background-size .35s var(--faq-ease), background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.m4-faq details:not(.is-open):not([open]) summary:hover::after {
    transform: rotate(90deg); color: var(--faq-ac); background-color: #F6F1FA; box-shadow: inset 0 0 0 1px var(--faq-ac);
}
.m4-faq details:is(.is-open, [open]:not([data-js])) summary::after {
    transform: rotate(180deg); background-size: 14px 2px, 2px 0; /* "+" → "–" */
    color: #fff; background-color: var(--faq-ac); box-shadow: inset 0 0 0 1px var(--faq-ac);
}
.m4-faq summary:active::after { transform: scale(.92); }

/* Cevap: panelden gelen serbest HTML (paragraf, liste, tablo…) */
.m4-faq:not(#_) .m4-faq-answer {
    margin: 0 26px; padding: 18px 0 24px; border-top: 1px solid #EFEAF4;
    font-size: 15px; line-height: 1.8; color: #5B5A66; overflow-wrap: break-word; overflow-x: auto;
}
.m4-faq:not(#_) .m4-faq-answer :is(p, li, span, div, td, th, a, strong, em, b) { font-family: inherit !important; font-size: inherit; line-height: inherit; }
.m4-faq:not(#_) .m4-faq-answer :is(p, li, span, div) { color: inherit; }
.m4-faq:not(#_) .m4-faq-answer > * { margin: 0 0 12px; }
.m4-faq:not(#_) .m4-faq-answer > :last-child { margin-bottom: 0; }
.m4-faq:not(#_) .m4-faq-answer p { margin: 0 0 12px; padding: 0; }
.m4-faq:not(#_) .m4-faq-answer p:last-child { margin-bottom: 0; }
.m4-faq:not(#_) .m4-faq-answer p:empty { display: none; }
.m4-faq:not(#_) .m4-faq-answer :is(ul, ol) { padding: 0 0 0 20px; }
.m4-faq:not(#_) .m4-faq-answer ul { list-style: disc; }
.m4-faq:not(#_) .m4-faq-answer ol { list-style: decimal; }
.m4-faq:not(#_) .m4-faq-answer li { margin: 0 0 6px; }
.m4-faq:not(#_) .m4-faq-answer :is(h2, h3, h4, h5, h6) { margin: 14px 0 8px; font-family: inherit; font-size: 15.5px; font-weight: 700; line-height: 1.45; color: #1B1A20; }
.m4-faq:not(#_) .m4-faq-answer a { color: var(--faq-ac); text-decoration: underline; }
.m4-faq:not(#_) .m4-faq-answer :is(strong, b) { color: #1B1A20; }
.m4-faq .m4-faq-answer img { max-width: 100%; height: auto; }
.m4-faq details:is(.is-open, [open]:not([data-js])) .m4-faq-answer { animation: mg-faq-in .45s var(--faq-ease) both; }
@keyframes mg-faq-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Ana sayfa: kaydırınca sırayla belirir (mevcut m4-reveal ile aynı kaydırma tabanlı animasyon) */
@supports (animation-timeline: view()) {
    .m4-home .m4-faq details { animation: m4-rv linear backwards; animation-timeline: view(); animation-range: entry 0% cover 22%; }
}

/* Dar alan (telefon, tablet, yazı sütunu): tek sütun */
@container (max-width: 860px) {
    .m4-faq-cols { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .m4-faq-col { gap: 12px; }
}
@media (max-width: 900px) {
    .m4-faq { --faq-h: 68px; }
    .m4-faq-wrap { gap: 24px; padding: 28px 0 32px; }
    .m4-faq summary { gap: 14px; padding: 14px 16px 14px 20px; }
    .m4-faq:not(#_) summary h3 { font-size: 15.5px; }
    .m4-faq summary::after { width: 34px; height: 34px; } /* (34−14)/2 = 10px, (34−2)/2 = 16px */
    .m4-faq:not(#_) .m4-faq-answer { margin: 0 20px; padding: 16px 0 20px; font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .m4-faq details, .m4-faq .m4-faq-answer { animation: none !important; }
    .m4-faq details, .m4-faq summary::after, .m4-faq summary h3 { transition: none !important; }
}
