/*
Theme Name: ThemeForge Pro Blog
Theme URI: https://themeforge.pro
Author: ThemeForge Team
Author URI: https://themeforge.pro
Description: ThemeForge Pro Blog is a professional, modern, and highly customizable WordPress blog theme. Features hero slider, post grid, dark mode toggle, reading progress bar, sidebar widgets, newsletter box, and full Gutenberg support.
Version: 1.0.0
Requires at least: 5.8
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: themeforge-pro
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles
*/

:root {
    --tf-primary: #0a2540;
    --tf-accent: #ff6b35;
    --tf-accent-hover: #e85a26;
    --tf-secondary: #2d7dd2;
    --tf-dark: #0f1720;
    --tf-light: #f7f9fc;
    --tf-text: #1a202c;
    --tf-muted: #64748b;
    --tf-border: #e2e8f0;
    --tf-white: #ffffff;
    --tf-font-heading: 'Playfair Display', Georgia, serif;
    --tf-font-body: 'Inter', -apple-system, sans-serif;
    --tf-radius: 12px;
    --tf-shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
    --tf-shadow-lg: 0 12px 40px rgba(10, 37, 64, 0.12);
    --tf-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.tf-dark-mode {
    --tf-text: #e2e8f0;
    --tf-muted: #94a3b8;
    --tf-border: #1e293b;
    --tf-white: #0f1720;
    --tf-light: #1a2332;
    --tf-dark: #f7f9fc;
    background: #0a1520;
    color: #e2e8f0;
}
body.tf-dark-mode h1, body.tf-dark-mode h2, body.tf-dark-mode h3,
body.tf-dark-mode h4, body.tf-dark-mode h5 { color: #f1f5f9; }
body.tf-dark-mode .tf-header { background: #0f1720; border-color: #1e293b; }
body.tf-dark-mode .tf-post-card { background: #1a2332; }
body.tf-dark-mode .tf-widget { border-color: #1e293b; }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--tf-font-body);
    color: var(--tf-text);
    background: var(--tf-white);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: var(--tf-transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tf-font-heading);
    color: var(--tf-dark);
    font-weight: 700;
    line-height: 1.25;
}

.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.tf-progress-bar {
    position: fixed; top: 0; left: 0; height: 3px;
    background: linear-gradient(90deg, var(--tf-accent), var(--tf-secondary));
    width: 0%; z-index: 9999; transition: width 0.1s;
}

.tf-topbar { background: var(--tf-dark); color: #cbd5e1; font-size: 13px; padding: 10px 0; }
.tf-topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.tf-topbar-tagline { font-weight: 500; letter-spacing: 0.3px; }
.tf-topbar-social { display: flex; gap: 16px; align-items: center; }
.tf-topbar-social a { color: #cbd5e1; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.tf-topbar-social a:hover { background: var(--tf-accent); color: var(--tf-white); }
.tf-topbar-social svg { width: 14px; height: 14px; fill: currentColor; }

.tf-header { background: var(--tf-white); border-bottom: 1px solid var(--tf-border); position: sticky; top: 0; z-index: 999; transition: var(--tf-transition); }
.tf-header.tf-scrolled { box-shadow: var(--tf-shadow); }
.tf-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; gap: 30px; }
.tf-logo a { display: flex; align-items: center; gap: 12px; }
.tf-logo-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--tf-primary), var(--tf-secondary));
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: var(--tf-white); font-weight: 800; font-size: 20px; font-family: var(--tf-font-heading);
}
.tf-logo-text { font-family: var(--tf-font-heading); font-size: 24px; font-weight: 700; color: var(--tf-primary); line-height: 1.1; }
.tf-logo-tagline { font-size: 10px; color: var(--tf-muted); letter-spacing: 1.2px; text-transform: uppercase; font-weight: 500; margin-top: 2px; }

.tf-nav ul { display: flex; gap: 34px; align-items: center; }
.tf-nav ul li a { font-weight: 500; font-size: 15px; color: var(--tf-text); padding: 8px 0; position: relative; }
.tf-nav ul li a::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background: var(--tf-accent); transition: width 0.3s; }
.tf-nav ul li a:hover, .tf-nav ul li.current-menu-item a { color: var(--tf-accent); }
.tf-nav ul li a:hover::after, .tf-nav ul li.current-menu-item a::after { width: 100%; }
.tf-nav ul li.menu-item-has-children { position: relative; }
.tf-nav ul li.menu-item-has-children > a::before { content: '\25BE'; margin-left: 6px; font-size: 10px; }
.tf-nav ul li.menu-item-has-children ul.sub-menu {
    position: absolute; top: 100%; left: 0; background: var(--tf-white);
    box-shadow: var(--tf-shadow-lg); border-radius: 10px; padding: 12px 0;
    min-width: 200px; opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: var(--tf-transition); flex-direction: column; gap: 0; margin-top: 8px;
}
.tf-nav ul li.menu-item-has-children:hover ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.tf-nav ul li.menu-item-has-children ul.sub-menu li a { display: block; padding: 10px 20px; font-size: 14px; }
.tf-nav ul li.menu-item-has-children ul.sub-menu li a::after { display: none; }

.tf-header-actions { display: flex; align-items: center; gap: 8px; }
.tf-icon-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--tf-text); }
.tf-icon-btn:hover { background: var(--tf-light); color: var(--tf-accent); }
.tf-icon-btn svg { width: 18px; height: 18px; }
.tf-menu-toggle { display: none; }

