/* ==========================================================================
   DanWillForex.com - Master Stylesheet
   Modern FinTech Theme: Deep Navy (#0A2558), Emerald Green (#10B981 / #059669),
   Crisp Whites, High-contrast Dark Mode.
   ========================================================================== */

:root {
  /* Brand Palette */
  --primary: #0A2558;
  --primary-hover: #071b40;
  --primary-light: #163e8a;
  --accent: #10B981;
  --accent-hover: #059669;
  --accent-light: #e6f7f1;
  --accent-border: #a7f3d0;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --warning-light: #fffbeb;

  /* Neutrals (Light Mode) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-muted: #f1f5f9;
  --border-color: #e2e8f0;
  --border-subtle: #edf2f7;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --header-bg: rgba(255, 255, 255, 0.95);

  /* Layout */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --container-max: 1240px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --primary: #2563eb;
  --primary-hover: #3b82f6;
  --primary-light: #1d4ed8;
  --accent: #10B981;
  --accent-hover: #34d399;
  --accent-light: rgba(16, 185, 129, 0.12);
  --accent-border: rgba(16, 185, 129, 0.25);
  --danger: #f87171;
  --danger-light: rgba(239, 68, 68, 0.12);

  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-muted: #1e293b;
  --border-color: #2e3a4e;
  --border-subtle: #242f42;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(17, 24, 39, 0.95);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

[data-theme="dark"] a {
  color: #60a5fa;
}

a:hover {
  text-decoration: none;
  opacity: 0.9;
}

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

button, input, select, textarea {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background-color: var(--bg-muted);
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  box-shadow: var(--card-shadow-hover);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 60;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: var(--bg-muted);
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--border-color);
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-muted);
  border-color: var(--text-muted);
}

.btn-navy {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-navy:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-green {
  background-color: var(--accent-light);
  color: var(--accent-hover);
  border: 1px solid var(--accent-border);
}

.badge-blue {
  background-color: rgba(10, 37, 88, 0.08);
  color: var(--primary);
  border: 1px solid rgba(10, 37, 88, 0.2);
}

[data-theme="dark"] .badge-blue {
  background-color: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
  border-color: rgba(37, 99, 235, 0.3);
}

/* Hero Section */
.hero-section {
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(180deg, var(--bg-muted) 0%, var(--bg-body) 100%);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
  }
}

.hero-title {
  font-size: clamp(2.1rem, 4.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text-main);
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, #0A2558 0%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-title .text-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Cards & Grid */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tool-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  box-shadow: var(--card-shadow);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent);
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--accent-light);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.tool-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.tool-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

/* Ad Placement Slots (AdSense Ready) */
.ad-slot-container {
  margin: 2rem 0;
  padding: 1rem;
  background-color: var(--bg-muted);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.ad-slot-banner {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.ad-slot-sidebar {
  width: 100%;
  max-width: 300px;
  min-height: 250px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  margin: 0 auto;
}

/* Content & Article Styles */
.article-container {
  max-width: 840px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.article-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.article-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-main);
}

.article-body h1 {
  font-size: 2.1rem;
  font-weight: 800;
  margin: 2.25rem 0 1.25rem;
  color: var(--text-main);
  line-height: 1.3;
}

.article-body h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.4rem;
  line-height: 1.35;
}

.article-body h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 1.6rem 0 0.85rem;
  color: var(--text-main);
  line-height: 1.4;
}

.article-body h4 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 1.35rem 0 0.75rem;
  color: var(--text-main);
}

.article-body h5 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.2rem 0 0.65rem;
  color: var(--text-main);
}

.article-body h6 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 1.1rem 0 0.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: var(--transition);
}

.article-body a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.75rem;
}

.article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* WordPress Embed Image & Figures */
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  display: block;
}

.article-body figure,
.article-body .wp-block-image {
  margin: 2rem 0;
  display: block;
  clear: both;
}

.article-body figure.align-center,
.article-body figure.aligncenter,
.article-body .align-center,
.article-body .aligncenter {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.article-body figure.align-center img,
.article-body figure.aligncenter img {
  margin: 0 auto;
}

.article-body figure.align-left,
.article-body figure.alignleft,
.article-body .align-left,
.article-body .alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1.25rem 0;
  max-width: 50%;
}

.article-body figure.align-right,
.article-body figure.alignright,
.article-body .align-right,
.article-body .alignright {
  float: right;
  margin: 0.5rem 0 1.25rem 1.5rem;
  max-width: 50%;
}

.article-body figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.6rem;
  text-align: center;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
  background-color: var(--bg-muted);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-main);
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* WordPress Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-body th {
  background-color: var(--bg-muted);
  color: var(--text-main);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.article-body td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
}

.article-body tr:nth-child(even) td {
  background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .article-body tr:nth-child(even) td {
  background-color: rgba(255, 255, 255, 0.02);
}

.article-body hr {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 2.25rem 0;
}

.article-body pre {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.5;
}

.article-body code {
  font-family: var(--font-mono);
  background-color: var(--bg-muted);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent);
}

.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.article-body .callout {
  background-color: var(--bg-muted);
  border-left: 4px solid var(--accent);
  padding: 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
}

