/*
Theme Name: WonderNews
Theme URI: https://wonderworldhost.com
Author: Wonder Team
Author URI: https://wonderworldhost.com
Description: A modern magazine and news WordPress theme with a clean and professional design. Perfect for news, magazine, blog, and publishing websites.
Version: 1.0.3
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: wondernews
Tags: news, magazine, blog, two-columns, right-sidebar, custom-background, custom-header, custom-menu, featured-images, threaded-comments, translation-ready
*/

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

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    color: #000;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #333;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.site-header {
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #fff;
    color: #000;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.header-main {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.site-logo {
    flex: 0 0 auto;
}

/* Header logo: only shows when custom logo exists; keep it sized even if uploaded logo is huge */
.site-logo .custom-logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.site-logo img.custom-logo {
    width: auto;
    height: auto;
    max-height: 44px;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.site-logo h1 {
    font-size: 28px;
    font-weight: 600;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    color: #000;
    margin: 0;
}

.site-logo a {
    color: #000;
}

/* Navigation */
.main-navigation {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-top: none;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 0;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    flex: 0 0 auto;
}

.menu-toggle:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.menu-toggle-icon {
    width: 18px;
    height: 2px;
    background: #0f172a;
    position: relative;
    display: inline-block;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #0f172a;
}

.menu-toggle-icon::before {
    top: -6px;
}

.menu-toggle-icon::after {
    top: 6px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 8px 10px;
    color: #333;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    border-radius: 0;
}

/* Header search: slightly shorter */
.header-search .search-field {
    padding: 8px 12px;
    font-size: 13px;
}

.header-search .search-submit {
    padding: 8px 12px;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: #000;
    background: #f3f4f6;
}

/* Dropdowns (including "More") */
.main-navigation .menu-item-has-children > a {
    padding-right: 30px;
    position: relative;
}

.main-navigation .menu-item-has-children > a::after {
    content: '▾';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #64748b;
}

.main-navigation .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 8px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
    display: none;
    z-index: 1001;
}

/* Prevent hover-gap between parent item and dropdown */
.main-navigation .menu-item-has-children::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 8px;
}

.main-navigation .sub-menu li {
    width: 100%;
}