.tf-main-layout { display: grid; grid-template-columns: 1fr 340px; gap: 50px; padding: 40px 24px 60px; max-width: 1300px; margin: 0 auto; }
.tf-content-area { min-width: 0; }

.tf-hero { position: relative; border-radius: var(--tf-radius); overflow: hidden; height: 520px; background-size: cover; background-position: center; display: flex; align-items: flex-end; color: var(--tf-white); margin-bottom: 50px; box-shadow: var(--tf-shadow-lg); }
.tf-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,37,64,0) 20%, rgba(10,37,64,0.9) 100%); z-index: 1; }
.tf-hero-content { position: relative; z-index: 2; padding: 50px; max-width: 640px; }
.tf-hero-cat { display: inline-block; font-size: 11px; letter-spacing: 2px; font-weight: 700; color: var(--tf-accent); background: rgba(255,107,53,0.15); padding: 6px 14px; border-radius: 20px; margin-bottom: 16px; text-transform: uppercase; }
.tf-hero h2 { color: var(--tf-white); font-size: 42px; margin-bottom: 16px; line-height: 1.15; }
.tf-hero p { color: #d1d5db; font-size: 16px; margin-bottom: 24px; }
.tf-hero-meta { display: flex; gap: 18px; align-items: center; font-size: 13px; color: #cbd5e1; margin-bottom: 26px; flex-wrap: wrap; }
.tf-hero-meta img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.3); }
.tf-hero-meta strong { color: var(--tf-white); font-weight: 600; }

.tf-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; background: var(--tf-accent); color: var(--tf-white); font-weight: 600; font-size: 14px; border-radius: 8px; }
.tf-btn:hover { background: var(--tf-accent-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,107,53,0.3); }
.tf-btn-outline { background: transparent; border: 1.5px solid var(--tf-white); color: var(--tf-white); }

.tf-hero-arrows { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; display: flex; justify-content: space-between; padding: 0 20px; z-index: 3; pointer-events: none; }
.tf-hero-arrows button { pointer-events: auto; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: var(--tf-white); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.tf-hero-arrows button:hover { background: var(--tf-accent); border-color: var(--tf-accent); transform: scale(1.1); }
.tf-hero-arrows svg { width: 18px; height: 18px; fill: currentColor; }

.tf-hero-dots { position: absolute; bottom: 24px; right: 30px; display: flex; gap: 8px; z-index: 3; }
.tf-hero-dots button { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.tf-hero-dots button.active { background: var(--tf-accent); width: 24px; border-radius: 5px; }

.tf-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; padding-bottom: 16px; border-bottom: 2px solid var(--tf-border); position: relative; }
.tf-section-head::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 70px; height: 2px; background: var(--tf-accent); }
.tf-section-head h3 { font-size: 26px; display: flex; align-items: center; gap: 12px; }
.tf-section-head h3::before { content: ''; width: 4px; height: 22px; background: var(--tf-accent); border-radius: 2px; }
.tf-section-head a { color: var(--tf-accent); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.tf-section-head a:hover { gap: 10px; }

.tf-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; margin-bottom: 50px; }
.tf-post-card { background: var(--tf-white); border-radius: var(--tf-radius); overflow: hidden; display: flex; flex-direction: column; }
.tf-post-card:hover { transform: translateY(-6px); box-shadow: var(--tf-shadow-lg); }
.tf-post-thumb { border-radius: var(--tf-radius); overflow: hidden; aspect-ratio: 16/10; background: var(--tf-light); display: block; }
.tf-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1); }
.tf-post-card:hover .tf-post-thumb img { transform: scale(1.08); }

