/* ============================================================= */
/*  non-critical.css – FINAL FIXED VERSION                      */
/*  Orange pill buttons, perfect hover/active, mobile-ready     */
/*  FIXED: "Related Articles" & "You Might Also Like" titles    */
/*  → No underline, clean orange bar only                      */
/* ============================================================= */

/* ------------------- VARIABLES ------------------- */
:root {
    --bg-body:        #fafafa;
    --bg-header:      #000;
    --bg-container:   #fff;
    --bg-input:       #fff;
    --text-primary:   #1a1a1a;
    --text-secondary: #666;
    --accent:         #e94e1b;
    --accent-hover:   #c63d13;
    --accent-light:   #ff6b35;
    --border:         #ddd;
    --border-focus:   #e94e1b;
}

body.dark-mode {
    --bg-body:        #0f0f0f;
    --bg-header:      #000;
    --bg-container:   #1a1a1a;
    --bg-input:       #222;
    --text-primary:   #e0e0e0;
    --text-secondary: #bbb;
    --border:         #444;
}

/* ------------------- GLOBAL ------------------- */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
body {
    background: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* ------------------- BLACK HEADER (Logo) ------------------- */
.site-header {
    background: var(--bg-header);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 68px;
    position: relative;
    z-index: 10;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    font-weight: 800;
    color: #fff !important;
    text-decoration: none !important;
    transition: color 0.3s ease, transform 0.2s ease;
}

.logo-text:hover {
    color: var(--accent-light) !important;
    transform: scale(1.03);
}

/* ------------------- ORANGE TOP BAR – PERFECT PILLS ------------------- */
.top-bar {
    background: var(--accent);
    padding: 12px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-height: 56px;
    overflow: hidden;
}

.top-bar a {
    color: #fff !important;
    font-weight: 600;
    font-size: clamp(0.8rem, 2vw, 0.875rem);
    padding: 8px 20px;
    border-radius: 50px;
    background: transparent;
    text-decoration: none !important;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* HOVER & ACTIVE STATE */
.top-bar a:hover,
.top-bar a.active {
    background: #fff !important;
    color: var(--accent) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* HOME BUTTON – Special white pill – ALWAYS VISIBLE */
.top-bar .home-btn,
.top-bar a.home-btn {
    background: #fff !important;
    color: var(--accent) !important;
    font-weight: 700;
    padding: 8px 22px;
    border-radius: 50px;
    gap: 6px;
    font-size: clamp(0.8rem, 2vw, 0.875rem);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.top-bar .home-btn:hover,
.top-bar a.home-btn:hover {
    background: var(--accent) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ------------------- HOVERS & ANIMATIONS ------------------- */
.article-image:hover { transform: scale(1.01); transition: 0.3s; }
.content a:hover { color: var(--accent-hover); text-decoration: underline; }
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.related-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    transition: 0.3s;
}
.related-item a:hover .related-title { color: var(--accent); }
.comment-form button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(233,78,27,0.3);
}
.theme-toggle:hover {
    transform: scale(1.12);
    background: var(--accent-light);
    box-shadow: 0 8px 25px rgba(233,78,27,0.4);
}

/* ------------------- THEME TOGGLE ------------------- */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tooltip */
.theme-toggle::before {
    content: attr(data-label);
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
}
.theme-toggle::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0,0,0,0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.theme-toggle:hover::before,
.theme-toggle:hover::after { opacity: 1; visibility: visible; top: -36px; }
.theme-toggle:hover::after { top: -16px; }

/* Icons */
.theme-icon { width: 28px; height: 28px; transition: opacity 0.3s, transform 0.3s; color: #fff; }
.theme-icon.sun { opacity: 0; transform: scale(0.7) rotate(90deg); }
.theme-icon.moon { opacity: 1; transform: scale(1); }
body.dark-mode .theme-icon.sun { opacity: 1; transform: scale(1) rotate(0); }
body.dark-mode .theme-icon.moon { opacity: 0; transform: scale(0.7) rotate(-90deg); }

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(233,78,27,0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(233,78,27,0); }
    100% { box-shadow: 0 0 0 0 rgba(233,78,27,0); }
}
.theme-toggle.pulse { animation: pulse 2s infinite; }

/* ------------------- CONTENT & FORM ------------------- */
.content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.1rem;
}
.content ul, .content ol { margin: 1.5rem 0; padding-left: 1.8rem; }
.content li { margin-bottom: 0.6rem; }

.comment-form input,
.comment-form textarea {
    background: var(--bg-input);
    border: 1.8px solid var(--border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 18px;
    transition: border 0.3s;
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(233,78,27,0.2);
    outline: none;
}
.comment-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

/* Dark mode success/error */
body.dark-mode p[style*="color:#2e8b57"] { color: #81c784 !important; }
body.dark-mode p[style*="color:#d32f2f"] { color: #e57373 !important; }

/* ------------------- RESPONSIVE ------------------- */
@media (max-width: 650px) {
    .top-bar { gap: 10px; padding: 10px 12px; }
    .top-bar a, .top-bar .home-btn, .top-bar a.home-btn {
        font-size: 0.75rem;
        padding: 6px 14px;
    }
    .top-bar .home-btn, .top-bar a.home-btn {
        padding: 6px 16px;
        min-width: 70px;
    }
    .theme-toggle { width: 50px; height: 50px; }
    .theme-icon { width: 24px; height: 24px; }
    .related-item { min-height: 280px; }
}

/* ------------------- ACCESSIBILITY & PRINT ------------------- */
*:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
@media print {
    .theme-toggle, .top-bar, .share-buttons, .comment-form, .related-articles, .comments { display: none !important; }
    body { color: #000; background: #fff; }
    .container { max-width: 100%; }
}

/* ============================================================= */
/*  FINAL FIX: "Related Articles" & "You Might Also Like"       */
/*  → NO UNDERLINE, ONLY CLEAN ORANGE BAR FROM CRITICAL CSS     */
/* ============================================================= */
.related-articles h2,
.related-articles h3 {
    text-decoration: none !important;
    font-weight: 800 !important;
    font-size: 1.5rem !important;
    color: var(--text-primary) !important;
    margin: 2rem 0 1.2rem !important;
    position: relative;
    padding-bottom: 0.5rem;
    /* border-bottom REMOVED – orange bar comes from ::after in critical CSS */
}

/* Optional: subtle hover effect */
.related-articles h2:hover {
    color: var(--accent) !important;
    transition: color 0.3s ease;
}

/* Dark mode: ensure ::after bar uses light accent */
body.dark-mode .related-articles h2::after,
body.dark-mode .related-articles h3::after {
    background: var(--accent-light) !important;
}

/* ============================================================= */
/*  END – TITLES CLEAN, BOLD & ORANGE BAR ONLY                  */
/* ============================================================= */