/* ShiftConvert theme: header, mega menu, footer, logo, dark/light toggle, ads. */
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 8px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.hdr-in { max-width: 1180px; margin: 0 auto; padding: 0 16px; min-height: 66px; display: flex; align-items: center; gap: 22px; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); flex: none; direction: ltr; }
.logo-mark { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ff8a2b, #ff4500); box-shadow: 0 8px 22px -8px rgba(255, 90, 0, .75); }
.logo-text { font-weight: 800; font-size: 1.35rem; letter-spacing: .3px; line-height: 1; }
.logo-text b { color: var(--accent); font-weight: 800; }
.logo-image { gap: 10px; }
.logo-img { display: block; height: var(--logo-h, 38px); width: auto; max-width: 260px; object-fit: contain; }
.logo-image.has-dark .for-dark { display: none; }
html[data-theme="dark"] .logo-image.has-dark .for-dark { display: block; }
html[data-theme="dark"] .logo-image.has-dark .for-light { display: none; }

/* ---------- navigation ---------- */
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 11px; color: var(--text); text-decoration: none; font: inherit; font-weight: 700; font-size: .98rem; white-space: nowrap; background: none; border: 0; cursor: pointer; }
.nav-link:hover, .nav-link:focus-visible { background: var(--accent-soft); color: var(--accent); outline: none; }
.nav-btn svg { transition: transform .2s; }
.nav-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.has-mega { position: relative; }
.mega { display: none; position: absolute; top: calc(100% + 12px); inset-inline-start: 0; z-index: 70; width: min(980px, 92vw); max-height: 75vh; overflow: auto; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 26px; }
.has-mega.open .mega { display: grid; }
.mega-col h4 { margin: 0 0 8px; font-size: .82rem; letter-spacing: .4px; color: var(--accent); }
.mega-col a { display: block; padding: 5px 8px; margin-inline: -8px; border-radius: 8px; color: var(--soft); text-decoration: none; font-size: .9rem; line-height: 1.45; }
.mega-col a:hover { background: var(--accent-soft); color: var(--text); }

.hdr-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; flex: none; }
button.lang-switch { position: static; font: inherit; cursor: pointer; }
.hdr-actions .lang-switch { position: static; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font-weight: 700; font-size: .9rem; text-decoration: none; }
.hdr-actions .lang-switch:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.theme-toggle { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .ic-moon { display: none; }
html[data-theme="light"] .theme-toggle .ic-sun { display: none; }
html[data-theme="light"] .theme-toggle .ic-moon { display: block; }

.burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .hdr-in { gap: 10px; }
  .burger { display: flex; }
  .main-nav { display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 18px; background: var(--bg); border-bottom: 1px solid var(--line); max-height: calc(100vh - 70px); overflow: auto; }
  .main-nav.open { display: flex; }
  .nav-link { padding: 12px 12px; }
  .has-mega { position: static; }
  .mega { position: static; width: auto; max-height: none; box-shadow: none; border: 0; border-inline-start: 2px solid var(--line); border-radius: 0; padding: 8px 12px; margin: 2px 12px 8px; grid-template-columns: 1fr; gap: 14px; background: transparent; }
  .logo-text { font-size: 1.2rem; }
}

/* ---------- footer ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--card3); }
.ft-in { max-width: 1180px; margin: 0 auto; padding: 44px 16px 28px; display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 28px; }
.ft-brand p { margin: 14px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.8; max-width: 300px; }
.ft-col h4 { margin: 0 0 12px; font-size: .85rem; color: var(--accent); letter-spacing: .4px; }
.ft-col a { display: block; padding: 4px 0; color: var(--muted); text-decoration: none; font-size: .9rem; line-height: 1.5; }
.ft-col a:hover { color: var(--text); }
.ft-bottom { max-width: 1180px; margin: 0 auto; padding: 18px 16px 30px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.ft-bottom p { margin: 0; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 980px) { .ft-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ft-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .ft-in { grid-template-columns: 1fr; } }

/* ---------- content ---------- */
.sc-legal { max-width: 820px; padding-top: 40px; }
.sc-legal .sc-title { font-size: 1.9rem; margin: 0 0 14px; }
.sc-legal p, .sc-legal li { color: var(--soft); line-height: 1.95; }
.hero h1.h1-tool { text-wrap: balance; }

/* ---------- ads ---------- */
.ad-slot { margin: 22px auto; max-width: 970px; text-align: center; min-height: 0; }
.ad-slot .ad-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: .7rem; letter-spacing: .4px; }
.ad-custom { display: flex; flex-direction: column; align-items: center; }
.ad-slot.ad-header { max-width: 1180px; margin: 10px auto 0; padding: 0 16px; }

/* side rails: only where there is empty space beside the 728px content column */
.ad-rail { display: none; position: fixed; top: 110px; z-index: 5; max-height: calc(100vh - 130px); overflow: hidden; }
.ad-rail:empty { display: none !important; }
.ad-rail .ad-slot { margin: 0; padding: 0; }
@media (min-width: 1340px) {
  .ad-rail { display: block; width: 160px; }
  .ad-rail-left  { left: calc(50% - 364px - 24px - 160px); }
  .ad-rail-right { left: calc(50% + 364px + 24px); }
}
@media (min-width: 1720px) {
  .ad-rail { width: 300px; }
  .ad-rail-left  { left: calc(50% - 364px - 24px - 300px); }
  .ad-rail-right { left: calc(50% + 364px + 24px); }
}
body:has(main.wide) .ad-rail, body:has(.editor) .ad-rail { display: none !important; }

/* ---------- contact form ---------- */
.sc-contact { margin-top: 36px; padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.sc-contact h2 { margin: 0 0 16px; font-size: 1.3rem; }
.cf { display: grid; gap: 14px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cf-f { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; color: var(--soft); }
.cf-f input, .cf-f textarea { width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
.cf-f textarea { resize: vertical; min-height: 140px; line-height: 1.7; }
.cf-f input:focus, .cf-f textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cf-hint { margin: 0; color: var(--muted); font-size: .84rem; }
.cf-hp { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-send { justify-self: start; display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 800; color: #fff; padding: 13px 30px; border-radius: 999px; background: linear-gradient(135deg, #ff8a2b, #ff4500); box-shadow: 0 10px 24px -10px rgba(255, 90, 0, .8); transition: transform .15s, filter .15s; }
.cf-send:hover { transform: translateY(-1px); filter: brightness(1.05); }
.cf-send:disabled { opacity: .6; cursor: default; transform: none; }
.cf-status { margin: 0; padding: 11px 14px; border-radius: 12px; font-weight: 700; font-size: .93rem; background: var(--card2); border: 1px solid var(--line); }
.cf-status[hidden] { display: none; }
.cf-status.ok { color: #12803a; border-color: rgba(34, 197, 94, .5); background: rgba(34, 197, 94, .1); }
html[data-theme="dark"] .cf-status.ok { color: #4ade80; }
.cf-status.err { color: #c62828; border-color: rgba(255, 107, 107, .5); background: rgba(255, 107, 107, .1); }
html[data-theme="dark"] .cf-status.err { color: #ff8a8a; }
@media (max-width: 600px) { .cf-row { grid-template-columns: 1fr; } .sc-contact { padding: 18px; } .cf-send { justify-self: stretch; justify-content: center; } }
