/*
Theme Name: NewsMag
Theme URI: https://newsmag.example.com
Description: Premium Modern Magazine Theme for News & Magazines. Online Ready — works with any categories. Import demo content from Appearance > NewsMag.
Version: 8.6
Author: Ghulam Mohiudeen
Author URI: https://mohirdo.com/
Text Domain: newsmag
Tags: blog, news, magazine, custom-menu, featured-images, theme-options, translation-ready
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --title: #0f172a;
    --title-hover: #3b82f6;
    --text: #475569;
    --meta: #94a3b8;
    --body-bg: #f1f5f9;
    --outer-bg: #f8fafc;
    --card: #fff;
    --header-bg: #fff;
    --footer-bg: #1e293b;
    --footer-bar: #0f172a;
    --footer-text: #cbd5e1;
    --border: #e2e8f0;
    --shadow: 0 1px 2px rgba(15,23,42,.05);
    --shadow-md: 0 4px 12px rgba(15,23,42,.06);
    --shadow-lg: 0 8px 24px rgba(15,23,42,.08);
    --radius: 8px;
    --gap: 30px;
    --header-h: 62px;
    --font: 'Montserrat', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); font-size: 14px; color: var(--text); line-height: 1.5; background: var(--body-bg); }
.site-outer { display: flex; flex-direction: column; min-height: 100vh; }
.site-outer .content-wrap { flex: 1; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font); font-weight: 700; color: var(--title); line-height: 1.3; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container { position: relative; width: 970px; max-width: 100%; margin: 0 auto; padding: 0 20px; }

/* ===== BORDER TOP ===== */
.border-top { height: 5px; background: linear-gradient(45deg, #3b82f6, #d946ef); }

/* ===== HEADER ===== */
.site-header { background: var(--header-bg); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.header-items { display: flex; justify-content: space-between; align-items: center; height: var(--header-h); }
.flex-left { display: flex; align-items: center; gap: 28px; }
.flex-right { display: flex; align-items: center; gap: 2px; }
.main-logo { flex-shrink: 0; height: var(--header-h); display: flex; align-items: center; }
.main-logo .site-title-link,
.main-logo .custom-logo-link { font-size: 25px; font-weight: 700; color: var(--title); }
.main-logo .custom-logo-link img { max-height: 40px; }
.main-nav { display: flex; height: var(--header-h); }
.nav-list { display: flex; gap: 28px; align-items: stretch; height: 100%; margin: 0; padding: 0; }
.nav-list li { position: relative; display: flex; }
.nav-list li a { display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--title); height: 100%; line-height: 1; white-space: nowrap; transition: color .15s; }
.nav-list li a:hover,
.nav-list li.current-menu-item a { color: var(--title-hover); }
.nav-list li .sub-menu { display: none; position: absolute; top: calc(var(--header-h) - 8px); left: 0; background: var(--card); min-width: 180px; box-shadow: var(--shadow), 0 10px 15px -3px rgba(15,23,42,.05); border-radius: var(--radius); z-index: 999; padding: 8px 0; transform: translate3d(0,8px,0); opacity: 0; visibility: hidden; transition: all .17s ease; }
.nav-list li:hover > .sub-menu { transform: translate3d(0,0,0); opacity: 1; visibility: visible; }
.nav-list li .sub-menu li a { padding: 8px 16px; font-size: 14px; font-weight: 400; height: auto; line-height: 1.5; color: var(--title); justify-content: space-between; }
.nav-list li .sub-menu li a:hover { color: var(--title-hover); }
.search-toggle, .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; font-size: 18px; color: var(--title); border-radius: 50%; transition: color .15s; }
.search-toggle:hover, .mobile-menu-toggle:hover { color: var(--title-hover); }
.mobile-menu-toggle { display: none; font-size: 26px; }

/* ===== SEARCH MODAL ===== */
.search-on { display: none; position: fixed; inset: 0; z-index: 200; }
.search-on.active { display: flex; align-items: center; justify-content: center; }
.search-on .overlay-bg { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; }
.search-box { position: relative; z-index: 1; width: 520px; max-width: calc(100% - 40px); background: var(--card, #fff); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: searchFadeIn .25s ease; overflow: hidden; }
.search-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--meta, #94a3b8); border-radius: 50%; background: var(--body-bg, #f1f5f9); z-index: 2; transition: all .15s; }
.search-close:hover { color: var(--title, #0f172a); background: var(--border, #e2e8f0); }
.search-form { display: flex; height: 64px; padding: 8px; }
.search-input { flex: 1; padding: 0 20px; font-size: 16px; border: none; outline: none; font-family: var(--font, 'Montserrat', sans-serif); color: var(--title, #0f172a); background: var(--body-bg, #f1f5f9); border-radius: 8px; }
.search-input::placeholder { color: var(--meta, #94a3b8); }
.search-submit-btn { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0 8px 0 0; background: var(--accent, #3b82f6); color: #fff; border-radius: 8px; font-size: 18px; border: none; cursor: pointer; transition: background .15s; flex-shrink: 0; }
.search-submit-btn:hover { background: var(--accent-hover, #2563eb); }
@keyframes searchFadeIn { from { opacity: 0; transform: scale(.95) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ===== SLIDE MENU ===== */
.slide-menu { display: none; flex-direction: column; position: fixed; top: 0; left: 0; width: 300px; height: 100%; background: var(--header-bg); z-index: 300; transform: translate3d(-100%,0,0); transition: transform .25s ease; box-shadow: 0 0 15px rgba(15,23,42,.1); overflow-y: auto; }
.slide-menu.active { transform: translate3d(0,0,0); visibility: visible; }
.slide-menu-header { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding: 0 20px; border-bottom: 1px solid var(--border); }
.mobile-logo { font-size: 25px; font-weight: 700; color: var(--title); }
.hide-mobile-menu { font-size: 20px; color: var(--title); padding: 0 20px; }
.hide-mobile-menu:hover { color: var(--title-hover); }
.mobile-menu { padding: 20px; }
.mobile-menu .nav-list { flex-direction: column; gap: 0; }
.mobile-menu .nav-list li a { padding: 10px 0; height: auto; font-size: 14px; font-weight: 400; color: var(--title); border-bottom: none; }
.mobile-menu > .nav-list > li > a { font-weight: 700; text-transform: uppercase; }
.mobile-menu .nav-list li a:hover { color: var(--title-hover); }

/* ===== FEATURED SECTION ===== */
.featured-section { margin: var(--gap) 0; }
.featured-items { display: grid; grid-template-columns: 52% 1fr; align-items: start; gap: 25px; width: 100%; }
.cs-hero { position: relative; display: block; overflow: hidden; border-radius: var(--radius); height: 300px; box-shadow: var(--shadow); }
.cs-hero img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cs-hero:hover img { transform: scale(1.03); }
.cs-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.65) 0%, rgba(15,23,42,0) 100%); z-index: 2; }
.cs-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; z-index: 3; }
.cs-tag { display: inline-flex; align-items: center; max-width: fit-content; height: 20px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 0 8px; border-radius: var(--radius); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.cs-title { color: #fff; font-size: 20px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cs-meta { color: rgba(255,255,255,.8); font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 5px; }

.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.grid-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.grid-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.grid-thumb { display: block; height: 168px; overflow: hidden; }
.grid-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.grid-card:hover .grid-thumb img { transform: scale(1.05); }
.grid-info { padding: 20px; }
.grid-cat { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.grid-title { font-size: 16px; font-weight: 600; margin: 6px 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid-title a { color: var(--title); }
.grid-title a:hover { color: var(--title-hover); }
.grid-meta { font-size: 12px; color: var(--meta); display: flex; align-items: center; gap: 4px; }

/* ===== TRENDING BAR ===== */
.trending-bar { margin: var(--gap) 0 0; }
.trending-inner { display: flex; align-items: center; background: var(--card); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); gap: 15px; }
.trending-label { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--title); flex-shrink: 0; white-space: nowrap; }
.trending-label i { color: var(--accent); font-size: 16px; background: linear-gradient(45deg, #3b82f6, #d946ef); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ticker-wrap { display: flex; align-items: center; flex: 1; overflow: hidden; }
.ticker-items { position: relative; flex: 1; height: 20px; overflow: hidden; }
.ticker-item { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: translate3d(5px,0,0); transition: all .4s ease; }
.ticker-item.active { opacity: 1; visibility: visible; transform: translate3d(0,0,0); }
.ticker-item a { display: flex; align-items: center; height: 20px; font-size: 14px; color: var(--title); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker-item a:hover { color: var(--title-hover); }
.ticker-next { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; font-size: 16px; color: var(--title); flex-shrink: 0; transition: color .15s; }
.ticker-next:hover { color: var(--title-hover); }

/* ===== CONTENT LAYOUT ===== */
.content-wrap { position: relative; margin: var(--gap) 0 0; }
.content-flex { display: flex; gap: var(--gap); }
.main-wrap { position: relative; width: calc(100% - 330px); min-width: 0; }
.sidebar-wrap { position: relative; width: 300px; flex-shrink: 0; }
.sidebar-sticky { position: sticky; top: calc(var(--header-h) + var(--gap)); display: grid; grid-template-columns: 100%; gap: var(--gap); }

/* ===== BLOCK SECTIONS ===== */
.block-section { margin-bottom: var(--gap); }
.title-wrap { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.title-wrap .block-title { display: flex; align-items: center; font-size: 18px; font-weight: 700; line-height: 1; }
.view-all { display: flex; align-items: center; flex-shrink: 0; gap: 2px; font-size: 13px; color: var(--accent); font-weight: 500; }
.view-all::after { content: "\f138"; font-size: 12px; }
.view-all:hover { opacity: .9; }

.block-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 25px; }
.block-hero { border-radius: var(--radius); overflow: hidden; }
.hero-link { display: block; position: relative; height: 370px; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.hero-link:hover img { transform: scale(1.03); }
.hero-link .cs-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.65) 0%, rgba(15,23,42,0) 100%); z-index: 2; }
.hero-link .cs-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; z-index: 3; }

.block-list { display: flex; flex-direction: column; gap: 25px; }
.list-item { display: flex; gap: 14px; }
.list-thumb { flex-shrink: 0; width: 98px; height: 68px; border-radius: var(--radius); overflow: hidden; display: block; background: var(--border); }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.list-item:hover .list-thumb img { transform: scale(1.05); }
.list-info { flex: 1; min-width: 0; }
.list-title { font-size: 14px; font-weight: 600; line-height: 1.4; }
.list-title a { color: var(--title); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-title a:hover { color: var(--title-hover); }
.list-meta { font-size: 12px; color: var(--meta); display: flex; align-items: center; gap: 4px; margin-top: 4px; }

/* Layout B: Hero Full + 3-Column Grid */
.block-layout-col { display: flex; flex-direction: column; gap: 25px; }
.block-hero-full { border-radius: var(--radius); overflow: hidden; }
.block-hero-full .hero-link { height: 320px; }
.block-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }

/* Layout C: Image Left + Text Right Rows */
.list-row-item { display: flex; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid var(--border); }
.list-row-item:last-child { border-bottom: none; padding-bottom: 0; }
.list-row-thumb { flex-shrink: 0; width: calc(50% - 10px); height: 180px; border-radius: var(--radius); overflow: hidden; display: block; background: var(--border); }
.list-row-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.list-row-item:hover .list-row-thumb img { transform: scale(1.05); }
.list-row-info { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.list-row-title { font-size: 20px; font-weight: 700; line-height: 1.3; }
.list-row-title a { color: var(--title); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-row-title a:hover { color: var(--title-hover); }
.list-row-excerpt { font-size: 14px; color: var(--text); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.list-row-meta { font-size: 12px; color: var(--meta); display: flex; align-items: center; gap: 4px; }

/* Layout D: Cards Grid */
.block-grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.block-grid-cards .card-item { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.block-grid-cards .card-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-thumb { display: block; height: 160px; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.block-grid-cards .card-item:hover .card-thumb img { transform: scale(1.05); }
.card-info { padding: 16px 18px; }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.card-title a { color: var(--title); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a:hover { color: var(--title-hover); }
.card-meta { font-size: 12px; color: var(--meta); display: flex; align-items: center; gap: 4px; }

/* ===== PLACEHOLDER ===== */
.post-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 60px; background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); }
.post-placeholder span { color: #fff; font-weight: 600; text-align: center; padding: 10px; font-size: 13px; line-height: 1.3; }

/* ===== SIDEBAR ===== */
.widget { background: var(--card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.widget-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 16px; line-height: 1; }
.widget-title i { color: var(--accent); font-size: 16px; }

/* Sidebar Search */
.search-widget { padding: 0; overflow: hidden; }
.sidebar-search { display: flex; }
.sidebar-search input { flex: 1; padding: 14px 16px; border: none; outline: none; font-family: var(--font); font-size: 14px; color: var(--title); }
.sidebar-search input::placeholder { color: var(--meta); }
.sidebar-search button { display: flex; align-items: center; padding: 0 16px; background: var(--accent); color: #fff; font-size: 16px; transition: background .15s; }
.sidebar-search button:hover { background: var(--accent-hover); }

/* Popular */
.pop-list { display: flex; flex-direction: column; }
.pop-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.pop-item:last-child { border-bottom: none; padding-bottom: 0; }
.pop-num { font-size: 20px; font-weight: 800; color: var(--border); min-width: 28px; text-align: center; line-height: 1; }
.pop-item:first-child .pop-num { color: var(--accent); }
.pop-body { display: flex; gap: 10px; flex: 1; }
.pop-thumb { flex-shrink: 0; width: 70px; height: 56px; border-radius: var(--radius); overflow: hidden; background: var(--border); }
.pop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pop-info h4 { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 3px; }
.pop-info h4 a { color: var(--title); }
.pop-info h4 a:hover { color: var(--title-hover); }
.pop-info span { font-size: 11px; color: var(--meta); }

/* Categories */
.cat-list li { border-bottom: 1px solid var(--border); }
.cat-list li:last-child { border-bottom: none; }
.cat-list li a { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 14px; color: var(--text); transition: all .15s; }
.cat-list li a:hover { color: var(--accent); padding-left: 5px; }
.cat-num { background: #f1f5f9; color: var(--meta); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius); transition: all .15s; }
.cat-list li a:hover .cat-num { background: var(--accent); color: #fff; }

/* ===== WORDPRESS DEFAULT WIDGETS ===== */
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 0; }
.widget ul li a { color: var(--text); font-size: 14px; transition: color .15s; text-decoration: none; }
.widget ul li a:hover { color: var(--accent); }

/* WP: Recent Posts */
.widget_recent_entries li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.widget_recent_entries li:last-child { border-bottom: none; }
.widget_recent_entries li .post-date { display: block; font-size: 12px; color: var(--meta); margin-top: 3px; }
.widget_recent_entries li::before { content: '\f285'; font-family: 'bootstrap-icons'; color: var(--accent); font-size: 12px; flex-shrink: 0; margin-top: 3px; }

/* WP: Categories */
.widget_categories ul { list-style: none; }
.widget_categories li { border-bottom: 1px solid var(--border); }
.widget_categories li:last-child { border-bottom: none; }
.widget_categories li a { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 14px; color: var(--text); transition: all .15s; }
.widget_categories li a:hover { color: var(--accent); padding-left: 5px; }
.widget_categories .cat-count { background: #f1f5f9; color: var(--meta); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius); transition: all .15s; }
.widget_categories li a:hover .cat-count { background: var(--accent); color: #fff; }

/* WP: Archives */
.widget_archive ul { list-style: none; }
.widget_archive li { border-bottom: 1px solid var(--border); }
.widget_archive li:last-child { border-bottom: none; }
.widget_archive li a { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 14px; color: var(--text); transition: all .15s; }
.widget_archive li a:hover { color: var(--accent); padding-left: 5px; }
.widget_archive .count { background: #f1f5f9; color: var(--meta); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius); transition: all .15s; }
.widget_archive li a:hover .count { background: var(--accent); color: #fff; }

/* WP: Tag Cloud */
.widget_tag_cloud .tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.widget_tag_cloud .tagcloud a { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; font-size: 12px !important; color: var(--title); border: 1px solid var(--border); border-radius: var(--radius); transition: all .15s; font-weight: 500; }
.widget_tag_cloud .tagcloud a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* WP: Meta */
.widget_meta li { border-bottom: 1px solid var(--border); }
.widget_meta li:last-child { border-bottom: none; }
.widget_meta li a { display: flex; align-items: center; gap: 6px; padding: 10px 0; font-size: 14px; color: var(--text); transition: all .15s; }
.widget_meta li a:hover { color: var(--accent); padding-left: 5px; }
.widget_meta li a::before { content: '\f285'; font-family: 'bootstrap-icons'; font-size: 11px; color: var(--meta); }

/* WP: Recent Comments */
.widget_recent_comments li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: flex-start; font-size: 14px; color: var(--text); line-height: 1.4; }
.widget_recent_comments li:last-child { border-bottom: none; }
.widget_recent_comments li .comment-author-link a { color: var(--accent); font-weight: 600; }

/* WP: Pages */
.widget_pages li { border-bottom: 1px solid var(--border); }
.widget_pages li:last-child { border-bottom: none; }
.widget_pages li a { display: block; padding: 10px 0; font-size: 14px; color: var(--text); transition: all .15s; }
.widget_pages li a:hover { color: var(--accent); padding-left: 5px; }
.widget_pages ul ul { margin-left: 16px; margin-top: 4px; }
.widget_pages ul ul li { border-bottom: none; }
.widget_pages ul ul li a { font-size: 13px; padding: 6px 0; }

/* WP: Calendar */
.widget_calendar table { width: 100%; border-collapse: collapse; }
.widget_calendar caption { font-weight: 700; font-size: 14px; color: var(--title); padding-bottom: 10px; text-align: left; }
.widget_calendar th { font-size: 12px; font-weight: 600; color: var(--meta); padding: 8px 0; text-align: center; border-bottom: 1px solid var(--border); }
.widget_calendar td { text-align: center; padding: 8px 0; font-size: 13px; color: var(--text); }
.widget_calendar td a { color: var(--accent); font-weight: 600; }
.widget_calendar td a:hover { text-decoration: underline; }
.widget_calendar td.today { background: var(--accent); color: #fff; border-radius: var(--radius); font-weight: 700; }
.widget_calendar td.today a { color: #fff; }
.widget_calendar .pad { color: var(--meta); }
.widget_calendar tfoot td { border-top: 1px solid var(--border); }

/* WP: RSS */
.widget_rss li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.widget_rss li:last-child { border-bottom: none; }
.widget_rss li .rsswidget { font-weight: 600; color: var(--title); }
.widget_rss li .rss-date { display: block; font-size: 12px; color: var(--meta); margin-top: 3px; }
.widget_rss li .rss-summary { font-size: 13px; color: var(--text); margin-top: 4px; line-height: 1.4; }

/* WP: Search */
.widget_search .search-form { display: flex; }
.widget_search input[type="search"],
.widget_search input[type="text"] { flex: 1; padding: 14px 16px; border: none; outline: none; font-family: var(--font); font-size: 14px; color: var(--title); }
.widget_search input::placeholder { color: var(--meta); }
.widget_search button,
.widget_search input[type="submit"] { display: flex; align-items: center; padding: 0 16px; background: var(--accent); color: #fff; font-size: 16px; border: none; cursor: pointer; transition: background .15s; }
.widget_search button:hover,
.widget_search input[type="submit"]:hover { background: var(--accent-hover); }

/* WP: Text Widget */
.widget_text .textwidget { font-size: 14px; color: var(--text); line-height: 1.7; }
.widget_text .textwidget p { margin-bottom: 12px; }
.widget_text .textwidget p:last-child { margin-bottom: 0; }
.widget_text .textwidget a { color: var(--accent); }
.widget_text .textwidget a:hover { color: var(--accent-hover); }
.widget_text .textwidget img { max-width: 100%; height: auto; border-radius: var(--radius); margin-top: 10px; }

/* WP: Nav Menu Widget */
.widget_nav_menu ul { list-style: none; }
.widget_nav_menu li { border-bottom: 1px solid var(--border); }
.widget_nav_menu li:last-child { border-bottom: none; }
.widget_nav_menu li a { display: block; padding: 10px 0; font-size: 14px; color: var(--text); transition: all .15s; }
.widget_nav_menu li a:hover { color: var(--accent); padding-left: 5px; }
.widget_nav_menu ul ul { margin-left: 16px; margin-top: 4px; }
.widget_nav_menu ul ul li { border-bottom: none; }
.widget_nav_menu ul ul li a { font-size: 13px; padding: 6px 0; }

/* WP: Custom HTML */
.widget_custom_html { word-wrap: break-word; overflow-wrap: break-word; }
.widget_custom_html iframe { max-width: 100%; }

/* WP: Media Image */
.widget_media_image img { width: 100%; border-radius: var(--radius); }
.widget_media_image figcaption { font-size: 12px; color: var(--meta); margin-top: 6px; }

/* ===== SINGLE POST ===== */
.item-post { background: var(--card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
#breadcrumb { display: flex; align-items: center; gap: 2px; font-size: 14px; color: var(--accent); margin-bottom: 16px; flex-wrap: wrap; }
#breadcrumb a { color: var(--accent); }
#breadcrumb a:hover { opacity: .9; }
#breadcrumb .sep { color: var(--meta); }
#breadcrumb .sep::after { content: "\f285"; font-size: 10px; font-weight: 700; }
.item-post h1.entry-title { font-size: 35px; margin-bottom: 14px; }
.post-header .entry-meta { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.align-left { display: flex; align-items: center; }
.entry-avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; border: 1px solid var(--accent); flex-shrink: 0; margin-right: 10px; }
.entry-avatar img { width: 100%; height: 100%; object-fit: cover; }
.al-items { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.author-name { font-weight: 700; color: var(--title); }
.post-thumbnail { margin-bottom: 20px; border-radius: var(--radius); overflow: hidden; }
.post-thumbnail img { width: 100%; }
#post-body { position: relative; font-size: 14px; line-height: 1.6em; color: var(--text); }
#post-body p { margin-bottom: 25px; }
#post-body h2 { font-size: 23px; margin: 30px 0 15px; color: var(--title); }
#post-body h3 { font-size: 20px; margin: 25px 0 12px; color: var(--title); }
#post-body a { color: var(--accent); }
#post-body blockquote { background: rgba(15,23,42,.03); border-left: 4px solid var(--accent); padding: 25px; margin: 20px 0; border-radius: 0 var(--radius) var(--radius) 0; }

.entry-labels { display: flex; flex-wrap: wrap; gap: 6px; margin: 25px 0 0; }
.entry-labels a { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; font-size: 12px; color: var(--title); border: 1px solid var(--border); border-radius: var(--radius); transition: all .15s; }
.entry-labels a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== SHARE BUTTONS ===== */
.share-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.share-btn { display: flex; align-items: center; justify-content: center; width: 38px; height: 36px; border-radius: var(--radius); color: #fff; font-size: 18px; transition: opacity .15s; }
.share-btn:hover { opacity: .85; color: #fff; }
.share-btn.fb { background: #3b5998; }
.share-btn.tw { background: #000; }
.share-btn.li { background: #0077b5; }
.share-btn.wa { background: #25d366; }
.share-btn.tg { background: #179cde; }

/* ===== COMMENT TRIGGER ===== */
.comment-trigger-wrap { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--border); }
.comment-trigger-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; font-size: 14px; font-weight: 600; font-family: var(--font);
    color: #fff; background: var(--accent); border: none; border-radius: var(--radius);
    cursor: pointer; transition: all .2s; box-shadow: 0 2px 8px rgba(59,130,246,.3);
}
.comment-trigger-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,.4); }
.comment-trigger-btn i { font-size: 16px; }
.comment-form-wrapper { display: none; margin-top: 20px; padding: 25px; background: rgba(241,245,249,.5); border-radius: var(--radius); border: 1px solid var(--border); }
.comment-form-wrapper.visible { display: block; }
.comment-form-wrapper .comment-respond { margin: 0; }
.comment-form-wrapper .comment-reply-title { font-size: 20px; margin-bottom: 15px; color: var(--title); }
.comment-form-wrapper #commentform { display: flex; flex-direction: column; gap: 12px; }
.comment-form-wrapper textarea,
.comment-form-wrapper input[type="text"],
.comment-form-wrapper input[type="email"],
.comment-form-wrapper input[type="url"] {
    width: 100%; padding: 12px 16px; font-family: var(--font); font-size: 14px;
    border: 1px solid var(--border); border-radius: var(--radius); outline: none;
    color: var(--title); background: var(--card); transition: border-color .15s;
}
.comment-form-wrapper textarea:focus,
.comment-form-wrapper input:focus { border-color: var(--accent); }
.comment-form-wrapper textarea { min-height: 120px; resize: vertical; }
.comment-form-wrapper .form-submit input[type="submit"] {
    display: inline-flex; align-items: center; padding: 12px 32px; font-family: var(--font);
    font-size: 14px; font-weight: 600; color: #fff; background: var(--accent);
    border: none; border-radius: var(--radius); cursor: pointer; transition: all .2s;
    align-self: flex-start;
}
.comment-form-wrapper .form-submit input[type="submit"]:hover { background: var(--accent-hover); }
.no-comments { color: var(--meta); font-size: 14px; padding: 20px 0; }

.related-posts { margin-top: 30px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.related-grid .post { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.related-grid .entry-thumbnail { height: 128px; overflow: hidden; background: var(--border); }
.related-grid .entry-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.related-grid .entry-header { padding: 12px 14px; }
.related-grid .entry-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.related-grid .entry-title a { color: var(--title); }
.related-grid .entry-title a:hover { color: var(--title-hover); }

/* ===== BLOG LIST LAYOUTS ===== */
.index-blog { background: var(--card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Layout: List (Image Left + Text Right) — DEFAULT */
.blog-list { display: flex; flex-direction: column; }
.blog-list-item { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.blog-list-item:first-child { padding-top: 0; }
.blog-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.blog-list-thumb { flex-shrink: 0; width: 260px; height: 180px; border-radius: var(--radius); overflow: hidden; display: block; background: var(--border); }
.blog-list-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.blog-list-item:hover .blog-list-thumb img { transform: scale(1.05); }
.blog-list-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.blog-list-cat { display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.blog-list-cat:hover { opacity: .85; }
.blog-list-title { font-size: 18px; font-weight: 700; line-height: 1.35; }
.blog-list-title a { color: var(--title); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-list-title a:hover { color: var(--title-hover); }
.blog-list-excerpt { font-size: 14px; color: var(--text); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.blog-list-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--meta); margin-top: auto; }
.blog-list-meta span { display: flex; align-items: center; gap: 4px; }
.blog-list-meta i { font-size: 12px; }

/* Layout: Grid (3-Column Cards) */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-grid-item { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: box-shadow .2s, transform .2s; }
.blog-grid-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-grid-thumb { display: block; height: 160px; overflow: hidden; background: var(--border); }
.blog-grid-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.blog-grid-item:hover .blog-grid-thumb img { transform: scale(1.05); }
.blog-grid-body { padding: 14px 16px; }
.blog-grid-body .blog-list-title { font-size: 15px; }

/* Layout: Compact (Small Thumb + Title) */
.blog-compact { display: flex; flex-direction: column; }
.blog-compact-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.blog-compact-item:first-child { padding-top: 0; }
.blog-compact-item:last-child { border-bottom: none; padding-bottom: 0; }
.blog-compact-thumb { flex-shrink: 0; width: 90px; height: 66px; border-radius: 6px; overflow: hidden; display: block; background: var(--border); }
.blog-compact-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.blog-compact-item:hover .blog-compact-thumb img { transform: scale(1.05); }
.blog-compact-body { flex: 1; min-width: 0; }
.blog-compact-body .blog-list-title { font-size: 14px; line-height: 1.4; margin-bottom: 4px; }

/* ===== ARCHIVE HEADER ===== */
.archive-header { background: var(--card); padding: 20px; margin: var(--gap) 0 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.archive-header h1 { font-size: 24px; }
.archive-desc { color: var(--meta); margin-top: 5px; font-size: 14px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 25px 0 5px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 14px; background: var(--card); color: var(--text); border-radius: var(--radius); font-size: 14px; font-weight: 500; box-shadow: var(--shadow); transition: all .15s; text-decoration: none; }
.pagination .page-numbers:hover,
.pagination .page-numbers.current { background: var(--accent); color: #fff; }

/* ===== NO POSTS ===== */
.no-posts { text-align: center; padding: 60px 20px; }
.no-posts h3 { font-size: 20px; margin-bottom: 8px; }
.no-posts p { color: var(--meta); }

/* ===== FOOTER ===== */
.site-footer { background: var(--footer-bg, #1e293b); margin-top: 36px; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding: 36px 0 20px; }
.footer-col.about { padding-right: 20px; }
.footer-logo { font-size: 20px; font-weight: 700; color: #fff; display: inline-block; margin-bottom: 10px; text-decoration: none; }
.footer-logo:hover { color: #fff; opacity: .9; }
.footer-logo.has-logo { display: inline-block; width: 140px; height: 36px; color: transparent; font-size: 0; overflow: hidden; }
.footer-logo.has-logo::after { content: ''; display: block; width: 100%; height: 100%; background: var(--logo-img) no-repeat left center / contain; background-color: var(--footer-bg, #1e293b); background-blend-mode: screen; }
.footer-desc { color: var(--footer-text, #cbd5e1); font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.7); transition: all .15s; font-size: 13px; }
.footer-social a:hover { background: var(--accent); color: #fff; }
.footer-title { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; position: relative; height: 32px; display: flex; align-items: flex-end; }
.footer-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 28px; height: 2px; background: var(--accent); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0; }
.footer-links li a { color: var(--footer-text); font-size: 13px; transition: all .15s; display: flex; align-items: center; height: 30px; }
.footer-links li a:hover { color: #fff; padding-left: 4px; }
.footer-bar { background: var(--footer-bar, #0f172a); }
.footer-bar .container { padding-top: 0; padding-bottom: 0; }
.footer-bar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 12px; flex-wrap: wrap; }
.footer-bar-inner p { color: rgba(255,255,255,.5); font-size: 12px; margin: 0; line-height: 1.5; }
.footer-bar-links { display: flex; gap: 16px; flex-shrink: 0; }
.footer-bar-links a { color: rgba(255,255,255,.5); font-size: 12px; }
.footer-bar-links a:hover { color: #fff; }
.footer-bottom-list { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }
.footer-bottom-list li a { color: rgba(255,255,255,.5); font-size: 12px; transition: color .15s; }
.footer-bottom-list li a:hover { color: #fff; }

/* ===== BACK TO TOP ===== */
.back-to-top { position: fixed; bottom: 25px; right: 25px; width: 40px; height: 40px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .25s; z-index: 99; box-shadow: 0 4px 12px rgba(59,130,246,.4); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-hover); color: #fff; transform: translateY(-3px); }

/* ===== ACCESSIBILITY ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100%; left: 0; z-index: 9999; padding: 12px 20px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; transition: top .2s; }
.skip-link:focus { top: 0; color: #fff; }

*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== ADSENSE CONTAINERS ===== */
.ad-slot { margin: var(--gap) 0; padding: 20px; background: rgba(241,245,249,.3); border: 1px dashed var(--border); border-radius: var(--radius); text-align: center; min-height: 90px; display: flex; align-items: center; justify-content: center; }
.ad-slot .adsbygoogle { display: block; }
.ad-slot-responsive { width: 100%; max-width: 728px; margin: var(--gap) auto; min-height: 90px; }
.ad-slot-sidebar { width: 100%; min-height: 250px; }

/* ===== SINGLE POST RESPONSIVE ===== */
@media (max-width: 680px) {
    .item-post .entry-meta { flex-direction: column; gap: 10px; align-items: flex-start; }
    .share-buttons { gap: 4px; }
    .share-btn { width: 34px; height: 32px; font-size: 16px; }
    .comment-trigger-btn { width: 100%; justify-content: center; }
    .footer-social a { width: 32px; height: 32px; }
}

@media (max-width: 480px) {
    .item-post { padding: 16px; }
    .entry-labels a { font-size: 11px; height: 20px; padding: 0 6px; }
}

/* ===== 404 ===== */
.not-found-content { text-align: center; padding: 80px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.not-found-title { font-size: 72px; color: var(--accent); }

/* ===== PAGE ===== */
.page-content { background: var(--card); padding: 35px; border-radius: var(--radius); box-shadow: var(--shadow); margin: var(--gap) 0; }

/* ===== RESPONSIVE: 1030px ===== */
@media (max-width: 1030px) {
    .main-wrap { width: calc(70% - var(--gap)); }
    .sidebar-wrap { width: 30%; }
}

/* ===== RESPONSIVE: 880px ===== */
@media (max-width: 880px) {
    .main-nav { display: none; }
    .mobile-menu-toggle { display: flex; }
    .slide-menu { display: flex; }
    .flex-left { gap: 0; overflow: hidden; }
    .content-flex { flex-direction: column; }
    .main-wrap { width: 100%; }
    .sidebar-wrap { width: 100%; margin: var(--gap) 0 0; }
    .sidebar-sticky { position: static; }
    .featured-items { grid-template-columns: 1fr; }
    .featured-grid .post { height: auto; }
    .block-layout { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; gap: 0; padding: 28px 0 16px; }
    .footer-col { text-align: center; padding: 0 0 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .footer-col:last-child { border-bottom: none; padding-bottom: 0; }
    .footer-col.about { padding-right: 0; }
    .footer-logo { text-align: center; margin-bottom: 8px; }
    .footer-logo.has-logo { margin: 0 auto 8px; }
    .footer-desc { margin-bottom: 10px; }
    .footer-social { justify-content: center; }
    .footer-title { justify-content: center; height: auto; }
    .footer-title::after { left: 50%; transform: translateX(-50%); }
    .footer-links li a { justify-content: center; }
    .footer-bar .container { padding-top: 0; padding-bottom: 0; }
    .footer-bar-inner { justify-content: center; text-align: center; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-list-item { gap: 16px; }
    .blog-list-thumb { width: 220px; height: 155px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .block-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .block-grid-cards { grid-template-columns: repeat(2, 1fr); }
    .block-hero-full .hero-link { height: 260px; }
    .search-on .search-box { width: 90%; }
}

/* ===== RESPONSIVE: 680px ===== */
@media (max-width: 680px) {
    .site-footer { margin-top: 30px; }
    .cs-hero, .hero-link { height: 220px; }
    .cs-title { font-size: 20px; }
    .featured-grid .grid-thumb { height: 130px; }
    .featured-grid .grid-title { font-size: 15px; }
    .featured-grid .grid-info { padding: 14px; }
    .block-layout { grid-template-columns: 1fr; }
    .hero-link { height: 200px; }
    .list-thumb { width: 100px; height: 68px; }
    .list-title { font-size: 15px; }
    .list-info { min-width: 0; }
    .item-post h1.entry-title { font-size: 28px; }
    .post-header .entry-meta { flex-direction: column; gap: 8px; align-items: flex-start; }
    .block-hero-full .hero-link { height: 200px; }
    .list-row-item { flex-direction: column; gap: 12px; }
    .list-row-thumb { width: 100%; height: 180px; }
    .list-row-title { font-size: 17px; }
    .footer-main { padding: 28px 0 16px; gap: 20px; }
    .footer-desc { font-size: 13px; margin-bottom: 12px; }
    .trending-bar { margin: 20px 0 0; }
    .trending-inner { padding: 12px 16px; }
    .featured-section { margin: 20px 0; }
    .content-wrap { margin: 20px 0 0; }
    .block-section { margin-bottom: 24px; }
    .title-wrap .block-title { font-size: 17px; }
}

/* ===== RESPONSIVE: 480px ===== */
@media (max-width: 480px) {
    :root { --gap: 20px; --header-h: 56px; }
    .container { padding: 0 14px; }
    .site-header .container { padding: 0 14px; }
    .site-title-link { font-size: 22px !important; }
    .featured-items, .featured-grid { gap: 16px; }
    .featured-items { margin: 16px 0; }
    .featured-grid .grid-thumb { height: 120px; }
    .featured-grid .grid-info { padding: 12px; }
    .cs-hero, .hero-link { height: 200px; }
    .cs-title { font-size: 18px; }
    .hero-link .cs-title { font-size: 18px; }
    .hero-link .cs-content { padding: 14px; }
    .list-thumb { width: 90px; height: 62px; }
    .list-title { font-size: 14px; }
    .list-item { gap: 10px; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-list-item { flex-direction: column; gap: 12px; }
    .blog-list-thumb { width: 100%; height: 180px; }
    .blog-list-title { font-size: 16px; }
    .related-grid { grid-template-columns: 1fr 1fr; }
    .block-grid-cards { grid-template-columns: 1fr; }
    .block-grid-3 { grid-template-columns: 1fr; }
    .block-hero-full .hero-link { height: 180px; }
    .list-row-thumb { height: 160px; }
    .list-row-title { font-size: 16px; }
    .item-post h1.entry-title { font-size: 24px; }
    .footer-main { grid-template-columns: 1fr; gap: 0; padding: 20px 0 12px; }
    .footer-col { padding: 0 0 16px; }
    .footer-logo { font-size: 18px; }
    .footer-logo.has-logo { width: 120px; height: 30px; }
    .footer-title { font-size: 13px; margin-bottom: 8px; }
    .footer-links li a { font-size: 12px; height: 28px; }
    .footer-bar .container { padding-top: 0; padding-bottom: 0; }
    .search-on .search-box { width: 95%; padding: 0; }
    .search-form { height: 56px; }
    .search-input { font-size: 15px; padding: 0 14px; }
    .sidebar-sticky { gap: 20px; }
    .widget { padding: 16px; }
    .block-section { margin-bottom: 20px; }
}

/* ===== RESPONSIVE: 380px ===== */
@media (max-width: 380px) {
    :root { --gap: 16px; }
    .container { padding: 0 12px; }
    .site-header .container { padding: 0 12px; }
    .cs-hero, .hero-link { height: 180px; }
    .featured-grid .grid-thumb { height: 100px; }
    .featured-grid .grid-title { font-size: 14px; }
    .hero-link { height: 180px; }
    .list-thumb { width: 80px; height: 56px; }
    .list-title { font-size: 13px; }
    .item-post h1.entry-title { font-size: 22px; }
    .related-grid { grid-template-columns: 1fr; }
    .related-grid .entry-thumbnail { height: 90px; }
    .related-grid .entry-title { font-size: 14px; }
    .footer-main { padding: 16px 0 10px; }
    .footer-col { padding: 0 0 12px; }
    .footer-logo { font-size: 16px; }
    .footer-logo.has-logo { width: 100px; height: 26px; }
    .footer-bar-inner { flex-direction: column; gap: 6px; }
}

/* ===== MOBILE TOUCH-FRIENDLY ===== */
@media (max-width: 680px) {
    a, button { min-height: 44px; }
    .search-toggle, .mobile-menu-toggle { width: 44px; height: 44px; }
    .nav-list li a { height: 48px; padding: 0 4px; }
    .ticker-next { width: 36px; height: 36px; }
    .back-to-top { width: 44px; height: 44px; bottom: 20px; right: 16px; }
    .view-all { padding: 8px 0; min-height: 44px; }
    .blog-list-item { padding: 14px 0; }
    .sidebar-search input { padding: 12px 14px; font-size: 16px; }
    .sidebar-search button { min-width: 48px; }
    .search-form { height: 56px; padding: 6px; }
    .search-submit-btn { width: 44px; height: 44px; }
    .search-close { width: 36px; height: 36px; top: 10px; right: 10px; }
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
* { -webkit-tap-highlight-color: transparent; }
