/*
Theme Name: Er. Rameshwar Singh Theme
Theme URI: https://taknikigyan.com
Author: Er. Rameshwar Singh
Author URI: https://taknikigyan.com
Description: A ultra-fast, lightweight, SEO-optimized universal custom theme built for TaknikiGyan.com.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ers-theme
*/

/* ----------------------------------------------------
   1. CSS Reset & Base Styles
---------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.8;
    color: #1e293b;
    background-color: #f8fafc;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004499;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ----------------------------------------------------
   2. Container & Layout
---------------------------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-content-wrapper,
.content-layout {
    display: flex !important;
    gap: 35px !important;
    align-items: flex-start !important;
    width: 100% !important;
}

#primary.site-main {
    flex: 1 !important;
    min-width: 0 !important;
}

#secondary.widget-area {
    width: 330px !important;
    flex-shrink: 0 !important;
}

/* ----------------------------------------------------
   3. Dynamic Header Styles
---------------------------------------------------- */
.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #1a1a1a;
}

.site-description {
    font-size: 13px;
    color: #666666;
    margin-top: 2px;
}

/* Navigation Menu */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-navigation a {
    font-weight: 600;
    color: #333333;
    font-size: 15px;
}

.main-navigation a:hover {
    color: #0066cc;
}

/* ----------------------------------------------------
   4. Footer Styles
---------------------------------------------------- */
.site-footer {
    background-color: #0f172a;
    color: #cbd5e1;
    padding: 50px 0 20px 0;
    margin-top: 50px;
    font-size: 14px;
}

.categories-col li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.categories-col li a:hover, 
.important-pages-col a:hover {
    color: #38bdf8 !important;
}

/* ====================================================
   ULTRA-SPACIOUS & FRESH 3D ARTICLE TYPOGRAPHY (NO CHIPKAO)
==================================================== */

/* Single Article Card Container */
.single-post-card {
    background: #ffffff !important;
    padding: 45px 50px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06) !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 30px !important;
}

/* Post Content Body */
.post-body {
    font-size: 19px !important;
    line-height: 2.0 !important;
    color: #1e293b !important;
    letter-spacing: 0.1px !important;
}

/* Paragraph Spacing - Fully Breathable & Distinct */
.post-body p {
    margin-top: 0 !important;
    margin-bottom: 30px !important;
    word-break: normal !important;
    color: #334155 !important;
    line-height: 2.0 !important;
}

/* H2 Headings (Main Section Titles - Clear & Bold) */
.post-body h2 {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 50px 0 24px 0 !important;
    padding-bottom: 12px !important;
    border-bottom: 3px solid #dc2626 !important;
    line-height: 1.4 !important;
    letter-spacing: -0.3px !important;
    display: block !important; /* Natural Inline Flow */
    clear: both !important;
}

/* H3 Headings (Sub-headings / Numbered Points 1, 2, 3...) */
.post-body h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 38px 0 16px 0 !important;
    line-height: 1.5 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: block !important; /* Natural Inline Flow */
    clear: both !important;
}

/* Natural Inline Alignment for Emojis, Numbers & Text inside Headings */
.post-body h1 *, 
.post-body h2 *, 
.post-body h3 *, 
.post-body h4 * {
    display: inline !important;
    vertical-align: middle !important;
    margin: 0 3px !important;
    float: none !important;
}

/* Clean up unwanted line-breaks injected by WP Gutenberg editor inside Headings */
.post-body h2 br, 
.post-body h3 br,
.post-body h4 br {
    display: inline !important;
}

/* Bullet Points & Lists Spacing */
.post-body ul, .post-body ol {
    margin: 25px 0 35px 25px !important;
    padding-left: 10px !important;
}

.post-body li {
    margin-bottom: 18px !important;
    line-height: 1.9 !important;
    color: #334155 !important;
}

.post-body li strong {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Images inside Article */
.post-body img, .perfect-post-img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    display: block !important;
    margin: 35px auto !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
}

/* ----------------------------------------------------
   PRO COMMENT BOX STYLING
---------------------------------------------------- */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #edf2f7;
}