.tf-post-body { padding: 20px 4px 0; }
.tf-post-cat { display: inline-block; font-size: 11px; font-weight: 700; color: var(--tf-accent); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 10px; }
.tf-post-card h4 { font-size: 19px; margin-bottom: 10px; line-height: 1.35; min-height: 51px; }
.tf-post-card h4 a:hover { color: var(--tf-accent); }
.tf-post-excerpt { font-size: 14px; color: var(--tf-muted); margin-bottom: 18px; line-height: 1.6; }
.tf-post-meta { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--tf-border); font-size: 12px; color: var(--tf-muted); margin-top: auto; }
.tf-post-meta img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.tf-meta-info { display: flex; flex-direction: column; line-height: 1.4; }
.tf-author-name { color: var(--tf-text); font-weight: 600; font-size: 12px; }
.tf-post-date { font-size: 11px; }

.tf-sidebar { padding-top: 4px; }
.tf-widget { margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--tf-border); }
.tf-widget:last-child { border-bottom: none; }
.tf-widget-title { font-size: 18px; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 2px solid var(--tf-border); font-family: var(--tf-font-heading); position: relative; }
.tf-widget-title::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 40px; height: 2px; background: var(--tf-accent); }

.tf-about-widget { text-align: center; padding: 20px; background: var(--tf-light); border-radius: var(--tf-radius); }
.tf-about-widget img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 3px solid var(--tf-white); box-shadow: var(--tf-shadow); }
.tf-about-widget h5 { font-size: 17px; margin-bottom: 8px; font-family: var(--tf-font-body); font-weight: 700; }
.tf-about-widget p { font-size: 13.5px; color: var(--tf-muted); margin-bottom: 16px; line-height: 1.6; }

.tf-recent-item { display: flex; gap: 14px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--tf-border); }
.tf-recent-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.tf-recent-item img { width: 78px; height: 66px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.tf-recent-item .tf-r-title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; display: block; color: var(--tf-text); }
.tf-recent-item .tf-r-title:hover { color: var(--tf-accent); }
.tf-recent-item .tf-r-date { font-size: 11.5px; color: var(--tf-muted); }

