/* ══════════════════════════════════════
   MOBILE MENU OVERLAY
══════════════════════════════════════ */
.tb-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 998;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.tb-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.tb-hero {
  background: var(--tb-green-900);
  background-image:
    radial-gradient(ellipse at 30% 50%, rgba(22,163,74,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(22,163,74,0.08) 0%, transparent 50%);
  padding: var(--space-16) var(--space-6);
  min-height: 90vh;
  display: flex;
  align-items: center;
}
.tb-hero__inner { max-width: 720px; margin: 0 auto; }
.tb-hero__badge {
  display: inline-flex; align-items: center;
  background: rgba(22,163,74,0.15);
  border: 1px solid rgba(22,163,74,0.30);
  color: var(--tb-green-300);
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500; margin-bottom: var(--space-6);
}
.tb-hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800; line-height: 1.1;
  color: white; margin-bottom: var(--space-6);
  letter-spacing: -1.5px;
}
.tb-hero__accent { color: var(--tb-green-400); }
.tb-hero__sub {
  font-size: 18px; line-height: 1.7;
  color: rgba(255,255,255,0.65);
  margin-bottom: var(--space-8); max-width: 560px;
}
.tb-hero__actions {
  display: flex; gap: var(--space-4);
  flex-wrap: wrap; margin-bottom: var(--space-12);
}
.tb-btn--hero-primary {
  background: var(--tb-green-500); color: white;
  padding: 14px 28px; font-size: 16px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 24px rgba(22,163,74,0.40);
  display: inline-flex; align-items: center;
  font-weight: 600; text-decoration: none;
  transition: all var(--duration) var(--ease);
}
.tb-btn--hero-primary:hover {
  background: var(--tb-green-400);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(22,163,74,0.50);
  color: white;
}
.tb-btn--hero-ghost {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 14px 28px; font-size: 16px;
  border-radius: var(--radius-full);
  display: inline-flex; align-items: center;
  font-weight: 600; text-decoration: none;
  transition: all var(--duration) var(--ease);
}
.tb-btn--hero-ghost:hover {
  background: rgba(255,255,255,0.15);
  color: white;
  border-color: rgba(255,255,255,0.3);
}
.tb-hero__stats { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.tb-stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 32px; font-weight: 800; color: white;
}
.tb-stat__label { font-size: 13px; color: rgba(255,255,255,0.45); font-weight: 500; }

/* ══════════════════════════════════════
   CATEGORIES
══════════════════════════════════════ */
.tb-categories { background: var(--tb-gray-50); }
.tb-categories__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.tb-cat-card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: var(--space-6);
  background: white;
  border: 1.5px solid var(--tb-gray-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}
.tb-cat-card:hover {
  background: var(--tb-green-50);
  border-color: var(--tb-green-300);
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-green);
}
.tb-cat-card__icon { font-size: 28px; margin-bottom: var(--space-3); }
.tb-cat-card__name {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--tb-gray-900); margin-bottom: 4px;
}
.tb-cat-card__desc { font-size: 13px; color: var(--tb-gray-400); }

/* ══════════════════════════════════════
   POSTS GRID
══════════════════════════════════════ */
.tb-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.tb-post-card {
  display: block; padding: var(--space-6);
  background: white;
  border: 1.5px solid var(--tb-gray-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}
.tb-post-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-green);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
  pointer-events: none;
}
.tb-post-card:hover {
  border-color: var(--tb-green-400);
  transform: translateY(-3px) scale(1.01);
}
.tb-post-card:hover::after { opacity: 1; }
.tb-post-card__cat {
  display: inline-block;
  background: var(--tb-green-50); color: var(--tb-green-600);
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; margin-bottom: var(--space-3);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.tb-post-card__title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--tb-gray-900);
  line-height: 1.4; margin-bottom: var(--space-4);
}
.tb-post-card__meta {
  display: flex; align-items: center;
  gap: var(--space-2); font-size: 13px;
  color: var(--tb-gray-400);
}

