/*
Theme Name: BhagyaChakras
Theme URI: https://bhagyachakras.in
Author: BhagyaChakras Team
Author URI: https://bhagyachakras.in
Description: Premium lightweight WordPress theme for Hindu Panchang, Choghadiya, Rahu Kaal, Muhurat, Tithi, Nakshatra and Puja Vidhi content. SEO-first, AdSense-friendly, mobile-first design with dark mode support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bhagyachakras
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===== RESET & BASE ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,sans-serif;line-height:1.7;color:#1a1a2e;background:#fff;overflow-x:hidden}
img{max-width:100%;height:auto;display:block}
a{color:#c0392b;text-decoration:none;transition:color .2s}
a:hover{color:#e74c3c}
ul,ol{list-style:none}
h1,h2,h3,h4,h5,h6{line-height:1.3;font-weight:700;color:#1a1a2e;margin-bottom:.5em}
h1{font-size:1.85rem}
h2{font-size:1.5rem}
h3{font-size:1.25rem}
p{margin-bottom:1em}
table{width:100%;border-collapse:collapse;margin:1.5em 0}
th,td{padding:10px 14px;border:1px solid #e0e0e0;text-align:left}
th{background:#f8f9fa;font-weight:600}

/* ===== CONTAINER ===== */
.bc-container{max-width:1200px;margin:0 auto;padding:0 16px}
.bc-grid{display:grid;gap:24px}
.bc-grid-2{grid-template-columns:1fr 1fr}
.bc-grid-3{grid-template-columns:repeat(3,1fr)}
.bc-grid-4{grid-template-columns:repeat(4,1fr)}

