/*
Theme Name: Ahrefs
Version: 1.0.1
Text Domain: ahrefs
Description: Clean modern SEO/marketing blog theme with blue-orange accents. Inspired by Ahrefs blog design.
Author: Developer
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

:root {
    --ahf-primary: #ff6a3d;
    --ahf-secondary: #1a1a2e;
    --ahf-accent: #4a90d9;
    --ahf-text: #1a1a2e;
    --ahf-text-light: #6b7280;
    --ahf-bg: #ffffff;
    --ahf-bg-alt: #f8fafc;
    --ahf-border: #e5e7eb;
    --ahf-font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --ahf-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --ahf-transition: 0.2s ease;
    --ahf-radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--ahf-font-body); font-size: 1rem; line-height: 1.7; color: var(--ahf-text); background: var(--ahf-bg); }
a { color: var(--ahf-primary); text-decoration: none; transition: color var(--ahf-transition); }
a:hover { color: var(--ahf-secondary); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--ahf-font-heading); font-weight: 700; line-height: 1.3; margin: 0 0 0.5em; color: var(--ahf-secondary); }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
p { margin: 0 0 1.25em; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed; top: 5px; left: 5px; width: auto; height: auto; padding: 15px 23px; clip: auto; font-size: 0.875rem; font-weight: 700; background: #f1f1f1; color: #21759b; z-index: 100000; }
.ahf-skip-link { position: absolute; top: -100px; left: 0; padding: 1rem 1.5rem; background: var(--ahf-primary); color: #fff; font-weight: 600; z-index: 99999; transition: top var(--ahf-transition); border-radius: var(--ahf-radius); }
.ahf-skip-link:focus { top: 10px; left: 10px; color: #fff; }

.ahf-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.ahf-header { background: var(--ahf-bg); position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--ahf-border); }
.ahf-header-scrolled { box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.ahf-header-inner { display: flex; align-items: center; justify-content: space-between; height: 4.5rem; }
.ahf-logo { font-family: var(--ahf-font-heading); font-size: 1.5rem; font-weight: 800; color: var(--ahf-secondary); display: flex; align-items: center; gap: 0.5rem; }
.ahf-logo:hover { color: var(--ahf-primary); }
.ahf-logo img, .ahf-logo .custom-logo { max-height: 50px; width: auto; height: auto; object-fit: contain; }
.ahf-logo-accent { color: var(--ahf-primary); }

.ahf-nav { display: flex; align-items: center; gap: 1rem; }
.ahf-nav-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 0.25rem; }
.ahf-nav-menu a { display: block; padding: 0.5rem 1rem; color: var(--ahf-text); font-size: 0.9375rem; font-weight: 500; border-radius: var(--ahf-radius); transition: all var(--ahf-transition); }
.ahf-nav-menu a:hover { color: var(--ahf-primary); background: var(--ahf-bg-alt); }
.ahf-nav-menu .current-menu-item > a { color: var(--ahf-primary); }
.ahf-menu-toggle { display: none; background: none; border: none; padding: 0.5rem; cursor: pointer; color: var(--ahf-secondary); }
.ahf-menu-toggle svg { width: 1.5rem; height: 1.5rem; }

.ahf-search-toggle { background: none; border: none; padding: 0.5rem; cursor: pointer; color: var(--ahf-text-light); border-radius: var(--ahf-radius); transition: all var(--ahf-transition); }
.ahf-search-toggle:hover { color: var(--ahf-primary); background: var(--ahf-bg-alt); }
.ahf-search-toggle svg { width: 1.25rem; height: 1.25rem; }
.ahf-search-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(26,26,46,0.95); z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.ahf-search-overlay.ahf-search-open { opacity: 1; visibility: visible; }
.ahf-search-form { width: 100%; max-width: 600px; padding: 2rem; }
.ahf-search-form input[type="search"] { width: 100%; padding: 1rem 1.5rem; font-size: 1.25rem; border: none; border-radius: var(--ahf-radius); background: #fff; color: var(--ahf-text); outline: none; }
.ahf-search-form input[type="search"]:focus { box-shadow: 0 0 0 3px rgba(255,106,61,0.3); }
.ahf-search-close { position: absolute; top: 2rem; right: 2rem; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; opacity: 0.7; transition: opacity var(--ahf-transition); }
.ahf-search-close:hover { opacity: 1; }

.ahf-content { padding: 2rem 0 3rem; min-height: 50vh; }
.ahf-layout { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.ahf-layout.right-sidebar { grid-template-columns: 1fr 320px; }
.ahf-layout.left-sidebar { grid-template-columns: 320px 1fr; }
.ahf-layout.left-sidebar .ahr-sidebar { order: -1; }
.ahf-main { min-width: 0; overflow: hidden; }

.ahf-breadcrumbs { padding: 1rem 0; margin-bottom: 1rem; font-size: 0.875rem; }
.ahf-breadcrumbs-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.ahf-breadcrumbs-list li::after { content: "/"; margin-left: 0.5rem; color: var(--ahf-text-light); }
.ahf-breadcrumbs-list li:last-child::after { display: none; }
.ahf-breadcrumbs a { color: var(--ahf-text-light); }
.ahf-breadcrumbs a:hover { color: var(--ahf-primary); }

.ahf-article-card { display: flex; gap: 1.5rem; background: var(--ahf-bg); padding: 1.5rem 0; border-bottom: 1px solid var(--ahf-border); }
.ahf-article-card:last-child { border-bottom: none; }
.ahf-article-thumb { flex: 0 0 280px; position: relative; overflow: hidden; border-radius: var(--ahf-radius); }
.ahf-article-thumb img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.3s ease; }
.ahf-article-card:hover .ahf-article-thumb img { transform: scale(1.05); }
.ahf-article-category { position: absolute; top: 0.75rem; left: 0.75rem; background: var(--ahf-primary); color: #fff; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600; border-radius: 2rem; }
.ahf-article-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.ahf-article-meta { display: flex; gap: 1rem; font-size: 0.8125rem; color: var(--ahf-text-light); margin-bottom: 0.5rem; }
.ahf-article-title { font-size: 1.25rem; margin-bottom: 0.5rem; line-height: 1.4; }
.ahf-article-title a { color: var(--ahf-secondary); }
.ahf-article-title a:hover { color: var(--ahf-primary); }
.ahf-article-excerpt { color: var(--ahf-text-light); font-size: 0.9375rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ahf-sticky-badge { display: inline-flex; align-items: center; gap: 0.25rem; background: linear-gradient(135deg, var(--ahf-primary), #ff8a5c); color: #fff; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600; border-radius: 2rem; margin-bottom: 0.5rem; }
.ahf-sticky-badge svg { width: 0.875rem; height: 0.875rem; }

.ahf-featured-section { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 2px solid var(--ahf-border); }
.ahf-featured-article { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.ahf-featured-thumb { border-radius: var(--ahf-radius); overflow: hidden; }
.ahf-featured-thumb img { width: 100%; height: 350px; object-fit: cover; }
.ahf-featured-category { display: inline-block; background: var(--ahf-primary); color: #fff; padding: 0.375rem 1rem; font-size: 0.8125rem; font-weight: 600; border-radius: 2rem; margin-bottom: 1rem; }
.ahf-featured-title { font-size: 2rem; margin-bottom: 1rem; }
.ahf-featured-title a { color: var(--ahf-secondary); }
.ahf-featured-title a:hover { color: var(--ahf-primary); }
.ahf-featured-excerpt { color: var(--ahf-text-light); font-size: 1rem; margin-bottom: 1rem; }
.ahf-featured-meta { display: flex; gap: 1rem; font-size: 0.875rem; color: var(--ahf-text-light); }

.ahf-single-header { margin-bottom: 2rem; }
.ahf-single-categories { margin-bottom: 1rem; }
.ahf-single-category { display: inline-block; background: var(--ahf-primary); color: #fff; padding: 0.375rem 1rem; font-size: 0.8125rem; font-weight: 600; border-radius: 2rem; margin-right: 0.5rem; }
.ahf-single-category a { color: #fff; }
.ahf-single-title { font-size: 2.5rem; margin-bottom: 1rem; line-height: 1.2; }
.ahf-single-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; font-size: 0.9375rem; color: var(--ahf-text-light); padding-bottom: 1.5rem; border-bottom: 1px solid var(--ahf-border); }
.ahf-single-meta a { color: var(--ahf-text); font-weight: 500; }
.ahf-single-meta a:hover { color: var(--ahf-primary); }
.ahf-single-thumbnail { margin: 2rem 0; border-radius: var(--ahf-radius); overflow: hidden; }
.ahf-single-thumbnail img { width: 100%; }
.ahf-single-thumbnail figcaption { font-size: 0.875rem; color: var(--ahf-text-light); margin-top: 0.75rem; font-style: italic; }

.ahf-entry-content { font-size: 1.0625rem; line-height: 1.8; }
.ahf-entry-content p { margin-bottom: 1.5em; }
.ahf-entry-content h2 { font-size: 1.625rem; margin-top: 2.5rem; margin-bottom: 1rem; }
.ahf-entry-content h3 { font-size: 1.375rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.ahf-entry-content a { color: var(--ahf-primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.ahf-entry-content a:hover { text-decoration-thickness: 2px; }
.ahf-entry-content blockquote { margin: 2rem 0; padding: 1.5rem 2rem; border-left: 4px solid var(--ahf-primary); background: var(--ahf-bg-alt); border-radius: 0 var(--ahf-radius) var(--ahf-radius) 0; font-size: 1.125rem; }
.ahf-entry-content ul, .ahf-entry-content ol { margin: 1.5em 0; padding-left: 1.5em; }
.ahf-entry-content li { margin-bottom: 0.5em; }
.ahf-entry-content img { margin: 2rem 0; border-radius: var(--ahf-radius); }
.ahf-entry-content pre { background: var(--ahf-secondary); color: #e5e7eb; padding: 1.5rem; overflow-x: auto; font-size: 0.875rem; border-radius: var(--ahf-radius); }
.ahf-entry-content code { background: var(--ahf-bg-alt); padding: 0.125rem 0.375rem; font-size: 0.875em; border-radius: 4px; }
.ahf-entry-content pre code { background: none; padding: 0; }

.ahf-tags { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--ahf-border); }
.ahf-tags-label { font-size: 0.875rem; font-weight: 600; margin-right: 0.75rem; color: var(--ahf-text-light); }
.ahf-tags-list { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }
.ahf-tags-list a { display: inline-block; padding: 0.375rem 0.875rem; background: var(--ahf-bg-alt); color: var(--ahf-text); font-size: 0.8125rem; border-radius: 2rem; transition: all var(--ahf-transition); }
.ahf-tags-list a:hover { background: var(--ahf-primary); color: #fff; }

.ahf-share { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--ahf-border); display: flex; align-items: center; gap: 1rem; }
.ahf-share-label { font-size: 0.875rem; font-weight: 600; color: var(--ahf-text-light); }
.ahf-share-buttons { display: flex; gap: 0.5rem; }
.ahf-share-buttons a { display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; background: var(--ahf-bg-alt); color: var(--ahf-text); border-radius: 50%; transition: all var(--ahf-transition); }
.ahf-share-buttons a:hover { background: var(--ahf-primary); color: #fff; }
.ahf-share-buttons svg { width: 1rem; height: 1rem; fill: currentColor; }

.ahf-author-box { margin-top: 2rem; padding: 1.5rem; background: var(--ahf-bg-alt); border-radius: var(--ahf-radius); display: flex; gap: 1.5rem; align-items: center; }
.ahf-author-avatar img { width: 80px; height: 80px; border-radius: 50%; }
.ahf-author-info { flex: 1; }
.ahf-author-name { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; }
.ahf-author-name a { color: var(--ahf-secondary); }
.ahf-author-name a:hover { color: var(--ahf-primary); }
.ahf-author-bio { font-size: 0.9375rem; color: var(--ahf-text-light); }

.ahf-post-nav { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--ahf-border); display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.ahf-post-nav-item { display: flex; flex-direction: column; }
.ahf-post-nav-item.ahf-next { text-align: right; }
.ahf-post-nav-label { font-size: 0.8125rem; color: var(--ahf-text-light); margin-bottom: 0.25rem; }
.ahf-post-nav-title { font-size: 1rem; font-weight: 600; color: var(--ahf-secondary); transition: color var(--ahf-transition); }
.ahf-post-nav-title:hover { color: var(--ahf-primary); }

.ahf-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--ahf-border); }
.ahf-related-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.ahf-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.ahf-related-item { display: flex; flex-direction: column; }
.ahf-related-thumb { margin-bottom: 0.75rem; overflow: hidden; border-radius: var(--ahf-radius); }
.ahf-related-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform 0.3s ease; }
.ahf-related-item:hover .ahf-related-thumb img { transform: scale(1.05); }
.ahf-related-item-title { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--ahf-secondary); }
.ahf-related-item-title:hover { color: var(--ahf-primary); }

.ahr-sidebar { font-size: 0.9375rem; }
.ahf-widget { background: var(--ahf-bg-alt); padding: 1.5rem; margin-bottom: 1.5rem; border-radius: var(--ahf-radius); }
.ahf-widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--ahf-primary); }
.ahf-widget ul { list-style: none; margin: 0; padding: 0; }
.ahf-widget li { padding: 0.5rem 0; border-bottom: 1px solid var(--ahf-border); }
.ahf-widget li:last-child { border-bottom: none; }
.ahf-widget a { color: var(--ahf-text); }
.ahf-widget a:hover { color: var(--ahf-primary); }

/* Sidebar search form */
.ahr-sidebar-search { display: flex; flex-direction: column; gap: 0.5rem; }
.ahr-sidebar-search-input { width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--ahf-border); border-radius: var(--ahf-radius); font-size: 0.875rem; font-family: var(--ahf-font-body); transition: border-color var(--ahf-transition), box-shadow var(--ahf-transition); }
.ahr-sidebar-search-input:focus { border-color: var(--ahf-primary); outline: none; box-shadow: 0 0 0 3px rgba(255,106,61,0.15); }
.ahr-sidebar-search-btn { padding: 0.625rem 1rem; background: var(--ahf-primary); color: #fff; border: none; border-radius: var(--ahf-radius); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background var(--ahf-transition); }
.ahr-sidebar-search-btn:hover { background: var(--ahf-secondary); }

/* Sidebar tag cloud */
.ahr-tag-cloud { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.ahr-tag-item { display: inline-block; padding: 0.25rem 0.75rem; background: var(--ahf-bg); border: 1px solid var(--ahf-border); color: var(--ahf-text); font-size: 0.8125rem; border-radius: 2rem; transition: all var(--ahf-transition); }
.ahr-tag-item:hover { background: var(--ahf-primary); color: #fff; border-color: var(--ahf-primary); }

.ahf-pagination { display: flex; justify-content: center; align-items: center; gap: 0.25rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ahf-border); }
.ahf-pagination a, .ahf-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0 0.75rem; font-weight: 500; font-size: 0.875rem; border-radius: var(--ahf-radius); transition: all var(--ahf-transition); }
.ahf-pagination a:hover { background: var(--ahf-bg-alt); color: var(--ahf-primary); }
.ahf-pagination .current { background: var(--ahf-primary); color: #fff; }

.ahf-archive-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--ahf-border); }
.ahf-archive-title { font-size: 2rem; margin-bottom: 0.5rem; }
.ahf-archive-description { color: var(--ahf-text-light); font-size: 1rem; }