.article-body .callout-warning {
  background-color: rgba(245, 158, 11, 0.08);
  border-left: 4px solid #f59e0b;
}

.article-body .formula-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--primary);
  margin: 1.5rem 0;
  overflow-x: auto;
}

[data-theme="dark"] .article-body .formula-box {
  color: #38bdf8;
}

/* --- WordPress Style Blog Post Editor (Admin Panel) --- */
.wp-editor-wrap {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.wp-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-muted);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wp-mode-tabs {
  display: flex;
  gap: 2px;
}

.wp-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: var(--transition);
}

.wp-tab-btn.active {
  background: var(--bg-surface);
  color: var(--accent);
  border-color: var(--border-color);
  border-bottom-color: var(--bg-surface);
  font-weight: 700;
}

.wp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.wp-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding-right: 0.4rem;
  border-right: 1px solid var(--border-subtle);
}

.wp-toolbar-group:last-child {
  border-right: none;
}

.wp-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  transition: all 0.15s ease;
  user-select: none;
}

.wp-btn:hover {
  background: var(--bg-muted);
  border-color: var(--accent);
  color: var(--accent);
}

.wp-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.wp-btn-accent {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

.wp-btn-accent:hover {
  background: var(--accent);
  color: #ffffff;
}

.wp-toolbar-select {
  height: 28px;
  font-size: 0.825rem;
  padding: 0 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
}

.wp-color-picker-wrap {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 0.3rem;
  background: var(--bg-surface);
  cursor: pointer;
  gap: 0.2rem;
}

.wp-color-input {
  width: 18px;
  height: 18px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

.wp-editor-canvas {
  min-height: 380px;
  max-height: 520px;
  overflow-y: auto;
  padding: 1.5rem;
  outline: none;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-main);
  background: var(--bg-surface);
  font-family: inherit;
}

.wp-editor-canvas:empty:before {
  content: attr(placeholder);
  color: var(--text-muted);
  pointer-events: none;
  display: block;
}

.wp-editor-canvas h1 { font-size: 2.1rem; font-weight: 800; margin: 1.5rem 0 1rem; color: var(--text-main); }
.wp-editor-canvas h2 { font-size: 1.65rem; font-weight: 700; margin: 1.5rem 0 0.85rem; color: var(--text-main); border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.3rem; }
.wp-editor-canvas h3 { font-size: 1.35rem; font-weight: 700; margin: 1.3rem 0 0.75rem; color: var(--text-main); }
.wp-editor-canvas h4 { font-size: 1.18rem; font-weight: 700; margin: 1.1rem 0 0.6rem; color: var(--text-main); }
.wp-editor-canvas h5 { font-size: 1.05rem; font-weight: 600; margin: 1rem 0 0.5rem; color: var(--text-main); }
.wp-editor-canvas h6 { font-size: 0.92rem; font-weight: 600; margin: 0.9rem 0 0.4rem; color: var(--text-muted); text-transform: uppercase; }
.wp-editor-canvas p { margin-bottom: 1.1rem; }
.wp-editor-canvas a { color: var(--accent); text-decoration: underline; font-weight: 600; }
.wp-editor-canvas img { max-width: 100%; height: auto; border-radius: var(--radius-md); box-shadow: var(--card-shadow); }
.wp-editor-canvas figure { margin: 1.5rem 0; }
.wp-editor-canvas figcaption { font-size: 0.85rem; color: var(--text-muted); font-style: italic; text-align: center; margin-top: 0.4rem; }
.wp-editor-canvas blockquote { border-left: 4px solid var(--accent); padding: 0.85rem 1.25rem; margin: 1.25rem 0; background: var(--bg-muted); font-style: italic; }
.wp-editor-canvas table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; border: 1px solid var(--border-color); }
.wp-editor-canvas th, .wp-editor-canvas td { border: 1px solid var(--border-color); padding: 0.6rem 0.8rem; }
.wp-editor-canvas th { background: var(--bg-muted); }
.wp-editor-canvas pre { background: var(--bg-muted); padding: 1rem; border-radius: var(--radius-md); font-family: var(--font-mono); overflow-x: auto; }
.wp-editor-canvas code { font-family: var(--font-mono); background: var(--bg-muted); padding: 0.15rem 0.35rem; border-radius: 3px; color: var(--accent); }

.wp-code-editor {
  font-family: var(--font-mono) !important;
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  border: none !important;
  border-radius: 0 !important;
  min-height: 380px !important;
  max-height: 520px !important;
  padding: 1.25rem !important;
  resize: vertical;
}

.wp-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.85rem;
  background: var(--bg-muted);
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Modal for Image / Link dialogs */
.wp-submodal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 250;
  padding: 1rem;
}

.wp-submodal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: var(--card-shadow-hover);
}

.code-editor-box {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  width: 100%;
  resize: vertical;
}


/* Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col-brand {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .footer-col-brand {
    grid-column: span 2;
  }
}

.footer-brand-logo {
  height: 48px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 380px;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-disclaimer-box {
  background-color: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-surface);
  padding: 1.5rem;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  gap: 1rem;
  z-index: 49;
  border-top: 1px solid var(--border-color);
}

.mobile-nav-drawer.open {
  display: flex;
}

@media (max-width: 991px) {
  .nav-links {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
}
