/*
Theme Name: Jastun Theme
Theme URI: https://jastun.theme/
Author: Jastun Theme
Author URI: https://jastun.theme/
Description: A clean, modern, and AdSense-friendly WordPress theme for bloggers and content creators. Features a professional design with optimized ad placements, fast loading, and mobile-first responsive layout.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
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: jastun-theme
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, adsense-ready

Jastun Theme - AdSense Friendly Blog Theme
*/

/* ========================================
   CSS Variables (Design System)
   ======================================== */
:root {
    /* Colors (Based on viewjankari.in) */
    --primary-color: #0073aa;
    /* Finance Blue */
    --primary-dark: #005580;
    /* Darker Blue for hover */
    --secondary-color: #0f172a;
    /* Dark Slate */
    --text-color: #334155;
    /* Slate */
    --text-light: #64748b;
    /* Lighter Slate */
    --text-muted: #94a3b8;
    /* Muted */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    /* Light Gray Background */
    --bg-dark: #0f172a;
    /* Dark Slate Background */
    --border-color: #e2e8f0;
    /* Soft Border */
    --button-gradient: linear-gradient(135deg, #0073aa 0%, #005580 100%);

    /* Category Colors */
    --cat-facebook: #1877f2;
    --cat-instagram: #e4405f;
    --cat-youtube: #ff0000;
    --cat-twitter: #1da1f2;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
    /* Smoother shadow */
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
    /* Floating shadow */
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-btn: 0 4px 15px rgba(0, 115, 170, 0.3);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;

    /* Layout */
    --container-width: 1200px;
    --sidebar-width: 320px;
    --header-height: 60px;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--secondary-color);
}

/* Base Headings mapped to viewjankari */
.entry-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--secondary-color);
    border-left: 5px solid var(--primary-color);
    padding: 8px 15px;
    background: linear-gradient(to right, #f8fafc, transparent);
    border-radius: 0 8px 8px 0;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.entry-content h3 {
    font-size: 20px;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 5px;
    display: inline-block;
    margin-top: 1.2em;
    margin-bottom: 0.8em;
}

/* ========================================
   Buttons & Inputs
   ======================================== */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
a.read-more,
.wp-block-button__link {
    display: inline-block;
    background: var(--button-gradient);
    color: var(--bg-white) !important;
    padding: 12px 24px;
    border-radius: 50px !important;
    font-weight: 600;
    font-size: var(--font-size-base);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: var(--transition-base);
    text-align: center;
    text-decoration: none;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
a.read-more:hover,
.wp-block-button__link:hover {
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
    transform: scale(1.03);
    color: var(--bg-white);
}

/* Override Global Button Styles for Header Toggles */
.menu-toggle,
.search-toggle {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text-color) !important;
    padding: var(--spacing-sm);
}

.menu-toggle:hover,
.search-toggle:hover {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--primary-color) !important;
    transform: none !important;
}

/* Back to Top Button Override */
.back-to-top {
    background: var(--primary-color) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4) !important;
    padding: 0 !important;
}

.back-to-top:hover {
    background: var(--primary-dark) !important;
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.5) !important;
    transform: translateY(-2px) !important;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea {
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--bg-white);
    max-width: 100%;
}

/* ========================================
   Layout & Container
   ======================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.site-main {
    display: flex;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

/* ========================================
   Header Styles
   ======================================== */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.3, 0.7, 0.1, 1), box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.site-header.header-hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Header Left (Search on Mobile) - Hidden on desktop */
.header-left {
    display: none;
    align-items: center;
}

/* Header Center (Logo) */
.header-center {
    display: flex;
    align-items: center;
}

/* Header Right (Search Toggle) - Visible on desktop */
.header-right {
    display: flex;
    align-items: center;
}

.site-logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
}

