/*
Theme Name: DailyToolsBlog
Theme URI: https://dailytoolsblog.com
Author: DailyToolsBlog Team
Author URI: https://dailytoolsblog.com
Description: A fast, modern, mobile-friendly WordPress theme for free online tools, calculators, and helpful blog articles. Optimized for SEO and Google AdSense.
Version: 5.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dailytoolsblog
Tags: blog, custom-logo, custom-menu, custom-colors, translation-ready, responsive-layout, one-column, two-columns, right-sidebar, theme-options, featured-images, full-width-template, sticky-post, threaded-comments, footer-widgets
*/

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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #0f172a;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --max-width: 1280px;
  --header-height: 72px;
  --transition: all 0.2s ease;
}

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-700);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--gray-900);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 1.1rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

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

.site-content {
  min-height: calc(100vh - var(--header-height) - 200px);
}

.content-area {
  padding: 40px 0;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.content-wrapper.full-width {
  grid-template-columns: 1fr;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 1.2rem;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
}

.site-title a {
  color: var(--gray-900);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--primary);
}

.site-title span {
  color: var(--primary);
}

.site-description {
  display: none;
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-navigation li {
  position: relative;
}

.main-navigation a {
  display: block;
  padding: 8px 16px;
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--primary);
  background: var(--primary-light);
}

/* Dropdown */
.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 220px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  padding: 8px;
  flex-direction: column;
  z-index: 100;
}

.main-navigation li:hover > .sub-menu {
  display: flex;
}

.main-navigation .sub-menu a {
  padding: 10px 14px;
  font-size: 0.9rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--gray-700);
}

.menu-toggle .hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle .hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: var(--transition);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  padding: 8px;
  border-radius: var(--radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search-toggle:hover {
  background: var(--gray-100);
  color: var(--primary);
}

/* Search Overlay */
.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  backdrop-filter: blur(4px);
}

.search-overlay.active {
  display: flex;
}

.search-overlay-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-xl);
}

.search-overlay .search-form {
  display: flex;
  gap: 10px;
}

.search-overlay .search-field {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition);
}

.search-overlay .search-field:focus {
  border-color: var(--primary);
}

.search-overlay .search-submit {
  padding: 14px 24px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.search-overlay .search-submit:hover {
  background: var(--primary-dark);
}

.search-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: var(--white);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  color: var(--gray-600);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  color: var(--white);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-title span {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 36px;
  line-height: 1.6;
}

.hero-search {
  max-width: 560px;
  margin: 0 auto 30px;
}

.hero-search-form {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.hero-search-form input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--gray-700);
  outline: none;
}

.hero-search-form button {
  padding: 16px 28px;
  background: var(--primary-dark);
  color: var(--white);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-search-form button:hover {
  background: var(--secondary);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 20px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
}

.hero-stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header .section-subtitle {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-header .section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header .section-desc {
  color: var(--gray-500);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   TOOL CATEGORIES
   ======================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.5rem;
}

.category-icon.math {
  background: #dbeafe;
  color: #2563eb;
}
.category-icon.text {
  background: #dcfce7;
  color: #16a34a;
}
.category-icon.finance {
  background: #fef3c7;
  color: #d97706;
}
.category-icon.converter {
  background: #fce7f3;
  color: #db2777;
}
.category-icon.health {
  background: #ede9fe;
  color: #7c3aed;
}
.category-icon.seo {
  background: #ffedd5;
  color: #ea580c;
}
.category-icon.dev {
  background: #cffafe;
  color: #0891b2;
}
.category-icon.misc {
  background: #f1f5f9;
  color: #475569;
}

.category-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.category-card span {
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* ========================================
   TOOLS GRID
   ======================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.tool-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--success);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tool-card-badge.popular {
  background: var(--accent);
}

.tool-card-badge.new {
  background: var(--primary);
}

.tool-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255,255,255,0.9);
  flex-shrink: 0;
}

.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tool-card h3 a {
  color: var(--gray-900);
  text-decoration: none;
}

.tool-card h3 a:hover {
  color: var(--primary);
}

