/*
 Theme Name:   AutomateOps Child
 Theme URI:    https://automateops.org
 Description:  GeneratePress child theme for AutomateOps — AI automation for freelancers and agencies.
 Author:       AutomateOps
 Author URI:   https://automateops.org
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  automateops-child
*/

/* ============================================================
   GLOBAL VARIABLES
   ============================================================ */
:root {
  --color-primary:       #2563EB;   /* Electric blue — trust + tech */
  --color-primary-dark:  #1D4ED8;
  --color-accent:        #10B981;   /* Emerald — growth, money, automation */
  --color-accent-dark:   #059669;
  --color-danger:        #EF4444;   /* Red — cons, warnings */
  --color-warning:       #F59E0B;   /* Amber — neutral callouts */
  --color-text:          #1F2937;   /* Near-black body text */
  --color-text-muted:    #6B7280;
  --color-bg:            #FFFFFF;
  --color-bg-soft:       #F9FAFB;
  --color-border:        #E5E7EB;
  --color-link:          #2563EB;
  --font-body:           'Inter', system-ui, -apple-system, sans-serif;
  --font-heading:        'Inter', system-ui, -apple-system, sans-serif;
  --radius:              8px;
  --shadow-sm:           0 1px 3px rgba(0,0,0,.08);
  --shadow-md:           0 4px 12px rgba(0,0,0,.10);
}

/* ============================================================
   BASE TYPOGRAPHY
   ============================================================ */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.75;
  font-size: 17px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 2.5rem; margin-bottom: .75rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); margin-top: 2rem; margin-bottom: .5rem; }

a { color: var(--color-link); text-decoration: underline; }
a:hover { color: var(--color-primary-dark); }

p { margin-bottom: 1.25rem; }

/* ============================================================
   ARTICLE CONTENT WIDTH
   ============================================================ */
.entry-content {
  max-width: 780px;
}

/* ============================================================
   QUICK VERDICT / SUMMARY BOX
   ============================================================ */
.verdict-box,
blockquote.verdict {
  background: #EFF6FF;
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  font-size: .97rem;
}
.verdict-box strong,
blockquote.verdict strong {
  color: var(--color-primary-dark);
}

/* ============================================================
   COMPARISON TABLES
   ============================================================ */
.wp-block-table table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  overflow: hidden;
}

.wp-block-table table thead,
.entry-content table thead {
  background: var(--color-primary);
  color: #fff;
}

.wp-block-table table thead th,
.entry-content table thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  border: none;
}

.wp-block-table table tbody tr:nth-child(even),
.entry-content table tbody tr:nth-child(even) {
  background: var(--color-bg-soft);
}

.wp-block-table table tbody td,
.entry-content table tbody td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.wp-block-table table tbody tr:last-child td,
.entry-content table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   PROS / CONS BOXES
   ============================================================ */
.pros-cons-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.75rem 0;
}

@media (max-width: 640px) {
  .pros-cons-wrap { grid-template-columns: 1fr; }
}

.pros-box,
.cons-box {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
}

.pros-box {
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
}
.pros-box h4 {
  color: var(--color-accent-dark);
  margin-top: 0;
  margin-bottom: .75rem;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cons-box {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
}
.cons-box h4 {
  color: #B91C1C;
  margin-top: 0;
  margin-bottom: .75rem;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pros-box ul,
.cons-box ul {
  margin: 0;
  padding-left: 1.2rem;
}

.pros-box li { color: #065F46; }
.cons-box li { color: #7F1D1D; }

/* ============================================================
   CTA BUTTONS
   ============================================================ */
.cta-btn,
.wp-block-button__link {
  display: inline-block;
  background: var(--color-primary);
  color: #fff !important;
  text-decoration: none !important;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: background .15s ease, transform .1s ease;
  box-shadow: var(--shadow-sm);
}
.cta-btn:hover,
.wp-block-button__link:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.cta-btn.secondary {
  background: transparent;
  color: var(--color-primary) !important;
  border: 2px solid var(--color-primary);
}
.cta-btn.secondary:hover {
  background: #EFF6FF;
}

.cta-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1.75rem 0;
}

/* ============================================================
   AFFILIATE CTA BLOCK
   ============================================================ */
.affiliate-cta {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0FDF4 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.affiliate-cta .cta-text p { margin: 0; font-size: .95rem; }
.affiliate-cta .cta-text strong { font-size: 1.1rem; display: block; margin-bottom: .25rem; }

/* ============================================================
   TOOL RATING CARD
   ============================================================ */
.tool-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}
.tool-card .tool-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.tool-card .tool-header img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
}
.tool-card .tool-meta {
  flex: 1;
}
.tool-card .tool-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 .15rem;
}
.tool-card .tool-tagline {
  font-size: .88rem;
  color: var(--color-text-muted);
  margin: 0;
}
.tool-card .tool-badge {
  background: var(--color-primary);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section h2 {
  font-size: 1.5rem;
}
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}
.faq-question {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 .5rem;
  color: var(--color-text);
}
.faq-answer {
  font-size: .95rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ============================================================
   AFFILIATE DISCLAIMER
   ============================================================ */
.affiliate-disclaimer {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: .85rem 1.25rem;
  font-size: .83rem;
  color: var(--color-text-muted);
  margin: 1.5rem 0 2rem;
}

/* ============================================================
   CHECKLIST (used in how-to articles)
   ============================================================ */
.task-checklist {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.task-checklist li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: .95rem;
}
.task-checklist li:last-child { border-bottom: none; }
.task-checklist li::before {
  content: "☐";
  font-size: 1.1rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-top: .05rem;
}

/* ============================================================
   WORKFLOW STEPS
   ============================================================ */
.workflow-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.workflow-steps li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.workflow-steps li:last-child { border-bottom: none; }
.workflow-steps li::before {
  content: counter(step);
  background: var(--color-primary);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .15rem;
}

/* ============================================================
   CODE BLOCKS
   ============================================================ */
pre, code {
  font-family: 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: .88rem;
}
pre {
  background: #1E293B;
  color: #E2E8F0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.65;
  margin: 1.5rem 0;
}
code {
  background: #F1F5F9;
  color: #BE185D;
  padding: .15em .4em;
  border-radius: 4px;
}
pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ============================================================
   LAST UPDATED BADGE
   ============================================================ */
.last-updated {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--color-text-muted);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: .3rem .85rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   RESPONSIVE TABLES (mobile scroll)
   ============================================================ */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.75rem 0;
}
.table-scroll table { margin: 0; }

/* ============================================================
   NAVIGATION / HEADER TWEAKS
   ============================================================ */
.site-header {
  border-bottom: 1px solid var(--color-border);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  font-size: .88rem;
  color: var(--color-text-muted);
}
