/*
Theme Name:   Custom Converter
Description:  Bright, fast theme made for the Custom Converter tools plugin. Colourful category pages, gradient homepage, instant tool search in the header, internal-link footer, AdSense slots and no jQuery.
Version:      2.2.0
Requires at least: 6.0
Requires PHP: 7.4
Author:       Custom Converter
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  custom-converter-theme
Tags:         one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

/* Layout: white sticky header · colour-tinted page band per category · centred 1160px column · navy footer */
:root {
  --t-ink: #0f172a;
  --t-text: #334155;
  --t-muted: #64748b;
  --t-line: #e2e8f0;
  --t-bg: #f6f7fb;
  --t-card: #ffffff;
  --t-brand: #4f46e5;
  --t-brand-2: #4338ca;
  --t-brand-soft: #eef2ff;
  --t-grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --t-footer: #0b1033;
  --t-footer-2: #131a4d;
  --t-footer-text: #c3c8e6;
  --t-width: 1160px;
  --t-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --c: #4f46e5;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--t-bg); color: var(--t-text); font: 16px/1.65 var(--t-font); -webkit-font-smoothing: antialiased; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--t-brand); }
a:hover { color: var(--t-brand-2); }
h1, h2, h3, h4 { color: var(--t-ink); line-height: 1.2; text-wrap: balance; letter-spacing: -.015em; }
:focus-visible { outline: 3px solid rgba(79, 70, 229, .45); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 16px; border-radius: 8px; }
.wrap { max-width: var(--t-width); margin: 0 auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 24px; } }