.site-logo img {
    max-height: 40px;
    width: auto;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

/* Hide mobile-only elements on desktop */
.mobile-menu-header {
    display: none;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-menu li a {
    color: var(--text-color);
    font-weight: 500;
    font-size: var(--font-size-sm);
    padding: var(--spacing-sm) 0;
    position: relative;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
    color: var(--primary-color);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-base);
}

.nav-menu li a:hover::after,
.nav-menu li.current-menu-item a::after {
    width: 100%;
}

/* Search Toggle */
.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    color: var(--text-color);
    font-size: var(--font-size-lg);
}

/* Search Toggle in Header Left - Hidden on Desktop, Visible on Mobile */
.header-left .search-toggle {
    display: none;
}

/* Header Actions Container */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Notification Toggle (Red Dot) */
.notification-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    display: none;
    /* Hidden on desktop, shown on mobile */
    align-items: center;
    justify-content: center;
}

.notification-dot {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    border: 2px solid #e53935;
    background: transparent;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    flex-direction: column;
    gap: 4px;
}

.menu-toggle span:not(.screen-reader-text) {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition-base);
}

/* ========================================
   Ad Zone Styles
   ======================================== */
.ad-zone {
    background: var(--bg-light);
    border: 1px dashed var(--border-color);
    padding: var(--spacing-md);
    text-align: center;
    margin: var(--spacing-lg) 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-zone-label {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.ad-zone-header {
    margin-bottom: var(--spacing-md);
}

.ad-zone-sidebar {
    margin-bottom: var(--spacing-lg);
}

.ad-zone-content {
    margin: var(--spacing-xl) 0;
}

/* ========================================
   Post Card Styles
   ======================================== */
.post-card {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    margin-bottom: var(--spacing-lg);
    transition: all 0.3s ease;
}

.post-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.post-card:last-child {
    margin-bottom: 0;
}

.post-thumbnail {
    width: 280px;
    height: 180px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Category Badge */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
}

.category-badge.facebook {
    color: var(--cat-facebook);
}

.category-badge.instagram {
    color: var(--cat-instagram);
}

.category-badge.youtube {
    color: var(--cat-youtube);
}

.category-badge.twitter {
    color: var(--cat-twitter);
}

.category-badge.default {
    color: var(--primary-color);
}

.category-badge svg {
    width: 12px;
    height: 12px;
}

/* Post Title */
.post-card .entry-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.post-card .entry-title a {
    color: var(--secondary-color);
}

.post-card .entry-title a:hover {
    color: var(--primary-color);
}

/* Post Excerpt */
.post-excerpt {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    flex: 1;
}

/* Post Meta */
.post-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.post-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    color: var(--primary-color);
    font-weight: 500;
}

.verified-badge {
    color: var(--cat-twitter);
}

/* ========================================
   Sidebar Widgets
   ======================================== */
.widget {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.widget-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

/* Follow Us Widget */
.follow-us-widget .social-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 50px;
    color: var(--bg-white);
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: opacity var(--transition-fast);
    text-decoration: none;
}

.social-btn:hover {
    opacity: 0.9;
    color: var(--bg-white);
    transform: none;
    box-shadow: none;
}

.social-btn.facebook {
    background: var(--cat-facebook);
}

.social-btn.twitter {
    background: #1da1f2;
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-btn.youtube {
    background: var(--cat-youtube);
}

.social-btn.whatsapp {
    background: #25d366;
}

/* Recent Posts Widget */
.recent-posts-widget .recent-post {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.recent-posts-widget .recent-post:last-child {
    border-bottom: none;
}

.recent-post-thumb {
    width: 70px;
    height: 50px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-content {
    flex: 1;
}

.recent-post-title {
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}

.recent-post-title a {
    color: var(--text-color);
}

.recent-post-title a:hover {
    color: var(--primary-color);
}

.recent-post-date {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* Tag Cloud Widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.tag-link {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    color: var(--text-color);
    transition: all var(--transition-fast);
}

.tag-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
}

/* ========================================
   Category Archive Header
   ======================================== */
.category-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
}

.category-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--primary-color);
    color: var(--bg-white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.category-back-link:hover {
    background: var(--primary-dark);
    color: var(--bg-white);
}

.category-line {
    flex: 1;
    height: 1px;
    border-bottom: 2px dotted var(--border-color);
}

/* ========================================
   Single Post Styles
   ======================================== */
.single-post-header {
    margin-bottom: var(--spacing-xl);
}

.single-post-header .category-badge {
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-md);
}

.single-post-header .entry-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
}

.single-post-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.single-post-meta .post-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.single-post-meta .author-avatar {
    width: 40px;
    height: 40px;
}

.share-buttons {
    display: flex;
    gap: var(--spacing-sm);
    margin-left: auto;
}

.share-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--bg-white);
    font-size: var(--font-size-sm);
}

