/*
Theme Name: SEO Tools Hub
Theme URI: https://example.com/seotools-hub
Author: SEO Tools Hub
Author URI: https://example.com
Description: A professional SEO & Web Tools theme with an advanced Addon Tools System. Supports blog posts for AdSense approval and a dynamic tool addon framework.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: seotools-hub
Tags: seo, tools, blog, adsense, addon
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    --color-primary:     #0057FF;
    --color-primary-dk:  #0041CC;
    --color-accent:      #00C2A8;
    --color-accent-dk:   #00967F;
    --color-bg:          #F4F7FF;
    --color-surface:     #FFFFFF;
    --color-border:      #E0E8FF;
    --color-text:        #1A1F36;
    --color-muted:       #6B7280;
    --color-danger:      #EF4444;
    --color-success:     #10B981;
    --color-warning:     #F59E0B;
    --radius-sm:         6px;
    --radius-md:         12px;
    --radius-lg:         20px;
    --shadow-sm:         0 1px 3px rgba(0,87,255,0.08);
    --shadow-md:         0 4px 16px rgba(0,87,255,0.12);
    --shadow-lg:         0 12px 40px rgba(0,87,255,0.16);
    --font-heading:      'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    --font-body:         'DM Sans', 'Segoe UI', sans-serif;
    --font-mono:         'JetBrains Mono', 'Fira Code', monospace;
    --transition:        0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width:         1280px;
    --header-height:     68px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dk); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
}

ul, ol { list-style: none; }
input, textarea, select, button { font-family: inherit; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: 24px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 40px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background: var(--color-primary-dk);
    border-color: var(--color-primary-dk);
    color: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}
.btn-accent {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.btn-accent:hover {
    background: var(--color-accent-dk);
    border-color: var(--color-accent-dk);
    color: #fff;
    transform: translateY(-1px);
}
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 17px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* ============================================================
   SITE HEADER — Professional Fixed
   ============================================================ */

/* ── Skip link ── */
.skip-link { position:absolute;top:-40px;left:0;padding:8px 16px;background:var(--color-primary);color:#fff;z-index:9999;border-radius:0 0 6px 0;font-weight:600;transition:top .2s; }
.skip-link:focus { top:0; }

/* ── Header shell ── */
#site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 0 var(--color-border);
    transition: box-shadow .2s;
}
#site-header.scrolled { box-shadow: 0 4px 24px rgba(0,87,255,.10); }
.admin-bar #site-header { top: 32px; }
@media screen and (max-width:782px){ .admin-bar #site-header { top:46px; } }

/* ── Inner layout ── */
.sth-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 0;
}

/* ══════════════════════════════════════
   LOGO
══════════════════════════════════════ */
.sth-logo-wrap { flex-shrink: 0; margin-right: 50px; }
.custom-logo-link img {width: 60px;}

.sth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
    line-height: 1;
}

/* Custom image logo */
.sth-logo .custom-logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
}
.sth-logo .custom-logo-link img {
    display: block;
    height: 40px;        /* Fixed height — always 40px */
    width: auto;
    max-width: 180px;    /* Never wider than 180px */
    max-height: 40px;    /* Hard cap */
    object-fit: contain;
    object-position: left center;
}

/* Emoji/text fallback logo */
.sth-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    color: #fff;
}
.sth-logo-text { display: flex; flex-direction: column; gap: 1px; }
.sth-logo-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
    color: var(--color-text);
    letter-spacing: -.3px;
    line-height: 1;
}
.sth-logo-tagline {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-muted);
    letter-spacing: .02em;
    line-height: 1;
    text-transform: uppercase;
}

/* ══════════════════════════════════════
   DESKTOP NAVIGATION
══════════════════════════════════════ */
.sth-nav { flex: 1; display: flex; align-items: center; }

.sth-nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.sth-nav-menu > li { position: relative; }

/* Top-level links */
.sth-nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 13px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
    line-height: 1;
}
.sth-nav-menu > li > a:hover { background: rgba(0,87,255,.07); color: var(--color-primary); }
.sth-nav-menu > li.current-menu-item > a,
.sth-nav-menu > li.current-menu-parent > a,
.sth-nav-menu > li.current-menu-ancestor > a {
    background: rgba(0,87,255,.08);
    color: var(--color-primary);
}

/* Dropdown arrow for parent items */
.sth-nav-menu > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 5px;
    margin-left: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform .2s;
    flex-shrink: 0;
}
.sth-nav-menu > li.menu-item-has-children:hover > a::after { transform: rotate(180deg); }