.tool-card p {
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 16px;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.tool-card-meta {
  font-size: 0.8rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.tool-card-link:hover {
  gap: 8px;
}

.tool-card-link svg {
  width: 16px;
  height: 16px;
  transition: var(--transition);
}

/* ========================================
   AD BANNER PLACEHOLDERS
   ======================================== */
.ad-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
  min-height: 90px;
}

.ad-banner.is-placeholder {
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  color: var(--gray-400);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  padding: 20px;
}

.ad-banner-header {
  min-height: 90px;
  max-width: 728px;
  margin: 20px auto;
}

.ad-banner-sidebar {
  min-height: 250px;
  margin-bottom: 24px;
}

.ad-banner-inline {
  min-height: 280px;
  margin: 30px 0;
}

.ad-banner-footer {
  min-height: 90px;
  max-width: 728px;
  margin: 30px auto;
}

.ad-banner-between {
  min-height: 120px;
}

.ad-label {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

/* ========================================
   BLOG SECTION
   ======================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-light), var(--gray-100));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 24px;
}

.blog-card-category {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.blog-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-card h3 a {
  color: var(--gray-900);
}

.blog-card h3 a:hover {
  color: var(--primary);
}

.blog-card-excerpt {
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gray-400);
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.blog-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-card-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* ========================================
   SINGLE TOOL PAGE
   ======================================== */
.tool-page {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 30px;
}

.tool-page-header {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.tool-page-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.tool-page-header .tool-description {
  color: var(--gray-500);
  font-size: 1.05rem;
}

.tool-interface {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 30px;
  margin-bottom: 30px;
}

.tool-input-group {
  margin-bottom: 20px;
}

.tool-input-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.tool-input-group input,
.tool-input-group textarea,
.tool-input-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: var(--transition);
  background: var(--white);
  color: var(--gray-700);
}

.tool-input-group input:focus,
.tool-input-group textarea:focus,
.tool-input-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.tool-input-group textarea {
  min-height: 120px;
  resize: vertical;
}

.tool-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition);
}

.tool-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.tool-btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}

.tool-btn-secondary:hover {
  background: var(--gray-300);
}

.tool-btn-group {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.tool-result {
  background: var(--white);
  border: 2px solid var(--success);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 20px;
  display: none;
}

.tool-result.active {
  display: block;
}

.tool-result-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--success);
  margin-bottom: 10px;
}

.tool-result-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.tool-result-detail {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.tool-how-to {
  margin-top: 30px;
}

.tool-how-to h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.tool-how-to ol {
  list-style: decimal;
  padding-left: 24px;
}

.tool-how-to ol li {
  margin-bottom: 10px;
  color: var(--gray-600);
}

.tool-faq {
  margin-top: 30px;
}

.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--gray-50);
  cursor: pointer;
  font-weight: 600;
  color: var(--gray-700);
  border: none;
  width: 100%;
  text-align: left;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--gray-100);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: var(--gray-400);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 16px 20px;
  max-height: 500px;
}

.faq-answer p {
  color: var(--gray-600);
  font-size: 0.9rem;
}

.faq-answer ul,
.faq-answer ol {
  padding-left: 24px;
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.faq-answer ul {
  list-style: disc;
}

.faq-answer ol {
  list-style: decimal;
}

.faq-answer li {
  margin-bottom: 6px;
}

/* ========================================
   BLOG SINGLE
   ======================================== */
.single-post-header {
  margin-bottom: 30px;
}

.single-post-category {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.single-post-title {
  font-size: 2.2rem;
  line-height: 1.25;
  margin-bottom: 16px;
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--gray-400);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.single-post-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.single-post-featured {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 30px;
}

.single-post-featured img {
  width: 100%;
  height: auto;
}

.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--gray-700);
}

.entry-content h2 {
  font-size: 1.6rem;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

.entry-content h3 {
  font-size: 1.3rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

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

.entry-content ul,
.entry-content ol {
  padding-left: 28px;
  margin-bottom: 18px;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  margin-bottom: 8px;
}

.entry-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--gray-600);
}

.entry-content pre {
  background: var(--gray-900);
  color: #e2e8f0;
  padding: 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
}

.entry-content code {
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--primary-dark);
}

.entry-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.entry-content th,
.entry-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.entry-content th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
}

.entry-content img {
  border-radius: var(--radius);
  margin: 24px 0;
}

/* Post Tags */
.post-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.post-tags span:first-child {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.9rem;
}

.post-tags a {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
}

.post-tags a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Post Navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--gray-200);
}

.post-nav-link {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}

.post-nav-link:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.post-nav-label {
  font-size: 0.8rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 6px;
}

.post-nav-title {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.95rem;
}

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

/* Related Posts */
.related-posts {
  margin-top: 40px;
}

.related-posts-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* Author Box */
.author-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 30px;
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.author-info p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

/* Hide default blog widgets (Archives, Categories, Meta, Recent Posts) from the Tool sidebar */
.single-tool-page .sidebar .widget_archive,
.single-tool-page .sidebar .widget_categories,
.single-tool-page .sidebar .widget_recent_entries,
.single-tool-page .sidebar .widget_meta,
.single-tool-page .sidebar .widget_recent_comments {
  display: none !important;
}

.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-widget h3,
.widget-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  color: var(--gray-800);
}

