/*
Theme Name: AccX - Accounting Problem Solver
Theme URI: https://example.com/theme-accx
Author: Piyash Datta
Author URI: https://example.com
Description: A clean, professional WordPress theme designed for Accounting Problem Solve Plugin. Modern UI with responsive layout.
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: theme-accx
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ========== CSS Reset & Variables ========== */
:root {
  --accx-bg: #f8fafc;
  --accx-fg: #0f172a;
  --accx-card: #ffffff;
  --accx-card-fg: #1e293b;
  --accx-primary: #2563eb;
  --accx-primary-dark: #1d4ed8;
  --accx-primary-light: #dbeafe;
  --accx-primary-fg: #ffffff;
  --accx-secondary: #f1f5f9;
  --accx-secondary-fg: #334155;
  --accx-muted: #94a3b8;
  --accx-border: #e2e8f0;
  --accx-accent: #0ea5e9;
  --accx-gradient: linear-gradient(135deg, #2563eb 0%, #0ea5e9 50%, #06b6d4 100%);
  --accx-radius: 12px;
  --accx-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --accx-shadow: 0 4px 24px -4px rgba(37,99,235,0.1);
  --accx-shadow-lg: 0 12px 40px -8px rgba(37,99,235,0.15);
  --accx-max-w: 1200px;
  --accx-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--accx-font);
  background: var(--accx-bg);
  color: var(--accx-fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accx-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accx-primary-dark); }

img { max-width: 100%; height: auto; }

/* ========== Header / Navigation ========== */
.accx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--accx-border);
}

.accx-header-inner {
  max-width: var(--accx-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.accx-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.accx-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accx-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

.accx-logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accx-fg);
  letter-spacing: -0.01em;
}

.accx-nav { display: flex; align-items: center; gap: 8px; }
.accx-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accx-secondary-fg);
  transition: all 0.2s;
}
.accx-nav a:hover { background: var(--accx-secondary); color: var(--accx-fg); }
.accx-nav a.accx-nav-cta {
  background: var(--accx-gradient);
  color: #fff;
  font-weight: 600;
}
.accx-nav a.accx-nav-cta:hover { opacity: 0.9; }

/* Mobile nav toggle */
.accx-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--accx-fg);
}
.accx-nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 768px) {
  .accx-nav-toggle { display: block; }
  .accx-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--accx-border);
    flex-direction: column;
    padding: 12px 24px 16px;
    box-shadow: var(--accx-shadow);
  }
  .accx-nav.open { display: flex; }
  .accx-nav a { width: 100%; text-align: center; padding: 12px; }
}

/* ========== Hero Section ========== */
.accx-hero {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.accx-hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.accx-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.accx-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--accx-primary-light);
  color: var(--accx-primary);
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.accx-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--accx-fg);
  margin-bottom: 16px;
}