.tf-cat-list li { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--tf-border); font-size: 14px; }
.tf-cat-list li:last-child { border-bottom: none; }
.tf-cat-list li a { color: var(--tf-text); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.tf-cat-list li a:hover { color: var(--tf-accent); }
.tf-cat-list li span { color: var(--tf-muted); font-size: 12px; background: var(--tf-light); padding: 3px 10px; border-radius: 12px; font-weight: 600; }

.tf-newsletter { text-align: center; }
.tf-newsletter p { font-size: 13.5px; color: var(--tf-muted); margin-bottom: 16px; }
.tf-newsletter input { width: 100%; padding: 13px 16px; border: 1.5px solid var(--tf-border); border-radius: 8px; font-size: 14px; margin-bottom: 12px; background: var(--tf-white); color: var(--tf-text); }
.tf-newsletter input:focus { outline: none; border-color: var(--tf-accent); box-shadow: 0 0 0 3px rgba(255,107,53,0.1); }
.tf-newsletter button { width: 100%; background: var(--tf-primary); color: var(--tf-white); padding: 13px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.tf-newsletter button:hover { background: var(--tf-accent); }

.tf-single-header { text-align: center; padding: 40px 0; border-bottom: 1px solid var(--tf-border); margin-bottom: 40px; }
.tf-single-header h1 { font-size: 42px; margin-bottom: 20px; max-width: 800px; margin-left: auto; margin-right: auto; }
.tf-single-meta { display: flex; justify-content: center; gap: 20px; font-size: 14px; color: var(--tf-muted); align-items: center; flex-wrap: wrap; }
.tf-single-meta img { width: 44px; height: 44px; border-radius: 50%; }
.tf-single-content { font-size: 17px; line-height: 1.85; }
.tf-single-content p { margin-bottom: 22px; }
.tf-single-content h2 { font-size: 28px; margin: 40px 0 20px; }
.tf-single-content h3 { font-size: 22px; margin: 32px 0 16px; }
.tf-single-content img { border-radius: var(--tf-radius); margin: 24px 0; }
.tf-single-content blockquote { border-left: 4px solid var(--tf-accent); padding: 20px 30px; background: var(--tf-light); border-radius: 0 12px 12px 0; margin: 30px 0; font-style: italic; font-size: 18px; }

.tf-footer { background: var(--tf-dark); color: #94a3b8; padding: 50px 0 24px; margin-top: 60px; }
.tf-footer-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 30px; border-bottom: 1px solid rgba(148,163,184,0.15); margin-bottom: 24px; flex-wrap: wrap; gap: 24px; }
.tf-footer-logo { display: flex; align-items: center; gap: 12px; }
.tf-footer-logo-text { font-family: var(--tf-font-heading); font-size: 24px; color: var(--tf-white); font-weight: 700; }
.tf-footer-nav { display: flex; gap: 30px; flex-wrap: wrap; }
.tf-footer-nav a { font-size: 14px; color: #94a3b8; }
.tf-footer-nav a:hover { color: var(--tf-accent); }
.tf-footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 13px; flex-wrap: wrap; gap: 16px; }
.tf-footer-social { display: flex; gap: 12px; }
.tf-footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(148,163,184,0.1); display: flex; align-items: center; justify-content: center; color: #94a3b8; }
.tf-footer-social a:hover { background: var(--tf-accent); color: var(--tf-white); transform: translateY(-3px); }
.tf-footer-social svg { width: 15px; height: 15px; fill: currentColor; }

.tf-back-top { position: fixed; bottom: 30px; right: 30px; width: 46px; height: 46px; border-radius: 50%; background: var(--tf-accent); color: var(--tf-white); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(255,107,53,0.4); opacity: 0; visibility: hidden; transform: translateY(20px); transition: var(--tf-transition); z-index: 998; }
.tf-back-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.tf-back-top:hover { background: var(--tf-primary); transform: translateY(-4px); }

.tf-pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; }
.tf-pagination .page-numbers { width: 42px; height: 42px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--tf-light); color: var(--tf-text); font-weight: 600; font-size: 14px; }
.tf-pagination .page-numbers:hover, .tf-pagination .page-numbers.current { background: var(--tf-accent); color: var(--tf-white); }

.tf-error-page { text-align: center; padding: 100px 20px; max-width: 600px; margin: 0 auto; }
.tf-error-code { font-size: 120px; font-family: var(--tf-font-heading); color: var(--tf-accent); line-height: 1; margin-bottom: 20px; }
.tf-error-page h2 { font-size: 32px; margin-bottom: 16px; }
.tf-error-page p { color: var(--tf-muted); margin-bottom: 30px; }

@media (max-width: 1100px) {
    .tf-main-layout { grid-template-columns: 1fr; gap: 40px; }
    .tf-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .tf-nav { position: fixed; top: 0; right: -100%; width: 300px; height: 100vh; background: var(--tf-white); padding: 100px 30px 30px; box-shadow: -10px 0 40px rgba(0,0,0,0.1); transition: right 0.4s; overflow-y: auto; z-index: 998; }
    .tf-nav.tf-open { right: 0; }
    .tf-nav ul { flex-direction: column; gap: 0; align-items: flex-start; }
    .tf-nav ul li { width: 100%; border-bottom: 1px solid var(--tf-border); }
    .tf-nav ul li a { padding: 16px 0; display: block; width: 100%; }
    .tf-nav ul li a::after { display: none; }
    .tf-menu-toggle { display: flex; }
    .tf-hero { height: 420px; }
    .tf-hero h2 { font-size: 30px; }
    .tf-hero-content { padding: 30px; }
}
@media (max-width: 640px) {
    .tf-posts-grid { grid-template-columns: 1fr; gap: 24px; }
    .tf-hero { height: 380px; }
    .tf-hero h2 { font-size: 24px; }
    .tf-section-head h3 { font-size: 20px; }
    .tf-footer-top { flex-direction: column; text-align: center; }
    .tf-footer-bottom { flex-direction: column; text-align: center; }
    .tf-topbar-tagline { display: none; }
    .tf-single-header h1 { font-size: 28px; }
    .tf-logo-text { font-size: 20px; }
    .container { padding: 0 18px; }
    .tf-main-layout { padding: 24px 18px 40px; }
}