.share-btn.facebook {
    background: var(--cat-facebook);
}

.share-btn.twitter {
    background: #000000;
}

.share-btn.whatsapp {
    background: #25d366;
}

/* Featured Image */
.single-featured-image {
    margin-bottom: var(--spacing-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.single-featured-image img {
    width: 100%;
    height: auto;
}

/* Post Content */
.single-post-content {
    font-size: var(--font-size-lg);
    line-height: 1.8;
}

.single-post-content h2 {
    font-size: var(--font-size-2xl);
    margin: var(--spacing-xl) 0 var(--spacing-md);
}

.single-post-content h3 {
    font-size: var(--font-size-xl);
    margin: var(--spacing-lg) 0 var(--spacing-md);
}

.single-post-content p {
    margin-bottom: var(--spacing-md);
}

.single-post-content ul,
.single-post-content ol {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-xl);
}

.single-post-content ul {
    list-style: disc;
}

.single-post-content ol {
    list-style: decimal;
}

.single-post-content li {
    margin-bottom: var(--spacing-sm);
}

/* Table of Contents */
.toc-box {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xl);
    background: var(--bg-white);
    overflow: hidden;
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-white);
}

.toc-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary-color);
}

.toc-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    transition: background 0.2s ease;
}

.toc-toggle:hover {
    background: var(--bg-light);
}

.toc-arrow {
    transition: transform 0.3s ease;
}

.toc-toggle.collapsed .toc-arrow {
    transform: rotate(180deg);
}

.toc-list {
    list-style: decimal;
    padding: 16px 20px 16px 40px;
    margin: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    max-height: 600px;
    opacity: 1;
    overflow: hidden;
}

.toc-list.toc-collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.toc-list li {
    padding: 4px 0;
    font-size: 14px;
    line-height: 1.6;
}

.toc-list li a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-list li a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.toc-list li.toc-sub {
    margin-left: 20px;
    list-style-type: lower-alpha;
}

/* Social Share Bar - Circular Icons */
.post-share-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: var(--spacing-lg) 0;
    margin: var(--spacing-xl) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.share-circle {
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none !important;
    padding: 0 !important;
    text-decoration: none;
}

.share-circle:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.share-circle.facebook {
    background: #1877f2 !important;
}

.share-circle.twitter {
    background: #000000 !important;
}

.share-circle.whatsapp {
    background: #25d366 !important;
}

.share-circle.telegram {
    background: #0088cc !important;
}

.share-circle.share-more {
    background: #ff6b35 !important;
}

/* Author Box */
.author-box {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    display: flex;
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
    align-items: center;
}

.author-box-avatar {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.author-box-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-box-content h4 {
    color: var(--secondary-color);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xs);
}

.author-box-content p {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin: 0;
}

/* Related Posts */
.related-posts {
    background: var(--bg-white);
    padding: var(--spacing-xl) 0;
    margin: var(--spacing-xl) 0;
}

