/* ========================================
   BODHITAMINDS - DUAL THEME SYSTEM (Vision Science Optimized)
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    /* === DARK THEME (BASE) === */
    --bg-body: #0a0a0a;
    --bg-card: #171717;
    --bg-card-hover: #262626;
    --bg-nav: rgba(10, 10, 10, 0.85);

    /* Text */
    --text-main: #ffffff;
    --text-body: #d4d4d4;
    /* Neutral-200 */
    --text-muted: #a3a3a3;
    /* Neutral-400 */

    /* Accents */
    --primary: #3b82f6;
    /* Blue-500 */
    --primary-glow: rgba(59, 130, 246, 0.5);

    /* Borders & Grids */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-white-10: rgba(255, 255, 255, 0.1);
    --grid-color: rgba(255, 255, 255, 0.05);
    --gradient-text: linear-gradient(to right, #60a5fa, #a78bfa);

    /* Shadows */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* === LIGHT THEME OVERRIDES (Applied via .light-theme class) === */
html.light-theme,
body.light-theme {
    --bg-body: #ffffff;
    --bg-card: #f8fafc;
    /* Slate-50 */
    --bg-card-hover: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.9);

    /* Text */
    --text-main: #0f172a;
    /* Slate-900 */
    --text-body: #334155;
    /* Slate-700 */
    --text-muted: #64748b;
    /* Slate-500 */

    /* Accents */
    --primary: #2563eb;
    /* Blue-600 */
    --primary-glow: rgba(37, 99, 235, 0.2);

    /* Borders & Grids */
    --border-color: #e2e8f0;
    /* Slate-200 */
    --grid-color: rgba(0, 0, 0, 0.04);
    --gradient-text: linear-gradient(to right, #2563eb, #7c3aed);

    /* Shadows */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* === GLOBAL TYPOGRAPHY === */
body {
    background-color: var(--bg-body);
    color: var(--text-body);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: color 0.2s;
}

/* === TEXT UTILITIES (Theme Adaptive) === */
.text-muted {
    color: var(--text-muted) !important;
}

.text-white {
    color: var(--text-main) !important;
}

/* IMPORTANT: Redefine text-white to adapt */
.text-primary {
    color: var(--primary) !important;
}

/* Ensure no pure white or black text in content areas */
p,
span:not(.navbar-brand span),
li {
    color: var(--text-body);
}

.title-tag {
    color: var(--text-main);
}

/* === NAVBAR === */
.navbar {
    background: var(--bg-nav) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main) !important;
    display: flex;
    align-items: center;
}

.navbar {
    min-height: 80px;
}

.nav-link {
    color: var(--text-body) !important;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-link.active {
    color: var(--primary) !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* === BUTTONS (Theme Toggle) === */
.btn-toggle-theme {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle-theme:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
}

/* === CTA BUTTONS === */
.btn-primary-glow {
    background: var(--primary);
    color: #ffffff !important;
    padding: 0.6rem 1.75rem;
    border-radius: 99px;
    font-weight: 600;
    box-shadow: 0 4px 14px 0 var(--primary-glow);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 var(--primary-glow);
    color: #ffffff !important;
}

.btn-gradient {
    background: var(--gradient-text);
    color: #ffffff !important;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 99px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 var(--primary-glow);
    color: #ffffff !important;
}

.btn-outline-glow {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 600;
    display: inline-block;
}

.btn-outline-glow:hover {
    border-color: var(--primary);
    color: var(--primary) !important;
}

/* === CARDS === */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 1rem;
    transition: transform 0.2s, background 0.2s;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-box {
    width: 3rem;
    height: 3rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* === ADMIN SIDEBAR & LISTS === */
.list-group-item {
    padding: 0.85rem 1.5rem;
    border: none !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px !important;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.list-group-item:hover {
    background: var(--bg-card-hover) !important;
    transform: translateX(5px);
}

.list-group-item.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px -5px var(--primary-glow);
    transform: scale(1.02);
}

.list-group-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1) !important;
}

/* Ensure the wrapper also has spacing */
.list-group.list-group-flush {
    padding: 1rem;
}

/* === HERO === */
.hero-section {
    position: relative;
    padding: 8rem 0 5rem;
    overflow: hidden;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    z-index: -1;
}

/* === FOOTER === */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 100px;
}

footer h5 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

footer p,
footer li {
    color: var(--text-muted);
}

footer a {
    color: var(--text-body);
}

footer a:hover {
    color: var(--primary);
}

/* === BADGE === */
.badge-new {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* === BLOG CONTENT RICH TEXT STYLES === */
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 2rem 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-content figure {
    margin: 2rem 0;
    text-align: center;
}

.blog-content figure figcaption {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.blog-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    color: var(--text-body);
}

.blog-content table th,
.blog-content table td {
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.blog-content table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.blog-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0 1rem 1rem 0;
    font-style: italic;
    color: var(--text-main);
}

.blog-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 1rem;
    margin: 2rem 0;
    border: 0;
}

.blog-content .media {
    margin: 2rem 0;
}

/* === RESPONSIVENESS === */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--bg-card);
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 1rem;
        border: 1px solid var(--border-color);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}