/* ============================================================
   BD SUITE — SITE LAYOUT
   Header, Footer, Homepage, Categories, Dark Mode
   ============================================================ */

/* ---- HEADER ---- */
.bd-site-header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid #e2e8f0; transition: background .3s, box-shadow .3s; }
.bd-site-header.bd-scrolled { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.bd-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; height: 64px; gap: 16px; }
.bd-header-logo { display: flex; align-items: center; text-decoration: none !important; flex-shrink: 0; }
.bd-logo-img { height: 36px; width: auto; }
.bd-logo-text { font-size: 20px; font-weight: 800; color: #1e293b; }
.bd-header-nav { display: flex; align-items: center; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.bd-header-nav::-webkit-scrollbar { display: none; }
.bd-nav-link { padding: 8px 12px; font-size: 14px; color: #475569; text-decoration: none !important; border-radius: 8px; white-space: nowrap; transition: background .2s, color .2s; }
.bd-nav-link:hover { background: #f1f5f9; color: #1e293b; }
.bd-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bd-theme-toggle { width: 36px; height: 36px; border: 1px solid #e2e8f0; border-radius: 50%; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; color: #64748b; }
.bd-theme-toggle:hover { background: #f1f5f9; }
.bd-icon-moon { display: none; }
[data-theme="dark"] .bd-icon-sun { display: none; }
[data-theme="dark"] .bd-icon-moon { display: block; }
[data-theme="dark"] .bd-theme-toggle { border-color: #334155; color: #94a3b8; }
.bd-header-cta { padding: 8px 18px; background: #2563eb; color: #fff !important; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none !important; transition: background .2s; white-space: nowrap; }
.bd-header-cta:hover { background: #1d4ed8; }
.bd-mobile-menu-btn { display: none; width: 36px; height: 36px; background: none; border: none; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 6px; }
.bd-mobile-menu-btn span { display: block; width: 22px; height: 2px; background: #475569; border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ---- FOOTER ---- */
.bd-site-footer { background: #f8fafc; border-top: 1px solid #e2e8f0; padding: 48px 0 0; margin-top: 40px; }
.bd-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.bd-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.bd-footer-col h4 { font-size: 15px; font-weight: 700; margin: 0 0 12px; color: #1e293b; }
.bd-footer-desc { font-size: 14px; color: #64748b; line-height: 1.6; margin: 0; }
.bd-footer-col ul { list-style: none; margin: 0; padding: 0; }
.bd-footer-col li { margin-bottom: 6px; }
.bd-footer-col a { font-size: 14px; color: #475569; text-decoration: none !important; transition: color .2s; }
.bd-footer-col a:hover { color: #2563eb; }
.bd-footer-bottom { margin-top: 32px; padding: 16px 0; border-top: 1px solid #e2e8f0; text-align: center; font-size: 13px; color: #94a3b8; }

/* ---- HOMEPAGE HERO ---- */
.bd-home-hero { position: relative; padding: 80px 0 60px; background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%); overflow: hidden; text-align: center; }
.bd-home-hero-bg { position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.bd-home-hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; padding: 0 16px; }
.bd-home-hero h1 { font-size: 38px; font-weight: 800; color: #fff; margin: 0 0 16px; line-height: 1.3; }
.bd-home-hero h1 span { color: #93c5fd; }
.bd-home-hero p { font-size: 18px; color: rgba(255,255,255,.8); margin: 0 0 28px; }
.bd-home-search { max-width: 560px; margin: 0 auto; }
.bd-home-search .bd-search-input { padding: 16px 50px 16px 20px; font-size: 17px; border: none; box-shadow: 0 4px 24px rgba(0,0,0,.15); }
.bd-home-search .bd-search-results { border-radius: 12px; }

/* ---- HOMEPAGE SECTIONS ---- */
.bd-home-section { padding: 48px 0; }
.bd-home-section-alt { background: #f8fafc; }
.bd-home-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.bd-home-heading { font-size: 26px; font-weight: 700; text-align: center; margin: 0 0 28px; color: #1e293b; }
.bd-home-center { text-align: center; margin-top: 24px; }
.bd-home-btn { display: inline-block; padding: 12px 28px; border-radius: 10px; font-size: 15px; font-weight: 600; text-decoration: none !important; transition: all .2s; }
.bd-btn-outline { border: 2px solid #e2e8f0; color: #475569 !important; background: transparent; }
.bd-btn-outline:hover { border-color: #2563eb; color: #2563eb !important; }
.bd-btn-white { background: #fff; color: #1e293b !important; }
.bd-btn-white:hover { background: #f1f5f9; }

/* ---- CATEGORY CARDS ---- */
.bd-cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bd-cat-card { display: flex; flex-direction: column; align-items: center; padding: 24px 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; text-decoration: none !important; color: #1e293b !important; transition: all .25s; text-align: center; }
.bd-cat-card:hover { border-color: #2563eb; box-shadow: 0 8px 24px rgba(37,99,235,.1); transform: translateY(-3px); }
.bd-cat-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #eff6ff; font-size: 26px; margin-bottom: 10px; transition: background .2s; }
.bd-cat-card:hover .bd-cat-icon { background: #dbeafe; }
.bd-cat-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.bd-cat-count { font-size: 12px; color: #94a3b8; }

/* ---- CTA ---- */
.bd-home-cta { padding: 60px 0; background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); text-align: center; }
.bd-cta-inner h2 { font-size: 30px; font-weight: 800; color: #fff; margin: 0 0 12px; }
.bd-cta-inner p { font-size: 18px; color: rgba(255,255,255,.8); margin: 0 0 24px; }

/* ---- ARTICLES ---- */
.bd-home-articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.bd-home-article { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid #e2e8f0; text-decoration: none !important; color: #1e293b !important; transition: all .25s; }
.bd-home-article:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.bd-home-article img { width: 100%; height: 180px; object-fit: cover; }
.bd-home-article-body { padding: 16px; }
.bd-home-article-date { font-size: 12px; color: #94a3b8; }
.bd-home-article h3 { font-size: 16px; font-weight: 600; margin: 6px 0 0; line-height: 1.4; }

/* ---- CATEGORIES PAGE ---- */
.bd-cats-page { max-width: 1200px; margin: 30px auto; padding: 0 16px; }
.bd-cats-title { font-size: 28px; font-weight: 700; margin: 0 0 24px; text-align: center; }
.bd-cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.bd-cat-card-lg { padding: 28px 16px; }
.bd-cat-icon-lg { width: 64px; height: 64px; font-size: 30px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .bd-cat-grid { grid-template-columns: repeat(4, 1fr); }
    .bd-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .bd-home-hero h1 { font-size: 28px; }
    .bd-home-hero p { font-size: 15px; }
}
@media (max-width: 640px) {
    .bd-header-nav { display: none; }
    .bd-header-nav.bd-nav-open { display: flex; flex-direction: column; position: absolute; top: 64px; right: 0; left: 0; background: #fff; border-bottom: 1px solid #e2e8f0; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.1); z-index: 999; }
    [data-theme="dark"] .bd-header-nav.bd-nav-open { background: #1e293b; }
    .bd-mobile-menu-btn { display: flex; }
    .bd-header-cta { display: none; }
    .bd-cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .bd-cat-icon { width: 44px; height: 44px; font-size: 22px; }
    .bd-cat-name { font-size: 12px; }
    .bd-home-hero { padding: 65px 0 40px; }
    .bd-home-hero h1 { font-size: 24px; }
    .bd-cta-inner h2 { font-size: 22px; }
    .bd-cta-inner p { font-size: 15px; }
    .bd-footer-grid { grid-template-columns: 1fr; }
    .bd-cats-grid { grid-template-columns: repeat(2, 1fr); }
    .bd-home-articles-grid { grid-template-columns: 1fr; }
}
