/*
Theme Name: Aitolin Affiliate
Theme URI: https://aitolin.com
Author: Aitolin Dev Team
Author URI: https://aitolin.com
Description: Ultra-fast, lightweight, schema-ready high-converting Amazon affiliate theme optimized for Bing, Google, and AI Search Engines.
Version: 2.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aitolin-affiliate
*/

:root {
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --accent: #f59e0b;
  --accent-dark: #b45309;
  --amazon-gold: #ff9900;
  --amazon-dark: #e68a00;
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --dark: #0f172a;
  --dark-card: #1e293b;
  --text: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg-main: #f8fafc;
  --white: #ffffff;
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 24px -4px rgba(0,0,0,0.12);
  --container-max: 1280px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, -apple-system, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--text);
  background-color: var(--bg-main);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   HEADER & MOBILE NAVIGATION
========================================= */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

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

.site-branding .site-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--dark);
  display: flex;
  align-items: center;
}

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

.nav-desktop {
  display: flex;
}

.nav-desktop ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-desktop a {
  font-weight: 600;
  color: var(--dark);
  font-size: 15px;
  padding: 6px 0;
  position: relative;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.nav-desktop a:hover::after {
  width: 100%;
}

/* AJAX Search Box */
.header-search-wrap {
  position: relative;
  width: 280px;
}

.header-search-input {
  width: 100%;
  padding: 9px 16px 9px 36px;
  border-radius: 24px;
  border: 1px solid var(--border);
  font-size: 14px;
  outline: none;
  background: var(--bg-main);
  transition: var(--transition);
}

.header-search-input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 13px;
}

.ajax-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1050;
  animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ajax-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.ajax-result-item:last-child {
  border-bottom: none;
}

.ajax-result-item:hover {
  background: var(--primary-light);
}

.ajax-result-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

.ajax-result-info {
  flex-grow: 1;
  overflow: hidden;
}

.ajax-result-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.ajax-result-date {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Mobile Hamburger Button */
.menu-toggle-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.menu-toggle-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--dark);
  transition: var(--transition);
}

/* Mobile Left Drawer */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 24px;
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-drawer.active {
  left: 0;
}

.mobile-nav-overlay.active {
  display: block;
  opacity: 1;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.drawer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.drawer-nav a {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

/* =========================================
   1. HERO BANNER CARD
========================================= */
.hero-banner-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1e40af 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  color: var(--white);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-banner-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.hero-banner-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-banner-title {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.6px;
}

.hero-banner-sub {
  font-size: 17px;
  color: #cbd5e1;
  line-height: 1.65;
  margin-bottom: 26px;
}

.hero-banner-cta-group {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  background: #f59e0b;
  color: #0f172a !important;
  font-weight: 800;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transition: var(--transition);
}

.hero-btn-primary:hover {
  background: #d97706;
  transform: translateY(-2px);
}

/* =========================================
   2. CATEGORY SHOWCASE (3-CARD GRID)
========================================= */
.category-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.cat-card-icon {
  font-size: 32px;
  background: var(--bg-main);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-card-info h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 4px;
}

.cat-card-info p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 8px;
}

.cat-link-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
}

/* =========================================
   3. PROMO DEAL CALLOUT BANNER
========================================= */
.promo-banner-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}

/* =========================================
   MAGAZINE GRID & UNIFORM CARDS
========================================= */
.home-section {
  padding: 32px 0;
}

.section-header-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}

.section-header-modern h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.magazine-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  align-items: stretch !important;
}