.comments-title, .comment-reply-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
}

/* Comment Form Styling */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8fafc;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.comment-form textarea, 
.comment-form input[type="text"], 
.comment-form input[type="email"], 
.comment-form input[type="url"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus, 
.comment-form input:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.comment-form input[type="submit"] {
    background: #0066cc;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    align-self: flex-start;
    transition: background 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    background: #004499;
}

/* Comment List Styling */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.comment-list .comment {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* ----------------------------------------------------
   SIDEBAR WIDGET CARDS & SOCIAL HOVERS
---------------------------------------------------- */
.sidebar-widget {
    background: #ffffff !important;
    padding: 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 25px !important;
    border: 1px solid #e2e8f0 !important;
}

.fb-widget a:hover {
    background: #145dbf !important;
}

.yt-widget a:hover {
    background: #cc0000 !important;
}

.search-submit:hover {
    background: #004499 !important;
}

/* ====================================================
   RED 3D HIGHLIGHTED CATEGORIES STYLING
==================================================== */
.takniki-gold-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 22px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05) !important;
}

.takniki-gold-header {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-bottom: 16px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.takniki-cat-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.takniki-cat-item {
    list-style: none !important;
    margin: 0 !important;
}

.takniki-cat-item a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 16px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    color: #334155 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.takniki-cat-item .left-box {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.takniki-cat-item .gold-folder-icon {
    font-size: 16px !important;
}

.takniki-cat-item .arrow-right {
    color: #94a3b8 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
}

/* Red 3D Active / Hover Button */
.takniki-cat-item a:hover,
.takniki-cat-item.active a {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    border-color: #991b1b !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4) !important;
}

.takniki-cat-item a:hover .arrow-right,
.takniki-cat-item.active a .arrow-right {
    color: #ffffff !important;
    transform: translateX(4px) !important;
}

/* ====================================================
   100% ANDROID & MOBILE ULTRA-RESPONSIVE FIXES
==================================================== */

*, *::before, *::after {
    box-sizing: border-box !important;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0;
    padding: 0;
}

/* Mobile Responsive Adjustments (Android Phones & Tablets) */
@media screen and (max-width: 868px) {

    .site-content-wrapper,
    .content-layout {
        flex-direction: column !important;
        gap: 25px !important;
    }

    #secondary.widget-area {
        width: 100% !important;
        margin-top: 20px !important;
    }

    .single-post-card {
        padding: 24px 18px !important;
        border-radius: 10px !important;
        box-shadow: none !important;
    }

    .post-body {
        font-size: 17px !important;
        line-height: 1.85 !important;
    }

    .post-body p {
        margin-bottom: 24px !important;
    }

    .post-body h2 {
        font-size: 22px !important;
        margin: 35px 0 16px 0 !important;
        padding-bottom: 8px !important;
    }

    .post-body h3 {
        font-size: 18px !important;
        margin: 28px 0 12px 0 !important;
    }

    .post-body table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    .post-body ul, .post-body ol {
        margin: 18px 0 25px 20px !important;
        padding-left: 5px !important;
    }

    .post-body li {
        margin-bottom: 12px !important;
        font-size: 16px !important;
    }

    .post-body img, .perfect-post-img, iframe, video {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin: 20px auto !important;
    }

    .header-wrapper {
        flex-direction: column !important;
        text-align: center !important;
        gap: 10px !important;
    }

    .main-navigation ul {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        padding: 0 !important;
        gap: 10px !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
    }
}

/* ----------------------------------------------------
   404 ERROR PAGE STYLING
---------------------------------------------------- */
.error-404-card {
    background: #ffffff;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    text-align: center;
    max-width: 650px;
    margin: 60px auto;
}

.error-code {
    font-size: 85px;
    font-weight: 900;
    color: #dc2626;
    margin: 0;
    line-height: 1;
}

.error-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 20px 0 10px 0;
}

.error-desc {
    color: #64748b;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.error-search-box {
    margin-bottom: 30px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.back-home-btn {
    display: inline-block;
    background: #0066cc;
    color: #ffffff !important;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}