.sidebar-widget ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.sidebar-widget ul li a {
  color: var(--gray-600);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-widget ul li a:hover {
  color: var(--primary);
}

.sidebar-popular-tool {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.sidebar-popular-tool:last-child {
  border-bottom: none;
}

.sidebar-popular-tool-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.9rem;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.1), inset 0 1px 0 rgba(255,255,255,0.9);
}

.sidebar-popular-tool h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.sidebar-popular-tool h4 a {
  color: var(--gray-700);
}

.sidebar-popular-tool h4 a:hover {
  color: var(--primary);
}

.sidebar-popular-tool span {
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 12px;
}

.cta-section p {
  opacity: 0.9;
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--white);
  color: var(--primary);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
}

.cta-btn:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--primary-dark);
}

/* ========================================
   BREADCRUMB
   ======================================== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
}

.breadcrumb-list li a {
  color: var(--gray-500);
}

.breadcrumb-list li a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--gray-300);
}

.breadcrumb-list li:last-child {
  color: var(--gray-700);
  font-weight: 500;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--gray-200);
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--gray-600);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.pagination .page-numbers:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .page-numbers.current {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 16px;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--gray-800);
}

.footer-about .footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-about .footer-logo span {
  color: var(--primary);
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--gray-800);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.9rem;
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
}

.footer-links h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  color: var(--gray-400);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links ul li a:hover {
  color: var(--white);
  padding-left: 4px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: var(--gray-500);
}

.footer-bottom-links a:hover {
  color: var(--white);
}

/* ========================================
   LEGAL PAGES
   ======================================== */
.legal-page {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 50px;
  max-width: 900px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.legal-page .last-updated {
  color: var(--gray-400);
  font-size: 0.9rem;
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 30px;
  margin-bottom: 12px;
}

.legal-page p {
  margin-bottom: 14px;
  line-height: 1.8;
}

.legal-page ul {
  list-style: disc;
  padding-left: 28px;
  margin-bottom: 14px;
}

.legal-page ul li {
  margin-bottom: 6px;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form .submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition);
}

.contact-form .submit-btn:hover {
  background: var(--primary-dark);
}

/* ========================================
   ARCHIVE / TOOLS LISTING
   ======================================== */
.archive-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 40px 0;
  margin-bottom: 0;
}

.archive-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.archive-header p {
  color: var(--gray-500);
  font-size: 1.05rem;
}

.tools-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tools-filter button {
  padding: 8px 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.tools-filter button:hover,
.tools-filter button.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ========================================
   404 PAGE
   ======================================== */
.error-404 {
  text-align: center;
  padding: 80px 20px;
}

.error-404-code {
  font-size: 8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.error-404 h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.error-404 p {
  color: var(--gray-500);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.error-404 .search-form {
  max-width: 400px;
  margin: 0 auto 24px;
  display: flex;
  gap: 10px;
}

.error-404 .search-field {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
}

.error-404 .search-submit {
  padding: 12px 20px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}

/* ========================================
   COMMENTS
   ======================================== */
.comments-area {
  margin-top: 40px;
}

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

.comment-list {
  list-style: none;
}

.comment {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  background: var(--white);
}

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

.comment-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.comment-author {
  font-weight: 600;
  color: var(--gray-800);
}

.comment-date {
  font-size: 0.8rem;
  color: var(--gray-400);
}

.comment-body p {
  font-size: 0.95rem;
  color: var(--gray-600);
}

.comment-reply-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 8px;
  display: inline-block;
}

.comment-respond {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 30px;
  margin-top: 30px;
}

.comment-respond .comment-reply-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.comment-form p {
  margin-bottom: 16px;
}

.comment-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
  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 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
}

.comment-form textarea {
  min-height: 120px;
}

.comment-form .submit {
  padding: 12px 28px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: 10px;
}
.mt-2 {
  margin-top: 20px;
}
.mt-3 {
  margin-top: 30px;
}
.mt-4 {
  margin-top: 40px;
}
.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 10px;
}
.mb-2 {
  margin-bottom: 20px;
}
.mb-3 {
  margin-bottom: 30px;
}
.mb-4 {
  margin-bottom: 40px;
}
.hidden {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
}

.btn-view-all:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  z-index: 900;
}

