/*
Theme Name: BestAIMarketingTools
Theme URI: https://bestaimarketingtools.com
Description: Custom theme for BestAIMarketingTools.com — AI marketing tool reviews and comparisons.
Version: 1.0
Author: BestAIMarketingTools
Author URI: https://bestaimarketingtools.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bestaimt
*/

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --amber-deep: #B45309;
  --amber-core: #D97706;
  --amber-mid: #F59E0B;
  --amber-light: #FDE68A;
  --amber-pale: #FEF3C7;
  --amber-faint: #FFFBF0;
  --ink: #1C1611;
  --ink-soft: #6B5B45;
  --ink-muted: #A89880;
  --ink-faint: #D4C8B8;
  --surface: #FFFFFF;
  --surface-warm: #FFF9EE;
  --border: #E8DFD1;
  --border-light: #F0EBE3;
  --green: #16A34A;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(28,22,17,0.06);
  --shadow-md: 0 4px 16px rgba(28,22,17,0.08);
  --shadow-lg: 0 8px 32px rgba(28,22,17,0.12);
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--amber-faint);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber-deep); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber-core); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  background: rgba(255,251,240,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s;
}

.site-nav.scrolled { box-shadow: 0 2px 20px rgba(28,22,17,0.08); }

.site-nav__inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-nav__logo-mark {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--amber-core), var(--amber-deep));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(180,83,9,0.2);
}

.site-nav__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-nav__logo-text span { color: var(--amber-core); font-weight: 800; }

/* WordPress menu */
.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  flex-shrink: 0;
}

.site-nav__menu li a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s;
  position: relative;
}

.site-nav__menu li a:hover { color: var(--ink); }

.site-nav__menu li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--amber-core);
  border-radius: 1px;
  transition: width 0.25s ease;
}

.site-nav__menu li a:hover::after { width: 100%; }

.site-nav__menu li:last-child a {
  background: var(--ink);
  color: white !important;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  transition: background 0.2s, transform 0.15s !important;
}

.site-nav__menu li:last-child a:hover {
  background: var(--ink-soft) !important;
  transform: translateY(-1px);
}

.site-nav__menu li:last-child a::after { display: none !important; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: 0.3s;
}

/* ============================================
   HERO (Homepage)
   ============================================ */
.hero {
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(253,230,138,0.4) 0%, rgba(254,243,199,0.2) 40%, transparent 70%);
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 30px) scale(1.1); }
}

.hero__inner { position: relative; z-index: 1; max-width: 720px; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 18px 8px 10px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.hero__eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 58px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 24px;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--amber-core) 0%, var(--amber-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--amber-core), var(--amber-deep));
  color: white !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(180,83,9,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(180,83,9,0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--ink) !important;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.btn-secondary:hover {
  border-color: var(--amber-mid);
  background: var(--amber-pale);
  transform: translateY(-1px);
}

.hero__proof {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.hero__proof-stat { text-align: center; padding: 0 20px; }
.hero__proof-stat:first-child { padding-left: 0; }
.hero__proof-stat:not(:last-child) { border-right: 1px solid var(--border); }

.hero__proof-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--amber-deep);
  line-height: 1.1;
}

.hero__proof-label {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ============================================
   CATEGORY CARDS
   ============================================ */
.section-header { margin-bottom: 40px; }

.section-eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber-deep);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-sub {
  font-size: 17px;
  color: var(--ink-muted);
  margin-top: 10px;
  max-width: 520px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, var(--amber-core));
  opacity: 0;
  transition: opacity 0.25s;
}

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

.cat-card:hover::before { opacity: 1; }

.cat-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.cat-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}

.cat-card p { font-size: 14px; color: var(--ink-muted); line-height: 1.5; margin-bottom: 14px; }

.cat-card__count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--amber-deep);
}

/* ============================================
   POST CARDS (Reviews, Blog)
   ============================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: var(--amber-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.post-card__thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--amber-core), var(--amber-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber-deep);
  z-index: 1;
}

.post-card__body {
  padding: 22px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__category {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-deep);
  margin-bottom: 8px;
}

.post-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--ink);
}

.post-card p { font-size: 14.5px; color: var(--ink-muted); line-height: 1.55; flex: 1; }

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border-light);
}

.post-card__read {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--amber-deep);
}

/* ============================================
   SINGLE POST / ARTICLE
   ============================================ */
