/* ============================================================
   Tool Dude v1.1.7 — Premium Upgrade Overlay Stylesheet
   Author: Mr Arslan CEO · https://codester.com/mrdigitalceo

   This file is loaded LAST (after style.css and mobile.css) so
   every selector here cleanly overrides the existing styles
   without modifying the original files. It contains ONLY the
   fixes & polish requested in the Premium Upgrade Master Prompt:

   1. Header / Navigation spacing & balance
   2. Home page premium polish
   3. Tool detail page polish + sticky sidebar
   4. Blog listing / single blog polish
   5. Empty-state placeholders
   6. Tighter, consistent UI rhythm
   7. AdSense-ready ad slot reservations
   8. Premium responsiveness 320px → 1600px
   9. Footer balance fixes
   ============================================================ */

/* ---------- 0. Design tokens (extend, don't overwrite) ---------- */
:root {
  --tdp-radius:    14px;
  --tdp-radius-sm: 10px;
  --tdp-radius-lg: 20px;
  --tdp-shadow-1:  0 1px 2px rgba(20,25,50,.04), 0 4px 14px rgba(20,25,50,.05);
  --tdp-shadow-2:  0 6px 18px rgba(20,25,50,.08), 0 16px 40px rgba(20,25,50,.08);
  --tdp-ease:      cubic-bezier(.22,.61,.36,1);
  --tdp-gap:       20px;
  --tdp-container: 1260px;
  --tdp-text-soft: #5d6781;
}

/* Use modern system + Inter fallback for the public site too (already loaded by admin) */
body.td-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Universal: kill any horizontal page overflow */
html, body { overflow-x: hidden; max-width: 100%; }

/* ============================================================
   1. HEADER & NAVIGATION FIX
   ============================================================ */

/* Wider, properly centered container so the right side does not look empty
   on large screens. Falls back to the project's value on small screens. */
.td-container { max-width: var(--tdp-container); }

