/* ==============================
   MILENYUM RENK PALETİ
============================== */
:root {
    --mg-primary: #554DB2;   /* Ana renk */
    --mg-secondary: #75CDFD; /* Vurgu / hover */
    --mg-soft-bg: #f6f5ff;   /* Açık zemin */
    --mg-border: #e4e2f5;    /* Yumuşak border */
    --mg-text-dark: #2b2b2b;
    --mg-text-light: #6b6b6b;
}

/* =====================================================
   GENEL SORU KARTI
===================================================== */
.mg-question-container {
    padding: 20px;
    background: var(--mg-soft-bg);
    border-radius: 8px;
}

.mg-question-title {
    font-size: 28px;
    margin-bottom: 10px;
}

/* =====================================================
   SORU FİLTRELERİ (Tümü / Cevaplanan / Bekleyen)
===================================================== */
.mg-question-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    width: 100%;
    clear: both;
}

.mg-question-filters a {
    padding: 8px 16px;
    background: #f2f2f2;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #333;
}

.mg-question-filters a:hover {
    background: #ddd;
}

/* =====================================================
   ROZETLER (Cevaplandı / Cevap Bekliyor)
===================================================== */
.mg-question-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
}

.mg-question-badge.answered {
    background: var(--mg-soft-bg);
    color: var(--mg-primary);
    border: 1px solid var(--mg-primary);
}

.mg-question-badge.pending {
    background: rgba(117, 205, 253, 0.15);
    color: var(--mg-secondary);
    border: 1px solid var(--mg-secondary);
}

/* Küçük rozet (kart içi) */
.mg-badge {
    margin-top: 14px;   /* BURASI ÖNEMLİ – boşluğu açar */
    align-self: flex-start; /* sola hizalı */
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
}


.mg-badge.answered {
    background: var(--mg-soft-bg);
    color: var(--mg-primary);
    border: 1px solid var(--mg-primary);
}

.mg-badge.pending {
    background: rgba(117, 205, 253, 0.15);
    color: var(--mg-secondary);
    border: 1px solid var(--mg-secondary);
}

/* =====================================================
   CEVAP ALANI (single-question.php)
===================================================== */
.mg-answer-box {
    margin-top: 30px;
    padding: 20px;
    border-left: 4px solid var(--mg-primary);
    background: #fff;
    border-radius: 6px;
}

.mg-answer-box h3 {
    margin-top: 0;
    font-size: 20px;
}

.mg-answer {
    border-top: 1px solid #ddd;
    padding: 10px 0;
}

.mg-answer-author {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

/* =====================================================
   LIKE / DISLIKE
===================================================== */
.mg-like-dislike button {
    margin-right: 10px;
}

/* =====================================================
   İLGİLİ SORULAR
===================================================== */
.mg-related-questions a {
    display: block;
    margin-bottom: 5px;
}

/* =====================================================
   HONEYPOT (BOT KORUMA)
===================================================== */
.ms-hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.mg-questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.mg-question-card {
    background: #fff;
    border: 1px solid var(--mg-border);
    border-radius: 10px;
    padding: 16px;
    transition: box-shadow .2s ease, transform .15s ease;

    display: flex;
    flex-direction: column;
    height: 100%;

    box-shadow: 0 2px 8px rgba(85,77,178,0.08);
}

.mg-question-card:hover {
    box-shadow: 0 6px 18px rgba(85,77,178,0.18);
    transform: translateY(-2px);
}

.mg-question-card-title {
    font-size: 16px;
    margin: 0 0 10px;
}

.mg-question-card-title a {
    text-decoration: none;
    color: #222;
    font-size: 18px;
    font-weight: 600;

    display: -webkit-box;
    -webkit-line-clamp: 2;       /* başlık max 2 satır */
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;            /* 2 satır yüksekliği sabitler */
}


.mg-question-meta {
    margin-top: 8px;
    font-size: 13px;
    color: #777;
}

/* === SORU KARTI ÖNE ÇIKAN GÖRSEL === */
.mg-question-thumb {
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 6px;
}

.mg-question-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.mg-question-card:hover .mg-question-thumb img {
    transform: scale(1.05);
}

/* === EN İYİ CEVAP === */
.mg-best-answer {
    border: 2px solid #f5c518;
    background: #fffbea;
}

.mg-best-badge {
    margin-left: 10px;
    padding: 4px 8px;
    background: #f5c518;
    color: #000;
    font-size: 12px;
    border-radius: 4px;
    vertical-align: middle;
}

/* === LİKE DİSLİKE === */
.mg-like-dislike {
    margin-top: 15px;
}

.mg-like-dislike button {
    margin-right: 10px;
    padding: 6px 10px;
    cursor: pointer;
}

/* Tema benzeri meta satırı */
.theme-like-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
}