.article-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-content h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.article-meta {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--ink);
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--ink);
}

.article-content p { margin-bottom: 20px; }

.article-content ul, .article-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

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

.article-content blockquote {
  border-left: 4px solid var(--amber-core);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--amber-pale);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--ink-soft);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-content th {
  background: var(--ink);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}

.article-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 15px;
}

.article-content tr:nth-child(even) { background: var(--surface-warm); }

/* Score box for reviews */
.score-box {
  background: var(--ink);
  color: white;
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 32px 0;
}

.score-box__number {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  color: var(--amber-mid);
  line-height: 1;
}

.score-box__label {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

/* Pros/Cons boxes */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 32px 0;
}

.pros-box, .cons-box {
  padding: 24px;
  border-radius: var(--radius-md);
}

.pros-box { background: #ECFDF5; border: 1px solid #A7F3D0; }
.cons-box { background: #FFF1F2; border: 1px solid #FECDD3; }

.pros-box h4 { color: #059669; font-family: var(--font-display); margin-bottom: 12px; }
.cons-box h4 { color: #E11D48; font-family: var(--font-display); margin-bottom: 12px; }

.pros-box li, .cons-box li { font-size: 15px; margin-bottom: 6px; }

/* CTA box inside articles */
.article-cta {
  background: linear-gradient(135deg, var(--amber-pale) 0%, var(--surface) 100%);
  border: 2px solid var(--amber-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin: 40px 0;
}

.article-cta h3 {
  margin-top: 0;
  font-size: 22px;
}

/* ============================================
   NEWSLETTER CTA
   ============================================ */
.newsletter {
  padding: 80px 0;
}

.newsletter__card {
  background: linear-gradient(135deg, var(--amber-pale) 0%, var(--surface) 60%, var(--amber-pale) 100%);
  border: 2px solid var(--amber-light);
  border-radius: var(--radius-xl);
  padding: 56px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--ink);
}

.newsletter__sub {
  font-size: 16.5px;
  color: var(--ink-muted);
  max-width: 460px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.newsletter__form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }

.newsletter__input {
  flex: 1;
  padding: 15px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.newsletter__input:focus {
  border-color: var(--amber-core);
  box-shadow: 0 0 0 4px rgba(217,119,6,0.1);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--ink);
  padding: 56px 0 0;
  color: rgba(255,255,255,0.5);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer__brand-text {
  font-size: 14px;
  line-height: 1.7;
  margin-top: 16px;
  max-width: 280px;
}

.site-footer h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.8);
  margin-bottom: 18px;
}

.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer li a { color: rgba(255,255,255,0.45); font-size: 14.5px; transition: color 0.2s; }
.site-footer li a:hover { color: var(--amber-mid); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 13px;
}

/* ============================================
   SIDEBAR (for archive pages)
   ============================================ */
.with-sidebar {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 48px 24px;
}

.sidebar__widget {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar__widget h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--ink);
}

/* ============================================
   WORDPRESS SPECIFIC
   ============================================ */
.wp-block-image { margin: 24px 0; border-radius: var(--radius-md); overflow: hidden; }
.wp-block-image img { border-radius: var(--radius-md); }

.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 24px; margin-bottom: 16px; }
.alignright { float: right; margin-left: 24px; margin-bottom: 16px; }

.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 !important; width: 1px; word-wrap: normal !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .with-sidebar { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-nav__menu { display: none; }
  .menu-toggle { display: block; }
  .site-nav__menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--surface);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    gap: 16px;
  }
  .site-nav__menu.active li:last-child a { display: block; text-align: center; }
  .hero h1 { font-size: 34px; }
  .hero__proof { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero__proof-stat { border-right: none !important; padding: 0; }
  .cat-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .newsletter__card { padding: 40px 28px; }
  .newsletter__form { flex-direction: column; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .btn-primary, .btn-secondary { justify-content: center; }
}