/* ══════════════════════════════════════
   TOOLS PREVIEW
══════════════════════════════════════ */
.tb-tools-preview {
  display: flex; flex-direction: column; gap: var(--space-3);
  max-width: 640px; margin: 0 auto;
}
.tb-tool-preview-card {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: white;
  border: 1.5px solid var(--tb-gray-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}
.tb-tool-preview-card:hover {
  border-color: var(--tb-green-400);
  background: var(--tb-green-50);
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}
.tb-tool-preview-card__icon { font-size: 24px; flex-shrink: 0; }
.tb-tool-preview-card__info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tb-tool-preview-card__info strong { font-size: 15px; font-weight: 600; color: var(--tb-gray-900); }
.tb-tool-preview-card__info span { font-size: 13px; color: var(--tb-gray-400); }
.tb-tool-preview-card__arrow { font-size: 18px; color: var(--tb-green-500); font-weight: 600; }

/* ══════════════════════════════════════
   NEWSLETTER
══════════════════════════════════════ */
.tb-newsletter {
  background: var(--tb-green-900);
  background-image: radial-gradient(ellipse at 70% 50%, rgba(22,163,74,0.12) 0%, transparent 60%);
}
.tb-newsletter__inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: var(--space-12);
  flex-wrap: wrap;
}
.tb-newsletter__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800; color: white;
  margin-bottom: var(--space-3);
}
.tb-newsletter__sub { font-size: 15px; color: rgba(255,255,255,0.55); max-width: 400px; }
.tb-newsletter__form { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.tb-newsletter__input {
  padding: 12px 18px; border-radius: var(--radius-full);
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: white; font-size: 15px;
  outline: none; min-width: 240px;
  transition: border-color var(--duration), background var(--duration);
}
.tb-newsletter__input::placeholder { color: rgba(255,255,255,0.35); }
.tb-newsletter__input:focus {
  border-color: var(--tb-green-400);
  background: rgba(255,255,255,0.12);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.tb-footer { background: var(--tb-gray-950); padding: var(--space-16) var(--space-6) var(--space-8); }
.tb-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8); margin-bottom: var(--space-12);
}
.tb-footer__tagline {
  font-size: 14px; color: rgba(255,255,255,0.40);
  margin-top: var(--space-3); line-height: 1.6; max-width: 220px;
}
.tb-footer__col-title {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: var(--space-4);
}
.tb-footer__links { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); padding: 0; margin: 0; }
.tb-footer__links a {
  font-size: 14px; color: rgba(255,255,255,0.45);
  text-decoration: none; transition: color var(--duration);
}
.tb-footer__links a:hover { color: var(--tb-green-400); }
.tb-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: var(--space-6);
  text-align: center;
  font-size: 13px; color: rgba(255,255,255,0.20);
}

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
.tb-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tb-gray-200);
  transition: box-shadow var(--duration) var(--ease);
}
.tb-header.scrolled { box-shadow: var(--shadow-md); }
.tb-header__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 var(--space-6);
  height: 64px; display: flex;
  align-items: center; justify-content: space-between;
}
.tb-logo {
  display: flex; align-items: center;
  gap: var(--space-2); text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800; font-size: 22px;
  color: var(--tb-green-500);
}
.tb-logo:hover { color: var(--tb-green-600); text-decoration: none; }
.tb-nav { display: flex; align-items: center; gap: var(--space-4); }
.tb-nav__list { display: flex; align-items: center; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.tb-nav__link {
  padding: var(--space-2) var(--space-3);
  color: var(--tb-gray-600);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--duration);
}
.tb-nav__link:hover { color: var(--tb-green-500); background: var(--tb-green-50); }
.tb-hamburger {
  display: none; flex-direction: column;
  gap: 5px; background: none; border: none;
  cursor: pointer; padding: var(--space-2);
}
.tb-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--tb-gray-700);
  border-radius: 2px;
  transition: all 0.25s var(--ease);
}

/* Astra conflict resets for homepage */
.tb-homepage .ast-hfb-header,
.tb-homepage #ast-fixed-header,
.tb-homepage .ast-below-header-bar { display: none !important; }
.tb-homepage .site-footer { display: none !important; }
.tb-homepage #page > .ast-container { padding-top: 0 !important; }
.tb-homepage .entry-content { max-width: 100% !important; padding: 0 !important; }
.tb-homepage .ast-page-builder-template { padding: 0 !important; }
.tb-homepage #content .ast-container { padding-top: 0 !important; }
.tb-homepage .ast-article-single { padding: 0 !important; box-shadow: none !important; }

