/*
Theme Name: Mahadev Premium Theme
Theme URI: https://mahadeevbooks.com
Author: Antigravity
Description: Premium SEO optimized, blazing fast custom theme for Mahadev Books. Features centralized dynamic links, category-based blog loading, and ultra-lightweight zero JS design.
Version: 1.0.0
*/

/* Black, White, Yellow Theme */
:root {
    --primary: #FFC107; /* Sleek Yellow/Gold */
    --primary-hover: #ffb300;
    --black: #080808;
    --dark: #121212;
    --white: #ffffff;
    --light: #f9f9f9;
    --text-main: #333333;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; 
}

body { 
    background: var(--white); 
    color: var(--text-main); 
    line-height: 1.7; 
    overflow-x: hidden; 
}

a { 
    text-decoration: none; 
}

.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* Navigation */
header { 
    background: var(--black); 
    border-bottom: 3px solid var(--primary); 
    padding: 12px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 15px;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-links { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
    flex-wrap: wrap; 
}

.nav-links a { 
    color: #e0e0e0; 
    font-weight: 600; 
    font-size: 15px; 
    text-transform: uppercase;
    transition: color 0.3s; 
}

.nav-links a:hover, .nav-links a.active, .nav-links .current_page_item a { 
    color: var(--primary); 
}

.header-btn { 
    background: var(--primary); 
    color: var(--black) !important; 
    padding: 10px 20px; 
    border-radius: 6px; 
    font-weight: 800 !important; 
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255,193,7,0.3);
}

.header-btn:hover { 
    background: var(--white); 
    box-shadow: 0 4px 15px rgba(255,193,7,0.6);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}
.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: 0.3s;
}