.ahf-search-header { background: var(--ahf-bg-alt); padding: 1.5rem; margin-bottom: 2rem; border-radius: var(--ahf-radius); }
.ahf-search-title { font-size: 1.5rem; margin-bottom: 0.25rem; }
.ahf-search-title span { color: var(--ahf-primary); }
.ahf-search-count { color: var(--ahf-text-light); font-size: 0.9375rem; }
.ahf-no-posts { text-align: center; padding: 3rem 2rem; background: var(--ahf-bg-alt); border-radius: var(--ahf-radius); }
.ahf-no-posts h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.ahf-no-posts p { color: var(--ahf-text-light); margin-bottom: 1.5rem; }
.ahf-search-form-inline { display: flex; max-width: 400px; margin: 0 auto; gap: 0.5rem; }
.ahf-search-form-inline .ahf-search-input { flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--ahf-border); border-radius: var(--ahf-radius); font-size: 0.9375rem; }
.ahf-search-form-inline .ahf-search-input:focus { border-color: var(--ahf-primary); outline: none; box-shadow: 0 0 0 3px rgba(255,106,61,0.15); }
.ahf-search-form-inline .ahf-search-submit { padding: 0.75rem 1.5rem; background: var(--ahf-primary); color: #fff; border: none; border-radius: var(--ahf-radius); font-weight: 600; cursor: pointer; transition: background var(--ahf-transition); }
.ahf-search-form-inline .ahf-search-submit:hover { background: var(--ahf-secondary); }

.ahf-404 { text-align: center; padding: 4rem 2rem; }
.ahf-404-code { font-size: 8rem; font-weight: 800; color: var(--ahf-primary); line-height: 1; margin-bottom: 1rem; }
.ahf-404-title { font-size: 2rem; margin-bottom: 0.5rem; }
.ahf-404-message { color: var(--ahf-text-light); margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; }
.ahf-404-home { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.875rem 2rem; background: var(--ahf-primary); color: #fff; font-weight: 600; border-radius: var(--ahf-radius); margin-top: 1rem; transition: background var(--ahf-transition); }
.ahf-404-home:hover { background: var(--ahf-secondary); color: #fff; }

.ahf-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--ahf-border); }
.ahf-comments-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.ahf-comments-list { list-style: none; margin: 0; padding: 0; }
.ahf-comments-list .children { list-style: none; margin: 0; padding: 0 0 0 2rem; }
.ahf-comment { padding: 1.5rem 0; border-bottom: 1px solid var(--ahf-border); }
.ahf-comment:last-child { border-bottom: none; }
.ahf-comment-body { display: flex; gap: 1rem; }
.ahf-comment-avatar img { width: 48px; height: 48px; border-radius: 50%; }
.ahf-comment-content { flex: 1; }
.ahf-comment-meta { margin-bottom: 0.5rem; }
.ahf-comment-author { font-weight: 600; font-size: 0.9375rem; }
.ahf-comment-date { font-size: 0.8125rem; color: var(--ahf-text-light); margin-left: 0.75rem; }
.ahf-comment-text { font-size: 0.9375rem; line-height: 1.6; }
.ahf-comment-actions { margin-top: 0.5rem; font-size: 0.8125rem; }
.ahf-comment-actions a { color: var(--ahf-text-light); margin-right: 1rem; }
.ahf-comment-actions a:hover { color: var(--ahf-primary); }
.ahf-comment-awaiting { background: #fef3c7; padding: 0.5rem 0.75rem; font-size: 0.8125rem; border-radius: var(--ahf-radius); margin-bottom: 0.5rem; }
.ahf-comment-form { margin-top: 2rem; }
.ahf-comment-form label { display: block; font-weight: 500; margin-bottom: 0.375rem; font-size: 0.875rem; }
.ahf-comment-form input[type="text"], .ahf-comment-form input[type="email"], .ahf-comment-form input[type="url"], .ahf-comment-form textarea { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--ahf-border); border-radius: var(--ahf-radius); font-size: 0.9375rem; margin-bottom: 1rem; transition: border-color var(--ahf-transition), box-shadow var(--ahf-transition); }
.ahf-comment-form textarea { min-height: 150px; resize: vertical; }
.ahf-comment-form input:focus, .ahf-comment-form textarea:focus { border-color: var(--ahf-primary); outline: none; box-shadow: 0 0 0 3px rgba(255,106,61,0.15); }
.ahf-comment-form input[type="submit"] { background: var(--ahf-primary); color: #fff; border: none; padding: 0.875rem 2rem; font-size: 0.9375rem; font-weight: 600; cursor: pointer; border-radius: var(--ahf-radius); transition: background var(--ahf-transition); }
.ahf-comment-form input[type="submit"]:hover { background: var(--ahf-secondary); }
.ahf-comments-closed { background: var(--ahf-bg-alt); padding: 1rem; text-align: center; color: var(--ahf-text-light); font-size: 0.9375rem; border-radius: var(--ahf-radius); }

.ahf-footer { background: var(--ahf-secondary); color: #fff; margin-top: 3rem; }
.ahf-footer-widgets { padding: 3rem 0; }
.ahf-footer-widgets-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.ahf-footer-widget { font-size: 0.9375rem; }
.ahf-footer-widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--ahf-primary); color: #fff; }
.ahf-footer-widget ul { list-style: none; margin: 0; padding: 0; }
.ahf-footer-widget li { padding: 0.375rem 0; }
.ahf-footer-widget a { color: rgba(255,255,255,0.7); transition: color var(--ahf-transition); }
.ahf-footer-widget a:hover { color: #fff; }
.ahf-footer-nav { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0; }
.ahf-footer-menu { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.ahf-footer-menu a { color: rgba(255,255,255,0.7); font-size: 0.875rem; }
.ahf-footer-menu a:hover { color: #fff; }
.ahf-footer-bottom { padding: 1.5rem 0; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }
.ahf-copyright { font-size: 0.875rem; color: rgba(255,255,255,0.5); }

.ahf-scroll-top { position: fixed; bottom: 2rem; right: 2rem; width: 3rem; height: 3rem; background: var(--ahf-primary); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all var(--ahf-transition); z-index: 999; border-radius: 50%; box-shadow: 0 4px 15px rgba(255,106,61,0.3); }
.ahf-scroll-top.ahf-scroll-top-visible { opacity: 1; visibility: visible; }
.ahf-scroll-top:hover { background: var(--ahf-secondary); transform: translateY(-3px); }
.ahf-scroll-top svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; fill: none; }

@media (max-width: 1024px) {
    .ahf-layout.right-sidebar, .ahf-layout.left-sidebar { grid-template-columns: 1fr; }
    .ahf-layout.left-sidebar .ahr-sidebar { order: initial; }
    .ahr-sidebar { margin-top: 2rem; }
    .ahf-footer-widgets-grid { grid-template-columns: repeat(2, 1fr); }
    .ahf-related-grid { grid-template-columns: repeat(2, 1fr); }
    .ahf-featured-article { grid-template-columns: 1fr; }
    .ahf-featured-thumb img { height: 280px; }
}

@media (max-width: 768px) {
    .ahr-sidebar { display: none !important; }
    .ahf-nav-menu { display: none; position: fixed; top: 4.5rem; left: 0; right: 0; background: var(--ahf-bg); flex-direction: column; padding: 1rem; box-shadow: 0 4px 20px rgba(0,0,0,0.1); border-top: 1px solid var(--ahf-border); }
    .ahf-nav-menu.ahf-nav-open { display: flex; }
    .ahf-nav-menu a { padding: 0.75rem 1rem; border-radius: 0; border-bottom: 1px solid var(--ahf-border); }
    .ahf-nav-menu li:last-child a { border-bottom: none; }
    .ahf-menu-toggle { display: block; }
    .ahf-article-card { flex-direction: column; gap: 1rem; }
    .ahf-article-thumb { flex: none; }
    .ahf-article-thumb img { height: 200px; }
    .ahf-single-title { font-size: 1.875rem; }
    .ahf-footer-widgets-grid { grid-template-columns: 1fr; }
    .ahf-related-grid { grid-template-columns: 1fr; }
    .ahf-post-nav { grid-template-columns: 1fr; gap: 1rem; }
    .ahf-post-nav-item.ahf-next { text-align: left; }
    .ahf-author-box { flex-direction: column; text-align: center; }
    .ahf-share { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (max-width: 480px) {
    html { font-size: 15px; }
    .ahf-container { padding: 0 1rem; }
    .ahf-single-title { font-size: 1.5rem; }
    .ahf-404-code { font-size: 5rem; }
    .ahf-featured-title { font-size: 1.5rem; }
    .ahf-search-form-inline { flex-direction: column; }
}

:focus { outline: 2px solid var(--ahf-primary); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--ahf-primary); outline-offset: 2px; }

/* Interlinking Section */
.ahre-interlinking {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}
.ahre-interlinking-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}
.ahre-interlinking-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ahre-interlinking-list li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}
.ahre-interlinking-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--ahre-color-primary, #333);
}
.ahre-interlinking-list a {
    color: var(--ahre-color-primary, #333);
    text-decoration: none;
}
.ahre-interlinking-list a:hover {
    text-decoration: underline;
}

/* Grid Layouts */
.grid-3col .ahf-articles-grid,
.grid-3col .ahf-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}
.grid-2col .ahf-articles-grid,
.grid-2col .ahf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}
/* When sidebar is present, reduce 3col to 2col and stack cards */
.ahf-layout.right-sidebar .grid-3col .ahf-articles-grid,
.ahf-layout.right-sidebar .grid-3col .ahf-grid,
.ahf-layout.left-sidebar .grid-3col .ahf-articles-grid,
.ahf-layout.left-sidebar .grid-3col .ahf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ahf-layout.right-sidebar .ahf-article-card,
.ahf-layout.left-sidebar .ahf-article-card {
    flex-direction: column;
    gap: 1rem;
}
.ahf-layout.right-sidebar .ahf-article-thumb,
.ahf-layout.left-sidebar .ahf-article-thumb {
    flex: none;
}
.ahf-layout.right-sidebar .ahf-article-thumb img,
.ahf-layout.left-sidebar .ahf-article-thumb img {
    height: 200px;
}
.grid-list .ahf-articles-grid,
.grid-list .ahf-grid {
    display: block;
}
.grid-list .ahf-article-card {
    margin-bottom: 30px;
}
@media (max-width: 1024px) {
    .grid-3col .ahf-articles-grid,
    .grid-3col .ahf-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .grid-3col .ahf-articles-grid,
    .grid-3col .ahf-grid,
    .grid-2col .ahf-articles-grid,
    .grid-2col .ahf-grid,
    .ahf-layout.right-sidebar .grid-3col .ahf-articles-grid,
    .ahf-layout.right-sidebar .grid-3col .ahf-grid,
    .ahf-layout.left-sidebar .grid-3col .ahf-articles-grid,
    .ahf-layout.left-sidebar .grid-3col .ahf-grid {
        grid-template-columns: 1fr;
    }
}