/* ══════════════════════════════════════
   GLOBAL MICRO-INTERACTIONS
══════════════════════════════════════ */
.tb-btn {
  display: inline-flex; align-items: center;
  padding: 10px 20px; border-radius: var(--radius-full);
  font-weight: 600; font-size: 14px;
  text-decoration: none; cursor: pointer;
  border: none; transition: all var(--duration) var(--ease);
}
.tb-btn--primary {
  background: var(--tb-green-500); color: white;
  box-shadow: var(--shadow-green);
}
.tb-btn--primary:hover {
  background: var(--tb-green-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(22,163,74,0.35);
  color: white;
}
.tb-btn--primary:active { transform: translateY(0); }
.tb-btn--outline {
  background: white; color: var(--tb-green-500);
  border: 1.5px solid var(--tb-green-500);
  padding: 12px 24px; border-radius: var(--radius-full);
}
.tb-btn--outline:hover {
  background: var(--tb-green-500);
  color: white;
  transform: translateY(-1px);
}

/* ══════════════════════════════════════
   RESPONSIVE — TABLET
══════════════════════════════════════ */
@media (max-width: 768px) {
  /* Header */
  .tb-header__inner { height: 56px; padding: 0 16px; }
  .tb-hamburger { display: flex; }
  .tb-nav {
    position: fixed; top: 0; right: -100%;
    width: min(300px, 85vw); height: 100vh;
    background: white; z-index: 999;
    padding: 72px 24px 32px;
    box-shadow: -8px 0 32px rgba(0,0,0,0.15);
    transition: right 0.35s cubic-bezier(0.16,1,0.3,1);
    flex-direction: column; align-items: flex-start;
    overflow-y: auto;
  }
  .tb-nav.open { right: 0; }
  .tb-nav__list li { border-bottom: 1px solid #f3f4f6; }
  .tb-nav__list {
    flex-direction: column; align-items: stretch;
    gap: 4px; width: 100%;
    border-bottom: 1px solid var(--tb-gray-200);
    padding-bottom: 20px; margin-bottom: 20px;
  }
  .tb-nav__link {
    font-size: 18px; font-weight: 600;
    width: 100%; padding: 14px 16px;
    display: block; border-radius: var(--radius-md);
    color: var(--tb-gray-700);
  }
  .tb-nav__link:hover { background: var(--tb-green-50); color: var(--tb-green-600); }
  .tb-nav__cta { width: 100%; justify-content: center; font-size: 16px; padding: 14px; margin-top: 20px; }

  /* Homepage sections */
  .tb-hero { padding: 64px 16px; min-height: 80vh; }
  .tb-hero__title { font-size: clamp(36px, 8vw, 52px); }
  .tb-hero__sub { font-size: 16px; }
  .tb-hero__actions { gap: 12px; }
  .tb-btn--hero-primary, .tb-btn--hero-ghost { padding: 13px 22px; font-size: 15px; }
  .tb-hero__stats { gap: 24px; }
  .tb-stat__num { font-size: 26px; }

  .tb-section { padding: 48px 16px; }
  .tb-categories__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tb-cat-card { padding: 20px; }
  .tb-cat-card__icon { font-size: 24px; }

  .tb-posts__grid { grid-template-columns: 1fr; gap: 12px; }
  .tb-post-card { padding: 20px; }

  .tb-tools-preview { padding: 0 0; }
  .tb-tool-preview-card { padding: 14px 18px; }

  .tb-newsletter { padding: 48px 16px; }
  .tb-newsletter__inner { flex-direction: column; text-align: center; gap: 28px; }
  .tb-newsletter__form { width: 100%; flex-direction: column; }
  .tb-newsletter__input { width: 100%; min-width: unset; }
  .tb-newsletter__form .tb-btn { width: 100%; justify-content: center; }

  .tb-footer { padding: 56px 16px 32px; }
  .tb-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .tb-footer__brand { grid-column: 1 / -1; }
}

/* ══════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════ */
@media (max-width: 480px) {
  .tb-categories__grid { grid-template-columns: 1fr; }
  .tb-footer__grid { grid-template-columns: 1fr; }
  .tb-hero__actions { flex-direction: column; align-items: flex-start; }
  .tb-btn--hero-primary, .tb-btn--hero-ghost { width: 100%; justify-content: center; }
  .tb-section__title { font-size: 22px; }
}