/* Top utility bar — tighter, vertically centered */
.td-topbar {
  background: var(--td-secondary, #1a1f36);
  font-size: 12.5px;
}
.td-topbar-inner {
  padding: 8px 0 !important;
  align-items: center;
  gap: 14px;
}
.td-topbar-left { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.td-topbar-left a { margin-right: 0 !important; opacity: .9; transition: opacity .15s; }
.td-topbar-left a:hover { opacity: 1; }
.td-topbar-right { display: flex; gap: 12px; align-items: center; }
.td-topbar-right a {
  margin-right: 0 !important;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  transition: background .15s, transform .15s;
}
.td-topbar-right a:hover { background: var(--td-primary); transform: translateY(-1px); }

/* Main header row — proper flex with controlled gaps */
.td-header-main {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 14px 0 !important; /* container provides side padding */
  flex-wrap: nowrap;
  min-height: 72px;
}
.td-logo { flex: 0 0 auto; margin-right: 6px; }
.td-logo img { height: 40px; width: auto; }

/* Search bar — perfectly centered, has its own max width */
.td-search {
  flex: 1 1 auto !important;
  max-width: 520px !important;
  margin: 0 auto !important;
  background: #f5f6fb;
  border: 1px solid #e6e8ef;
  border-radius: 999px;
  padding: 4px 4px 4px 18px;
  transition: border-color .15s, box-shadow .15s;
}
.td-search:focus-within {
  border-color: var(--td-primary, #ff6a00);
  box-shadow: 0 0 0 4px rgba(255,106,0,.12);
}
.td-search input { font-size: 14px; }
.td-search button {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Right action group — compact, balanced */
.td-header-actions {
  flex: 0 0 auto !important;
  gap: 8px !important;
  margin-left: auto;
}
.td-header-actions .td-btn { padding: 9px 14px; font-size: 13px; }
.td-header-actions .td-btn-ghost { padding: 8px 12px; }
.td-header-actions .td-btn-primary {
  box-shadow: 0 4px 12px rgba(255,106,0,.28);
}
.td-header-actions .td-btn-primary:hover { box-shadow: 0 6px 18px rgba(255,106,0,.4); }

/* Secondary nav row — centered when there's room, tidy spacing */
.td-nav { background: #fff; border-top: 1px solid var(--td-border, #e6e8ef); }
.td-nav ul { gap: 2px; }
.td-nav li a {
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  margin: 6px 0;
  transition: color .15s, background .15s;
}
.td-nav li a:hover { background: #fff5ec; color: var(--td-primary); }

/* Header is sticky with a subtle shadow on scroll (graceful fallback) */
.td-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
}
.td-header.is-scrolled { box-shadow: 0 4px 22px rgba(20,25,50,.06); }

/* Mobile header — compact + safe spacing */
@media (max-width: 900px) {
  .td-topbar-inner { flex-wrap: wrap; gap: 8px; padding: 6px 0 !important; }
  .td-header-main { flex-wrap: wrap; padding: 10px 0 !important; min-height: 0; gap: 10px !important; }
  .td-logo img { height: 34px; }
  .td-search { order: 99; flex-basis: 100% !important; max-width: 100% !important; margin: 0 !important; }
  .td-header-actions { display: none; }  /* hidden on mobile, mobile_nav.php handles it */
  .td-nav { display: none; }              /* handled by offcanvas */
}

/* ============================================================
   2. HOME PAGE PREMIUM POLISH
   ============================================================ */

/* Hero — premium typography + better stats */
.td-hero {
  background:
    radial-gradient(900px 360px at 80% -40%, rgba(255,106,0,.14), transparent 60%),
    radial-gradient(700px 300px at -10% 120%, rgba(26,31,54,.06), transparent 60%),
    linear-gradient(135deg, #fff8f0 0%, #ffeedd 100%);
  padding: 70px 0 60px;
}
.td-hero h1 {
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.td-hero p.lead { font-size: 16px; line-height: 1.6; }
.td-hero-search {
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(20,25,50,.10);
  border: 1px solid #f1d8b8;
}
.td-hero-search input { padding: 13px 22px; font-size: 15px; }
.td-hero-search button {
  border-radius: 999px;
  padding: 0 26px;
  font-weight: 700;
  height: 46px;
  display: inline-flex; align-items: center; gap: 8px;
}
.td-hero-popular a {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-color: rgba(255,255,255,.9);
  padding: 5px 14px;
  font-size: 12.5px;
  transition: all .15s;
}
.td-hero-popular a:hover { transform: translateY(-1px); }
.td-hero-stats { gap: 36px; padding-top: 10px; border-top: 1px dashed rgba(26,31,54,.12); margin-top: 30px !important; }
.td-hero-stats div b { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.td-hero-stats div span { font-size: 12.5px; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.td-hero-mascot img { max-height: 340px; }

/* Section title rhythm */
.td-section { padding: 56px 0; }
.td-section-head { margin-bottom: 32px; }
.td-section-head h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.015em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.td-section-head h2 i {
  display: inline-flex; width: 38px; height: 38px;
  align-items: center; justify-content: center;
  background: rgba(255,106,0,.12);
  border-radius: 10px;
  font-size: 16px;
  margin-right: 0 !important;
}
.td-section-head p { font-size: 14px; color: var(--tdp-text-soft); }
.td-section-head .td-see-all {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: rgba(255,106,0,.08);
  border-radius: 999px;
  transition: all .15s;
}
.td-section-head .td-see-all:hover { background: var(--td-primary); color: #fff !important; }

/* Category tiles — premium, balanced */
.td-cat-grid { gap: 16px; }
.td-cat-tile {
  border: 1px solid #ebedf4;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  padding: 24px 14px;
  transition: transform .25s var(--tdp-ease), box-shadow .25s var(--tdp-ease), border-color .15s;
  position: relative;
  overflow: hidden;
}
.td-cat-tile::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,106,0,.08), transparent 70%);
  opacity: 0; transition: opacity .25s;
}
.td-cat-tile:hover { transform: translateY(-4px); border-color: rgba(255,106,0,.25); }
.td-cat-tile:hover::after { opacity: 1; }
.td-cat-tile .td-cat-icon {
  width: 54px; height: 54px;
  font-size: 22px;
  box-shadow: 0 6px 14px rgba(0,0,0,.10);
  position: relative; z-index: 1;
}
.td-cat-tile .td-cat-name { font-weight: 700; font-size: 14px; position: relative; z-index: 1; }

/* Tool cards — consistent height & spacing */
.td-card-grid { gap: 22px; }
.td-card {
  border: 1px solid #ebedf4;
  border-radius: 16px;
  transition: transform .25s var(--tdp-ease), box-shadow .25s var(--tdp-ease), border-color .15s;
}
.td-card:hover { border-color: rgba(255,106,0,.30); box-shadow: var(--tdp-shadow-2); }
.td-card-thumb {
  padding: 28px;
  background: linear-gradient(135deg, #fbfcfe 0%, #f3f5fb 100%);
  border-bottom: 1px solid #f1f2f7;
  position: relative;
}
.td-card-thumb img { width: 72px; height: 72px; }
.td-card-initials { width: 72px; height: 72px; font-size: 26px; border-radius: 16px; }
.td-card-body { padding: 16px 18px 18px; gap: 8px; display: flex; flex-direction: column; flex: 1; }
.td-card-title { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.td-card-desc { font-size: 13.5px; min-height: 40px; line-height: 1.5; margin: 0 0 4px; color: var(--tdp-text-soft); }
.td-card-meta { gap: 6px; margin-bottom: 6px; }
.td-cat-badge, .td-pricing-badge {
  font-size: 10.5px;
  letter-spacing: .3px;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
}
.td-card-stats { font-size: 12px; margin-bottom: 10px; }
.td-card-actions { gap: 8px; }
.td-card-actions .td-btn-sm { padding: 8px 12px; font-size: 12px; font-weight: 600; }
.td-card-actions .td-btn-primary { box-shadow: 0 4px 10px rgba(255,106,0,.25); }
.td-card-actions .td-compare-btn { flex: 0 0 38px !important; max-width: 38px; }
.td-card-badges { top: 12px; left: 12px; gap: 5px; }
.td-card-badges span {
  font-size: 9.5px; padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
  letter-spacing: .4px;
}

/* Favorite (heart) button — softer */
.td-fav-btn {
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  border-color: transparent;
}

/* Ranking rows — premium look */
.td-rank-row { padding: 14px 20px; border-radius: 14px; transition: all .2s var(--tdp-ease); }
.td-rank-row:hover { transform: translateX(2px); box-shadow: var(--tdp-shadow-2); }
.td-rank-num { font-size: 28px; font-weight: 900; }
.td-rank-logo { border-radius: 12px; background: #fafbff; padding: 6px; }

/* Newsletter — premium gradient */
.td-newsletter {
  background:
    radial-gradient(600px 300px at 80% 20%, rgba(255,106,0,.45), transparent 60%),
    linear-gradient(135deg, #1a1f36 0%, #2a3151 100%);
  padding: 60px 30px;
  border-radius: 22px;
}
.td-newsletter h3 { font-size: 28px; font-weight: 800; letter-spacing: -0.015em; }

/* Blog cards on home */
.td-blog-grid { gap: 22px; }
.td-blog-card { border: 1px solid #ebedf4; border-radius: 16px; overflow: hidden; }
.td-blog-card .td-blog-thumb {
  height: 200px;
  background:
    linear-gradient(135deg, rgba(255,106,0,.10), rgba(33,150,243,.10)),
    var(--td-secondary, #1a1f36);
  position: relative;
}
.td-blog-card .td-blog-thumb::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,106,0,.30), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(33,150,243,.30), transparent 50%);
  opacity: .7;
}
.td-blog-card .td-blog-thumb img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.td-blog-card-body { padding: 20px; }
.td-blog-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.td-blog-meta { font-size: 12px; gap: 14px; }
.td-blog-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ============================================================
   3. TOOL DETAIL PAGE POLISH
   ============================================================ */

.td-tool-hero {
  border-radius: 20px;
  padding: 32px;
  background:
    linear-gradient(135deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid #ebedf4;
  box-shadow: var(--tdp-shadow-1);
}
.td-tool-hero-top { gap: 28px; align-items: center; }
.td-tool-hero-logo {
  width: 110px; height: 110px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fbfcfe 0%, #eef0f8 100%);
  padding: 14px;
  border: 1px solid #ebedf4;
}
.td-tool-hero h1 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 8px;
}
.td-tool-hero .td-tool-desc { font-size: 15px; color: var(--tdp-text-soft); margin: 4px 0 14px; }
.td-tool-hero .td-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13.5px; }
.td-tool-hero .td-visit {
  background: var(--td-primary);
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(255,106,0,.30);
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .15s, box-shadow .15s;
}
.td-tool-hero .td-visit:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255,106,0,.40); }

/* Content cards on tool detail */
.td-content-card {
  border-radius: 16px;
  border: 1px solid #ebedf4;
  padding: 24px;
  margin-bottom: 18px;
}
.td-content-card h2 {
  font-size: 19px; font-weight: 800;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f2f7;
  display: flex; align-items: center; gap: 10px;
}
.td-content-card h2::before {
  content: ''; width: 4px; height: 22px;
  background: linear-gradient(180deg, var(--td-primary), #ff8a3d);
  border-radius: 4px;
}
.td-content-card h3 { font-size: 16px; font-weight: 700; }

/* Pros & Cons cleaner */
.td-pros, .td-cons { padding: 20px; border-radius: 14px; border: 1px solid; }
.td-pros { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #a7f3d0; }
.td-cons { background: linear-gradient(135deg, #fef2f2, #fee2e2); border-color: #fecaca; }
.td-pros h4, .td-cons h4 { margin: 0 0 12px; display: inline-flex; align-items: center; gap: 8px; }
.td-pros ul, .td-cons ul { padding-left: 18px; margin: 0; }
.td-pros li, .td-cons li { padding: 4px 0; font-size: 14px; }

/* Feature list — premium check icons */
.td-feature-list li {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fafbfe;
  transition: background .15s;
}
.td-feature-list li:hover { background: #fff5ec; }
.td-feature-list li i {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(16,185,129,.14);
  color: #10b981 !important;
  border-radius: 50%;
  margin-right: 10px !important;
  font-size: 11px;
}

/* Sidebar — sticky on desktop */
@media (min-width: 993px) {
  .td-tool-grid > aside.td-sidebar {
    position: sticky;
    top: 110px;
    align-self: start;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
.td-side-card { border-radius: 16px; border: 1px solid #ebedf4; padding: 20px; }
.td-side-card h4 {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--tdp-text-soft);
  margin: 0 0 14px;
}

/* Share buttons with platform-specific tints */
.td-side-card .td-btn { transition: all .15s; }
.td-side-card a[href*="facebook"]:hover { background: #1877f2; color: #fff !important; border-color: #1877f2; }
.td-side-card a[href*="twitter"]:hover { background: #000; color: #fff !important; border-color: #000; }
.td-side-card a[href*="linkedin"]:hover { background: #0a66c2; color: #fff !important; border-color: #0a66c2; }
.td-side-card a[href*="whatsapp"]:hover, .td-side-card a[href*="wa.me"]:hover { background: #25d366; color: #fff !important; border-color: #25d366; }
.td-side-card a[href*="t.me"]:hover, .td-side-card a[href*="telegram"]:hover { background: #229ed9; color: #fff !important; border-color: #229ed9; }

/* Reviews list */
#reviews > div[style*="border-bottom"] { padding: 18px 0 !important; }
#reviews h4 { font-size: 15px; font-weight: 700; }

/* ============================================================
   4. BLOG LISTING / SINGLE BLOG POLISH
   ============================================================ */

.td-blog-meta i { color: var(--td-primary); }

/* ============================================================
   5. EMPTY STATES & FALLBACKS
   ============================================================ */

.td-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border: 1px dashed #d8dce6;
  border-radius: 16px;
  color: var(--tdp-text-soft);
}
.td-empty-state i { font-size: 48px; color: #c4cad8; margin-bottom: 14px; }
.td-empty-state h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--td-text); }
.td-empty-state p { margin: 0; font-size: 14px; }

/* Better fallback for tools with no logo: gradient pattern */
.td-card-initials {
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.20), rgba(255,255,255,0) 60%),
    var(--bg, #ff6a00) !important;
}

/* ============================================================
   6. FORMS & BUTTONS UNIFICATION
   ============================================================ */

.td-form { border-radius: 16px; padding: 30px; }
.td-form input[type=text], .td-form input[type=email], .td-form input[type=password],
.td-form input[type=url], .td-form input[type=number], .td-form input[type=date],
.td-form select, .td-form textarea {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.td-form input:focus, .td-form select:focus, .td-form textarea:focus {
  box-shadow: 0 0 0 4px rgba(255,106,0,.14);
}
.td-btn { font-weight: 600; transition: all .15s var(--tdp-ease); }
.td-btn-primary { box-shadow: 0 4px 12px rgba(255,106,0,.22); }
.td-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(255,106,0,.32); }

/* Pagination polish */
.td-pagination li a { padding: 9px 14px; font-size: 13px; font-weight: 600; }
.td-pagination li.active a { box-shadow: 0 4px 12px rgba(255,106,0,.28); }

/* ============================================================
   7. ADSENSE-READY AD SLOTS (reserve space, no layout shift)
   ============================================================ */

.td-ad-slot {
  display: block;
  margin: 18px auto;
  width: 100%;
  max-width: var(--tdp-container);
  text-align: center;
}
.td-ad-slot-home_top, .td-ad-slot-home_middle, .td-ad-slot-home_bottom,
.td-ad-slot-site_top, .td-ad-slot-site_bottom { min-height: 90px; }
.td-ad-slot-tool_top, .td-ad-slot-tool_middle, .td-ad-slot-tool_bottom { min-height: 90px; }
.td-ad-slot-tool_sidebar { min-height: 250px; }
.td-ad-empty {
  border: 2px dashed #cfd4e2;
  padding: 22px;
  border-radius: 12px;
  color: var(--tdp-text-soft);
  font-size: 13px;
  background: rgba(207,212,226,.07);
}
.td-ad-empty b { display: block; margin-bottom: 4px; color: var(--td-text); font-size: 13.5px; }
.td-ad-empty span { font-size: 12px; opacity: .8; }
.td-ad-label {
  font-size: 10.5px;
  color: var(--tdp-text-soft);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
  text-align: center;
}

/* ============================================================
   8. FOOTER POLISH (the dark-navy footer)
   ============================================================ */

.td-footer { padding: 60px 0 22px; margin-top: 70px; }
.td-footer-grid { gap: 40px; }
.td-footer h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.td-footer ul li { margin-bottom: 10px; }
.td-footer-bottom { margin-top: 36px; font-size: 12.5px; }

/* ============================================================
   9. RESPONSIVE — fine-tune across all breakpoints
   ============================================================ */

@media (max-width: 1366px) {
  .td-container { max-width: 1200px; }
}
@media (max-width: 1200px) {
  .td-container { max-width: 1080px; }
  .td-cat-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 992px) {
  .td-section { padding: 44px 0; }
  .td-tool-hero { padding: 24px; }
  .td-tool-hero-logo { width: 90px; height: 90px; }
  .td-cat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .td-hero { padding: 50px 0 40px; }
  .td-hero-grid { text-align: center; }
  .td-hero-stats { justify-content: center; gap: 24px; }
  .td-hero-mascot { display: none; }
  .td-section { padding: 36px 0; }
  .td-section-head { margin-bottom: 22px; }
  .td-section-head h2 { font-size: 22px; }
  .td-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .td-card-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .td-blog-grid { grid-template-columns: 1fr; gap: 18px; }
  .td-tool-hero-top { grid-template-columns: 80px 1fr; gap: 16px; }
  .td-tool-hero-top .td-visit { grid-column: 1 / -1; justify-content: center; margin-top: 12px; width: 100%; }
  .td-content-card { padding: 20px; }
  .td-pros-cons { grid-template-columns: 1fr; }
  .td-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .td-hero h1 { font-size: 26px; }
  .td-hero p.lead { font-size: 14.5px; }
  .td-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .td-card-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .td-card-thumb { padding: 22px; }
  .td-card-thumb img, .td-card-initials { width: 60px; height: 60px; font-size: 22px; }
  .td-card-body { padding: 14px; }
  .td-card-actions { flex-wrap: wrap; }
  .td-card-actions .td-btn { font-size: 11.5px; padding: 7px 10px; }
  .td-tool-hero { padding: 18px; }
  .td-tool-hero-logo { width: 72px; height: 72px; border-radius: 18px; }
  .td-tool-hero h1 { font-size: 22px; }
  .td-newsletter { padding: 40px 20px; }
  .td-newsletter h3 { font-size: 22px; }
  .td-footer-grid { grid-template-columns: 1fr; }
  .td-section-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .td-card-grid { grid-template-columns: 1fr; }
  .td-card-actions .td-compare-btn { display: none; }
}

/* ============================================================
   10. FINAL UX TOUCHES
   ============================================================ */

/* Smooth scroll-top button */
.td-scrolltop { box-shadow: 0 8px 18px rgba(255,106,0,.35); }
.td-scrolltop:hover { transform: translateY(-2px); }

/* Skeleton/loading shimmer (for future enhancement) */
.td-skeleton {
  background: linear-gradient(90deg, #eef0f5 25%, #f7f8fb 50%, #eef0f5 75%);
  background-size: 200% 100%;
  animation: tdShimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes tdShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Print friendly */
@media print {
  .td-header, .td-footer, .td-ad, .td-ad-slot, .td-side-card,
  #tdScrollTop, .td-mobile-toggle, .td-hero-search { display: none !important; }
  .td-container { max-width: 100%; }
  body.td-body { background: #fff; }
}