.card-modern {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

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

.card-thumb-wrap {
  height: 200px;
  position: relative;
  background: #e2e8f0;
  overflow: hidden;
  flex-shrink: 0;
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-modern:hover .card-thumb-wrap img {
  transform: scale(1.05);
}

.card-body-modern {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta-top {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.card-title-modern {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.card-title-modern a {
  color: var(--dark);
}

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

.card-excerpt-modern {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-footer-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: auto;
}

.card-read-more-link {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-read-more-link:hover {
  color: var(--primary-hover);
}

.card-read-more-link:hover .arrow-anim {
  transform: translateX(3px);
}

.arrow-anim {
  transition: transform 0.2s ease;
}

.card-read-time {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* =========================================
   CLICKABLE & CONSISTENT BADGES
========================================= */
.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.2;
  width: fit-content;
}

.meta-badge-cat {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  cursor: pointer;
  transition: var(--transition);
}

.meta-badge-cat:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.meta-badge-verified {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
  text-transform: none;
}

.read-time-indicator {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 600;
}

/* =========================================
   SMART COMPLIANCE / AFFILIATE NOTICE
========================================= */
.smart-disclosure-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 18px 0 28px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  transition: var(--transition);
}

.smart-disclosure-box:hover {
  border-color: #cbd5e1;
  background: #fcfdfe;
}

.smart-disclosure-icon {
  color: var(--accent);
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.smart-disclosure-text strong {
  color: var(--dark);
}

/* =========================================
   SIDEBAR & SEPARATED WIDGETS
========================================= */
.single-post-wrapper {
  padding: 36px 0 80px;
}

.single-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
}

.single-main-content {
  min-width: 0;
}

.single-sidebar {
  position: sticky;
  top: 88px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: fit-content;
}

.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

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

.widget-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-post-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.side-thumb-link {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--border);
}

.side-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.sidebar-post-item:hover .side-thumb-link img {
  transform: scale(1.06);
}

.side-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
}

.side-title a {
  color: var(--dark);
}

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

.side-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.trust-widget {
  background: #f8fafc;
  border-left: 3px solid var(--primary);
}

/* =========================================
   SINGLE POST TYPOGRAPHY
========================================= */
.post-header {
  margin-bottom: 24px;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.post-main-title {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.28;
  color: var(--dark);
  letter-spacing: -0.5px;
}

.post-lead {
  font-size: 18px;
  color: #475569;
  line-height: 1.65;
  margin: 20px 0 28px;
}

.post-content {
  font-size: 17.5px;
  line-height: 1.8;
  color: #334155;
}

.post-content h2 {
  font-size: 25px;
  font-weight: 800;
  color: var(--dark);
  margin: 44px 0 18px;
  border-left: 4px solid var(--primary);
  padding-left: 14px;
}

.post-content h3 {
  font-size: 20.5px;
  font-weight: 700;
  color: var(--dark);
  margin: 32px 0 14px;
}

.post-content p {
  margin-bottom: 22px;
}

/* =========================================
   HIGH CONVERTING BLOCKS & NO-WRAP BUTTONS
========================================= */
.btn-amazon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #ff9900 0%, #e68a00 100%);
  color: #111 !important;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: var(--radius-xs);
  text-align: center;
  white-space: nowrap;
  margin-top: auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.btn-amazon:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Top Picks */
.aitolin-top-picks {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 36px 0;
  box-shadow: var(--shadow-sm);
}

.aitolin-top-picks-header {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-main);
}

.top-picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.pick-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  position: relative;
  transition: var(--transition);
}

.pick-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.pick-item.best-overall {
  border-color: var(--primary-border);
  background: var(--primary-light);
}

.pick-badge {
  position: absolute;
  top: -10px;
  left: 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.pick-badge.overall { background: var(--primary); color: var(--white); }
.pick-badge.value { background: var(--success); color: var(--white); }
.pick-badge.premium { background: var(--accent-dark); color: var(--white); }

.pick-img {
  height: 140px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pick-img img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.pick-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.35;
}

.pick-rating {
  font-size: 13px;
  color: var(--accent-dark);
  margin-bottom: 14px;
  font-weight: 600;
}

/* Product Review Card */
.aitolin-product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 36px 0;
  box-shadow: var(--shadow-sm);
}

.product-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 16px;
}

.product-card-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--dark);
}

.product-card-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