.theme-like-meta span {
    display: inline-block;
}

.theme-like-meta .meta-sep {
    margin: 0 8px;
    color: #bbb;
}

.theme-like-meta .meta-answered {
    color: var(--mg-primary);
    font-weight: 700; /* bold */
}

/* ==============================
   QUESTION SIDEBAR – TEMA BENZERİ
============================== */

.mg-question-layout {
    max-width: 1200px;
    margin: 40px auto;
    display: flex;
    gap: 30px;
    padding: 0 15px;
}

.mg-question-main {
    flex: 1;
}

.mg-question-sidebar {
    width: 300px;
    font-size: 14px;
}

.mg-sidebar-block {
    margin-bottom: 30px;
}

.mg-sidebar-block h4 {
    font-size: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.mg-sidebar-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mg-sidebar-block li {
    margin-bottom: 8px;
}

.mg-sidebar-block a {
    color: #444;
    text-decoration: none;
}

.mg-sidebar-block a:hover {
    color: var(--mg-primary);
    text-decoration: underline;
}

/* MOBİL */
@media (max-width: 900px) {
    .mg-question-layout {
        flex-direction: column;
    }

    .mg-question-sidebar {
        width: 100%;
    }
}

/* ==============================
   SIDEBAR – ZENGİN TEMA HİSSİ
============================== */

/* Genel sidebar blok */
.mg-sidebar-block {
    background: #fff;
    border: 1px solid #e6e6e6;
    padding: 15px;
    margin-bottom: 20px;
}

/* Başlık */
.mg-sidebar-block h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* Başlık ikonları (pseudo) */
.mg-sidebar-block h4::before {
    content: "▸";
    color: #0073aa;
    font-size: 14px;
}

/* Liste */
.mg-sidebar-block ul li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

.mg-sidebar-block ul li:last-child {
    border-bottom: none;
}

/* Linkler */
.mg-sidebar-block a {
    color: #444;
    font-size: 14px;
}

.mg-sidebar-block a:hover {
    color: #0073aa;
}

/* UZMANA SOR ÖZEL */
.mg-sidebar-block:first-child {
    background: var(--mg-soft-bg);
    border: 1px solid var(--mg-border);
}

.mg-sidebar-block:first-child h4 {
    color: var(--mg-primary);
}

.mg-sidebar-block:first-child a {
    font-weight: 600;
}

/* Küçük sayaç hissi */
.mg-sidebar-count {
    background: #f1f1f1;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: auto;
}

/* ==============================
   SIDEBAR ICONS – PROFESYONEL
============================== */

/* Başlık ikonları */
.mg-sidebar-block h4::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Hızlı Linkler */
.mg-sidebar-block:nth-of-type(1) h4::before {
    background-image: url("data:image/svg+xml,%3Csvg fill='%23554DB2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 3l-1 2H7v2h4l-1 2H5v2h4l-1 2H3v2h8l-1 2h2l6-12z'/%3E%3C/svg%3E");
}

/* Alakalı Sorular */
.mg-sidebar-block:nth-of-type(2) h4::before {
    background-image: url("data:image/svg+xml,%3Csvg fill='%23554DB2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 100 20 10 10 0 000-20zm1 15h-2v-2h2v2zm1.07-7.75l-.9.92A1.5 1.5 0 0012 12h-1v-1c0-.4.16-.78.44-1.06l1.2-1.2a1.5 1.5 0 10-2.12-2.12l-.5.5-1.42-1.42.5-.5a3.5 3.5 0 115 5z'/%3E%3C/svg%3E");
}

/* Kategoriler */
.mg-sidebar-block:nth-of-type(3) h4::before {
    background-image: url("data:image/svg+xml,%3Csvg fill='%23554DB2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v2H3V5zm0 6h18v2H3v-2zm0 6h18v2H3v-2z'/%3E%3C/svg%3E");
}

/* Son Sorular */
.mg-sidebar-block:nth-of-type(4) h4::before {
    background-image: url("data:image/svg+xml,%3Csvg fill='%23554DB2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3h-1V1h-2v2H8V1H6v2H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm0 16H5V9h14v10z'/%3E%3C/svg%3E");
}

.mg-sidebar-block ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==============================
   CTA BUTTON – UZMANA SOR
============================== */

.mg-cta-item {
    margin-top: 12px;
}

.mg-cta-button {
    display: block;
    text-align: center;
    background: var(--mg-primary);
    color: #fff !important;
    padding: 10px 12px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mg-cta-button:hover {
    background: var(--mg-secondary);
    color: #fff;
    text-decoration: none;
}

/* ==============================
   İLGİLİ SORULAR – DÜZGÜN GÖRÜNÜM
============================== */

.mg-related-title {
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 20px;
    color: var(--mg-text-dark);
}

.mg-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.mg-related-item {
    display: block;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--mg-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--mg-text-dark);
    text-decoration: none;
    transition: all .2s ease;
}

.mg-related-item:hover {
    border-color: var(--mg-primary);
    background: var(--mg-soft-bg);
    color: var(--mg-primary);
}

.mg-related-item {
    cursor: pointer;
}

.mg-related-item:hover {
    transform: translateY(-2px);
}

.mg-related-item::after {
    content: "→";
    margin-left: 8px;
    opacity: 0;
    transition: all .2s ease;
}

.mg-related-item:hover::after {
    opacity: 1;
    margin-left: 12px;
}

/* ==============================
   LİKE-DİSLİKE – DÜZGÜN GÖRÜNÜM
============================== */

.mg-like-dislike {
    margin-top: 18px;
    display: flex;
    gap: 12px;
}

.mg-like-dislike button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid var(--mg-border);
    background: #fff;
    color: var(--mg-text-dark);
    cursor: pointer;
    transition: all .2s ease;
}