.accx-hero h1 span {
  background: var(--accx-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accx-hero p {
  font-size: 1.125rem;
  color: var(--accx-muted);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.accx-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.accx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.accx-btn-primary {
  background: var(--accx-gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.accx-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }

.accx-btn-secondary {
  background: var(--accx-card);
  color: var(--accx-card-fg);
  border: 1px solid var(--accx-border);
}
.accx-btn-secondary:hover { border-color: var(--accx-primary); color: var(--accx-primary); }

/* ========== Stats Row ========== */
.accx-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 40px 24px;
  max-width: var(--accx-max-w);
  margin: 0 auto;
}

.accx-stat { text-align: center; }
.accx-stat-num {
  font-size: 2rem;
  font-weight: 800;
  background: var(--accx-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.accx-stat-label { font-size: 0.8125rem; color: var(--accx-muted); font-weight: 500; margin-top: 4px; }

@media (max-width: 640px) {
  .accx-stats { gap: 24px; flex-wrap: wrap; }
  .accx-stat-num { font-size: 1.5rem; }
}

/* ========== Features Grid ========== */
.accx-section {
  padding: 60px 24px;
  max-width: var(--accx-max-w);
  margin: 0 auto;
}

.accx-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.accx-section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.accx-section-header p {
  font-size: 1rem;
  color: var(--accx-muted);
  max-width: 520px;
  margin: 0 auto;
}

.accx-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.accx-feature-card {
  background: var(--accx-card);
  border: 1px solid var(--accx-border);
  border-radius: var(--accx-radius);
  padding: 28px;
  transition: all 0.3s;
}
.accx-feature-card:hover {
  border-color: rgba(37,99,235,0.2);
  box-shadow: var(--accx-shadow-lg);
  transform: translateY(-4px);
}

.accx-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accx-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.accx-feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accx-card-fg);
}

.accx-feature-card p {
  font-size: 0.875rem;
  color: var(--accx-muted);
  line-height: 1.65;
}

/* ========== How It Works ========== */
.accx-steps-bg {
  background: linear-gradient(180deg, var(--accx-bg) 0%, #eef2ff 100%);
  padding: 60px 24px;
}

.accx-steps-inner {
  max-width: var(--accx-max-w);
  margin: 0 auto;
}

.accx-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

@media (max-width: 768px) { .accx-steps-grid { grid-template-columns: 1fr; gap: 24px; } }

.accx-step {
  text-align: center;
  position: relative;
  counter-increment: step;
}

.accx-step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accx-gradient);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(37,99,235,0.25);
}

.accx-step h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; }
.accx-step p { font-size: 0.875rem; color: var(--accx-muted); max-width: 280px; margin: 0 auto; line-height: 1.6; }

/* ========== Topics Section ========== */
.accx-topics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) { .accx-topics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .accx-topics-grid { grid-template-columns: 1fr; } }

.accx-topic-card {
  background: var(--accx-card);
  border: 1px solid var(--accx-border);
  border-radius: var(--accx-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}
.accx-topic-card:hover {
  border-color: rgba(37,99,235,0.3);
  box-shadow: var(--accx-shadow);
}

.accx-topic-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accx-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.accx-topic-card span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accx-card-fg);
}

/* ========== CTA Section ========== */
.accx-cta {
  margin: 60px 24px;
  max-width: var(--accx-max-w);
  margin-left: auto;
  margin-right: auto;
  background: var(--accx-gradient);
  border-radius: 20px;
  padding: 60px 32px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.accx-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.accx-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.accx-cta p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 28px;
  position: relative;
}

.accx-cta .accx-btn {
  background: #fff;
  color: var(--accx-primary);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  position: relative;
}
.accx-cta .accx-btn:hover { transform: translateY(-2px); color: var(--accx-primary-dark); }

/* ========== Solver Section on Homepage ========== */
.accx-solver-section {
  padding: 0 24px 60px;
  max-width: 860px;
  margin: 0 auto;
}

.accx-solver-section .accx-section-header { margin-bottom: 32px; }

/* ========== Footer ========== */
.accx-footer {
  border-top: 1px solid var(--accx-border);
  padding: 32px 24px;
  text-align: center;
}

.accx-footer-inner {
  max-width: var(--accx-max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.accx-footer-copy {
  font-size: 0.8125rem;
  color: var(--accx-muted);
}

.accx-footer-links { display: flex; gap: 20px; }
.accx-footer-links a {
  font-size: 0.8125rem;
  color: var(--accx-muted);
  transition: color 0.2s;
}
.accx-footer-links a:hover { color: var(--accx-primary); }

@media (max-width: 640px) {
  .accx-footer-inner { flex-direction: column; text-align: center; }
}

/* ========== WordPress Content Defaults ========== */
.accx-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

.accx-content h1, .accx-content h2, .accx-content h3 {
  margin-bottom: 16px;
  line-height: 1.3;
}

.accx-content p { margin-bottom: 16px; color: var(--accx-card-fg); line-height: 1.75; }

/* Scroll to top button */
.accx-scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accx-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--accx-shadow);
  transition: all 0.2s;
  z-index: 50;
}
.accx-scroll-top:hover { transform: translateY(-2px); }
.accx-scroll-top.visible { display: flex; }
