/*
* Theme Name: WTechni Master Edition Child
* Author: techsesamjho
* Template: tech
* Version: 8.0 (Sticky Sidebar Removed - Header Only)
* Description: Optimized for SEO 2026. Only Site-Header stays on top.
*/

/* =========================================
   1. GLOBAL SYSTEM & VARIABLES
========================================= */
:root {
    --primary: #4b7a0d;
    --primary-dark: #3a5f0a;
    --primary-hover: #5fa110;
    --accent: #d32f2f;
    --bg-body: #e4e4e4;
    --bg-white: #ffffff;
    --text-dark: #1c1e21;
    --text-medium: #4b4f56;
    --text-muted: #8d949e;
    --border: #e0e2e7;
    --shadow-soft: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-bold: 0 12px 30px rgba(0,0,0,0.1);
    --radius-full: 50px;
    --radius-lg: 15px;
    --radius-md: 10px;
    --transition-fast: 0.2s ease;
    --transition-slow: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* =========================================
   2. TYPOGRAPHY & BASE RESET
========================================= */
html { scroll-behavior: smooth; box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }

body {
    background-color: var(--bg-body);
    margin: 0; padding: 0;
    font-family: "Hind", sans-serif;
    color: var(--text-dark);
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}



h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 800;
    margin: 1.6em 0 0.8em;
    line-height: 1.25;
}

h1 { font-size: 38px; }
h2 { font-size: 30px; border-left: 6px solid var(--primary); padding-left: 15px; }
h3 { font-size: 24px; }

a { color: var(--primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--accent); }

