/* ============ TEST KAPAK (HERO) ============
   Kapak görseli arka plan, üstüne koyu geçiş, içerik altta hizalı.
   Görsel yoksa marka renginde bir geçişe düşer, tasarım bozulmaz. */

.test-hero {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
}

/* Metnin okunabilmesi için görselin üstüne koyu geçiş. */
.test-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 12, 20, .92) 0%, rgba(10, 12, 20, .70) 38%, rgba(10, 12, 20, .15) 75%, rgba(10, 12, 20, 0) 100%);
}

.test-hero--nocover {
    background-image: linear-gradient(135deg, #e30613 0%, #7a0a12 55%, #1a1a2e 100%);
    min-height: 300px;
}

.test-hero-body {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 2rem 1.75rem 1.75rem;
    color: #fff;
}

.test-badge {
    display: inline-block;
    background: #e30613;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .35rem .75rem;
    border-radius: .5rem;
    margin-bottom: .9rem;
}

/* Başlık: haber sayfasıyla aynı responsive ölçek, koyu zemin için beyaz. */
.test-title {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    font-size: calc(1.375rem + 1.5vw);
    line-height: 1.2;
    font-weight: 800;
    color: #fff;
    margin: 0 0 .6rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

@media (min-width: 1200px) {
    .test-title { font-size: 2.5rem; }
}

/* Kapakta başlık geçici olarak gizli. Silinmedi: sayfanın tek H1'i olduğu için
   arama motoru ve ekran okuyucu görmeye devam etmeli. Geri açmak için bu sınıfı
   test.blade.php'deki h1'den kaldırmak yeterli. */
.test-title--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.test-lead {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
    margin: 0 0 1rem;
    max-width: 46rem;
}

.test-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.35rem;
}

.test-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .92);
    font-size: .8125rem;
    font-weight: 600;
    padding: .35rem .7rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.test-chip--link:hover {
    background: rgba(255, 255, 255, .24);
    color: #fff;
}

/* Fotoğraf üstünde en çok beyaz buton okunuyor. */
.test-start-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    color: #1a1a2e;
    font-weight: 800;
    font-size: 1.0625rem;
    padding: .9rem 2rem;
    border: 0;
    border-radius: .85rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
    transition: transform .15s ease, box-shadow .15s ease;
}

.test-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .34);
}

.test-start-btn:active {
    transform: translateY(0);
}

/* Soru ekranında testin adı üstte küçük görünür. */
.test-quiz-caption {
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #94a3b8;
    margin-bottom: .85rem;
}

@media (max-width: 640px) {
    .test-hero { min-height: 320px; border-radius: 1rem; }
    .test-hero-body { padding: 1.5rem 1.15rem 1.35rem; }
    .test-lead { font-size: 1rem; }
    .test-start-btn { width: 100%; justify-content: center; }
}

/* Test çözme ekranı. Tipografi haber sayfasıyla aynı ölçeği kullanır. */

.test-question-title {
    font-size: 22px;
    line-height: 32px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
}

.test-question-image {
    border-radius: .75rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.test-question-image img {
    width: 100%;
    height: auto;
    display: block;
}

.test-options {
    display: grid;
    gap: .75rem;
}

.test-options--list {
    grid-template-columns: 1fr;
}

.test-options--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.test-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: .75rem;
    padding: 1rem;
    font-size: 17px;
    font-weight: 500;
    color: #212529;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.test-option:hover {
    border-color: #e30613;
    background: #fff5f5;
}

.test-option.is-selected {
    border-color: #e30613;
    background: #e30613;
    color: #fff;
}

/* Görsel ızgarada metin resmin altında durur. */
.test-option--grid {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

.test-option--grid .test-option-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f3f4f6;
}

.test-option--grid .test-option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.test-option--grid .test-option-text {
    padding: .75rem 1rem;
}

.test-option--list .test-option-image {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: .5rem;
    overflow: hidden;
}

.test-option--list .test-option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 480px) {
    .test-question-title { font-size: 20px; line-height: 29px; }
    .test-option { font-size: 16px; padding: .85rem; }
}

body.dark-mode .test-option {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .test-option:hover {
    border-color: #e30613;
    background: #26313f;
}

body.dark-mode .test-question-title {
    color: #f1f5f9;
}

/* Ilerleme cubugu sifirdan baslar, genisligi JS gunceller. */
[data-test-bar] {
    width: 0;
}

/* ---- Bilgi testinde anlik geri bildirim ---- */
.test-option.is-correct {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.test-option.is-wrong {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

.test-option:disabled {
    cursor: default;
}

.test-option:disabled:hover {
    border-color: #e5e7eb;
    background: #fff;
}

.test-option.is-correct:disabled:hover {
    border-color: #16a34a;
    background: #16a34a;
}

.test-option.is-wrong:disabled:hover {
    border-color: #dc2626;
    background: #dc2626;
}

/* ---- Sonuc ekranindaki cevap karnesi ---- */
.test-review-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #111827;
    text-align: left;
    margin: 1.75rem 0 .75rem;
}

.test-review {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .6rem;
    text-align: left;
}

.test-review-item {
    border: 1px solid #e5e7eb;
    border-left-width: 4px;
    border-radius: .6rem;
    padding: .7rem .9rem;
    background: #fff;
}

.test-review-item.is-correct { border-left-color: #16a34a; }
.test-review-item.is-wrong { border-left-color: #dc2626; }

.test-review-q {
    font-weight: 700;
    color: #111827;
    margin: 0 0 .35rem;
    line-height: 1.4;
}

.test-review-a {
    font-size: .9rem;
    color: #4b5563;
    margin: 0;
}

.test-review-a--ok {
    color: #16a34a;
    font-weight: 600;
    margin-top: .15rem;
}

.test-review-tag {
    display: inline-block;
    min-width: 6.5rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #9ca3af;
    margin-right: .35rem;
}

body.dark-mode .test-review-item {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .test-review-q { color: #f1f5f9; }
body.dark-mode .test-review-a { color: #cbd5e1; }