.product-card-image {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.product-card-image img {
  max-height: 180px;
  max-width: 100%;
  object-fit: contain;
}

/* Pros & Cons */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.pros-box, .cons-box {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
}

.pros-box {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.cons-box {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
}

.pros-box h4 { color: #065f46; margin-bottom: 10px; font-size: 15.5px; font-weight: 700; }
.cons-box h4 { color: #991b1b; margin-bottom: 10px; font-size: 15.5px; font-weight: 700; }

.pros-box ul, .cons-box ul {
  list-style: none;
  margin: 0;
}

.pros-box li, .cons-box li {
  margin-bottom: 8px;
}

/* Table */
.aitolin-table-wrapper {
  overflow-x: auto;
  margin: 32px 0;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.aitolin-compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14.5px;
}

.aitolin-compare-table th {
  background: var(--dark);
  color: var(--white);
  padding: 12px 16px;
  font-weight: 700;
  white-space: nowrap;
}

.aitolin-compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.aitolin-compare-table td:last-child {
  white-space: nowrap;
  width: 1%;
}

.aitolin-compare-table tr:hover {
  background: var(--bg-main);
}

/* FAQ Accordion Styling with Pure CSS Grid Height Transitions */
.aitolin-faq {
  margin: 40px 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.faq-question {
  padding: 18px 22px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  user-select: none;
  list-style: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.faq-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-item[open] .faq-question {
  background: var(--primary-light);
  color: var(--primary);
  border-bottom: 1px solid var(--primary-border);
}

.faq-chevron {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  stroke: var(--primary);
}

/* Pure CSS Grid Animation for Smooth Height Expansion */
.faq-content-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item[open] .faq-content-wrapper {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  overflow: hidden;
}

.faq-answer-inner p {
  padding: 20px 24px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  margin: 0;
  transition: opacity 0.3s ease;
}

.single-featured-hero:hover .hero-hover-zoom {
  transform: scale(1.03);
}

/* =========================================
   FOOTER
========================================= */
.site-footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 60px 0 30px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 16px;
}

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

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

.footer-col a {
  color: #cbd5e1;
}

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

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 1080px) {
  .single-layout-grid {
    grid-template-columns: 1fr;
  }
  .single-sidebar {
    position: static;
    margin-top: 20px;
  }
  .magazine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .category-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .promo-banner-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-desktop, .header-search-wrap {
    display: none;
  }
  .menu-toggle-btn {
    display: flex;
  }
  .hero-banner-title {
    font-size: 27px;
  }
  .hero-banner-card {
    padding: 32px 20px;
  }
  .category-showcase-grid {
    grid-template-columns: 1fr;
  }
  .magazine-grid {
    grid-template-columns: 1fr !important;
  }
  .product-card-grid {
    grid-template-columns: 1fr;
  }
  .pros-cons-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .post-main-title {
    font-size: 26px;
  }
}
/* Graceful Image Error Handling: Auto hide broken images without showing blank box */
img:not([src]), img[src=""] {
  display: none !important;
}

.pick-img img:not([src]), .product-card-image img:not([src]) {
  display: none !important;
}
.pros-box li::before, .cons-box li::before {
    content: none !important;
}
.pros-box ul, .cons-box ul {
    list-style: none !important;
    padding-left: 0 !important;
}

/* =========================================
   TABLE OF CONTENTS (TOC) - CLEAN STABLE UI
========================================= */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

.aitolin-toc-wrapper {
  margin: 32px 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  overflow: hidden;
}

.aitolin-toc-header {
  padding: 16px 20px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aitolin-toc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.aitolin-toc-body {
  padding: 18px 24px;
  background: #f8fafc;
}

.toc-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.toc-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1.5;
}

.toc-num {
  font-size: 13.5px;
  font-weight: 700;
  color: #2563eb;
  flex-shrink: 0;
}

.toc-link:hover {
  color: #2563eb;
  transform: translateX(4px);
}

/* =========================================
   INTERACTIVE TOOLS & CALCULATORS UI/UX
========================================= */
.aitolin-tool-container {
  margin: 40px 0;
}

.aitolin-tool-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 60%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-top: 4px solid #2563eb;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px -8px rgba(37, 99, 235, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
  padding: 38px 34px;
  position: relative;
  overflow: hidden;
}

.tool-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tool-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.3;
}

.tool-subtitle {
  font-size: 15.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.tool-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .tool-form-grid {
    grid-template-columns: 1fr;
  }
  .aitolin-tool-card {
    padding: 24px 18px;
  }
}

.tool-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--dark);
}

.tool-select-wrap {
  position: relative;
}