/* ===== HEADER ===== */
.bc-header{position:sticky;top:0;z-index:1000;background:#fff;border-bottom:1px solid #eee;transition:box-shadow .3s}
.bc-header.scrolled{box-shadow:0 2px 12px rgba(0,0,0,.08)}
.bc-header-inner{display:flex;align-items:center;justify-content:space-between;height:64px}
.bc-logo{font-size:1.4rem;font-weight:800;color:#c0392b}
.bc-logo span{color:#d4a017}
.bc-nav{display:flex;gap:4px}
.bc-nav a{padding:8px 14px;font-size:.9rem;font-weight:500;color:#333;border-radius:6px;transition:all .2s}
.bc-nav a:hover,.bc-nav a.active{background:#fef3f0;color:#c0392b}
.bc-header-actions{display:flex;align-items:center;gap:12px}
.bc-search-btn,.bc-dark-toggle{background:none;border:none;cursor:pointer;padding:8px;color:#333;font-size:1.1rem;border-radius:50%;transition:background .2s}
.bc-search-btn:hover,.bc-dark-toggle:hover{background:#f5f5f5}
.bc-mobile-toggle{display:none;background:none;border:none;cursor:pointer;padding:8px;font-size:1.4rem;color:#333}

/* ===== SEARCH OVERLAY ===== */
.bc-search-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.7);z-index:2000;display:none;align-items:flex-start;justify-content:center;padding-top:120px}
.bc-search-overlay.active{display:flex}
.bc-search-box{background:#fff;border-radius:12px;padding:24px;width:90%;max-width:600px}
.bc-search-box input{width:100%;padding:14px 18px;border:2px solid #e0e0e0;border-radius:8px;font-size:1.1rem;outline:none}
.bc-search-box input:focus{border-color:#c0392b}

/* ===== HERO / PANCHANG DASHBOARD ===== */
.bc-hero{background:linear-gradient(135deg,#fef9f0 0%,#fff5f5 100%);padding:40px 0 32px;border-bottom:1px solid #f0e6d6}
.bc-hero-title{font-size:1.6rem;text-align:center;margin-bottom:24px;color:#1a1a2e}
.bc-panchang-cards{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}
.bc-panchang-card{background:#fff;border-radius:12px;padding:20px 16px;text-align:center;border:1px solid #f0e0d0;transition:transform .2s,box-shadow .2s}
.bc-panchang-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.06)}
.bc-panchang-card .bc-pc-icon{font-size:1.8rem;margin-bottom:8px}
.bc-panchang-card .bc-pc-label{font-size:.8rem;color:#666;margin-bottom:4px;text-transform:uppercase;letter-spacing:.5px}
.bc-panchang-card .bc-pc-value{font-size:1rem;font-weight:700;color:#c0392b}

/* ===== QUICK ACCESS GRID ===== */
.bc-quick-grid{padding:40px 0}
.bc-section-title{font-size:1.5rem;margin-bottom:24px;position:relative;padding-bottom:12px}
.bc-section-title::after{content:'';position:absolute;bottom:0;left:0;width:48px;height:3px;background:#c0392b;border-radius:2px}
.bc-quick-card{background:#fff;border-radius:12px;padding:24px;border:1px solid #eee;text-align:center;transition:all .2s}
.bc-quick-card:hover{border-color:#c0392b;box-shadow:0 8px 24px rgba(192,57,43,.08)}
.bc-quick-card .bc-qc-icon{font-size:2rem;margin-bottom:12px}
.bc-quick-card h3{font-size:1.1rem;margin-bottom:8px}
.bc-quick-card p{font-size:.88rem;color:#555;margin-bottom:0}

/* ===== ARTICLE CARDS ===== */
.bc-articles{padding:40px 0}
.bc-article-card{background:#fff;border-radius:12px;overflow:hidden;border:1px solid #eee;transition:all .2s}
.bc-article-card:hover{box-shadow:0 8px 24px rgba(0,0,0,.06);transform:translateY(-2px)}
.bc-article-card .bc-ac-img{height:180px;background:#f5f0eb;overflow:hidden}
.bc-article-card .bc-ac-img img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.bc-article-card:hover .bc-ac-img img{transform:scale(1.05)}
.bc-article-card .bc-ac-body{padding:18px}
.bc-article-card .bc-ac-cat{display:inline-block;font-size:.75rem;font-weight:600;color:#c0392b;background:#fef3f0;padding:3px 10px;border-radius:4px;margin-bottom:8px}
.bc-article-card .bc-ac-title{font-size:1.05rem;font-weight:700;margin-bottom:8px;line-height:1.4}
.bc-article-card .bc-ac-title a{color:#1a1a2e}
.bc-article-card .bc-ac-title a:hover{color:#c0392b}
.bc-article-card .bc-ac-excerpt{font-size:.88rem;color:#555;margin-bottom:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bc-article-card .bc-ac-meta{font-size:.78rem;color:#888;display:flex;gap:12px}

/* ===== FEATURED LARGE CARDS ===== */
.bc-featured-large{padding:40px 0}
.bc-feat-card{background:#fff;border-radius:12px;overflow:hidden;border:1px solid #eee;display:grid;grid-template-columns:1fr 1fr;min-height:280px}
.bc-feat-card .bc-fc-img{background:#f5f0eb}
.bc-feat-card .bc-fc-img img{width:100%;height:100%;object-fit:cover}
.bc-feat-card .bc-fc-body{padding:28px;display:flex;flex-direction:column;justify-content:center}
.bc-feat-card .bc-fc-body h3{font-size:1.3rem;margin-bottom:12px}
.bc-feat-card .bc-fc-body p{color:#555;font-size:.92rem}

/* ===== INTERNAL LINK HUB ===== */
.bc-link-hub{padding:40px 0;background:#f8f9fa}
.bc-link-list{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.bc-link-list a{display:block;padding:14px 18px;background:#fff;border-radius:8px;border:1px solid #eee;font-size:.92rem;font-weight:500;color:#333;transition:all .2s}
.bc-link-list a:hover{border-color:#c0392b;color:#c0392b;background:#fef9f7}

/* ===== FAQ SECTION ===== */
.bc-faq{padding:40px 0}
.bc-faq-item{border:1px solid #eee;border-radius:10px;margin-bottom:12px;overflow:hidden}
.bc-faq-q{padding:16px 20px;font-weight:600;cursor:pointer;display:flex;justify-content:space-between;align-items:center;background:#fafafa;transition:background .2s}
.bc-faq-q:hover{background:#f5f0eb}
.bc-faq-q::after{content:'+';font-size:1.2rem;color:#c0392b;transition:transform .2s}
.bc-faq-item.open .bc-faq-q::after{transform:rotate(45deg)}
.bc-faq-a{padding:0 20px;max-height:0;overflow:hidden;transition:all .3s;color:#555;font-size:.92rem}
.bc-faq-item.open .bc-faq-a{padding:16px 20px;max-height:500px}

/* ===== ABOUT SECTION ===== */
.bc-about-section{padding:40px 0;background:#fef9f0}
.bc-about-inner{display:grid;grid-template-columns:1fr 2fr;gap:32px;align-items:center}
.bc-about-img{border-radius:12px;overflow:hidden}
.bc-about-img img{width:100%;border-radius:12px}
.bc-about-text h2{margin-bottom:16px}
.bc-about-text p{color:#555;font-size:.95rem}

/* ===== AUTHOR SECTION ===== */
.bc-author-section{padding:40px 0}
.bc-author-box{display:flex;gap:24px;background:#f8f9fa;border-radius:12px;padding:28px;border:1px solid #eee}
.bc-author-avatar{width:80px;height:80px;border-radius:50%;overflow:hidden;flex-shrink:0}
.bc-author-avatar img{width:100%;height:100%;object-fit:cover}
.bc-author-info h3{margin-bottom:4px}
.bc-author-info .bc-author-role{font-size:.85rem;color:#c0392b;margin-bottom:8px}
.bc-author-info p{font-size:.9rem;color:#555;margin-bottom:0}

/* ===== NEWSLETTER ===== */
.bc-newsletter{padding:48px 0;background:linear-gradient(135deg,#c0392b 0%,#a93226 100%);color:#fff;text-align:center}
.bc-newsletter h2{color:#fff;margin-bottom:8px}
.bc-newsletter p{color:rgba(255,255,255,.85);margin-bottom:20px}
.bc-newsletter-form{display:flex;gap:8px;max-width:480px;margin:0 auto}
.bc-newsletter-form input{flex:1;padding:12px 18px;border:none;border-radius:8px;font-size:.95rem}
.bc-newsletter-form button{padding:12px 28px;background:#d4a017;color:#fff;border:none;border-radius:8px;font-weight:600;cursor:pointer;transition:background .2s}
.bc-newsletter-form button:hover{background:#b8860b}

/* ===== FOOTER ===== */
.bc-footer{background:#1a1a2e;color:#ccc;padding:48px 0 0}
.bc-footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:32px;margin-bottom:40px}
.bc-footer h4{color:#fff;margin-bottom:16px;font-size:1rem}
.bc-footer a{color:#aaa;font-size:.88rem;display:block;margin-bottom:8px;transition:color .2s}
.bc-footer a:hover{color:#d4a017}
.bc-footer-about p{font-size:.88rem;line-height:1.7}
.bc-footer-bottom{border-top:1px solid #2a2a3e;padding:20px 0;text-align:center;font-size:.82rem;color:#888}

/* ===== SINGLE POST ===== */
.bc-single{padding:32px 0}
.bc-single-header{margin-bottom:28px}
.bc-breadcrumb{font-size:.82rem;color:#888;margin-bottom:16px}
.bc-breadcrumb a{color:#888}
.bc-breadcrumb a:hover{color:#c0392b}
.bc-breadcrumb span{margin:0 6px}
.bc-single-cat{display:inline-block;font-size:.78rem;font-weight:600;color:#c0392b;background:#fef3f0;padding:4px 12px;border-radius:4px;margin-bottom:12px}
.bc-single h1{font-size:2rem;margin-bottom:16px;line-height:1.3}
.bc-single-meta{font-size:.85rem;color:#888;display:flex;gap:16px;flex-wrap:wrap;margin-bottom:24px}
.bc-featured-img{border-radius:12px;overflow:hidden;margin-bottom:28px}
.bc-featured-img img{width:100%}

/* ===== READING PROGRESS BAR ===== */
.bc-progress-bar{position:fixed;top:64px;left:0;width:0;height:3px;background:#c0392b;z-index:999;transition:width .1s}

/* ===== TABLE OF CONTENTS ===== */
.bc-toc{background:#f8f9fa;border-radius:10px;padding:20px 24px;margin-bottom:28px;border:1px solid #eee}
.bc-toc h4{margin-bottom:12px;font-size:.95rem}
.bc-toc ol{counter-reset:toc;padding-left:0}
.bc-toc li{counter-increment:toc;margin-bottom:6px}
.bc-toc li::before{content:counter(toc) ".";color:#c0392b;font-weight:600;margin-right:6px}
.bc-toc a{font-size:.88rem;color:#333}
.bc-toc a:hover{color:#c0392b}

/* ===== CONTENT AREA ===== */
.bc-content{font-size:1.02rem;line-height:1.8}
.bc-content h2{margin-top:2em;margin-bottom:.6em;font-size:1.4rem}
.bc-content h3{margin-top:1.5em;margin-bottom:.5em}
.bc-content p{margin-bottom:1.2em}
.bc-content ul,.bc-content ol{margin:1em 0 1.5em 1.5em}
.bc-content li{margin-bottom:.4em}
.bc-content blockquote{border-left:4px solid #c0392b;padding:16px 20px;margin:1.5em 0;background:#fef9f7;border-radius:0 8px 8px 0}
.bc-content img{border-radius:8px;margin:1.5em 0}


/* ===== FEATURED SNIPPET BOX ===== */
.bc-snippet-box{background:#fef9f0;border-left:4px solid #d4a017;border-radius:0 10px 10px 0;padding:18px 22px;margin:20px 0 28px;font-size:.95rem;line-height:1.7}

/* ===== AUTHOR BOX (SINGLE) ===== */
.bc-single-author{display:flex;gap:20px;background:#f8f9fa;border-radius:12px;padding:24px;margin:32px 0;border:1px solid #eee}
.bc-single-author img{width:64px;height:64px;border-radius:50%;object-fit:cover;flex-shrink:0}
.bc-single-author h4{margin-bottom:4px}
.bc-single-author p{font-size:.88rem;color:#555;margin-bottom:0}

/* ===== RELATED POSTS ===== */
.bc-related{margin:36px 0}
.bc-related h3{margin-bottom:16px}

/* ===== SOCIAL SHARE ===== */
.bc-share{display:flex;gap:10px;margin:28px 0;flex-wrap:wrap}
.bc-share a{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:8px;font-size:.85rem;font-weight:500;color:#fff;transition:opacity .2s}
.bc-share a:hover{opacity:.85;color:#fff}
.bc-share-fb{background:#1877f2}
.bc-share-tw{background:#1da1f2}
.bc-share-wa{background:#25d366}
.bc-share-tg{background:#0088cc}

/* ===== POST NAVIGATION ===== */
.bc-post-nav{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:32px 0;padding-top:24px;border-top:1px solid #eee}
.bc-post-nav a{padding:16px;background:#f8f9fa;border-radius:10px;font-size:.9rem;color:#333;transition:all .2s}
.bc-post-nav a:hover{background:#fef3f0;color:#c0392b}
.bc-post-nav .bc-pn-label{font-size:.78rem;color:#888;margin-bottom:4px}

/* ===== SIDEBAR ===== */
.bc-sidebar{padding-left:24px}
.bc-widget{background:#fff;border:1px solid #eee;border-radius:12px;padding:20px;margin-bottom:24px}
.bc-widget h4{font-size:1rem;margin-bottom:16px;padding-bottom:10px;border-bottom:2px solid #c0392b}
.bc-widget-list li{padding:10px 0;border-bottom:1px solid #f0f0f0}
.bc-widget-list li:last-child{border-bottom:none}
.bc-widget-list a{font-size:.9rem;color:#333}
.bc-widget-list a:hover{color:#c0392b}

/* ===== MAIN LAYOUT WITH SIDEBAR ===== */
.bc-main-layout{display:grid;grid-template-columns:1fr 320px;gap:32px;padding:32px 0}
.bc-main-content{min-width:0}

/* ===== CATEGORY PAGE ===== */
.bc-cat-header{padding:40px 0;background:linear-gradient(135deg,#fef9f0 0%,#fff5f5 100%);border-bottom:1px solid #f0e6d6;margin-bottom:32px}
.bc-cat-header h1{font-size:1.8rem;margin-bottom:8px}
.bc-cat-header p{color:#555;font-size:.95rem}

/* ===== 404 PAGE ===== */
.bc-404{text-align:center;padding:80px 0}
.bc-404 h1{font-size:4rem;color:#c0392b}
.bc-404 p{font-size:1.1rem;color:#555;margin-bottom:24px}
.bc-404 a{display:inline-block;padding:12px 28px;background:#c0392b;color:#fff;border-radius:8px;font-weight:600}

/* ===== PAGE TEMPLATES ===== */
.bc-page-content{padding:40px 0}
.bc-page-content h1{font-size:1.8rem;margin-bottom:20px}

/* ===== TRUST BADGES ===== */
.bc-trust-badges{display:flex;gap:16px;flex-wrap:wrap;margin:20px 0}
.bc-badge{display:flex;align-items:center;gap:8px;padding:10px 16px;background:#f0faf0;border:1px solid #c8e6c9;border-radius:8px;font-size:.85rem;color:#2e7d32}

/* ===== MOBILE NAV ===== */
.bc-mobile-nav{display:none;position:fixed;bottom:0;left:0;width:100%;background:#fff;border-top:1px solid #eee;z-index:1000;padding:8px 0}
.bc-mobile-nav-inner{display:flex;justify-content:space-around}
.bc-mobile-nav a{display:flex;flex-direction:column;align-items:center;font-size:.68rem;color:#555;gap:2px;padding:4px 8px}
.bc-mobile-nav a.active{color:#c0392b}
.bc-mobile-nav .bc-mn-icon{font-size:1.2rem}

/* ===== MOBILE MENU OVERLAY ===== */
.bc-mobile-menu{position:fixed;top:0;left:0;width:100%;height:100%;background:#fff;z-index:2000;transform:translateX(-100%);transition:transform .3s;overflow-y:auto;padding:20px}
.bc-mobile-menu.active{transform:translateX(0)}
.bc-mobile-menu-close{background:none;border:none;font-size:1.5rem;cursor:pointer;position:absolute;top:16px;right:16px;color:#333}
.bc-mobile-menu nav{margin-top:48px}
.bc-mobile-menu nav a{display:block;padding:14px 0;font-size:1.1rem;color:#333;border-bottom:1px solid #f0f0f0}

/* ===== DARK MODE ===== */
body.bc-dark{background:#121212;color:#e0e0e0}
.bc-dark .bc-header{background:#1e1e1e;border-color:#333}
.bc-dark .bc-nav a{color:#ccc}
.bc-dark .bc-nav a:hover{background:#2a2a2a}
.bc-dark .bc-hero{background:linear-gradient(135deg,#1a1a1a 0%,#1e1e1e 100%);border-color:#333}
.bc-dark .bc-panchang-card{background:#1e1e1e;border-color:#333}
.bc-dark .bc-panchang-card .bc-pc-label{color:#999}
.bc-dark .bc-article-card{background:#1e1e1e;border-color:#333}
.bc-dark .bc-article-card .bc-ac-title a{color:#e0e0e0}
.bc-dark .bc-article-card .bc-ac-excerpt{color:#999}
.bc-dark .bc-quick-card{background:#1e1e1e;border-color:#333}
.bc-dark .bc-quick-card p{color:#999}
.bc-dark .bc-feat-card{background:#1e1e1e;border-color:#333}
.bc-dark .bc-link-hub{background:#1a1a1a}
.bc-dark .bc-link-list a{background:#1e1e1e;border-color:#333;color:#ccc}
.bc-dark .bc-faq-item{border-color:#333}
.bc-dark .bc-faq-q{background:#1e1e1e;color:#e0e0e0}
.bc-dark .bc-faq-a{color:#bbb}
.bc-dark .bc-about-section{background:#1a1a1a}
.bc-dark .bc-author-box{background:#1e1e1e;border-color:#333}
.bc-dark .bc-footer{background:#0a0a0a}
.bc-dark .bc-content blockquote{background:#1e1e1e}
.bc-dark .bc-toc{background:#1e1e1e;border-color:#333}
.bc-dark .bc-snippet-box{background:#1e1e1e}
.bc-dark .bc-single-author{background:#1e1e1e;border-color:#333}
.bc-dark .bc-widget{background:#1e1e1e;border-color:#333}
.bc-dark .bc-mobile-nav{background:#1e1e1e;border-color:#333}
.bc-dark .bc-mobile-menu{background:#121212}
.bc-dark .bc-mobile-menu nav a{color:#e0e0e0;border-color:#333}
.bc-dark h1,.bc-dark h2,.bc-dark h3{color:#e0e0e0}
.bc-dark .bc-search-box{background:#1e1e1e}
.bc-dark .bc-search-box input{background:#2a2a2a;border-color:#444;color:#e0e0e0}
.bc-dark .bc-post-nav a{background:#1e1e1e}
.bc-dark .bc-cat-header{background:linear-gradient(135deg,#1a1a1a 0%,#1e1e1e 100%);border-color:#333}

/* ===== RESPONSIVE ===== */
@media(max-width:1024px){
    .bc-grid-4{grid-template-columns:repeat(2,1fr)}
    .bc-panchang-cards{grid-template-columns:repeat(3,1fr)}
    .bc-footer-grid{grid-template-columns:1fr 1fr}
    .bc-main-layout{grid-template-columns:1fr}
    .bc-sidebar{padding-left:0}
    .bc-feat-card{grid-template-columns:1fr}
    .bc-about-inner{grid-template-columns:1fr}
}
@media(max-width:768px){
    .bc-nav{display:none}
    .bc-mobile-toggle{display:block}
    .bc-mobile-nav{display:block}
    body{padding-bottom:64px}
    .bc-grid-2,.bc-grid-3{grid-template-columns:1fr}
    .bc-panchang-cards{grid-template-columns:repeat(2,1fr)}
    .bc-link-list{grid-template-columns:1fr 1fr}
    .bc-hero-title{font-size:1.3rem}
    .bc-single h1{font-size:1.5rem}
    .bc-newsletter-form{flex-direction:column}
    .bc-footer-grid{grid-template-columns:1fr}
    .bc-post-nav{grid-template-columns:1fr}
    h1{font-size:1.5rem}
    h2{font-size:1.25rem}
}
@media(max-width:480px){
    .bc-panchang-cards{grid-template-columns:1fr 1fr}
    .bc-link-list{grid-template-columns:1fr}
    .bc-author-box{flex-direction:column;text-align:center}
    .bc-single-author{flex-direction:column;text-align:center}
}

/* ===== SKIP LINK (ACCESSIBILITY) ===== */
.bc-skip-link{position:absolute;top:-100px;left:16px;background:#c0392b;color:#fff;padding:10px 18px;z-index:9999;border-radius:4px;font-weight:600}
.bc-skip-link:focus{top:8px;color:#fff}

/* ===== PRINT ===== */
@media print{
    .bc-header,.bc-footer,.bc-sidebar,.bc-mobile-nav,.bc-share,.bc-newsletter,.bc-progress-bar{display:none!important}
    body{color:#000;background:#fff}
}
