/* ═══════════════════════════════════════════
   PAINT 3D THEME — Design System
   Colors: Indigo #4F46E5 + Cyan #06B6D4
   Fonts: Poppins (headings) + Inter (body)
   ═══════════════════════════════════════════ */

:root {
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-light: #EEF2FF;
  --primary-rgb: 79, 70, 229;
  --accent: #06B6D4;
  --accent-dark: #0891B2;
  --bg: #FAFAFA;
  --surface: #F3F4F6;
  --border: #E5E7EB;
  --text: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --white: #ffffff;
  --success: #10B981;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
  --container: 1140px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 0.75rem; margin-top: 2.5rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 600; margin-bottom: 0.5rem; margin-top: 2rem; }
p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

/* ── Container ── */
.p3d-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.p3d-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.p3d-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.p3d-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.p3d-logo:hover { color: var(--text); }
.p3d-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--white);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}
.p3d-nav { display: flex; align-items: center; gap: 32px; }
.p3d-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
.p3d-nav a:hover { color: var(--primary); }
.p3d-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}
.p3d-nav a:hover::after { width: 100%; }

/* Mobile menu */
.p3d-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.p3d-menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}
@media (max-width: 768px) {
  .p3d-menu-toggle { display: flex; }
  .p3d-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .p3d-header.menu-open .p3d-nav { display: flex; }
}

/* ── Main Content ── */
.p3d-main { min-height: calc(100vh - 64px - 300px); }
.p3d-breadcrumb-wrap { padding-top: 24px; }
.p3d-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.p3d-breadcrumb a { color: var(--primary); }
.p3d-breadcrumb .current { color: var(--text); font-weight: 500; }
.p3d-breadcrumb span { color: var(--text-light); }

.p3d-article { padding: 40px 0 80px; }
.p3d-content { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.p3d-full-width .p3d-content,
.p3d-front-page .p3d-content { max-width: none; padding: 0; }
.p3d-front-page .p3d-article { padding: 0; }

/* ── Content Styling ── */
.p3d-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(79,70,229,0.3); }
.p3d-content a:hover { text-decoration-color: var(--primary); }

.p3d-content ul, .p3d-content ol { padding-left: 24px; margin-bottom: 1.5rem; }
.p3d-content li { margin-bottom: 8px; }
.p3d-content li::marker { color: var(--primary); }

/* ── Buttons ── */
.p3d-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none !important;
  white-space: nowrap;
}
.p3d-btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.p3d-btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.35);
}
.p3d-btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.p3d-btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}
.p3d-btn-white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}
.p3d-btn-white:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  color: var(--primary);
}
.p3d-btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}
.p3d-btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.p3d-btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ── Sections ── */
.p3d-section {
  padding: 80px 24px;
}
.p3d-section-alt { background: var(--surface); }
.p3d-section-dark {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #0f172a 100%);
  color: var(--white);
}
.p3d-section-dark h1,
.p3d-section-dark h2,
.p3d-section-dark h3 { color: var(--white); }
.p3d-section-dark p { color: rgba(255,255,255,0.8); }
.p3d-section-inner { max-width: var(--container); margin: 0 auto; }
.p3d-section-header { margin-bottom: 48px; }
.p3d-section-header.center { text-align: center; }
.p3d-section-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 640px; }
.p3d-section-header.center p { margin: 0 auto; }
.p3d-section-label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
}
.p3d-section-dark .p3d-section-label {
  background: rgba(79,70,229,0.2);
  color: #a5b4fc;
}

/* ── Feature Grid ── */
.p3d-grid { display: grid; gap: 24px; }
.p3d-grid-2 { grid-template-columns: repeat(2, 1fr); }
.p3d-grid-3 { grid-template-columns: repeat(3, 1fr); }
.p3d-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .p3d-grid-3, .p3d-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .p3d-grid-2, .p3d-grid-3, .p3d-grid-4 { grid-template-columns: 1fr; } }

.p3d-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}
.p3d-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary);
}
.p3d-card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
  color: var(--primary);
}
.p3d-card h3 { font-size: 1.15rem; margin-top: 0; margin-bottom: 8px; }
.p3d-card p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.6; margin: 0; }
.p3d-card a { text-decoration: none; }