/* Hero Section */
.hero { 
    background-color: var(--black); 
    background-image: radial-gradient(var(--dark) 3px, transparent 3px);
    background-size: 40px 40px;
    padding: 80px 20px 60px; 
    text-align: center;
    color: var(--white);
    border-bottom: 5px solid var(--primary);
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 { 
    font-size: 48px; 
    color: var(--primary); 
    margin-bottom: 20px; 
    font-weight: 900; 
    line-height: 1.2;
    text-transform: uppercase; 
    text-shadow: 2px 2px 5px rgba(0,0,0,0.6);
}

.hero p { 
    font-size: 19px; 
    color: #f1f1f1; 
    margin-bottom: 30px; 
    font-weight: 400; 
    line-height: 1.6;
}

/* Buttons */
.btn-box { 
    text-align: center; 
    margin: 30px 0; 
}

.btn { 
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    background: var(--primary); 
    color: var(--black); 
    font-weight: 800; 
    padding: 15px 35px; 
    border-radius: 6px; 
    text-transform: uppercase; 
    transition: all 0.3s; 
    border: 2px solid var(--primary); 
    font-size: 16px; 
    box-shadow: 0 6px 15px rgba(255, 193, 7, 0.25);
}

.btn:hover { 
    background: transparent; 
    color: var(--primary); 
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

.btn-dark { 
    background: var(--black); 
    color: var(--primary); 
    border: 2px solid var(--black); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-dark:hover { 
    background: transparent; 
    color: var(--black); 
    border-color: var(--black);
}

/* Page Sections */
.page-section { 
    padding: 60px 0; 
}

.page-section:nth-child(even) { 
    background-color: var(--light); 
}

.page-section h2 { 
    font-size: 32px; 
    color: var(--black); 
    margin: 0 auto 25px; 
    font-weight: 800; 
    text-transform: uppercase; 
    display: table; 
    border-bottom: 4px solid var(--primary); 
    padding-bottom: 8px; 
    text-align: center;
}

.page-section p { 
    font-size: 17px; 
    margin-bottom: 20px; 
    color: var(--text-main); 
    text-align: justify; 
    line-height: 1.8;
}

/* Tables */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.info-table th {
    background: var(--black);
    color: var(--primary);
    padding: 16px;
    text-align: left;
    text-transform: uppercase;
    font-size: 15px;
}

.info-table td {
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.info-table tr:nth-child(even) {
    background: var(--light);
}

/* Footer */
footer { 
    background: var(--black); 
    color: #a0a0a0; 
    padding: 50px 0 20px; 
    border-top: 5px solid var(--primary); 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 40px; 
    margin-bottom: 30px; 
}

.footer-col .footer-logo img {
    height: 40px;
    width: auto;
    margin-bottom: 20px;
    display: block;
}

.footer-col h3 { 
    color: var(--primary); 
    margin-bottom: 20px; 
    font-size: 20px; 
    text-transform: uppercase;
}

.footer-col p { 
    font-size: 15px; 
    margin-bottom: 15px; 
    line-height: 1.6;
}

.footer-links a { 
    color: #a0a0a0; 
    display: block; 
    margin-bottom: 10px; 
    font-weight: 500;
    transition: color 0.2s;
}

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

.footer-bottom { 
    text-align: center; 
    padding-top: 20px; 
    border-top: 1px solid #222; 
    font-size: 14px; 
}

/* FAQ Section */
.faq-section { padding: 60px 0; background: var(--white); }
.faq-item { background: var(--light); border: 1px solid #eee; padding: 25px; margin-bottom: 20px; border-radius: 8px; border-left: 5px solid var(--primary); transition: transform 0.3s; }
.faq-item:hover { transform: translateX(5px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.faq-item h3 { color: var(--black); margin-bottom: 12px; font-size: 20px; font-weight: 700; }
.faq-item p { color: var(--text-main); margin-bottom: 0; font-size: 16px; }

/* Blog Section */
.blog-section { background: var(--light); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 30px; }
.blog-card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); transition: transform 0.3s; border-bottom: 4px solid var(--primary); }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.blog-thumb img { width: 100%; height: 200px; object-fit: cover; display: block; border-bottom: 1px solid #eee; }
.blog-content { padding: 20px; }
.blog-content h3 { font-size: 20px; color: var(--black); margin-bottom: 10px; line-height: 1.4; }
.blog-content h3 a { color: var(--black); transition: color 0.2s; }
.blog-content h3 a:hover { color: var(--primary); }
.blog-content p { font-size: 15px; color: #555; margin-bottom: 15px; line-height: 1.6; }
.read-more { font-weight: 700; color: var(--primary); text-transform: uppercase; font-size: 14px; display: inline-block; transition: color 0.2s; }
.read-more:hover { color: var(--black); }

/* Single Blog Page */
.single-blog-wrapper { max-width: 800px; margin: 50px auto; padding: 0 20px; }
.single-blog-header { margin-bottom: 30px; text-align: center; }
.single-blog-header h1 { font-size: 40px; color: var(--black); margin-bottom: 15px; font-weight: 900; line-height: 1.2; text-transform: uppercase; }
.single-blog-meta { color: #777; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.single-blog-thumb img { width: 100%; height: auto; border-radius: 10px; margin-bottom: 30px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.single-blog-content { font-size: 18px; line-height: 1.9; color: #444; }
.single-blog-content h2, .single-blog-content h3 { color: var(--black); margin: 30px 0 15px; }
.single-blog-content p { margin-bottom: 20px; text-align: justify; }

/* Responsive */
@media (max-width: 768px) {
    header { padding: 8px 0; position: relative; }
    .nav-container { flex-direction: row; justify-content: space-between; align-items: center; }
    .logo img { height: 38px; }
    
    .menu-toggle { display: flex; }
    .nav-links { 
        display: none;
        flex-direction: column; 
        width: 100%; 
        background: var(--black); 
        padding: 15px 0;
        border-top: 2px solid var(--primary);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    .nav-links.active { display: flex; }
    .nav-links a { font-size: 15px; padding: 10px 20px; width: 100%; text-align: left; border-bottom: 1px solid #1a1a1a; }
    .header-btn { margin: 10px 20px; width: calc(100% - 40px); text-align: center; }
    
    .hero { padding: 40px 20px 30px; }
    .hero h1 { font-size: 34px; margin-bottom: 15px; }
    .hero p { font-size: 16px; }
    .page-section { padding: 40px 0; }
    .page-section h2 { font-size: 26px; }
    .page-section p { text-align: left; font-size: 16px; }
    .btn { padding: 14px 25px; width: 100%; text-align: center; }
    .single-blog-header h1 { font-size: 30px; }
}
