/* ============================================================
   CV24.ORG — main.css
   Design system + components + rich motion layer
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --primary:       #6B4EFF;
  --primary-dark:  #5438CC;
  --primary-light: #EDE9FF;
  --primary-soft:  #F5F3FF;
  --text-dark:     #111827;
  --text-mid:      #374151;
  --text-gray:     #6B7280;
  --bg-light:      #F9FAFB;
  --border:        #E5E7EB;
  --success:       #10B981;
  --white:         #FFFFFF;
  --dark:          #111827;
  --dark-2:        #1E293B;

  --icon-purple-bg: #EDE9FF;
  --icon-green-bg:  #D1FAE5;
  --icon-yellow-bg: #FEF3C7;
  --icon-blue-bg:   #DBEAFE;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(17,24,39,.08);
  --shadow-md: 0 4px 16px rgba(17,24,39,.10);
  --shadow-lg: 0 18px 48px rgba(17,24,39,.14);
  --shadow-primary: 0 10px 30px rgba(107,78,255,.30);

  --nav-h: 64px;
  --container: 1140px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4 { line-height: 1.15; color: var(--text-dark); font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { color: var(--text-gray); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }
.section--gray { background: var(--bg-light); }
.text-center { text-align: center; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { margin-top: 12px; font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  color: var(--primary); text-transform: uppercase; margin-bottom: 12px;
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-light); color: var(--primary);
  padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600;
}
.pill svg { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-md);
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  will-change: transform;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 14px 36px rgba(107,78,255,.40); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: #fff; color: var(--text-mid); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-ghost { color: var(--primary); font-weight: 600; }
.btn-ghost:hover { gap: 12px; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 1000;
  background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #8B6BFF);
  display: grid; place-items: center; color: #fff; font-size: .8rem; font-weight: 800;
  box-shadow: var(--shadow-primary);
}
.nav-links { display: flex; align-items: center; gap: 28px; margin: 0 auto; }
.nav-links a { color: var(--text-mid); font-weight: 500; font-size: .95rem; position: relative; padding: 6px 0; transition: color .2s; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--primary); border-radius: 2px; transition: width .25s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
/* Login/CTA duplicated inside the burger menu — shown only on narrow phones
   where they no longer fit in the top bar (see @media 700px). */
.nav-links .nav-mobile-cta { display: none; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; width: 100%; }
.nav-links .nav-mobile-cta .btn { flex: 1; text-align: center; }
.nav-links .nav-mobile-cta a::after { display: none; }
.nav-right { display: flex; align-items: center; gap: 16px; }

.lang-switch { position: relative; }
.lang-switch-btn { display: flex; align-items: center; gap: 6px; color: var(--text-mid); font-weight: 500; font-size: .9rem; padding: 6px 8px; border-radius: 8px; }
.lang-switch-btn:hover { background: var(--bg-light); }
.lang-menu {
  position: absolute; right: 0; top: 120%; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 6px; min-width: 150px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .2s var(--ease); z-index: 50;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 6px; font-size: .9rem; color: var(--text-mid); }
.lang-menu a:hover, .lang-menu a.active { background: var(--primary-light); color: var(--primary); }

.nav-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--primary-light); }
.avatar-initials { display: grid; place-items: center; background: var(--primary-light); color: var(--primary); font-weight: 700; font-size: .85rem; }

.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { width: 22px; height: 2px; background: var(--text-dark); border-radius: 2px; transition: .3s; }

.page { padding-top: var(--nav-h); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 55% 45%; align-items: center; gap: 24px; }
.hero h1 { margin: 18px 0; }
.hero-sub { font-size: 1.1rem; max-width: 460px; }
.hero-actions { display: flex; gap: 14px; margin: 28px 0 24px; flex-wrap: wrap; }
.hero-nosub { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; padding: 8px 14px; border-radius: 999px; background: var(--icon-green-bg); color: #047857; font-weight: 600; font-size: .9rem; }
.hero-features { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-feature { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--text-mid); font-weight: 500; }
.hero-feature .fi { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-light); display: grid; place-items: center; color: var(--primary); flex-shrink: 0; }

