/* automatethisai.com — Hugo/Blowfish custom theme */
/* Dark green theme matching original static site */

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

:root {
  --bg:           #0b0d11;
  --bg-card:      #13161d;
  --bg-card-2:    #171b24;
  --white:        #ffffff;
  --ice:          #e2e5eb;
  --muted:        #97a1b3;
  --muted2:       #4d5566;
  --accent:       #10b981;
  --accent-hov:   #059669;
  --accent-glow:  rgba(16, 185, 129, 0.12);
  --text:         #e2e5eb;
  --border:       #1e2330;
  --border-subtle:#171b24;
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html, html.scroll-smooth {
  scroll-behavior: smooth;
}

html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font) !important;
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body {
  max-width: none !important;
  padding: 0 !important;
  display: block !important;
}

#the-top, .print\:hidden a[href="#main-content"] { display: none !important; }

a { color: var(--accent); }

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

/* ── Nav breakpoint: hamburger earlier for 6 nav items ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(12, 15, 20, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    z-index: 200;
    list-style: none;
  }
  .nav-links.open a {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
    color: var(--muted);
    min-height: 44px;
    line-height: 1.5;
  }
  .nav-links.open a:hover { color: var(--white); }
}

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 15, 20, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
  text-decoration: none;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 44px;
  height: 44px;
  padding: 12px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
}

/* ── Hero (homepage) ── */
.hero {
  padding: 100px 0 70px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card) 100%);
}

.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--white);
  max-width: 900px;
  margin: 0 auto 16px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero > .container > p {
  max-width: 640px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000 !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.15s;
  min-height: 50px;
}
.btn:hover { background: var(--accent-hov); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--white) !important;
  border: 1.5px solid rgba(255,255,255,0.2);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: transparent;
}

/* ── Sections ── */
.section {
  padding: 64px 0;
}
.section-alt {
  background: var(--bg-card);
}

.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 8px;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 0 40px;
}

/* ── Cards (homepage featured guides) ── */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card, .article-link--card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover, .article-link--card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card-featured {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(16,185,129,0.04) 100%);
  border-color: rgba(16, 185, 129, 0.2);
}

.card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

.card h3, .article-link--card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white) !important;
  margin: 0 0 10px;
  line-height: 1.4;
}

.card p, .article-link--card p {
  font-size: 0.92rem;
  color: var(--muted) !important;
  margin: 0 0 16px;
  line-height: 1.6;
  flex: 1;
}

.card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.card-arrow {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: auto;
}

.card-link {
  text-decoration: none;
  display: block;
}

/* ── Article link cards (section list page grid) ── */
.article-link--card {
  padding: 0;
  overflow: hidden;
}
.article-link--card .card-link {
  display: block;
  padding: 24px;
}

/* ── Tool cards ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.tool-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.tool-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 10px;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.6;
  flex: 1;
}

.tool-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
  min-height: 1.4em;
}

.affiliate-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: #000 !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 6px;
  transition: background 0.2s;
  margin-top: auto;
}
.affiliate-btn:hover { background: var(--accent-hov); }

.disclosure-note {
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Article / static page headers ── */
.article-header {
  padding: 70px 0 36px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card) 100%);
}

.breadcrumbs {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 6px; color: var(--muted); }

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  max-width: 800px;
  margin: 0 auto 16px;
  line-height: 1.3;
}

.list-header .list-sub {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ── Hero image ── */
.hero-image-wrap {
  max-width: 900px;
  margin: -20px auto 0;
  padding: 0 24px;
}
.hero-image {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
}

/* ── Article body layout ── */
.article-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.article-body-content {
  max-width: 760px;
  margin: 0 auto;
  flex: 1;
  min-width: 0;
}

.article-toc {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
}

.toc-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.toc-inner nav > ul,
.toc-inner ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
}
.toc-inner ul ul {
  padding-left: 16px;
  margin-top: 6px;
}
.toc-inner li { margin-bottom: 8px; }
.toc-inner a {
  color: var(--muted);
  text-decoration: none;
  line-height: 1.5;
}
.toc-inner a:hover { color: var(--accent); }

/* ── Body content typography ── */
.article-body-content h1,
.article-body-content h2,
.article-body-content h3,
.article-body-content h4,
.article-body-content h5,
.article-body-content h6 {
  color: var(--white);
}

.article-body-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin: 40px 0 16px;
}

.article-body-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ice);
  margin: 32px 0 12px;
}

.article-body-content p {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.75;
}

.article-body-content ul, .article-body-content ol {
  margin: 0 0 20px 24px;
  color: var(--text);
}

.article-body-content li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.article-body-content strong { color: var(--white); font-weight: 700; }
.article-body-content em { font-style: italic; }

