/*
Theme Name: Convert Files Online
Theme URI: https://convert-files-online.co.za/
Author: Convert Files Online
Description: A fast, privacy-first browser file conversion theme for PDF, Word and image files.
Version: 2.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: convert-files-online
*/

:root {
  --navy: #0f172a;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --green: #4ade80;
  --green-dark: #16a34a;
  --ink: #172033;
  --muted: #64748b;
  --line: #dfe7f2;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --shadow: 0 22px 60px rgba(15, 23, 42, .12);
  --radius: 24px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.cfo-container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(223,231,242,.85);
  backdrop-filter: blur(16px);
}
.header-inner { height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; min-width: 250px; }
.brand img, .brand .custom-logo { width: 270px; height: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 30px; font-weight: 650; font-size: 15px; }
.nav-menu { display: contents; margin: 0; padding: 0; list-style: none; }
.nav-menu li { display: contents; }
.site-nav a { color: #334155; transition: color .2s ease; }
.site-nav a:hover, .site-nav a:focus { color: var(--blue); }
.nav-cta { padding: 11px 18px; color: #fff !important; background: var(--blue); border-radius: 12px; box-shadow: 0 8px 20px rgba(37,99,235,.22); }
.nav-toggle { display: none; border: 0; background: transparent; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--navy); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 92px;
  background:
    radial-gradient(circle at 8% 20%, rgba(74,222,128,.13), transparent 25%),
    radial-gradient(circle at 88% 30%, rgba(37,99,235,.16), transparent 30%),
    linear-gradient(180deg, #f9fbff 0%, #fff 100%);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 999px; pointer-events: none; }
.hero::before { width: 420px; height: 420px; right: -270px; top: -210px; border: 76px solid rgba(37,99,235,.055); }
.hero::after { width: 240px; height: 240px; left: -170px; bottom: -160px; border: 52px solid rgba(74,222,128,.08); }
.hero-grid { position: relative; display: grid; grid-template-columns: .86fr 1.14fr; align-items: center; gap: 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--blue-dark); font-size: 14px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(74,222,128,.17); }
.hero h1 { max-width: 650px; margin: 0; color: var(--navy); font-size: clamp(44px, 5vw, 70px); line-height: 1.04; letter-spacing: -.055em; }
.hero h1 span { color: var(--blue); }
.hero-copy { max-width: 600px; margin: 24px 0 26px; color: var(--muted); font-size: 19px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; color: #475569; font-size: 14px; font-weight: 650; }
.trust-row span { display: inline-flex; align-items: center; gap: 8px; }
.trust-row svg { width: 18px; color: var(--green-dark); }

.converter-shell { position: relative; background: var(--surface); border: 1px solid rgba(211,223,238,.95); border-radius: 30px; box-shadow: var(--shadow); padding: 22px; }
.converter-shell::after { content: ""; position: absolute; inset: auto 16% -20px; height: 36px; background: rgba(37,99,235,.15); filter: blur(27px); z-index: -1; }
.tool-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; padding: 6px; background: #f1f5f9; border-radius: 15px; }
.tool-tab { min-height: 44px; padding: 8px; color: #64748b; border: 0; border-radius: 11px; background: transparent; font-size: 14px; font-weight: 750; transition: .2s ease; }
.tool-tab:hover { color: var(--blue); }
.tool-tab.active { color: var(--navy); background: #fff; box-shadow: 0 4px 13px rgba(15,23,42,.09); }
.drop-zone { position: relative; display: grid; place-items: center; min-height: 250px; padding: 30px 20px; text-align: center; border: 2px dashed #bfd0e4; border-radius: 20px; background: var(--surface-soft); transition: .2s ease; }
.drop-zone.dragging { border-color: var(--blue); background: var(--blue-soft); transform: scale(1.006); }
.upload-icon { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 17px; border-radius: 22px; color: var(--blue); background: #fff; box-shadow: 0 10px 24px rgba(37,99,235,.14); }
.upload-icon svg { width: 34px; height: 34px; }
.drop-zone h2 { margin: 0; color: var(--navy); font-size: 21px; line-height: 1.3; }
.drop-zone p { margin: 7px 0 18px; color: var(--muted); font-size: 14px; }
.primary-button, .convert-button, .download-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 12px; color: #fff; background: var(--blue); font-weight: 750; transition: .2s ease; }
.primary-button { min-height: 45px; padding: 10px 20px; }
.primary-button:hover, .convert-button:hover, .download-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.file-list { display: none; margin-top: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: #475569; font-size: 13px; }
.file-list.visible { display: block; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.file-row + .file-row { border-top: 1px solid #edf2f7; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { flex: 0 0 auto; color: #94a3b8; }
.conversion-controls { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 14px; }
.format-field { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; }
.format-field label { color: var(--muted); font-size: 13px; font-weight: 700; }
.format-field select { flex: 1; border: 0; outline: 0; color: var(--navy); background: transparent; font-weight: 750; }
.convert-button { min-width: 150px; padding: 0 22px; }
.convert-button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.conversion-note { margin: 12px 2px 0; color: #64748b; font-size: 12px; text-align: center; }
.status { display: none; margin-top: 14px; padding: 13px 15px; border-radius: 12px; font-size: 14px; }
.status.visible { display: block; }
.status.working { color: #1e40af; background: #eff6ff; }
.status.success { color: #166534; background: #f0fdf4; }
.status.error { color: #991b1b; background: #fef2f2; }
.results { display: none; margin-top: 14px; }
.results.visible { display: grid; gap: 9px; }
.result-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.result-meta { min-width: 0; }
.result-meta strong { display: block; overflow: hidden; color: var(--navy); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.result-meta small { color: var(--muted); }
.download-button { flex: 0 0 auto; padding: 8px 14px; font-size: 13px; }

.section { padding: 94px 0; }
.section-soft { background: var(--surface-soft); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { margin: 0 0 14px; color: var(--navy); font-size: clamp(32px, 4vw, 46px); line-height: 1.12; letter-spacing: -.035em; }
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card { padding: 29px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: .25s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15,23,42,.08); }
.card-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 20px; color: var(--blue); background: var(--blue-soft); border-radius: 15px; }
.card-icon svg { width: 25px; height: 25px; }
.feature-card h3 { margin: 0 0 8px; color: var(--navy); font-size: 19px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 42px; counter-reset: steps; }
.step { position: relative; text-align: center; counter-increment: steps; }
.step::before { content: counter(steps); display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 18px; color: #fff; background: var(--blue); border: 8px solid #dbeafe; border-radius: 50%; font-weight: 800; box-sizing: content-box; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 31px; left: calc(50% + 48px); width: calc(100% - 96px); height: 2px; background: #dbe6f3; }
.step h3 { margin: 0 0 7px; color: var(--navy); }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.privacy-banner { display: grid; grid-template-columns: auto 1fr; gap: 25px; align-items: center; padding: 38px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, #0f172a, #172554); box-shadow: 0 22px 55px rgba(15,23,42,.2); }
.privacy-lock { display: grid; place-items: center; width: 78px; height: 78px; color: var(--green); background: rgba(255,255,255,.08); border-radius: 22px; }
.privacy-lock svg { width: 38px; }
.privacy-banner h2 { margin: 0 0 7px; font-size: 29px; }
.privacy-banner p { margin: 0; color: #cbd5e1; }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-list details { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.faq-list summary { padding: 20px 55px 20px 20px; color: var(--navy); font-weight: 750; cursor: pointer; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 20px; top: 14px; color: var(--blue); font-size: 28px; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: 0; padding: 0 20px 20px; color: var(--muted); }

.site-footer { padding: 54px 0 24px; color: #cbd5e1; background: var(--navy); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .6fr .7fr; gap: 55px; padding-bottom: 38px; }
.footer-logo { width: 250px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-intro { max-width: 430px; margin: 0; color: #94a3b8; font-size: 14px; }
.footer-title { margin: 0 0 13px; color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .07em; }
.footer-links { display: grid; gap: 8px; color: #94a3b8; font-size: 14px; }
.footer-links a:hover { color: var(--green); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 22px; border-top: 1px solid rgba(148,163,184,.18); color: #64748b; font-size: 13px; }

.page-content { min-height: 60vh; padding: 70px 0; }
.page-content article { max-width: 820px; margin: auto; }
.page-content h1 { color: var(--navy); font-size: 44px; line-height: 1.15; }
.page-content a { color: var(--blue); text-decoration: underline; }
.entry-content { color: #475569; }

.tool-page-hero {
  padding: 42px 0 74px;
  background:
    radial-gradient(circle at 85% 12%, rgba(37,99,235,.13), transparent 25%),
    radial-gradient(circle at 10% 38%, rgba(74,222,128,.1), transparent 22%),
    linear-gradient(180deg, #f8fbff, #fff);
}
.tool-page-wrap { max-width: 920px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 38px; color: #64748b; font-size: 13px; }
.breadcrumb a { color: var(--blue); font-weight: 700; }
.tool-page-heading { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.tool-page-heading h1 { margin: 0; color: var(--navy); font-size: clamp(40px, 6vw, 60px); line-height: 1.05; letter-spacing: -.05em; }
.tool-page-heading > p:last-child { max-width: 690px; margin: 18px auto 0; color: var(--muted); font-size: 18px; }
.converter-page-shell { max-width: 760px; margin: auto; }
.converter-page-shell .drop-zone { min-height: 275px; }
.ad-slot { min-height: 90px; margin-top: 30px; margin-bottom: 30px; color: #94a3b8; text-align: center; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.ad-slot > span { display: block; margin-bottom: 6px; }
.ad-widget { text-transform: none; letter-spacing: normal; }
.tool-content-section { padding-top: 70px; }
.tool-article { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 56px; }
.tool-copy { max-width: 760px; }
.tool-copy h2 { margin: 46px 0 13px; color: var(--navy); font-size: 29px; line-height: 1.2; letter-spacing: -.025em; }
.tool-copy h2:first-child { margin-top: 0; }
.tool-copy p { color: #536178; }
.article-steps { display: grid; gap: 13px; padding-left: 24px; color: #536178; }
.article-steps strong { color: var(--navy); }
.format-note { margin-top: 22px; padding: 18px 20px; color: #334155; background: var(--blue-soft); border-left: 4px solid var(--blue); border-radius: 0 14px 14px 0; }
.tool-trust-card { position: sticky; top: 110px; padding: 26px; color: #dbeafe; background: linear-gradient(145deg, #0f172a, #172554); border-radius: 22px; box-shadow: 0 18px 42px rgba(15,23,42,.16); }
.tool-trust-card .privacy-lock { width: 58px; height: 58px; margin-bottom: 18px; border-radius: 17px; }
.tool-trust-card h2 { margin: 0 0 14px; color: #fff; font-size: 22px; }
.tool-trust-card ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.tool-trust-card li::before { content: "✓"; margin-right: 9px; color: var(--green); font-weight: 800; }
.related-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-tool { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; padding: 17px 19px; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 15px; font-size: 15px; font-weight: 750; transition: .2s ease; }
.related-tool svg { flex: 0 0 auto; width: 20px; color: var(--blue); }
.related-tool:hover { color: var(--blue); border-color: #b9cef7; transform: translateY(-2px); box-shadow: 0 12px 27px rgba(15,23,42,.07); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy-wrap { text-align: center; }
  .hero-copy { margin-inline: auto; }
  .trust-row { justify-content: center; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-article { grid-template-columns: 1fr; }
  .tool-trust-card { position: static; max-width: 480px; }
}

@media (max-width: 760px) {
  .cfo-container { width: min(calc(100% - 28px), var(--container)); }
  .header-inner { height: 70px; }
  .brand { min-width: 0; }
  .brand img, .brand .custom-logo { width: 205px; }
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: 70px 0 auto; display: none; padding: 28px 22px 34px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 18px 35px rgba(15,23,42,.12); flex-direction: column; align-items: stretch; text-align: center; }
  .site-nav.open { display: flex; }
  .hero { padding: 58px 0 68px; }
  .hero h1 { font-size: clamp(39px, 12vw, 57px); }
  .hero-copy { font-size: 17px; }
  .converter-shell { padding: 14px; border-radius: 22px; }
  .tool-tabs { grid-template-columns: 1fr; }
  .tool-tab { min-height: 40px; }
  .drop-zone { min-height: 230px; }
  .conversion-controls { grid-template-columns: 1fr; }
  .convert-button { min-height: 50px; }
  .section { padding: 68px 0; }
  .card-grid, .steps { grid-template-columns: 1fr; gap: 18px; }
  .step { padding: 8px 0 20px; }
  .step:not(:last-child)::after { display: none; }
  .privacy-banner { grid-template-columns: 1fr; padding: 28px; text-align: center; }
  .privacy-lock { margin: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; }
  .tool-page-hero { padding: 28px 0 54px; }
  .breadcrumb { margin-bottom: 28px; }
  .tool-page-heading > p:last-child { font-size: 16px; }
  .related-tools { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