.hero-char-wrap { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 420px; }
.hero-char-wrap::before {
  content: ''; position: absolute; width: 360px; height: 360px;
  background: radial-gradient(circle, var(--primary-light) 0%, var(--primary-soft) 60%, transparent 100%);
  border-radius: 50%; animation: blobPulse 8s ease-in-out infinite;
}
.hero-char-wrap img { position: relative; z-index: 1; width: 340px; max-width: 80%; }

.float-card {
  position: absolute; z-index: 2; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-md); padding: 10px 14px; font-size: .8rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.float-card .dot { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.float-card.fc-1 { top: 14%; left: 2%; animation: floatY 4s ease-in-out infinite; }
.float-card.fc-2 { bottom: 16%; right: 2%; animation: floatY 5s ease-in-out infinite .6s; }

/* ---------- Animated keyframes ---------- */
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.char-float { animation: floatY 3.4s ease-in-out infinite; will-change: transform; }
@keyframes blobPulse { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }

/* ---------- Scroll-reveal motion layer ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: var(--reveal-delay, 0ms); will-change: transform, opacity; }
.reveal.fade { transform: none; }
.reveal.left { transform: translateX(-32px); }
.reveal.right { transform: translateX(32px); }
.reveal.zoom { transform: scale(.94); }
.reveal.is-visible { opacity: 1; transform: none; }

/* staggered children */
.stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.stagger.is-visible > * { opacity: 1; transform: none; }
.stagger.is-visible > *:nth-child(1) { transition-delay: .05s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: .13s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: .21s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: .29s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: .37s; }
.stagger.is-visible > *:nth-child(6) { transition-delay: .45s; }

/* ---------- Feature cards (Why CV24) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 24px; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { font-size: .92rem; }
.ic-purple { background: var(--icon-purple-bg); color: var(--primary); }
.ic-green  { background: var(--icon-green-bg);  color: var(--success); }
.ic-yellow { background: var(--icon-yellow-bg); color: #D97706; }
.ic-blue   { background: var(--icon-blue-bg);   color: #2563EB; }

/* ---------- Template preview cards ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.tpl-card {
  background: #fff; border: 2px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .25s var(--ease);
  cursor: pointer;
}
.tpl-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.tpl-card.active { border-color: var(--primary); box-shadow: var(--shadow-primary); }
.tpl-preview { position: relative; aspect-ratio: 3/4; background: var(--bg-light); overflow: hidden; }
.tpl-preview .tpl-scaler { position: absolute; top: 0; left: 0; width: 794px; transform: scale(.295); transform-origin: top left; pointer-events: none; }
.tpl-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.tpl-foot .tpl-name { font-weight: 700; }
.tpl-foot .tpl-desc { font-size: .82rem; color: var(--text-gray); }
.tpl-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; flex-shrink: 0; transition: .2s; }
.tpl-card.active .tpl-check { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.step { text-align: center; padding: 0 8px; position: relative; }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; margin: 0 auto 8px; box-shadow: var(--shadow-primary); }
.step-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--primary-light); color: var(--primary); display: grid; place-items: center; margin: 0 auto 16px; transition: transform .3s var(--ease); }
.step:hover .step-ic { transform: translateY(-4px) scale(1.04); }
.step h3 { margin-bottom: 6px; }
.step p { font-size: .88rem; }
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 60px; right: -8px; width: 16px; height: 16px;
  border-top: 2px dashed var(--border); border-right: 2px dashed var(--border); transform: rotate(45deg);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--primary-soft), var(--primary-light));
  border-radius: var(--radius-xl); padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  position: relative; overflow: hidden;
}
.cta-banner h2 { margin-bottom: 8px; }
.cta-banner .char-float { width: 180px; }

/* ---------- Counters ---------- */
.stats-row { display: flex; gap: 40px; flex-wrap: wrap; }
.stat .stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat .stat-label { font-size: .85rem; color: var(--text-gray); }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #CBD5E1; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 28px; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer p { color: #94A3B8; font-size: .9rem; max-width: 260px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.footer-col a { display: block; color: #94A3B8; font-size: .9rem; padding: 5px 0; transition: color .2s, transform .2s; }
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.socials { display: flex; gap: 12px; margin-top: 16px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; transition: .2s; }
.socials a:hover { background: var(--primary); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 24px; text-align: center; color: #64748B; font-size: .85rem; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-mid); margin-bottom: 7px; }
.form-group .opt { color: var(--text-gray); font-weight: 400; }
.input, .form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-dark); background: #fff; transition: border-color .2s, box-shadow .2s;
}
.input:focus, .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(107,78,255,.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: .9rem; margin-bottom: 18px; }
.alert-error { background: #FEE2E2; color: #B91C1C; }
.alert-success { background: var(--icon-green-bg); color: #047857; }

/* Soft "confirm your email" banner (verify-banner.php) */
.verify-banner { background: #FEF3C7; color: #92400E; padding: 9px 16px; font-size: .88rem; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.verify-banner form { margin: 0; display: inline; }
.verify-banner button { background: none; border: 1px solid #D97706; color: #92400E; border-radius: 6px; padding: 4px 12px; cursor: pointer; font-size: .82rem; font-weight: 600; font-family: inherit; }
.verify-banner button:hover { background: #FDE68A; }
.verify-banner .vb-sent { color: #047857; font-weight: 600; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 48px 24px; background: var(--bg-light); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 40px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-card .sub { margin-bottom: 26px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-weight: 600; margin-bottom: 12px; transition: .2s; }
.oauth-btn:hover { background: var(--bg-light); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-gray); font-size: .82rem; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-foot { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--text-gray); }
.auth-foot a { color: var(--primary); font-weight: 600; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: var(--text-gray); margin-bottom: 16px; display: flex; gap: 8px; align-items: center; }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- Tabs / filters ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.tab { padding: 8px 16px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--text-mid); background: var(--bg-light); transition: .2s; }
.tab:hover { background: var(--primary-light); color: var(--primary); }
.tab.active { background: var(--primary); color: #fff; }
.tab svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.toolbar .search { flex: 1; min-width: 220px; }
/* Search box (used in toolbar AND blog hero) — keep the icon small & positioned */
.search { position: relative; }
.search input { padding-left: 40px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-gray); width: 18px; height: 18px; flex-shrink: 0; }

/* templates page layout */
.tpl-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
/* Grid children must be allowed to shrink below their content's min-width,
   otherwise wide content (e.g. the compare table) blows the 1fr column past
   the viewport on phones and the whole page scrolls horizontally. */
.tpl-layout > *, .blog-layout > *, .hero-grid > * { min-width: 0; }
.sidebar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: calc(var(--nav-h) + 16px); }
.sidebar h4 { font-size: .9rem; margin-bottom: 12px; display: flex; justify-content: space-between; }
.filter-group { margin-bottom: 22px; }
.check-item { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: .9rem; color: var(--text-mid); cursor: pointer; }
.check-item input { width: 16px; height: 16px; accent-color: var(--primary); }
.page-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }

/* compare table */
.compare {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; overflow-x: auto; margin-top: 40px;
}
.compare table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare th, .compare td { padding: 14px 12px; text-align: center; border-bottom: 1px solid var(--border); font-size: .9rem; }
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--text-mid); }
.compare thead th { color: var(--text-dark); font-weight: 700; }
.compare .yes { color: var(--success); font-weight: 700; }
.compare .no { color: var(--border); }
.compare tr.hl { background: var(--primary-soft); }