/* Dropdown submenu */
.sth-nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,87,255,.12);
    padding: 6px;
    list-style: none;
    z-index: 100;
    animation: dropDown .15s ease;
}
@keyframes dropDown { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.sth-nav-menu > li.menu-item-has-children:hover > .sub-menu,
.sth-nav-menu > li.menu-item-has-children:focus-within > .sub-menu { display: block; }
.sth-nav-menu .sub-menu li a {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: background .12s, color .12s;
    white-space: nowrap;
}
.sth-nav-menu .sub-menu li a:hover { background: rgba(0,87,255,.07); color: var(--color-primary); }

/* ══════════════════════════════════════
   RIGHT SIDE ACTIONS
══════════════════════════════════════ */
.sth-header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }

/* All Tools CTA Button */
.sth-tools-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 18px;
    height: 38px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s, transform .15s, box-shadow .15s;
    white-space: nowrap;
}
.sth-tools-btn:hover {
    background: var(--color-primary-dk);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,87,255,.3);
}
.sth-tools-btn svg { flex-shrink: 0; }

/* Hamburger button */
.sth-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: 1.5px solid var(--color-border);
    border-radius: 9px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.sth-hamburger:hover { border-color: var(--color-primary); background: rgba(0,87,255,.05); }
.sth-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform .25s, opacity .25s, width .25s;
    transform-origin: center;
}
/* Open state animation */
.sth-hamburger.is-open .sth-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sth-hamburger.is-open .sth-bar:nth-child(2) { opacity: 0; width: 0; }
.sth-hamburger.is-open .sth-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════
   MOBILE NAV DRAWER
══════════════════════════════════════ */
.sth-mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 1100;
    box-shadow: -8px 0 40px rgba(0,0,0,.12);
    transition: right .28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sth-mobile-nav.is-open { right: 0; }

.sth-mobile-nav-inner { padding: 24px 20px; }

/* Close button inside drawer */
.sth-mobile-close {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}
.sth-mobile-close-btn {
    width: 36px; height: 36px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 18px; color: var(--color-muted);
    transition: background .15s;
}
.sth-mobile-close-btn:hover { background: var(--color-border); }

.sth-mobile-menu { list-style: none; margin: 0 0 20px; padding: 0; }
.sth-mobile-menu li { border-bottom: 1px solid var(--color-bg); }
.sth-mobile-menu li:last-child { border-bottom: none; }
.sth-mobile-menu a {
    display: block;
    padding: 13px 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: color .15s;
}
.sth-mobile-menu a:hover { color: var(--color-primary); }
.sth-mobile-menu .sub-menu { list-style: none; padding: 0 0 8px 16px; margin: 0; }
.sth-mobile-menu .sub-menu li { border: none; }
.sth-mobile-menu .sub-menu a { font-size: 13px; font-weight: 500; color: var(--color-muted); padding: 7px 4px; }

.sth-mobile-actions { margin-top: 16px; }

/* Overlay */
.sth-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1099;
    backdrop-filter: blur(2px);
    transition: opacity .28s;
    opacity: 0;
}
.sth-mobile-overlay.is-visible { display: block; opacity: 1; }

/* ══════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════ */
@media (max-width: 1024px) {
    .sth-logo-wrap { margin-right: 20px; }
}

@media (max-width: 900px) {
    .sth-nav { display: none; }        /* Hide desktop nav */
    .sth-mobile-nav { display: block; }/* Show drawer */
    .sth-hamburger { display: flex; }
    .sth-header-inner { gap: 0; }
}

@media (max-width: 480px) {
    .sth-header-inner { padding: 0 16px; }
    .sth-logo-name { font-size: 16px; }
    .sth-logo .custom-logo-link img { height: 34px; max-width: 140px; }
    .sth-tools-btn span { display: none; } /* Hide text on tiny screens, keep icon */
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    background: linear-gradient(135deg, #0057FF 0%, #0041CC 40%, #001A80 100%);
    padding: 80px 0 100px;
    position: relative;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}
.hero-section h1 {
    font-size: clamp(32px, 5vw, 58px);
    color: #fff;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.hero-section h1 .highlight {
    color: var(--color-accent);
    position: relative;
}
.hero-section p.hero-desc {
    font-size: 18px;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 36px;
}
.hero-search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Hero search results dropdown */
.hero-search-box .header-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow-y: auto;
    z-index: 9999;
	display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.hero-search-box .search-result-item small {
    display: none;
}
.hero-search-box .search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #1a1a2e;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
    background: #ffffff;
	text-align:left;
}
.hero-search-box .search-result-item:last-child { border-bottom: none; }
.hero-search-box .search-result-item:hover {
    background: #f5f8ff;
    color: var(--color-primary);
}
.hero-search-box .search-result-item .result-icon {
    font-size: 22px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(0,87,255,0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.hero-search-box input {
    width: 100%;
    padding: 18px 72px 18px 24px;
    border-radius: 16px;
    border: none;
    font-size: 16px;
    background: #fff;
    color: var(--color-text);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    outline: none;
}
.hero-search-box button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    border: none;
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background var(--transition);
}
.hero-search-box button:hover { background: var(--color-primary-dk); }

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; color: rgba(255,255,255,0.9); }
.hero-stat .stat-num {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-heading);
}
.hero-stat .stat-label { font-size: 13px; color: rgba(255,255,255,0.65); }