.back-to-top.visible {
  display: flex;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .legal-page {
    padding: 30px;
  }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.2rem;
  }

  .menu-toggle {
    display: flex;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    z-index: 999;
  }

  .main-navigation.toggled {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation a {
    padding: 12px 16px;
  }

  .main-navigation .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 16px;
    display: none;
  }

  .main-navigation li:hover > .sub-menu,
  .main-navigation li.toggled-on > .sub-menu {
    display: flex;
  }

  .hero-section {
    padding: 50px 0;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-search-form {
    flex-direction: column;
  }

  .hero-search-form button {
    justify-content: center;
  }

  .hero-stats {
    gap: 20px;
    flex-wrap: wrap;
  }

  .section {
    padding: 40px 0;
  }

  .section-header .section-title {
    font-size: 1.5rem;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  .tool-page {
    padding: 24px;
  }

  .tool-input-row {
    grid-template-columns: 1fr;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .single-post-title {
    font-size: 1.6rem;
  }

  .author-box {
    flex-direction: column;
    text-align: center;
  }

  .error-404-code {
    font-size: 5rem;
  }

  .ad-banner-header {
    min-height: 60px;
  }

  .ad-banner-inline {
    min-height: 200px;
  }

  .legal-page {
    padding: 20px;
  }

  .legal-page h1 {
    font-size: 1.5rem;
  }

  .content-area {
    padding: 24px 0;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .category-card {
    padding: 18px 12px;
  }

  .category-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 14px;
  }

  .site-title {
    font-size: 1.1rem;
  }

  .tool-btn-group {
    flex-direction: column;
  }

  .tool-btn {
    justify-content: center;
  }
}

/* ========================================
   WORDPRESS SPECIFIC
   ======================================== */
.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.85rem;
  color: var(--gray-500);
  text-align: center;
  margin-top: 8px;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignleft {
  float: left;
  margin-right: 20px;
  margin-bottom: 10px;
}

.alignright {
  float: right;
  margin-left: 20px;
  margin-bottom: 10px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Sticky post */
.sticky .blog-card {
  border: 2px solid var(--primary);
}

/* WordPress widgets */
.widget select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

/* Skip link */
.skip-link {
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 9999;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 16px;
  color: var(--white);
}

/* ========================================
   LOADING & ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .ad-banner,
  .back-to-top,
  .comments-area,
  .post-navigation {
    display: none !important;
  }

  .content-wrapper {
    grid-template-columns: 1fr !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
}

/* ============================================================
   CUSTOM STEP LIST (dtb-how-to-steps)
   ============================================================ */
.dtb-how-to-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: dtb-step;
}

.dtb-how-to-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  counter-increment: dtb-step;
}

.dtb-how-to-step:last-child {
  border-bottom: none;
}

.dtb-how-to-step::before {
  content: counter(dtb-step);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.dtb-step-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.dtb-step-body {
  flex: 1;
}

.dtb-step-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.dtb-step-detail {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   FEATURES BOX (dtb-features-box)
   ============================================================ */
.dtb-features-box {
  margin-top: 30px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
}

.dtb-features-heading {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.dtb-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.dtb-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
}

.dtb-feature-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.dtb-feature-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  line-height: 1.4;
}

/* ========================================
   TOOL HERO IMAGE (single-tool.php only)
   ======================================== */
.tool-hero {
  margin-bottom: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tool-hero-img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}

/* ========================================
   CATEGORY TAG PILL (grid + list cards)
   ======================================== */
.tool-category-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  /* default colours; overridden per-category via wp_head CSS */
  background: #ede9fe;
  color: #5b21b6;
}

/* ========================================
   TOOL ICON (upgraded grid icon wrapper)
   Replaces .tool-card-icon in grid context.
   ======================================== */
.tool-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border-radius: 20px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
  flex-shrink: 0;
  /* default gradient; overridden per-category via wp_head CSS */
  background: linear-gradient(135deg, #ede9fe22, #ede9fe11);
}

.tool-card:hover .tool-icon {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ========================================
   TOOL LIST VIEW (template-parts/tool-list.php)
   ======================================== */
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.tool-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.tool-list-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.tool-list-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.10);
}

.tool-list-body {
  flex: 1;
  min-width: 0;
}

.tool-list-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-list-excerpt {
  font-size: 0.85rem;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-list-cta {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.tool-list-category-group {
  margin-bottom: 32px;
}

.tool-list-category-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-400);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-100);
}

/* ========================================
   SITE IDENTITY — LOGO & TYPOGRAPHY
   ======================================== */

/* Custom logo wrapper */
.dtb-custom-logo {
  display: flex;
  align-items: center;
}

/* Auto first-letter fallback box */
.dtb-letter-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* Make tagline visible when enabled (overrides display:none default) */
.site-description {
  display: block;
  font-size: 0.78rem;
  color: var(--gray-400);
  margin: 0;
  line-height: 1.3;
}

/* Cropped / resized custom logo */
.custom-logo {
  max-width: 160px;  /* overridden by dtb-site-identity-css inline style */
  max-height: 50px;
  width: auto;
  height: auto;
  display: block;
}