/* ---------- Examples grid ---------- */
.ex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ex-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.ex-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.ex-card .ex-preview { aspect-ratio: 3/4; background: var(--bg-light); position: relative; overflow: hidden; }
.ex-card .ex-preview .tpl-scaler { position: absolute; top: 0; left: 0; width: 794px; transform: scale(.305); transform-origin: top left; }
.ex-body { padding: 16px 18px; }
.ex-body .ex-name { font-weight: 700; }
.ex-body .ex-role { color: var(--primary); font-weight: 600; font-size: .9rem; }
.ex-body .ex-meta { font-size: .82rem; color: var(--text-gray); margin: 4px 0 8px; }
.featured-banner { background: linear-gradient(120deg, var(--primary-soft), var(--primary-light)); border-radius: var(--radius-xl); padding: 36px; display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: center; margin-top: 40px; }
/* Featured preview is a direct grid item, so aspect-ratio won't size it — give it an explicit height. */
.featured-banner .ex-preview { height: 440px; aspect-ratio: auto; align-self: center; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.tag { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: .8rem; font-weight: 600; color: var(--text-mid); }

/* ---------- Pricing ---------- */
.billing-toggle { display: inline-flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 6px; margin: 24px auto 0; }
.billing-toggle .seg { padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--text-mid); transition: .2s; }
.billing-toggle .seg.active { background: var(--primary); color: #fff; }
.save-badge { background: var(--icon-green-bg); color: #047857; font-size: .78rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; margin-left: 4px; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; margin-top: 48px; }
.price-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 32px 28px; display: flex; flex-direction: column; position: relative; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.price-card.featured { border-color: var(--primary); box-shadow: var(--shadow-primary); }
.price-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .78rem; font-weight: 700; padding: 6px 16px; border-radius: 999px; }
.price-ic { width: 48px; height: 48px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; }
.price-name { font-size: 1.3rem; font-weight: 800; }
.price-for { color: var(--text-gray); font-size: .9rem; margin-bottom: 18px; }
.price-amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; }
.price-amount span { font-size: 1rem; font-weight: 500; color: var(--text-gray); }
.price-old { color: var(--text-gray); text-decoration: line-through; font-size: .9rem; }
.price-note { font-size: .82rem; color: var(--text-gray); margin-top: 4px; }
.price-card .btn { margin: 20px 0; }
.feat-list { display: flex; flex-direction: column; gap: 11px; }
.feat-list li { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; color: var(--text-mid); }
.feat-list li svg { color: var(--success); flex-shrink: 0; margin-top: 2px; }
.price-foot { margin-top: auto; padding-top: 16px; font-size: .82rem; color: var(--text-gray); display: flex; align-items: center; gap: 6px; }