/* ============================================================
   SECTION STYLES
   ============================================================ */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-label {
    display: inline-block;
    background: rgba(0,87,255,0.08);
    color: var(--color-primary);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.section-title {
    font-size: clamp(24px, 3vw, 36px);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.section-desc {
    color: var(--color-muted);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto;
}

.section { padding: 72px 0; }
.section-alt { background: var(--color-surface); }

/* ============================================================
   TOOL CARD
   ============================================================ */
.tool-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}
.tool-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    color: var(--color-text);
}
.tool-card:hover::before { transform: scaleX(1); }

.tool-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(0,87,255,0.1), rgba(0,194,168,0.1));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
    transition: transform var(--transition);
}
.tool-card:hover .tool-icon { transform: scale(1.1); }

.tool-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}
.tool-card p {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.5;
    flex: 1;
}
.tool-card .tool-tag {
    display: inline-block;
    background: rgba(0,87,255,0.06);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    margin-top: 14px;
    align-self: flex-start;
}

/* ============================================================
   CATEGORY TABS
   ============================================================ */
.category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 32px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}
.category-tabs::-webkit-scrollbar { height: 4px; }
.category-tabs::-webkit-scrollbar-track { background: transparent; }
.category-tabs::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-muted);
    transition: all var(--transition);
    white-space: nowrap;
}
.cat-tab:hover, .cat-tab.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ============================================================
   ADS SECTIONS
   ============================================================ */
.ad-slot {
    background: linear-gradient(135deg, #f8f9ff, #f0f4ff);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    min-height: 90px;
    margin: 24px 0;
}
.ad-slot-728 { min-height: 90px; }
.ad-slot-300 { min-width: 300px; min-height: 250px; }

/* ============================================================
   SINGLE TOOL PAGE
   ============================================================ */
.tool-page-wrapper {
    padding: 40px 0 80px;
}
.tool-page-header {
    background: linear-gradient(135deg, #001A80, #0057FF);
    color: #fff;
    padding: 48px 0;
    margin-bottom: 40px;
}
.tool-page-header .tool-page-icon {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
}
.tool-page-header h1 { color: #fff; font-size: clamp(24px, 4vw, 40px); margin-bottom: 10px; }
.tool-page-header .tool-breadcrumb {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    margin-bottom: 10px;
}
.tool-page-header .tool-breadcrumb a { color: rgba(255,255,255,0.8); }
.tool-page-header .tool-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.tool-meta-badge {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.tool-content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 900px) {
    .tool-content-grid { grid-template-columns: 1fr; }
}

.tool-main-panel {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.tool-main-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(90deg, rgba(0,87,255,0.03), rgba(0,194,168,0.03));
    display: flex;
    align-items: center;
    gap: 10px;
}
.tool-main-panel-header h2 { font-size: 16px; margin: 0; }
.tool-main-panel-body { padding: 28px; }

/* Tool UI components inside tool */
.tool-input-group { margin-bottom: 20px; }
.tool-input-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--color-text); }
.tool-input-group textarea,
.tool-input-group input,
.tool-input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    font-family: var(--font-body);
}
.tool-input-group textarea:focus,
.tool-input-group input:focus,
.tool-input-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0,87,255,0.1);
    background: #fff;
}
.tool-input-group textarea { resize: vertical; min-height: 120px; }

.tool-result-box {
    background: var(--color-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 20px;
}
.tool-result-box h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.tool-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.tool-sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
	margin-bottom: 20px !important;
}

.sidebar-widget-header {
    padding: 14px 20px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}
.sidebar-widget-body { padding: 20px; }

.related-tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    transition: color var(--transition);
}
.related-tool-item:last-child { border-bottom: none; }
.related-tool-item:hover { color: var(--color-primary); }
.related-tool-item .rt-icon {
    width: 36px;
    height: 36px;
    background: rgba(0,87,255,0.07);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section { padding: 60px 0; background: var(--color-bg); }
.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    user-select: none;
    transition: background var(--transition);
}
.faq-question:hover { background: var(--color-bg); }
.faq-question .faq-icon { font-size: 20px; color: var(--color-primary); transition: transform var(--transition); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
    display: none;
    padding: 0 24px 20px;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } .hero-search-box .header-search-results {grid-template-columns: repeat(1, 1fr);} }