.main-navigation .sub-menu a {
    padding: 10px 12px;
    font-size: 13px;
    text-transform: none;
    border-radius: 0;
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu,
.main-navigation li.is-open > .sub-menu {
    display: block;
}

.header-right {
    flex: 0 0 340px;
    display: flex;
    justify-content: flex-end;
}

.header-search {
    width: 100%;
    max-width: 340px;
}

/* Hero Section */
.hero-section {
    margin: 30px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.hero-main {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 0;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-main:hover img {
    transform: scale(1.05);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
}

/* In hero area, category should stack above title (no overlap) */
.hero-content .post-category {
    position: static;
    top: auto;
    left: auto;
    display: inline-block;
    margin: 0 0 10px 0;
}

.hero-category {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    border-radius: 0;
}

.hero-title {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.3;
    margin: 10px 0;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-title a {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-title a:hover {
    color: #fff;
}

.hero-meta {
    font-size: 14px;
    color: #e5e7eb;
}

.hero-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.hero-sidebar-item:first-child {
    grid-column: 1 / -1;
    height: 247.5px;
}

.hero-sidebar-item {
    position: relative;
    height: 240px;
    overflow: hidden;
    border-radius: 0;
}

.hero-sidebar-item:nth-child(2),
.hero-sidebar-item:nth-child(3) {
    height: 247.5px;
}

.hero-sidebar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-sidebar-item:hover img {
    transform: scale(1.05);
}

.hero-sidebar-item .hero-content {
    padding: 20px;
}

.hero-sidebar-item .hero-title {
    font-size: 18px;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* Content Sections */
.content-section {
    background: #fff;
    margin: 30px 0;
    padding: 30px;
    border-radius: 0;
}

/* Homepage: content + sidebar starting at Don't Miss */
.home-content {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    align-items: stretch;
    margin: 30px 0;
}

.home-sidebar {
    background: #fff;
    padding: 30px 0;
    align-self: start;
}



/* Homepage sections: remove left/right inner padding (full-width content) */
.home-main > .content-section {
    padding-left: 0;
    padding-right: 0;
}

/* Same alignment for homepage sections nested inside .primary-content */
.home-main .primary-content > .content-section {
    padding-left: 0;
    padding-right: 0;
}

/* Homepage cards: make title + excerpt area full-width (no side padding) */
.home-main .content-section .post-card > .post-content {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
}

/* Sidebar list style (thumb left, title+date right) */
.home-sidebar .sidebar-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-sidebar .sidebar-post-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

.home-sidebar .sidebar-post-item:last-child {
    border-bottom: none;
}

.home-sidebar .sidebar-post-thumb {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    overflow: hidden;
    border-radius: 0;
}

.home-sidebar .sidebar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-sidebar .sidebar-post-info {
    flex: 1;
    min-width: 0;
}

.home-sidebar .sidebar-post-title {
    display: block;
    color: #000;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
}

.home-sidebar .sidebar-post-title:hover {
    color: #000;
    text-decoration: underline;
}

.home-sidebar .sidebar-post-date {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

/* Avoid double top spacing inside homepage main column */
.home-main > .content-section:first-child {
    margin-top: 0;
}

.home-main > .content-section {
    margin-top: 0;
    margin-bottom: 30px;
}

/* Don't Miss (featured left + list right) */
.home-main > .dont-miss-section {
    padding-left: 0;
    padding-right: 0;
}

.dont-miss-content {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 12px;
    align-items: start;
}

/* Prevent long titles in the right column from forcing the grid wider */
.dont-miss-featured,
.dont-miss-list {
    min-width: 0;
}

.dont-miss-featured .post-thumbnail {
    height: 300px;
}

.dont-miss-featured .post-thumbnail img {
    transition: transform 0.3s ease;
}

.dont-miss-featured .post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.dont-miss-featured .post-title {
    font-size: 16px;
    font-weight: 500;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
}

/* Make featured text area full-width (no left/right padding) */
.dont-miss-featured .post-content {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
}

.dont-miss-list {
    margin-top: 0;
}

.dont-miss-list-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

.dont-miss-list-item:last-child {
    border-bottom: none;
}

.dont-miss-list-thumb {
    width: 92px;
    height: 62px;
    flex: 0 0 92px;
    overflow: hidden;
}

.dont-miss-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dont-miss-list-item:hover .dont-miss-list-thumb img {
    transform: scale(1.05);
}

.dont-miss-list-info {
    flex: 1;
    min-width: 0;
}

.dont-miss-list-title {
    display: block;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
}

.dont-miss-list-title:hover {
    color: #000;
    text-decoration: underline;
}

.dont-miss-list-date {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

/* Keep other homepage grids at 2 columns in the main column */
.home-main > .primary-content .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
    padding-bottom: 0;
    border-bottom: 0;
    overflow: hidden;
}

.section-title {
    font-size: 14px;
    font-weight: 500;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    text-transform: uppercase;
    color: #fff;
    background: #000;
    padding: 7px 14px;
    display: inline-block;
    position: relative;
}

/* Section header line that connects to the title box */
.section-title::after {
    content: "";
    position: absolute;
    left: 100%;
    bottom: 0;
    height: 3px;
    width: 9999px;
    background: #000;
}

.section-tabs {
    display: flex;
    gap: 20px;
}

.section-tabs a {
    color: #666;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
}

.section-tabs a:hover,
.section-tabs a.active {
    color: #000;
}

/* Lifestyle News section layout (2 featured + list) */
.lifestyle-section .section-title {
    background: #2e7d32;
}

.lifestyle-section .section-title::after {
    background: #2e7d32;
}

/* Homepage Category Section 3 (Performance) uses yellow header like the reference */
.performance-section .section-title {
    background: #f5c400;
    color: #000;
}

.performance-section .section-title::after {
    background: #f5c400;
}

.lifestyle-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.lifestyle-featured .post-thumbnail {
    height: 230px;
}

/* Category tag sits near the bottom-left like the reference */
.lifestyle-featured .post-category {
    top: auto;
    bottom: 15px;
}

.lifestyle-list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 25px;
}

.lifestyle-list-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.lifestyle-list-thumb {
    width: 110px;
    height: 70px;
    flex: 0 0 110px;
    overflow: hidden;
}

.lifestyle-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lifestyle-list-item:hover .lifestyle-list-thumb img {
    transform: scale(1.05);
}

.lifestyle-list-info {
    flex: 1;
    min-width: 0;
}

.lifestyle-list-title {
    display: block;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.lifestyle-list-title:hover {
    text-decoration: underline;
    color: #000;
}

.lifestyle-list-date {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

/* Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.post-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.post-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

/* Category archive: full-width text + no hover effects */
.category .archive-content .post-card > .post-content {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
}

.category .post-card {
    transition: none;
}

.category .post-card:hover {
    transform: none;
    box-shadow: none;
}

.category .post-thumbnail img,
.category .post-card:hover .post-thumbnail img {
    transform: none;
    transition: none;
}

.post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #000;
    color: #fff;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 0;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 18px;
    font-weight: 500;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    line-height: 1.4;
    margin-bottom: 10px;
}

/* Homepage: keep typography consistent across sections */
.home-main .content-section .post-title {
    font-size: 16px;
    line-height: 1.35;
}

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

.post-title a:hover {
    color: #000;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.post-excerpt {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Sidebar */
.sidebar {
    background: #fff;
    padding: 25px;
    border-radius: 0;
}

.widget {
    margin-bottom: 35px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 18px;
    font-weight: 500;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #000;
    color: #1a1a1a;
}

/* Sidebar widget header style (label + line) */
.sidebar .widget,
.home-sidebar .widget {
    overflow: hidden;
}

.sidebar .widget-title,
.home-sidebar .widget-title {
    display: inline-block;
    position: relative;
    background: #000;
    color: #fff;
    font-size: 14px;
    padding: 7px 14px;
    margin-bottom: 16px;
    border-bottom: 0;
}

.sidebar .widget-title::after,
.home-sidebar .widget-title::after {
    content: "";
    position: absolute;
    left: 100%;
    bottom: 0;
    height: 2px;
    width: 9999px;
    background: #000;
    transform: none;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.widget ul li:last-child {
    border-bottom: none;
}

/* Footer */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    margin-top: 50px;
}

/* Footer: override global widget/title styling for dark background */
.site-footer,
.site-footer p,
.site-footer li {
    color: #d1d5db;
}

.site-footer a {
    color: #d1d5db;
}

.site-footer a:hover {
    color: #fff;
}

/* Some block widgets (Gutenberg) ship their own colors; force readable footer colors */
.site-footer .footer-widgets-grid,
.site-footer .footer-widgets-grid p,
.site-footer .footer-widgets-grid li {
    color: #d1d5db;
}

.site-footer .footer-widgets-grid a,
.site-footer .footer-widgets-grid a:visited {
    color: #d1d5db !important;
}

.site-footer .footer-widgets-grid a:hover {
    color: #fff !important;
}

.site-footer .footer-widgets-grid ul,
.site-footer .footer-widgets-grid ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-footer .footer-widgets-grid li {
    list-style: none !important;
}

.site-footer .widget-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    position: relative;
}

.site-footer .widget-title::after {
    content: "";
    display: block;
    height: 2px;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    margin-top: 12px;
}

.site-footer ul,
.site-footer ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer .widget ul li:last-child {
    border-bottom: none;
}

.footer-widgets {
    padding: 50px 0;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
}

.footer-widget-area {
    min-width: 0;
}

.footer-brand .site-name {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.footer-about-text {
    margin-top: 14px;
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.6;
}

.footer-newsletter {
    margin-top: 18px;
    display: grid;
    gap: 10px;
    max-width: 320px;
}

.footer-newsletter {
    grid-template-columns: 1fr 1fr;
}

.footer-newsletter-button {
    grid-column: 1 / -1;
}

.footer-newsletter input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
    outline: none;
}

.footer-newsletter input::placeholder {
    color: rgba(255,255,255,0.65);
}

.footer-newsletter-button {
    padding: 12px 14px;
    border: 0;
    background: #111;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.footer-link-list,
.footer-link-list li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-link-list {
    padding-left: 0;
}

.footer-link-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-link-list li:last-child {
    border-bottom: none;
}

.footer-link-list a {
    color: #d1d5db;
    text-decoration: none;
}

.footer-link-list a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Footer: Popular Post list typography */
.footer-trending-list a {
    font-size: 13px;
    line-height: 1.35;
}

.footer-trending-list li {
    padding: 8px 0;
}

.footer-widget {
    color: #d1d5db;
}

.footer-widget h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget a {
    color: #d1d5db;
}

.footer-widget a:hover {
    color: #fff;
}

.footer-bottom {
    background: #0f0f0f;
    padding: 20px 0;
    border-top: 1px solid #333;
}

.footer-bottom-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-social a {
    color: #9ca3af;
    font-size: 14px;
    text-decoration: none;
}

.footer-social a:hover {
    color: #fff;
}

.footer-copy p {
    margin: 0;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 14px;
}

/* Two Column Layout */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 30px 0;
    position: relative;
}

.home-content {
    position: relative;
}

/* Sidebar: bottom-sticky behavior (enabled via JS on desktop) */
.wn-sidebar-inner.wn-sidebar-fixed-bottom,
.wn-sidebar-inner.wn-sidebar-absolute-bottom {
    z-index: 50;
}

/* Category/archive: match homepage sidebar proportions (desktop only) */
@media (min-width: 1025px) {
    .category .main-content,
    .archive .main-content {
        grid-template-columns: 3fr 1fr;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .home-content {
        grid-template-columns: 1fr;
    }

    .home-sidebar {
        background: #fff;
        padding: 30px 0;
    }

    .home-sidebar,
    .sidebar {
        position: static;
        top: auto;
    }

    .dont-miss-content {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        text-align: left;
        gap: 10px;
    }

    /* Arrange: hamburger (left) - logo (center) - search (right) */
    .main-navigation {
        order: 1;
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-start;
        gap: 10px;
        position: relative;
    }

    .site-logo {
        order: 2;
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
    }

    .header-right {
        order: 3;
        flex: 0 0 auto;
        width: auto;
        justify-content: flex-end;
    }

    .header-search {
        max-width: none;
        width: auto;
    }

    /* Mobile header search: icon-only by default; expands on click/focus */
    .site-header .header-search {
        position: relative;
    }

    .site-header .header-search .search-form {
        background: transparent;
        border: 1px solid transparent;
        border-radius: 0;
        overflow: visible;
    }

    .site-header .header-search .search-form label {
        flex: 0 0 auto;
        width: 0;
        overflow: hidden;
        margin: 0;
    }

    .site-header .header-search .search-field {
        width: 0;
        min-width: 0;
        padding: 0;
        opacity: 0;
        pointer-events: none;
    }

    .site-header .header-search .search-submit {
        width: 42px;
        height: 42px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-header .header-search.is-open .search-form,
    .site-header .header-search:focus-within .search-form {
        background: #f3f4f6;
        border-color: #e5e7eb;
        overflow: hidden;
    }

    .site-header .header-search.is-open .search-form label,
    .site-header .header-search:focus-within .search-form label {
        width: 170px;
    }

    .site-header .header-search.is-open .search-field,
    .site-header .header-search:focus-within .search-field {
        width: 100%;
        padding: 8px 10px;
        opacity: 1;
        pointer-events: auto;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-navigation ul {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        width: min(280px, 90vw);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        display: none;
        border: 1px solid #e5e7eb;
        border-radius: 0;
        padding: 8px;
        background: #fff;
        z-index: 2000;
    }

    .main-navigation a {
        width: 100%;
    }

    .main-navigation .sub-menu {
        position: static;
        min-width: 0;
        border: none;
        box-shadow: none;
        padding: 6px 0 0 12px;
        border-radius: 0;
    }

    .main-navigation .menu-item-has-children::after {
        content: none;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }

    .home-main > .content-section .post-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .lifestyle-featured-grid {
        grid-template-columns: 1fr;
    }

    .lifestyle-list-grid {
        grid-template-columns: 1fr;
    }

    .performance-section .post-list-item {
        flex-direction: column;
        gap: 14px;
    }

    .performance-section .post-list-item .post-thumbnail {
        width: 100%;
        height: 220px;
    }

    .performance-section .post-list-item .post-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .site-logo img.custom-logo {
        max-height: 38px;
        max-width: 180px;
    }
}

@media (max-width: 640px) {
    .footer-bottom-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Homepage: disable hover effects everywhere except HERO */
.home .home-content .post-card {
    transition: none;
}

.home .home-content .post-card:hover {
    transform: none;
    box-shadow: none;
}

.home .home-content .post-thumbnail img {
    transition: none;
}

.home .home-content .post-card:hover .post-thumbnail img {
    transform: none;
}

.home .home-content .dont-miss-list-item:hover .dont-miss-list-thumb img,
.home .home-content .lifestyle-list-item:hover .lifestyle-list-thumb img {
    transform: none;
}

.home .home-content .dont-miss-list-title:hover,
.home .home-content .lifestyle-list-title:hover,
.home .home-content .home-sidebar .sidebar-post-title:hover {
    text-decoration: none;
}

/* Post List Item */
.post-list-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
}

.post-list-item:last-child {
    border-bottom: none;
}

.post-list-item .post-thumbnail {
    flex-shrink: 0;
    width: 250px;
    height: 150px;
}

.post-list-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-list-item .post-content {
    flex: 1;
    padding: 0;
}

@media (max-width: 768px) {
    /* Search results: better mobile layout (image top, text below) */
    .search .post-list-item {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 18px;
        padding-bottom: 18px;
    }

    .search .post-list-item .post-thumbnail {
        width: 100%;
        height: 210px;
    }

    .search .post-list-item .post-title {
        font-size: 18px;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .search .post-list-item .post-meta {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 12px;
    }

    .search .post-list-item .post-excerpt {
        font-size: 13px;
        line-height: 1.55;
    }

    .search .search-header {
        margin: 0 0 16px 0;
    }
}

/* Performance Training: list layout like the reference (thumb left, text right) */
.performance-section .post-list-item {
    gap: 28px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.performance-section .post-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.performance-section .post-list-item .post-thumbnail {
    width: 280px;
    height: 170px;
    overflow: hidden;
}

.performance-section .post-list-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.performance-section .post-list-item .post-content {
    padding: 0;
}

.performance-section .post-list-item .post-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 8px;
}

.performance-section .post-list-item .post-meta {
    margin-bottom: 12px;
    color: #666;
}

.performance-section .post-list-item .post-excerpt {
    margin-top: 0;
}

/* Popular Posts Sidebar Widget */
.popular-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.popular-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popular-post-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 0;
}

.popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
}

.popular-post-content h4 {
    font-size: 13px;
    line-height: 1.35;
    margin: 0 0 5px 0;
}

.popular-post-content h4 a {
    color: #1a1a1a;
}

.popular-post-content h4 a:hover {
    color: #000;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 0;
    overflow: hidden;
}

.search-form label {
    flex: 1;
    margin: 0;
}

.search-field {
    width: 100%;
    padding: 12px 15px;
    border: none;
    background: transparent;
    font-size: 14px;
}

.search-submit {
    padding: 12px 15px;
    border: none;
    background: #000;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-submit:hover {
    background: #333;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Entry Content Styles */
.entry-content {
    margin-top: 30px;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.entry-content ul,
.entry-content ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.entry-content img {
    margin: 20px 0;
    border-radius: 0;
}

/* Comments */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e5e7eb;
}

.comments-title {
    font-size: 24px;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-body {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 0;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-date {
    display: block;
    font-size: 12px;
    color: #666;
}

.comment-reply-title {
    font-size: 22px;
    margin: 0 0 12px;
}

.comment-respond {
    margin-top: 35px;
}

.comment-respond .comment-notes,
.comment-respond .logged-in-as {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.comment-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.comment-form > p {
    margin: 0;
}

.comment-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    background: #fff;
    color: #111;
    font-size: 14px;
    line-height: 1.4;
    outline: none;
}

.comment-form textarea {
    min-height: 160px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #111;
}

/* Span full width fields */
.comment-form-comment,
.comment-form-url,
.comment-form-cookies-consent,
.form-submit {
    grid-column: 1 / -1;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #666;
    font-size: 13px;
}

.comment-form-cookies-consent label {
    margin: 0;
    font-weight: 400;
    color: #666;
}

.comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 3px;
}

.comment-form .submit {
    display: inline-block;
    padding: 12px 18px;
    background: #000;
    color: #fff;
    border: 0;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.comment-form .submit:hover {
    background: #333;
}

@media (max-width: 768px) {
    .comment-form {
        grid-template-columns: 1fr;
    }
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    color: #333;
}

.pagination a:hover,
.pagination .current {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Archive & Search Headers */
.archive-header,
.search-header {
    margin-bottom: 30px;
    padding: 30px;
    background: #fff;
    border-radius: 0;
}

/* Search page: match archive/category layout + typography */
@media (min-width: 1025px) {
    .search .main-content {
        grid-template-columns: 3fr 1fr;
    }
}

.search .search-header {
    padding: 0;
    background: transparent;
    margin: 0 0 22px 0;
}

/* Safety: some setups rely on `search-results` body class; also wins over the global `.search-header` rule */
.search-results .search-header {
    padding: 0 !important;
    background: transparent !important;
    margin: 0 0 22px 0;
}

/* Absolute safety: target the search template DOM directly (independent of body classes) */
.search-content .search-header {
    padding: 0 !important;
    background: transparent !important;
    margin: 0 0 22px 0;
}

.search .search-section-header {
    margin-bottom: 0;
}

.search .search-query {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-transform: none;
    padding-bottom: 9px;
    border-bottom: 3px solid #000;
}

.search .search-query span {
    display: inline-block;
    padding: 7px 0;
}

/* Search cards: full-width text + no hover effects (consistent with homepage/category rule) */
.search .archive-content .post-card > .post-content {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
}

.search .post-card {
    transition: none;
}

.search .post-card:hover {
    transform: none;
    box-shadow: none;
}

.search .post-thumbnail img,
.search .post-card:hover .post-thumbnail img {
    transform: none;
    transition: none;
}

/* Keep category archive grids at 2 columns in the main column */
@media (min-width: 769px) {
    .search .archive-content .post-grid,
    .category .archive-content .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .category .archive-content .post-grid {
        grid-template-columns: 1fr;
    }

    /* Category/Hero: stack sidebar hero items too */
    .hero-sidebar {
        grid-template-columns: 1fr;
    }
}

.archive-title,
.search-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.archive-description {
    color: #666;
    font-size: 16px;
}

/* 404 Error Page */
.error-404 {
    text-align: center;
    padding: 60px 30px;
    background: #fff;
    border-radius: 0;
}

.error-404-title {
    font-size: 120px;
    font-weight: 900;
    color: #000;
    margin: 0;
}

.error-404 h2 {
    font-size: 32px;
    margin: 20px 0;
}

.error-404-search {
    max-width: 500px;
    margin: 30px auto;
}

.error-404-home {
    margin-top: 30px;
}

.button {
    display: inline-block;
    padding: 12px 30px;
    background: #000;
    color: #fff;
    border-radius: 0;
    font-weight: 600;
    transition: background 0.3s ease;
}

.button:hover {
    background: #333;
    color: #fff;
}

/* Single Post Styles */
.single-post-content .entry-header {
    text-align: left;
    margin-bottom: 30px;
}

/* Single post: keep category badge in-flow (avoid overlapping the title) */
.single-post-content .entry-header .post-category {
    position: static;
    top: auto;
    left: auto;
    display: inline-block;
    margin: 0 0 10px 0;
}

.entry-title {
    font-size: 36px;
    line-height: 1.3;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .single-post-content .entry-title {
        font-size: 26px;
        line-height: 1.25;
        margin: 10px 0 12px;
    }
}

.post-featured-image {
    margin: 30px 0;
    border-radius: 0;
    overflow: hidden;
}

.entry-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.post-tags {
    color: #666;
    font-size: 14px;
}

.post-tags a {
    display: inline-block;
    background: #f3f4f6;
    padding: 5px 12px;
    margin-right: 5px;
    margin-top: 5px;
    border-radius: 0;
    color: #333;
    font-size: 13px;
}

.post-tags a:hover {
    background: #000;
    color: #fff;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
    padding: 20px;
    background: #f9fafb;
    border-radius: 0;
}

.nav-next {
    text-align: right;
}

.post-navigation a {
    color: #000;
    font-weight: 600;
}

.post-navigation a:hover {
    color: #333;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}