/* FAQ accordion */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; background: #fff; }
.faq-q { width: 100%; text-align: left; padding: 18px 20px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-q .chev { transition: transform .3s var(--ease); flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq-a-inner { padding: 0 20px 18px; color: var(--text-gray); font-size: .92rem; }

/* ---------- Blog ---------- */
.blog-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.feature-article { background: linear-gradient(120deg, var(--primary-soft), var(--primary-light)); border-radius: var(--radius-xl); padding: 32px; position: relative; overflow: hidden; }
.feature-article .tagline { font-size: .75rem; font-weight: 700; letter-spacing: .1em; color: var(--primary); }
.blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.post-thumb { aspect-ratio: 16/10; background: var(--primary-light); position: relative; }
.post-cat { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); color: var(--primary); font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.post-body { padding: 16px 18px; }
.post-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.post-body p { font-size: .88rem; }
.post-meta { display: flex; gap: 16px; font-size: .8rem; color: var(--text-gray); margin-top: 12px; }
.aside-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.topic-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.topic-row:last-child { border-bottom: none; }
.topic-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-light); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.aside-cta { background: linear-gradient(135deg, var(--primary-soft), var(--primary-light)); }
.newsletter { background: linear-gradient(120deg, var(--primary-soft), var(--primary-light)); border-radius: var(--radius-xl); padding: 40px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-top: 48px; }
.newsletter form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input { min-width: 240px; }
.resource-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.resource-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.resource-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.resource-ic { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .7rem; color: #fff; margin-bottom: 14px; }

/* blog post article */
.article { max-width: 760px; margin: 0 auto; }
.article h1 { margin: 16px 0; }
.article-meta { display: flex; gap: 16px; color: var(--text-gray); font-size: .9rem; margin-bottom: 28px; }
.article-body { font-size: 1.05rem; color: var(--text-mid); line-height: 1.8; }
.article-body h2 { font-size: 1.5rem; margin: 32px 0 12px; }
.article-body p { color: var(--text-mid); margin-bottom: 16px; }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.resume-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.resume-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); display: flex; flex-direction: column; }
.resume-card .rc-body { flex: 1; }