/* =========================================
   3. WORDPRESS ALIGNMENT & MEDIA
========================================= */
.aligncenter { display: block; margin: 30px auto; }
.alignleft { float: left; margin: 0 25px 25px 0; }
.alignright { float: right; margin: 0 0 25px 25px; }
.wp-caption { background: #f8f9fa; border: 1px solid var(--border); padding: 10px; border-radius: var(--radius-md); text-align: center; }
.wp-caption-text { font-size: 13px; color: var(--text-muted); font-style: italic; margin-top: 8px; }

blockquote {
    background: #f9f9f9;
    border-left: 8px solid var(--primary);
    padding: 25px 35px;
    margin: 30px 0;
    font-style: italic;
    font-size: 20px;
    color: #444;
}

/* =========================================
   4. LAYOUT ENGINE (MASTER)
========================================= */
.container { max-width: 1240px; margin: 0 auto; padding: 0 25px; }
.main-layout { display: flex; align-items: flex-start; gap: 40px; margin: 50px auto; }

.content-area {
    flex: 2.5; 
    background: var(--bg-white);
    padding: clamp(25px, 5vw, 50px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-bold);
    min-width: 0;
}

/* SIDEBAR FIX: No Sticky property */
.sidebar { 
    flex: 1; 
    min-width: 330px; 
    position: relative; /* Fixed: Changed from sticky to relative */
    top: 0; /* Fixed: Removed sticky offset */
    z-index: 10; 
}

/* =========================================
   5. SITE HEADER & SEARCH (ONLY STICKY ELEMENT)
========================================= */
.site-header { 
    position: sticky; 
    top: 0; 
    z-index: 9999; 
    background: #fff; 
    border-bottom: 1px solid var(--border); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
}

.header-flex { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; gap: 30px; }

.site-logo { font-size: 28px; font-weight: 900; color: var(--accent); display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 34px; animation: glow 3s infinite alternate; }

.ts-search {
    display: flex; align-items: center; width: 100%; max-width: 450px; height: 50px;
    background: #f0f2f5; border-radius: var(--radius-full); padding: 5px; position: relative;
    border: 1.5px solid transparent; transition: var(--transition-slow);
}

.ts-search:focus-within { background: #fff; border-color: var(--primary); box-shadow: var(--shadow-bold); }
.ts-search-input { flex: 1; border: none; outline: none; background: transparent; padding: 0 15px 0 50px; font-size: 16px; width: 100%; }
.ts-search-icon { position: absolute; left: 20px; color: var(--text-muted); font-size: 18px; }
.ts-search-btn { height: 40px; padding: 0 28px; border: none; border-radius: var(--radius-full); background: linear-gradient(135deg, #6aa61b, var(--primary)); color: #fff; font-weight: 800; cursor: pointer; transition: var(--transition-fast); }
.ts-search-btn:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(75,122,13,0.3); }

/* =========================================
   6. ARTICLE & POST ELEMENTS
========================================= */
.entry-content p { margin-bottom: 1.8em; }
.entry-content ul, .entry-content ol { margin-bottom: 1.8em; padding-left: 30px; }
.entry-content li { margin-bottom: 10px; }

.updated-badge { animation: pulse-red 2s infinite; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4); } 70% { box-shadow: 0 0 0 12px rgba(211, 47, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); } }

.wtechni-toc-box { background: #fdfdfd; border: 1.5px solid #ececec; padding: 30px; border-radius: var(--radius-md); margin: 40px 0; }
.fact-check-box { background: #f0f9f2; border-left: 6px solid var(--primary); padding: 25px; border-radius: 10px; margin: 50px 0; box-shadow: var(--shadow-soft); }

/* =========================================
   7. POST GRID DESIGN
========================================= */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 35px; }
.post-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); transition: var(--transition-slow); display: flex; flex-direction: column; height: 100%; }
.post-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-bold); border-color: var(--primary); }
.post-thumb { position: relative; overflow: hidden; height: 210px; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.post-card:hover .post-thumb img { transform: scale(1.1); }
.post-info { padding: 25px; flex-grow: 1; }
.post-info h3 { font-size: 20px; margin: 0 0 12px; }

/* =========================================
   8. THREADED COMMENTS (FB STYLE)
========================================= */
.comments-area { margin-top: 60px; padding-top: 40px; border-top: 2px solid #f0f2f5; }
.comment-list { padding: 0; list-style: none; }
.comment-list .children { list-style: none; margin-left: 60px; border-left: 2px solid #f0f2f5; padding-left: 25px; }
.comment-body { display: flex; gap: 18px; margin-bottom: 30px; transition: var(--transition-fast); }
.comment-avatar img { border-radius: 50%; border: 2px solid #fff; box-shadow: var(--shadow-soft); }
.comment-content { background: #f0f2f5; padding: 18px 25px; border-radius: 22px; flex: 1; position: relative; }
.comment-author { font-weight: 800; color: #1c1e21; font-size: 15px; margin-bottom: 5px; display: block; }

/* =========================================
   9. TABLES & TECHNICAL CODE
========================================= */


table { width: 100%; border-collapse: collapse; margin: 30px 0; font-size: 16px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-soft); }
th, td { padding: 15px 20px; border: 1px solid #f0f2f5; }
th { background: var(--primary); color: #fff; font-weight: 800; text-transform: uppercase; }
tr:nth-child(even) { background: #f9f9f9; }

pre, code { background: #282c34; color: #abb2bf; padding: 20px; border-radius: 12px; overflow-x: auto; font-family: 'Fira Code', 'Courier New', monospace; font-size: 14px; line-height: 1.6; border-left: 5px solid var(--primary); }

/* =========================================
   10. WIDGETS & PAGINATION (NON-STICKY)
========================================= */
.widget { background: #fff; padding: 30px; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 35px; box-shadow: var(--shadow-soft); }
.widget-title { color: var(--text-dark); font-size: 20px; font-weight: 900; border-bottom: 3.5px solid var(--primary); padding-bottom: 12px; margin-bottom: 25px; display: block; position: relative; }
.widget-title::after { content: ''; position: absolute; width: 40px; height: 3.5px; background: var(--accent); bottom: -3.5px; left: 0; }

.pagination { display: flex; justify-content: center; gap: 12px; margin: 60px 0; }
.page-numbers { padding: 12px 22px; background: #fff; border: 1px solid var(--border); border-radius: 8px; font-weight: 800; color: var(--text-dark); transition: var(--transition-fast); }
.page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-numbers:hover:not(.current) { transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: var(--primary); }

/* =========================================
   11. NEWSLETTER & FOOTER
========================================= */
.wtechni-newsletter { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); padding: 50px; border-radius: 20px; color: #fff; text-align: center; box-shadow: 0 15px 40px rgba(75, 122, 13, 0.25); }
.site-footer { background: #fff; padding: 80px 0 40px; border-top: 1.5px solid var(--border); }

/* =========================================
   12. DARK MODE & RESPONSIVE
========================================= */
body.dark-mode { background-color: #0f0f0f; color: #d1d1d1; }
body.dark-mode .content-area, body.dark-mode .widget, body.dark-mode .site-header, body.dark-mode .post-card { background: #1a1a1a; border-color: #333; color: #fff; }
body.dark-mode .ts-search { background: #222; }
body.dark-mode .ts-search-input { color: #fff; }
body.dark-mode blockquote { background: #222; color: #ccc; }

@media (max-width: 1100px) { .sidebar { min-width: 300px; } }
@media (max-width: 992px) { 
    .main-layout { flex-direction: column; } 
    .sidebar { width: 100%; position: static; margin-top: 50px; } 
    .header-flex { flex-direction: column; padding: 20px; }
}
@media (max-width: 768px) {
    .content-area { padding: 30px 20px; }
    .post-grid { grid-template-columns: 1fr; }
    .comment-list .children { margin-left: 20px; }
    .ts-search { max-width: 100%; }
}

/* Back to Top & Mobile Nav */
#backToTop { transition: var(--transition-slow); }
#backToTop:hover { transform: scale(1.1) rotate(10deg); background: var(--accent) !important; }

.m-nav-item:active { transform: scale(0.9); }
.trending-ticker-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #e0e2e7;
    height: 45px;
    overflow: hidden;
    font-family: 'Hind', sans-serif;
    z-index: 99;
}

.ticker-label {
    background: #4b7a0d;
    color: #fff;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-track {
    display: flex;
    white-space: nowrap;
    animation: ticker-swipe 30s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.ticker-item {
    color: #1c1e21;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 0 40px;
    transition: 0.3s;
}

.ticker-item:hover {
    color: #4b7a0d;
}

@keyframes ticker-swipe {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Dark Mode Support */
body.dark-mode .trending-ticker-wrapper { background: #1a1a1a; border-color: #333; }
body.dark-mode .ticker-item { color: #e0e0e0; }
/* Sidebar Sticky Logic for Techsesamjho */
@media (min-width: 992px) {
    /* मान लीजिए आपकी साइडबार की क्लास .sidebar-main है */
    .sidebar-main {
        height: 100%;
    }

    /* साइडबार का आखिरी विजेट स्टिकी रहेगा */
    .sidebar-main .widget:last-child {
        position: -webkit-sticky;
        position: sticky;
        top: 90px; /* Header से दूरी - इसे अपने हेडर के हिसाब से एडजस्ट करें */
        z-index: 10;
    }
}