.article-body-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.article-body-content a:hover {
  color: var(--accent-hov);
  border-bottom-color: var(--accent);
}

/* Product boxes */
.product-box {
  background: var(--accent-glow);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  padding: 24px;
  margin: 24px 0;
}

.product-box h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.product-box p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.product-box .price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 8px;
  margin-bottom: 0;
}

/* ── Stat rows / cards ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ── Tables — !important overrides for Blowfish/Tailwind preflight ── */
.article-body-content table,
.article-body table,
main table {
  display: table !important;
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  margin: 24px 0 !important;
  font-size: 0.9rem !important;
  color: var(--text) !important;
}

.article-body-content thead,
.article-body thead,
main table thead {
  display: table-header-group !important;
}

main table tbody {
  display: table-row-group !important;
}

.article-body-content tr,
.article-body tr,
main table tr {
  display: table-row !important;
}

.article-body-content th,
.article-body th,
main table th {
  display: table-cell !important;
  background: var(--accent-glow) !important;
  color: var(--white) !important;
  font-weight: 700 !important;
  text-align: left !important;
  padding: 12px 16px !important;
  border: 1px solid var(--border) !important;
}

.article-body-content td,
.article-body td,
main table td {
  display: table-cell !important;
  padding: 12px 16px !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  vertical-align: top !important;
}

.article-body-content tr:nth-child(even),
.article-body tr:nth-child(even),
main table tr:nth-child(2n) {
  background: rgba(255, 255, 255, 0.03);
}

.article-body-content td strong,
.article-body td strong,
main table strong {
  color: var(--text) !important;
}

main table a {
  color: var(--text) !important;
  text-decoration: none;
}

/* Blockquotes */
.article-body-content blockquote {
  margin: 24px 0;
  padding: 20px;
  background: var(--accent-glow);
  border-left: 4px solid var(--accent);
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
}
.article-body-content blockquote p { margin-bottom: 0; }

/* AEO Quick Answer */
.quick-answer {
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.75rem auto;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #b0b8c4;
  text-align: left;
  max-width: 680px;
}
.quick-answer strong {
  color: var(--accent);
  font-weight: 700;
}

/* FAQ */
.faq-section {
  margin-top: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ice);
  margin-bottom: 0.5rem;
}

.faq-answer {
  color: #b0b8c4 !important;
  line-height: 1.7;
  margin: 0;
}
.faq-answer a {
  color: var(--accent) !important;
}
.faq-answer strong {
  color: var(--white) !important;
}

/* ── Footer ── */
#site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.footer-brand .logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
}
.footer-brand .logo span { color: var(--accent); }
.footer-brand p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.footer-col h5 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 0.85rem;
  text-align: center;
}
.footer-bottom a { color: var(--muted); text-decoration: underline; }
.footer-bottom a:hover { color: var(--accent); }

/* Scroll to top */
.scroll-top-btn {
  position: fixed;
  bottom: 40px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.9);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  z-index: 50;
  transition: background 0.2s, transform 0.2s;
}
.scroll-top-btn:hover { background: var(--accent); transform: translateY(-2px); }

/* Kill Blowfish's default scroll-to-top */
#scroll-to-top, [id="scroll-to-top"] { display: none !important; }

/* Hide appearance switcher if theme renders one anywhere */
.appearance-switcher, #appearance-switch, [data-appearance-toggle] {
  display: none !important;
}

/* ── Mobile ── */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { flex-direction: column; }
  .article-toc { width: 100%; position: static; order: -1; }
  .stat-row { grid-template-columns: 1fr; }
  .nav-inner { padding: 16px 20px; position: relative; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }

  .article-header { padding: 56px 0 28px; }
  .article-body { padding: 32px 20px 60px; }
  .article-body-content h2 { font-size: 1.3rem; margin: 32px 0 12px; }
  .article-body-content h3 { font-size: 1.1rem; margin: 24px 0 10px; }
  .product-box { padding: 20px; }
  .tools-grid { grid-template-columns: 1fr; }

  body { font-size: 17px; line-height: 1.7; }

  .article-body-content table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Section hero images — constrained height ── */
.section-hero-img { max-height: 300px; object-fit: cover; width: 100%; border-radius: 10px; }

/* ── Newsletter (site-wide) ── */
.newsletter-section {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.newsletter-section h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.newsletter-section p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--muted);
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--accent);
}

/* ── Hub page article cards ── */
.hub-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.hub-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.hub-card-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.hub-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hub-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 24px 24px;
}

.hub-card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 10px;
  line-height: 1.35;
}

.hub-card-body p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.55;
  flex: 1;
}

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

.hub-card-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.hub-card-arrow {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

@media (max-width: 900px) {
  .hub-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hub-cards { grid-template-columns: 1fr; }
}

.text-center { text-align: center; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