/* ---------- brand ---------- */
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--t-ink); font-weight: 800; font-size: 20px; letter-spacing: -.03em; flex: none; line-height: 1; }
.site-brand:hover { color: var(--t-ink); }
.brand-mark { flex: none; display: block; filter: drop-shadow(0 6px 10px rgba(79, 70, 229, .35)); }
.brand-2 { background: var(--t-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.custom-logo { max-height: 44px; width: auto; display: block; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--t-line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.header-bar { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.main-nav { flex: 1; min-width: 0; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.main-nav li { position: relative; }
.main-nav a { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 10px; color: var(--t-text); font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.main-nav .nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav .current-menu-ancestor > a { color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }
.main-nav .menu-item-has-children > a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.main-nav .sub-menu { display: none; position: absolute; top: calc(100% + 6px); right: 0; min-width: 240px; background: #fff; border: 1px solid var(--t-line); border-radius: 16px; padding: 8px; box-shadow: 0 24px 48px -20px rgba(15, 23, 42, .35); flex-direction: column; z-index: 120; }
.main-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.header-search { position: relative; width: 230px; flex: none; margin-left: auto; }
.header-search input { width: 100%; height: 42px; border: 1px solid var(--t-line); background: var(--t-bg); border-radius: 99px; padding: 0 14px 0 38px; font: inherit; font-size: 14.5px; color: var(--t-ink); }
.header-search input:focus { outline: none; border-color: var(--t-brand); background: #fff; box-shadow: 0 0 0 4px rgba(79, 70, 229, .14); }
.header-search svg { position: absolute; left: 13px; top: 13px; color: var(--t-muted); pointer-events: none; }
.hs-results { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, 92vw); background: #fff; border: 1px solid var(--t-line); border-radius: 16px; box-shadow: 0 24px 48px -16px rgba(15, 23, 42, .3); overflow: hidden; z-index: 110; }
.hs-results a { display: flex; gap: 10px; padding: 11px 14px; color: var(--t-ink); text-decoration: none; border-bottom: 1px solid var(--t-line); font-size: 15px; }
.hs-results a:last-child { border-bottom: 0; }
.hs-results a:hover, .hs-results a.is-on { background: var(--t-brand-soft); }
.hs-results p { margin: 0; padding: 12px 14px; color: var(--t-muted); font-size: 14px; }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--t-line); border-radius: 12px; background: #fff; cursor: pointer; color: var(--t-ink); }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 2px; background: currentColor; margin: 0 auto; position: relative; border-radius: 2px; transition: transform .2s; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; } .menu-toggle span::after { top: 6px; }
.nav-open .menu-toggle span { background: transparent; }
.nav-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }
@media (min-width: 1121px) {
  .main-nav ul { flex-wrap: nowrap; }
  .header-bar { gap: 16px; }
}
@media (min-width: 1121px) and (max-width: 1260px) {
  .main-nav a { padding: 8px 8px; font-size: 14px; }
  .header-search { width: 190px; }
}
@media (max-width: 1120px) {
  .header-bar { flex-wrap: wrap; gap: 10px; padding-block: 10px; min-height: 0; }
  .menu-toggle { display: block; }
  .main-nav { display: none; order: 4; flex-basis: 100%; }
  .nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; padding-bottom: 8px; }
  .main-nav .sub-menu { display: flex; position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; }
  .main-nav .menu-item-has-children > a::after { display: none; }
  .header-search { order: 3; flex-basis: 100%; width: auto; }
}

/* ---------- page band (tool & category pages) ---------- */
.page-band { position: relative; overflow: hidden; background: #eef2ff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, #fff) 0%, color-mix(in srgb, var(--c) 5%, #fff) 55%, #fff 100%); border-bottom: 1px solid color-mix(in srgb, var(--c) 14%, #fff); }
.page-band::after { content: ""; position: absolute; right: -90px; top: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); pointer-events: none; }
.page-band .wrap { position: relative; padding-block: 22px 34px; }
.is-tool-page .page-band .wrap { padding-bottom: 64px; }
.band-crumbs { font-size: 13.5px; color: var(--t-muted); margin: 0 0 16px; }
.band-crumbs a { color: var(--t-muted); text-decoration: none; }
.band-crumbs a:hover { color: var(--c); text-decoration: underline; }
.band-crumbs .sep { margin: 0 6px; opacity: .55; }
.band-row { display: flex; align-items: center; gap: 16px; }
.band-icon { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--c); font-size: 30px; box-shadow: 0 12px 24px -12px var(--c); }
.band-chip { display: inline-block; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c); text-decoration: none; margin-bottom: 4px; }
a.band-chip:hover { color: var(--c); text-decoration: underline; }
.page-band h1 { margin: 0; font-size: clamp(28px, 4.4vw, 42px); font-weight: 800; letter-spacing: -.03em; }
.band-lead { margin: 14px 0 0; max-width: 70ch; font-size: 17px; color: var(--t-text); }
@media (max-width: 560px) { .band-icon { width: 48px; height: 48px; font-size: 24px; border-radius: 14px; } .band-row { gap: 12px; } }
.is-tool-page .site-main { padding-top: 0; }
.is-tool-page .site-main > .wrap { margin-top: -40px; position: relative; }
.is-cat-page .site-main { padding-top: 28px; }

/* ---------- ads ---------- */
.ad-slot { margin: 18px auto; text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }
.ad-label { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--t-muted); margin-bottom: 4px; }

/* ---------- content ---------- */
.site-main { padding-block: 32px 64px; min-height: 60vh; }
.page-head { margin-bottom: 10px; }
.page-head h1 { font-size: clamp(28px, 4.2vw, 40px); margin: 0 0 8px; font-weight: 800; letter-spacing: -.03em; }
.entry-content > *:first-child { margin-top: 0; }
.content-narrow { max-width: 800px; }
.layout.no-sidebar > div { max-width: 820px; width: 100%; margin-inline: auto; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.sidebar { position: sticky; top: 92px; display: grid; gap: 18px; }
.widget { background: #fff; border: 1px solid var(--t-line); border-radius: 18px; padding: 20px; }
.widget-title { font-size: 15px; margin: 0 0 10px; }
.widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.widget li a { text-decoration: none; color: var(--t-text); display: block; padding: 5px 0; font-size: 14.5px; }
.widget li a:hover { color: var(--t-brand); }
.entry-card { background: #fff; border: 1px solid var(--t-line); border-radius: 22px; padding: clamp(20px, 4vw, 36px); }
.entry-card + .entry-card { margin-top: 18px; }
.entry-meta { font-size: 13.5px; color: var(--t-muted); margin: 0 0 14px; }
.entry-content { font-size: 17px; }
.entry-content p, .entry-content ul, .entry-content ol { max-width: 72ch; }
.entry-card .entry-content table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.entry-card .entry-content th, .entry-card .entry-content td { border: 1px solid var(--t-line); padding: 8px 10px; text-align: left; }
.entry-card .entry-content th { background: var(--t-bg); }
.entry-content blockquote { margin: 20px 0; padding: 14px 20px; border-left: 4px solid var(--t-brand); background: var(--t-brand-soft); border-radius: 0 14px 14px 0; }
.post-thumb img { border-radius: 16px; display: block; margin-bottom: 18px; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.post-item { background: #fff; border: 1px solid var(--t-line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.post-item:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -20px rgba(15, 23, 42, .35); }
.post-item img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-item .pi-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.post-item h2 { font-size: 19px; margin: 0; }
.post-item h2 a { color: var(--t-ink); text-decoration: none; }
.post-item h2 a:hover { color: var(--t-brand); }
.post-item p { margin: 0; color: var(--t-muted); font-size: 15px; }
.pagination, .nav-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 26px; }
.page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--t-line); border-radius: 12px; background: #fff; text-decoration: none; color: var(--t-text); }
.page-numbers.current { background: var(--t-grad); color: #fff; border-color: transparent; }
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form input[type=search] { flex: 1; min-width: 0; height: 48px; border: 1px solid #cbd5e1; border-radius: 12px; padding: 0 14px; font: inherit; }
.btn, .search-form button, .comment-form input[type=submit] { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--t-grad); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; box-shadow: 0 10px 20px -12px rgba(79, 70, 229, .8); }
.btn:hover, .search-form button:hover { color: #fff; filter: brightness(1.06); }
.not-found { text-align: center; padding: 48px 0; }
.not-found .big { font-size: 110px; font-weight: 800; line-height: 1; margin: 0; background: var(--t-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found .search-form { margin: 24px auto; }
.comments-area { margin-top: 28px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: #fff; border: 1px solid var(--t-line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.comment-form textarea, .comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url] { width: 100%; border: 1px solid #cbd5e1; border-radius: 12px; padding: 10px 12px; font: inherit; }
.trust-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 40px 0 0; }
.trust-row > span { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--t-line); font-size: 14.5px; color: var(--t-muted); }
.trust-row i { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-style: normal; font-size: 20px; background: var(--t-brand-soft); }
.trust-row b { display: block; color: var(--t-ink); font-size: 15.5px; }

/* ---------- footer ---------- */
.site-footer { background: var(--t-footer); background: linear-gradient(180deg, var(--t-footer-2) 0%, var(--t-footer) 260px); color: var(--t-footer-text); font-size: 14.5px; margin-top: 40px; }
.site-footer a { color: var(--t-footer-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer h2, .site-footer h3 { color: #fff; }

.footer-band { padding-top: 40px; }
.band-in { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center; padding: clamp(22px, 3.5vw, 34px); border-radius: 24px; background: var(--t-grad); box-shadow: 0 24px 48px -24px rgba(124, 58, 237, .7); }
.band-in::after { content: ""; position: absolute; right: -80px; top: -120px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 114, 182, .5), transparent 65%); pointer-events: none; }
.band-text, .band-actions { position: relative; z-index: 1; }
.band-text h2 { margin: 0 0 4px; font-size: clamp(20px, 2.6vw, 26px); }
.band-text p { margin: 0; color: rgba(255, 255, 255, .86); max-width: 56ch; }
.band-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.band-search { width: 260px; margin-left: 0; }
.band-search input { background: #fff; border-color: transparent; height: 48px; }
.band-search svg { top: 16px; }
.band-results { bottom: calc(100% + 8px); top: auto; left: 0; right: auto; }
.site-footer .band-results a { color: var(--t-ink); text-decoration: none; }
.btn-light { background: #fff; color: var(--t-brand-2) !important; box-shadow: none; white-space: nowrap; text-decoration: none !important; }
.btn-light:hover { filter: none; background: var(--t-brand-soft); }
@media (max-width: 760px) { .band-in { grid-template-columns: minmax(0, 1fr); } .band-search { width: auto; flex: 1 1 100%; } .btn-light { flex: 1 1 auto; } }

.footer-main { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 44px; padding-block: 48px 36px; }
@media (max-width: 980px) { .footer-main { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.footer-about .site-brand { color: #fff; margin-bottom: 14px; }
.footer-about .site-brand:hover { text-decoration: none; color: #fff; }
.site-footer .brand-2 { background: linear-gradient(135deg, #93c5fd, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-about p { margin: 0; max-width: 36ch; line-height: 1.65; }
.footer-facts { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.footer-facts li { border-radius: 99px; padding: 5px 12px; font-size: 13px; background: rgba(255, 255, 255, .07); }
.footer-facts b { color: #fde68a; }
.footer-contact { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 6px; }
.footer-contact span { display: inline-block; min-width: 82px; color: rgba(255, 255, 255, .5); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.footer-contact a { color: #fff; }
.footer-social { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.footer-social a { display: inline-block; padding: 7px 13px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 13px; font-weight: 600; }
.footer-social a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; min-width: 0; }
@media (max-width: 1100px) and (min-width: 701px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.footer-col summary { list-style: none; cursor: default; }
.footer-col summary::-webkit-details-marker { display: none; }
.footer-col h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; }
.footer-col h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col li { line-height: 1.4; }
.footer-col .more a { color: #fff; font-weight: 700; }
@media (max-width: 700px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid rgba(255, 255, 255, .1); }
  .footer-col { border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .footer-col summary { cursor: pointer; padding: 15px 0; display: flex; justify-content: space-between; align-items: center; }
  .footer-col summary h3 { margin: 0; }
  .footer-col summary::after { content: "+"; color: #fff; font-size: 20px; line-height: 1; }
  .footer-col[open] summary::after { content: "−"; }
  .footer-col ul { padding-bottom: 16px; gap: 11px; }
}
.footer-cats { padding-bottom: 36px; }
.footer-cats h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.footer-cats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.footer-cats a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; }
.footer-cats a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.footer-cats a:hover { border-color: var(--c); color: #fff; text-decoration: none; }
.footer-cats small { color: rgba(255, 255, 255, .45); font-size: 12px; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; padding-bottom: 32px; }
.fwidget-title { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; }
.bottom-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
.footer-note { margin: 0; color: rgba(255, 255, 255, .58); max-width: 70ch; }
.legal-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; }

.back-top { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--t-grad); color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 10px 22px -8px rgba(79, 70, 229, .8); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90; }
.back-top.show { opacity: 1; pointer-events: auto; }

/* WordPress core classes */
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, figcaption { font-size: 13.5px; color: var(--t-muted); }

@media print { .site-header, .site-footer, .ad-slot, .back-top, .sidebar, .page-band::after { display: none !important; } body { background: #fff; } }
