:root {
    --navy-primary: #244b7a;
    --navy-dark: #193557;
    --navy-light: #36659d;
    --navy-border: #244b7a;
    --accent-blue: #38bdf8;
    --success-green: #10b981;
    --danger-red: #ef4444;
    --bg-light-blue: #f0f4f9;
    --text-navy: #193557;
    --text-body: #334e68;
    --card-bg: #ffffff;
}

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-light-blue);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(219, 234, 254, 0.45) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(224, 238, 255, 0.6) 0%, transparent 45%),
        linear-gradient(135deg, #f0f4f9 0%, #e2eaf4 100%);
    background-attachment: fixed;
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ================= Navbar ================= */
.navbar-custom {
    background-color: #ffffff;
    border-bottom: 2px solid #dbe4ee;
    box-shadow: 0 4px 20px rgba(36, 75, 122, 0.06);
}

.brand-logo {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--navy-primary) !important;
    letter-spacing: -0.5px;
}

.search-input {
    border-radius: 30px;
    padding-left: 1rem;
    background-color: #f1f5f9;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.search-input:focus {
    background-color: #ffffff;
    border-color: var(--navy-primary);
    box-shadow: 0 0 0 4px rgba(36, 75, 122, 0.12);
}

/* ================= Infographic Header Banner ================= */
.faq-hero-section {
    padding: 2.5rem 0 1.5rem 0;
}

.faq-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--navy-primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.faq-hero-subtitle {
    font-size: 1.05rem;
    color: #486581;
    font-weight: 400;
}

.faq-hero-brand {
    text-align: right;
    color: var(--navy-primary);
}

.faq-hero-brand h6 {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
    letter-spacing: 0.5px;
}

.faq-hero-brand small {
    color: #627d98;
    font-size: 0.78rem;
}

/* ================= Speech Bubble & Capsule Cards ================= */
.faq-item-container {
    margin-bottom: 2rem;
    position: relative;
}

/* 1. Speech Bubble Header for Questions */
.speech-bubble-wrapper {
    position: relative;
    display: inline-block;
    max-width: 92%;
    z-index: 2;
    margin-bottom: -8px;
}

.speech-bubble {
    background-color: var(--navy-primary);
    color: #ffffff !important;
    font-size: 1.08rem;
    font-weight: 600;
    padding: 0.65rem 1.6rem;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(25, 53, 87, 0.2);
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
}

.speech-bubble:hover {
    background-color: var(--navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(25, 53, 87, 0.28);
    color: #ffffff !important;
}

/* Speech Bubble Arrow Tail */
.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 28px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid var(--navy-primary);
    transition: border-top-color 0.2s ease;
}

.speech-bubble:hover::after {
    border-top-color: var(--navy-dark);
}

/* 2. Capsule Body Card */
.capsule-card {
    background: var(--card-bg);
    border: 3px solid var(--navy-primary);
    border-radius: 45px;
    padding: 1.25rem 1.75rem 1.25rem 1.25rem;
    box-shadow: 0 8px 24px rgba(36, 75, 122, 0.08);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

.capsule-card:hover {
    box-shadow: 0 12px 32px rgba(36, 75, 122, 0.14);
    transform: translateY(-2px);
}

/* Left Icon Circle in Capsule */
.capsule-icon-circle {
    width: 68px;
    height: 68px;
    min-width: 68px;
    background-color: var(--navy-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.85rem;
    box-shadow: 0 4px 10px rgba(36, 75, 122, 0.25);
}

.capsule-icon-circle.success {
    background-color: var(--success-green);
}

.capsule-content {
    flex: 1;
    min-width: 0;
}

.capsule-text {
    color: #334e68;
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 0.6rem;
}

/* Meta badges */
.capsule-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #627d98;
    border-top: 1px dashed #dbe4ee;
    padding-top: 0.5rem;
}

.badge-pill-navy {
    background-color: #ebf3fb;
    color: var(--navy-primary);
    border: 1px solid #c8dcf2;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-pill-success {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ================= Detail Page (question.php) ================= */
.detail-bubble-header {
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-dark) 100%);
    color: #ffffff;
    padding: 1.5rem 2rem;
    border-radius: 35px 35px 12px 12px;
    box-shadow: 0 6px 20px rgba(25, 53, 87, 0.15);
}

.detail-capsule-body {
    background: #ffffff;
    border: 3px solid var(--navy-primary);
    border-top: none;
    border-radius: 0 0 35px 35px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(36, 75, 122, 0.08);
}

.answer-capsule-card {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 35px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.answer-capsule-card.accepted {
    border: 3px solid var(--success-green);
    background-color: #fafffc;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.12);
}

/* ================= Voting Widget ================= */
.vote-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.vote-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.15s ease;
}

.vote-btn:hover {
    color: var(--navy-primary);
    transform: scale(1.2);
}

.vote-btn.active.upvote {
    color: var(--navy-primary);
    transform: scale(1.25);
}

.vote-btn.active.downvote {
    color: var(--danger-red);
    transform: scale(1.25);
}

.vote-score {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--navy-dark);
}

/* ================= Buttons & Navigation ================= */
.btn-navy {
    background-color: var(--navy-primary);
    color: #ffffff;
    border-radius: 30px;
    padding: 0.5rem 1.4rem;
    font-weight: 600;
    border: 2px solid var(--navy-primary);
    transition: all 0.2s ease;
}

.btn-navy:hover {
    background-color: var(--navy-dark);
    border-color: var(--navy-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 53, 87, 0.25);
}

.btn-outline-navy {
    background-color: transparent;
    color: var(--navy-primary);
    border: 2px solid var(--navy-primary);
    border-radius: 30px;
    padding: 0.45rem 1.2rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-outline-navy:hover {
    background-color: var(--navy-primary);
    color: #ffffff;
}

/* ================= Sidebar & General Cards ================= */
.sidebar-card {
    background: #ffffff;
    border: 2px solid #dbe4ee;
    border-radius: 28px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 18px rgba(36, 75, 122, 0.05);
}

.sidebar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eef3f8;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-lg {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--navy-primary);
}

/* ================= Footer ================= */
footer {
    background-color: #ffffff;
    border-top: 2px solid #dbe4ee;
    padding: 1.75rem 0;
    margin-top: 3.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-hero-title {
        font-size: 1.6rem;
    }
    .faq-hero-brand {
        text-align: left;
        margin-top: 0.5rem;
    }
    .capsule-card {
        border-radius: 30px;
        padding: 1.25rem 1rem;
        gap: 0.85rem;
    }
    .capsule-icon-circle {
        width: 52px;
        height: 52px;
        min-width: 52px;
        font-size: 1.4rem;
    }
    .speech-bubble {
        font-size: 0.95rem;
        padding: 0.5rem 1.2rem;
    }
}