.blog-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.blog-card-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 20px; }
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--color-muted);
    margin-bottom: 10px;
}
.blog-card-meta .cat-label {
    background: rgba(0,87,255,0.08);
    color: var(--color-primary);
    padding: 2px 10px;
    border-radius: 50px;
    font-weight: 600;
}
.blog-card-body h2 { font-size: 16px; line-height: 1.4; margin-bottom: 10px; }
.blog-card-body h2 a { color: var(--color-text); }
.blog-card-body h2 a:hover { color: var(--color-primary); }
.blog-card-body p { font-size: 13px; color: var(--color-muted); line-height: 1.6; }

/* Single post */
.single-post-wrapper { display: grid; grid-template-columns: 1fr 340px !important; gap: 20px !important; padding: 48px 0 80px; align-items: start; }
@media (max-width: 960px) { .single-post-wrapper { grid-template-columns: 1fr !important; }.single-post-container {
    padding: 10px;
} }

.post-article {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
	padding:20px;
}
.post-featured-image { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-body { padding: 36px; }
.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--color-muted);
    margin-bottom: 20px;
}
.post-meta a { color: var(--color-primary); font-weight: 600; }
.post-title { font-size: clamp(22px, 3vw, 36px); margin-bottom: 16px; letter-spacing: -0.01em; }

.post-content { font-size: 16px; line-height: 1.8; color: #374151; }
.post-content h2, .post-content h3, .post-content h4 { margin: 32px 0 14px; }
.post-content p { margin-bottom: 20px; }
.post-content ul, .post-content ol { margin: 0 0 20px 24px; list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 16px 20px;
    margin: 24px 0;
    background: rgba(0,87,255,0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--color-muted);
}
.post-content img { border-radius: var(--radius-sm); margin: 20px 0; }
.post-content a { color: var(--color-primary); text-decoration: underline; }
.post-content code {
    font-family: var(--font-mono);
    background: var(--color-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid var(--color-border);
}
.post-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 24px 0;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
}

.post-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 20px 36px; border-top: 1px solid var(--color-border); }
.post-tag {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.post-tag:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
    padding: 14px 0;
    font-size: 13px;
    color: var(--color-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.breadcrumbs a { color: var(--color-muted); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs .sep { opacity: 0.4; }
.breadcrumbs .current { color: var(--color-text); font-weight: 600; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 0;
}
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-muted);
    transition: all var(--transition);
    text-decoration: none;
}
.page-numbers:hover, .page-numbers.current {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.page-numbers.dots { border: none; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
    background: #0a0f24;
    color: rgba(255,255,255,0.7);
    padding: 64px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .site-logo { color: #fff; margin-bottom: 16px;display: flex;align-items: center;gap: 10px;line-height: 1; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 280px; }
.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    color: #fff;
}
.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--color-accent); }

.footer-bottom {
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-bottom-links a:hover { color: var(--color-accent); }

/* Social links */
.social-links { display: flex; gap: 10px; margin-top: 20px; }
.social-link {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    transition: all var(--transition);
    text-decoration: none;
}
.social-link:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); }

/* ============================================================
   ADMIN NOTICE / MESSAGES
   ============================================================ */
.sth-notice {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sth-notice-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.sth-notice-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.sth-notice-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ============================================================
   TOOLS LISTING PAGE
   ============================================================ */
.tools-listing-hero {
    background: linear-gradient(135deg, #0057FF 0%, #0041CC 100%);
    padding: 56px 0;
    color: #fff;
    text-align: center;
}
.tools-listing-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 44px); margin-bottom: 12px; }
.tools-listing-hero p { color: rgba(255,255,255,0.8); font-size: 17px; }

.tools-listing-section { padding: 56px 0; }

.category-section { margin-bottom: 56px; }
.category-section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-border);
}
.category-section-header .cat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(0,87,255,0.1), rgba(0,194,168,0.1));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}
.category-section-header h2 { font-size: 20px; margin: 0 0 2px; }
.category-section-header .tool-count {
    background: rgba(0,87,255,0.08);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 4px;
}

/* ============================================================
   SEARCH RESULTS HIGHLIGHT
   ============================================================ */
.search-highlight { background: rgba(0,87,255,0.12); border-radius: 3px; padding: 0 2px; }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 768px) {
    .section { padding: 48px 0; }
    .hero-section { padding: 56px 0 72px; }
    .tool-page-header { padding: 36px 0; }
}

/* ============================================================
   SKIP LINK (Accessibility)
   ============================================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: 8px 16px;
    background: var(--color-primary);
    color: #fff;
    z-index: 9999;
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 600;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    #site-header, #site-footer, .ad-slot, .tool-sidebar { display: none; }
    body { background: #fff; }
}