.mg-like-dislike .mg-like:hover {
    background: var(--mg-soft-bg);
    border-color: var(--mg-primary);
    color: var(--mg-primary);
}

.mg-like-dislike .mg-dislike:hover {
    background: #fafafa;
    border-color: #ccc;
}

.mg-like-dislike span {
    font-weight: 600;
}

@media (max-width: 768px) {

    .mg-question-card {
        border: 1px solid rgba(85,77,178,0.25);
        box-shadow: 0 4px 14px rgba(85,77,178,0.18);
    }

    .mg-questions-grid {
        gap: 16px; /* kartlar arası nefes */
    }
}

/* ==============================
   BREADCRUMB – TEMA UYUMLU
============================== */
.mg-breadcrumb {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.2px;
    margin-bottom: 12px;
    text-align: center;
    color: rgba(255,255,255,0.75);
}

.mg-breadcrumb a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: opacity .2s ease;
}

.mg-breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.mg-breadcrumb span {
    margin: 0 8px;
    color: rgba(255,255,255,0.55);
}

/* ==============================
   SADECE SORU SAYFALARI
============================== */

/* Üst başlık – menü arası boşluğu kaldır */
.single-question .wd-page-title,
.post-type-archive-question .wd-page-title,
.tax-question-category .wd-page-title {
    margin-top: -40px !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* İçeriğin üstten boşluğunu sıfırla */
.single-question .mg-question-layout,
.post-type-archive-question .mg-question-layout,
.tax-question-category .mg-question-layout {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Soru kapalı bilgilendirme */
.mg-question-closed-note {
    margin: 30px 0;
    padding: 14px 18px;
    background: #fff3f3;
    border: 1px solid #f2bcbc;
    border-left: 4px solid #d63638;
    color: #7a1f1f;
    font-size: 14px;
}