.related-posts-title {
    color: var(--secondary-color);
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-posts-title svg {
    color: var(--primary-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.related-post-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.related-post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.related-post-thumb {
    height: 180px;
    overflow: hidden;
    display: block;
    position: relative;
}

.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-post-card:hover .related-post-thumb img {
    transform: scale(1.05);
}

/* Category badge overlay on related post image */
.related-cat-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    text-transform: capitalize;
    backdrop-filter: blur(4px);
}

.related-post-content {
    padding: var(--spacing-md);
}

.related-post-content h5 {
    font-size: var(--font-size-base);
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.related-post-content h5 a {
    color: var(--secondary-color);
    text-decoration: none;
}

.related-post-content h5 a:hover {
    color: var(--primary-color);
}

.related-post-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* ========================================
   Comments Section
   ======================================== */
.comments-area {
    margin-top: var(--spacing-2xl);
}

.comments-title,
.comment-reply-title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
    background: #e53935;
    color: #ffffff;
    padding: 12px var(--spacing-lg);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: block;
    font-weight: 600;
}

.comment-form {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: var(--spacing-xl);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border-top: none;
}

.comment-form label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--text-color);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--bg-white);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.comment-form-cookies-consent input {
    margin-top: 4px;
}

.form-submit .submit {
    background: #e53935 !important;
    color: #ffffff !important;
    border: none;
    padding: 12px var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
    box-shadow: none !important;
}

.form-submit .submit:hover {
    background: #c62828 !important;
    transform: none !important;
}

/* ========================================
   Footer Styles
   ======================================== */
.site-footer {
    background: #1e293b;
    /* Dark blue background */
    color: #cbd5e1;
    /* slate-300 */
    padding: 60px 0 0;
    margin-top: var(--spacing-2xl);
    font-family: var(--font-primary);
}