/* ── Hero ── */
.p3d-hero {
  padding: 100px 24px 100px;
  text-align: center;
}
.p3d-hero h1 {
  font-size: clamp(2.8rem, 6vw, 4rem);
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.p3d-hero .p3d-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.75);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.p3d-hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.p3d-hero-trust {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.p3d-hero-trust span { display: flex; align-items: center; gap: 6px; }
.p3d-hero-trust .check { color: var(--accent); }

/* ── Tables ── */
.p3d-content table,
.p3d-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 24px 0;
}
.p3d-content th,
.p3d-table th {
  background: var(--primary);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 18px;
  text-align: left;
}
.p3d-content td,
.p3d-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
.p3d-content tr:last-child td,
.p3d-table tr:last-child td { border-bottom: none; }
.p3d-content tr:nth-child(even) td,
.p3d-table tr:nth-child(even) td { background: var(--surface); }
.p3d-content tr:hover td,
.p3d-table tr:hover td { background: var(--primary-light); }

/* ── Code ── */
.p3d-content code,
code {
  background: var(--primary-light);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--primary-dark);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}
.p3d-content pre,
pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 24px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 24px 0;
  font-size: 0.88rem;
  line-height: 1.6;
}
pre code { background: transparent; color: inherit; padding: 0; }

/* ── Accordion / FAQ ── */
.p3d-faq { margin: 24px 0; }
.p3d-faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  transition: all var(--transition);
}
.p3d-faq details:hover { border-color: var(--primary); }
.p3d-faq details[open] { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.p3d-faq summary {
  padding: 18px 24px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  transition: background var(--transition);
}
.p3d-faq summary:hover { background: var(--border); }
.p3d-faq summary::-webkit-details-marker { display: none; }
.p3d-faq summary::after { content: '+'; font-size: 1.2rem; color: var(--primary); font-weight: 700; }
.p3d-faq details[open] summary::after { content: '\2212'; }
.p3d-faq details[open] summary { background: var(--primary-light); color: var(--primary); }
.p3d-faq .p3d-faq-answer {
  padding: 20px 24px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.93rem;
}

/* ── Link Cards (for tutorial hub) ── */
.p3d-link-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all var(--transition);
  text-decoration: none !important;
}
.p3d-link-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.p3d-link-card h4 {
  font-size: 1rem;
  margin: 0 0 4px;
  color: var(--primary);
  font-weight: 600;
}
.p3d-link-card p { color: var(--text-muted); font-size: 0.88rem; margin: 0; }

/* ── Steps ── */
.p3d-steps { counter-reset: step; list-style: none; padding-left: 0; }
.p3d-steps li {
  counter-increment: step;
  padding-left: 48px;
  position: relative;
  margin-bottom: 20px;
}
.p3d-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

/* ── Blockquote ── */
blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
}

/* ── 404 ── */
.p3d-404 {
  text-align: center;
  padding: 120px 24px;
}
.p3d-404 h1 { margin-bottom: 16px; }
.p3d-404 p { color: var(--text-muted); margin-bottom: 32px; }
.p3d-404 .p3d-btn { margin: 0 8px; }

/* ── Footer ── */
.p3d-footer {
  background: #0f172a;
  color: rgba(255,255,255,0.65);
  padding: 64px 0 32px;
}
.p3d-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);
  margin-bottom: 24px;
}
.p3d-footer-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.p3d-footer-brand p { font-size: 0.88rem; line-height: 1.6; }
.p3d-footer-col { display: flex; flex-direction: column; gap: 10px; }
.p3d-footer-col h4 {
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.p3d-footer-col a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.p3d-footer-col a:hover { color: var(--white); }
.p3d-footer-bottom { font-size: 0.8rem; color: rgba(255,255,255,0.35); }
@media (max-width: 768px) { .p3d-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .p3d-footer-grid { grid-template-columns: 1fr; } }

/* ── Selection ── */
::selection { background: var(--primary); color: var(--white); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ── Gutenberg overrides ── */
.wp-block-heading { font-family: 'Poppins', sans-serif; }
.wp-block-table table { border-collapse: separate; border-spacing: 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.wp-block-table th { background: var(--primary) !important; color: #fff !important; font-family: 'Poppins', sans-serif; font-weight: 600; padding: 14px 18px; }
.wp-block-table td { padding: 12px 18px; border-bottom: 1px solid var(--border); }
.wp-block-table tr:nth-child(even) td { background: var(--surface); }
.wp-block-table tr:hover td { background: var(--primary-light); }
.wp-block-button__link {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: var(--radius) !important;
  padding: 14px 28px !important;
  font-weight: 600 !important;
  border: none !important;
  transition: all var(--transition) !important;
}
.wp-block-button__link:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.35);
}
.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--primary) !important;
  border: 2px solid var(--primary) !important;
}
.is-style-outline .wp-block-button__link:hover {
  background: var(--primary) !important;
  color: #fff !important;
}