/* ============================================================================
   MyPDFTools - Global Site Styles (mpt-global.css)
   Loaded on every page to enforce consistent typography, spacing, colors,
   buttons, cards, ad boxes, and footer look across the whole site.
   ============================================================================ */

:root {
  --mpt-primary: #10B981;
  --mpt-primary-hover: #059669;
  --mpt-secondary: #3B82F6;
  --mpt-bg-light: #F9FAFB;
  --mpt-bg-dark: #0B0C10;
  --mpt-card-light: #FFFFFF;
  --mpt-card-dark: #1C2530;
  --mpt-text-light: #1F2937;
  --mpt-text-dark: #D1D5DB;
  --mpt-muted-light: #6B7280;
  --mpt-muted-dark: #9CA3AF;
  --mpt-border-light: #E5E7EB;
  --mpt-border-dark: #2D3748;
  --mpt-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --mpt-shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
  --mpt-radius: 8px;
  --mpt-transition: 0.25s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.6;
  margin: 0;
  background: var(--mpt-bg-light);
  color: var(--mpt-text-light);
  transition: background var(--mpt-transition), color var(--mpt-transition);
}

body.dark-mode {
  background: var(--mpt-bg-dark);
  color: var(--mpt-text-dark);
}

/* Make sure all headings have consistent weight + color */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--mpt-text-light);
  margin: 0 0 0.6em;
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
  color: var(--mpt-text-dark);
}

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); color: var(--mpt-primary); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

/* ============================================================
   AD BOX - consistent look across site
   ============================================================ */
.ad-box {
  max-width: 100%;
  margin: 24px auto;
  padding: 14px;
  background: rgba(0,0,0,0.02);
  border: 1px solid var(--mpt-border-light);
  border-radius: var(--mpt-radius);
  text-align: center;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
body.dark-mode .ad-box {
  background: rgba(255,255,255,0.03);
  border-color: var(--mpt-border-dark);
}
.ad-box ins.adsbygoogle { max-width: 100%; width: 100%; }
.ad-box .ad-label,
.ad-box > span {
  display: block;
  font-size: 11px;
  color: var(--mpt-muted-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
body.dark-mode .ad-box .ad-label,
body.dark-mode .ad-box > span { color: var(--mpt-muted-dark); }

/* ============================================================
   BUTTONS
   ============================================================ */
.mpt-btn, .btn-primary, .cta {
  display: inline-block;
  background: var(--mpt-primary);
  color: #fff !important;
  padding: 11px 22px;
  border-radius: var(--mpt-radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  font-size: 0.95rem;
  transition: background var(--mpt-transition), box-shadow var(--mpt-transition), transform 0.1s;
}
.mpt-btn:hover, .btn-primary:hover, .cta:hover {
  background: var(--mpt-primary-hover);
  box-shadow: 0 6px 16px rgba(16,185,129,0.3);
  transform: translateY(-1px);
}

/* ============================================================
   CARDS / CONTAINERS
   ============================================================ */
.mpt-card, .feature-card, .converter-card, .tool-card {
  background: var(--mpt-card-light);
  border: 1px solid var(--mpt-border-light);
  border-radius: var(--mpt-radius);
  padding: 24px;
  box-shadow: var(--mpt-shadow);
  transition: box-shadow var(--mpt-transition), transform var(--mpt-transition);
}
body.dark-mode .mpt-card,
body.dark-mode .feature-card,
body.dark-mode .converter-card,
body.dark-mode .tool-card {
  background: var(--mpt-card-dark);
  border-color: var(--mpt-border-dark);
}
.mpt-card:hover, .feature-card:hover {
  box-shadow: var(--mpt-shadow-hover);
  transform: translateY(-2px);
}

/* ============================================================
   SECTION SPACING
   ============================================================ */
main, .main-content, .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

section { margin-bottom: 40px; }

/* ============================================================
   FOOTER (consistent look)
   ============================================================ */
footer, .mpt-footer {
  background: #1C2530;
  color: #D1D5DB;
  padding: 36px 20px;
  margin-top: 40px;
  text-align: center;
  font-size: 0.92rem;
}
footer a, .mpt-footer a {
  color: #10B981;
  margin: 0 8px;
  text-decoration: none;
  transition: color var(--mpt-transition);
}
footer a:hover, .mpt-footer a:hover { color: #34D399; text-decoration: underline; }
footer nav, .mpt-footer nav { margin: 12px 0; }
footer p, .mpt-footer p { margin: 8px 0; }

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 768px) {
  .ad-box { margin: 16px auto; padding: 10px; min-height: 70px; }
  main, .main-content, .container { padding: 16px 14px; }
  section { margin-bottom: 28px; }
  footer, .mpt-footer { padding: 24px 16px; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--mpt-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