.footer-widgets {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

/* Column 1 - Brand */
.footer-brand .footer-logo {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.footer-brand .footer-description {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 90%;
}

.footer-social-simple {
    display: flex;
    gap: 20px;
}

.footer-social-simple a {
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-social-simple a:hover {
    color: #38bdf8;
    transform: translateY(-2px);
}

/* Nav Columns (Categories & Links) */
.footer-nav-column h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
}

.footer-nav-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-nav-column ul li a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-nav-column ul li a:hover {
    color: #ffffff;
}

.footer-category-list li:first-child a {
    color: #ffffff;
    font-weight: 700;
}

.footer-bottom {
    background: #0f172a;
    text-align: center;
    padding: var(--spacing-md) 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl) 0;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
}

.pagination .next,
.pagination .prev {
    width: auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
   404 Page
   ======================================== */
.error-404 {
    text-align: center;
    padding: var(--spacing-2xl) 0;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.error-404 h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
}

.error-404 p {
    color: var(--text-light);
    margin-bottom: var(--spacing-xl);
}

.error-404 .search-form {
    max-width: 400px;
    margin: 0 auto;
}

/* ========================================
   Search Form
   ======================================== */
.search-form {
    display: flex;
    gap: 0;
}

.search-form .search-field {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-right: none;
    font-size: var(--font-size-base);
}

.search-form .search-submit {
    background: #e60000 !important;
    /* Red search button matching viewjankari */
    color: var(--bg-white) !important;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: background var(--transition-fast);
}

.search-form .search-submit:hover {
    background: #cc0000 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .footer-widgets {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    /* Mobile Header: Search (left) | Logo (center) | Menu (right) */
    .header-inner {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .header-left {
        display: flex !important;
        justify-content: flex-start;
    }

    .header-center {
        justify-content: center;
    }

    .header-right {
        display: flex !important;
        justify-content: flex-end;
    }

    .menu-toggle {
        display: flex !important;
    }

    /* ---- Mobile Menu Overlay ---- */
    .main-navigation {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 80px var(--spacing-xl) var(--spacing-xl);
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-y: auto;
        z-index: 9999;
        flex-direction: column;
    }

    .main-navigation.active {
        display: flex;
        transform: translateX(0);
    }

    /* Nav Menu Items */
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu li a {
        color: #e2e8f0 !important;
        font-size: 1.1rem;
        font-weight: 500;
        padding: 16px 12px;
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        transition: all 0.25s ease;
        border-radius: var(--radius-md);
        position: relative;
    }

    .nav-menu li a::before {
        content: '';
        width: 4px;
        height: 0;
        background: var(--primary-color);
        border-radius: var(--radius-full);
        transition: height 0.25s ease;
        flex-shrink: 0;
    }

    .nav-menu li a:hover,
    .nav-menu li a:active,
    .nav-menu li.current-menu-item a {
        color: #38bdf8 !important;
        background: rgba(56, 189, 248, 0.08);
        padding-left: 18px;
    }

    .nav-menu li a:hover::before,
    .nav-menu li a:active::before,
    .nav-menu li.current-menu-item a::before {
        height: 24px;
    }

    /* Mobile Menu Header */
    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-bottom: var(--spacing-xl);
        padding-bottom: var(--spacing-md);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-logo {
        color: #ffffff !important;
        font-size: var(--font-size-xl);
        font-weight: 700;
        text-decoration: none;
    }

    .menu-close {
        background: transparent !important;
        border: none;
        color: #94a3b8 !important;
        cursor: pointer;
        padding: 8px !important;
        border-radius: var(--radius-full);
        box-shadow: none !important;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .menu-close:hover {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.1) !important;
        transform: none !important;
        box-shadow: none !important;
    }

    .site-main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .post-card {
        flex-direction: column;
        padding: var(--spacing-sm);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        background: var(--bg-white);
        margin-bottom: var(--spacing-md);
        gap: var(--spacing-sm);
        transition: all 0.3s ease;
    }

    .post-card:active,
    .post-card:hover {
        border-color: var(--primary-color);
        box-shadow: 0 4px 15px rgba(0, 115, 170, 0.15);
        transform: translateY(-2px);
    }

    .post-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        border-radius: var(--radius-sm);
        border: none;
        overflow: hidden;
    }

    .post-thumbnail img {
        border-radius: var(--radius-sm);
    }

    .post-card:active .post-thumbnail img,
    .post-card:hover .post-thumbnail img {
        transform: scale(1.03);
    }

    .post-card .category-badge,
    .post-card .post-excerpt {
        display: none;
    }

    .post-card .entry-title {
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-xs);
        line-height: 1.3;
    }

    .post-meta {
        font-size: 13px;
        gap: var(--spacing-xs) var(--spacing-sm);
    }

    .single-post-header .entry-title {
        font-size: var(--font-size-2xl);
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .single-post-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-buttons {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .post-card {
        padding: var(--spacing-md) 0;
    }

    .widget {
        padding: var(--spacing-md);
    }
}

/* ========================================
   Accessibility
   ======================================== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--bg-light);
    clip: auto !important;
    clip-path: none;
    color: var(--text-color);
    display: block;
    font-size: var(--font-size-base);
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: var(--spacing-md);
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip Link */
.skip-link {
    position: fixed;
    top: -100%;
    left: 0;
    background: var(--primary-color);
    color: var(--bg-white);
    padding: var(--spacing-sm) var(--spacing-md);
    z-index: 100000;
    transition: top var(--transition-base);
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   Scroll Animations
   ======================================== */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.reveal-element.animate-up {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure hover/active still works after scroll animation */
.reveal-element.animate-up.post-card:hover,
.reveal-element.animate-up.post-card:active {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 115, 170, 0.2);
    transform: translateY(-4px);
}

.reveal-element.animate-up.post-card:hover .post-thumbnail img,
.reveal-element.animate-up.post-card:active .post-thumbnail img {
    transform: scale(1.05);
}

/* ========================================
   Dark Mode Support (viewjankari inspired)
   ======================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e2e8f0;
        --secondary-color: #ffffff;
        --text-light: #94a3b8;
        --text-muted: #64748b;

        --bg-white: #1e293b;
        --bg-light: #0f172a;
        --bg-dark: #020617;

        --border-color: #334155;

        --primary-color: #38bdf8;
        --primary-dark: #7dd3fc;

        --button-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    }

    body {
        background-color: var(--bg-light);
    }

    .widget,
    .post-card,
    .main-navigation,
    .site-header {
        background-color: var(--bg-white);
        border-color: var(--border-color);
    }

    img {
        opacity: 0.9;
        transition: opacity 0.3s ease;
    }

    img:hover {
        opacity: 1;
    }
}