.tool-select {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  background-color: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.tool-select:focus {
  border-color: #2563eb;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.tool-security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.tool-math-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-math-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
}

.tool-math-box.math-box-error {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
}

.tool-inline-error {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fecaca;
  padding: 5px 10px;
  border-radius: 6px;
  animation: fadeIn 0.2s ease-out;
}

.math-question {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #166534;
}

.math-input {
  width: 90px;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  border: 1.5px solid #86efac;
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: #0f172a;
}

.math-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.math-input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.btn-tool-calculate {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-tool-calculate:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-tool-calculate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spin-icon {
  animation: spin 1s linear infinite;
}

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

/* Results Output Card */
.tool-results-wrapper {
  margin-top: 36px;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-results-card {
  background: #f8fafc;
  border: 2px solid #3b82f6;
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: 0 12px 24px -4px rgba(37, 99, 235, 0.08);
}

.tool-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.result-badge {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.result-price-box {
  text-align: right;
}

.price-val {
  font-size: 30px;
  font-weight: 900;
  color: #2563eb;
  letter-spacing: -0.02em;
  line-height: 1;
}

.price-saved {
  font-size: 13.5px;
  font-weight: 700;
  color: #059669;
  margin-top: 4px;
}

.tool-product-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.tool-product-row {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  transition: all 0.2s ease;
}

.tool-product-row:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.tool-prod-thumb {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  background: #f8fafc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.tool-prod-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tool-prod-info {
  flex: 1;
}

.tool-prod-cat {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.05em;
  display: block;
}

.tool-prod-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  line-height: 1.4;
  margin: 2px 0;
  display: block;
}

.tool-prod-name:hover {
  color: #2563eb;
}

.tool-prod-price {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.btn-amazon-sm {
  background: #f59e0b;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.btn-amazon-sm:hover {
  background: #d97706;
  color: #fff;
}

.tool-results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.tool-guarantee {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #059669;
}

.btn-amazon-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
  transition: all 0.25s ease;
}

.btn-amazon-primary:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
  transform: translateY(-1px);
}

/* =========================================
   TOOLS DIRECTORY HUB GRID & PREVIEWS
========================================= */
.tools-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 36px 0 48px 0;
}

@media (max-width: 992px) {
  .tools-directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .tools-directory-grid {
    grid-template-columns: 1fr;
  }
}

.tool-card-preview {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 12px;
  padding: 28px 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tool-card-preview:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
}

/* =========================================
   TOOLS COMPREHENSIVE MOBILE RESPONSIVENESS
========================================= */
@media (max-width: 768px) {
  .tool-security-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .tool-math-wrap {
    width: 100%;
  }

  .tool-math-box {
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .btn-tool-calculate {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    font-size: 15px;
  }

  .tool-results-card {
    padding: 20px 16px;
  }

  .tool-results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .result-price-box {
    text-align: left;
    width: 100%;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
  }

  .tool-product-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 14px;
  }

  .tool-prod-thumb {
    width: 56px;
    height: 56px;
  }

  .tool-prod-action {
    width: 100%;
  }

  .btn-amazon-sm {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding: 10px 14px;
  }

  .tool-results-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .tool-results-footer .btn-amazon-primary {
    width: 100%;
    box-sizing: border-box;
  }

  .home-tools-card {
    padding: 24px 18px !important;
  }
}

/* =========================================
   MODERN CENTERED PAGINATION STYLES
========================================= */
nav.pagination,
.navigation.pagination {
  margin: 50px 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.pagination .screen-reader-text,
nav.pagination h2.screen-reader-text {
  display: none !important;
}

.pagination .nav-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.pagination .nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

.pagination .nav-links a.page-numbers:hover {
  color: var(--primary);
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateY(-1px);
}

.pagination .nav-links .page-numbers.current {
  background: var(--primary);
  color: #ffffff !important;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  cursor: default;
}

.pagination .nav-links .page-numbers.dots {
  color: var(--text-muted);
  cursor: default;
  min-width: 24px;
  padding: 0 4px;
}

.pagination .nav-links .page-numbers.prev,
.pagination .nav-links .page-numbers.next {
  font-weight: 700;
  padding: 0 18px;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: var(--dark);
}

.pagination .nav-links .page-numbers.prev:hover,
.pagination .nav-links .page-numbers.next:hover {
  background: var(--primary);
  color: #ffffff !important;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

@media (max-width: 640px) {
  .pagination .nav-links {
    padding: 8px 12px;
    gap: 6px;
  }
  .pagination .nav-links .page-numbers {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13.5px;
  }
}