/* Preview iframes: absolutely positioned so their fixed 794x1123 layout size
   never inflates the wrapper — the wrapper keeps its aspect-ratio and crops. */
.tpl-preview, .ex-preview, .resume-thumb { position: relative; overflow: hidden; }
.tpl-preview iframe, .ex-preview iframe, .resume-thumb iframe { position: absolute; top: 0; left: 0; }
.resume-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.resume-thumb { aspect-ratio: 3/4; background: var(--bg-light); position: relative; overflow: hidden; }
.resume-thumb .tpl-scaler { position: absolute; top: 0; left: 0; width: 794px; transform: scale(.30); transform-origin: top left; }
.resume-actions { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-top: 1px solid var(--border); }
.resume-actions .rc-download { width: 100%; justify-content: center; }
.resume-actions .rc-row { display: flex; gap: 8px; }
.resume-actions .rc-edit { flex: 1; justify-content: center; }
.plan-banner { background: linear-gradient(120deg, var(--primary-soft), var(--primary-light)); border-radius: var(--radius-lg); padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 64px 24px; background: var(--bg-light); border-radius: var(--radius-lg); border: 1px dashed var(--border); }

/* ---------- Legal ---------- */
.legal { max-width: 800px; margin: 0 auto; }
.legal h2 { font-size: 1.3rem; margin: 28px 0 10px; }
.legal p, .legal li { color: var(--text-mid); margin-bottom: 12px; }
.legal ul { list-style: disc; padding-left: 22px; }

/* ---------- 404 ---------- */
.err-page { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; text-align: center; padding: 48px 24px; }
.err-code { font-size: 6rem; font-weight: 800; color: var(--primary); line-height: 1; }

/* ---------- Cookie banner ---------- */
#cookieBanner { font-family: inherit; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 4px; box-shadow: var(--shadow-md); }
  .nav.open .nav-links { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 0; width: 100%; }
  .nav-burger { display: flex; }
  /* .nav-links (the desktop auto-margin spacer) is hidden here, so the right
     group must push itself to the edge. */
  .nav-right { margin-left: auto; }
  .feature-grid, .tpl-grid, .resource-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid, .steps, .ex-grid, .post-grid { grid-template-columns: 1fr; }
  .hero-grid, .blog-hero, .featured-banner, .newsletter, .tpl-layout, .blog-layout { grid-template-columns: 1fr; }
  .hero-char-wrap { min-height: 320px; order: -1; }
  .sidebar { position: static; }
  .steps .step::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-banner { flex-direction: column; text-align: center; }
  .page-title-row { flex-direction: column; }
  .page-title-row .pill { display: none; }
  .feature-article .fa-char { display: none; }
  .newsletter form { flex-direction: column; align-items: stretch; }
  .newsletter input { min-width: 0; width: 100%; }
}
@media (max-width: 700px) {
  /* The header can't fit logo + language + login + CTA + burger on a phone:
     login/CTA move into the burger menu (see .nav-mobile-cta in header.php). */
  .nav-right { gap: 8px; }
  .nav-right .nav-login-link, .nav-right > .btn { display: none; }
  .nav-links .nav-mobile-cta { display: flex; }
  .container { padding: 0 18px; }
  /* The template-page checkbox sidebar duplicates the toolbar selects — on a
     phone it's just two screens of repeated filters, so the toolbar wins. */
  .tpl-layout .sidebar { display: none; }
}
@media (max-width: 560px) {
  .section { padding: 56px 0; }
  .feature-grid, .tpl-grid, .resource-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-banner { padding: 32px 24px; }
  .auth-card { padding: 28px 22px; }
  h1 { font-size: 1.9rem; }
  .hero h1 { font-size: 2.1rem; }
  .compare { padding: 18px 14px; }
  .verify-banner { font-size: .8rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
  .char-float, .hero-char-wrap::before, .float-card { animation: none !important; }
}
