/* =============================================================================
   Web Earner Solutions — custom.css (100% Mobile Overflow Fixed)
   Design system: dark-first glassmorphism, gradient brand, buttery animations.
   Works standalone (no CDN dependency); Tailwind CDN is optional on top.
   ============================================================================= */

:root {
  --brand-1: #6366f1;
  --brand-2: #8b5cf6;
  --brand-3: #d946ef;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.18), rgba(217,70,239,.14));
  --bg: #070b18;
  --bg-2: #0b1020;
  --bg-3: #101731;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-2: rgba(255, 255, 255, 0.16);
  --text: #eef1ff;
  --text-2: #aab3d0;
  --text-3: #6d789c;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #38bdf8;
  --purple: #a78bfa;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-lg: 0 24px 60px -12px rgba(2, 6, 23, 0.65);
  --shadow-glow: 0 0 42px -8px rgba(139, 92, 246, 0.55);
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Poppins', var(--font-body);
}

html[data-theme="light"] {
  --bg: #f6f7fd;
  --bg-2: #ffffff;
  --bg-3: #eef0fb;
  --surface: #ffffff;
  --surface-2: #f2f4ff;
  --border: #e2e5f5;
  --border-2: #ccd2ef;
  --text: #131a33;
  --text-2: #47506f;
  --text-3: #828bab;
  --shadow-lg: 0 20px 50px -18px rgba(30, 41, 82, 0.22);
  --shadow-glow: 0 10px 34px -12px rgba(139, 92, 246, 0.35);
}

/* ANTI-STRETCH RESET: Ensure absolute constraint on body */
* { box-sizing: border-box !important; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; width: 100%; max-width: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  word-wrap: break-word; 
  overflow-wrap: break-word;
  width: 100%;
  max-width: 100%;
  overflow-x: clip; /* Protects sticky elements while stopping horizontal scroll */
}

img, picture, video, canvas, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.2; font-weight: 600; }
::selection { background: rgba(139, 92, 246, .45); color: #fff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #2b3355; border-radius: 8px; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c6cbe6; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 5rem 0; position: relative; max-width: 100%; }
.section-sm { padding: 3rem 0; max-width: 100%; }

/* ------------------------------- Typography ------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: .35rem .9rem; border-radius: 999px;
  color: #c7b8ff; background: var(--grad-soft); border: 1px solid rgba(139,92,246,.35);
}
html[data-theme="light"] .eyebrow { color: #6d28d9; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin: 1rem 0 .6rem; }
.section-sub { color: var(--text-2); max-width: 640px; font-size: 1.02rem; }
.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }
.gradient-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.text-muted { color: var(--text-2); }
.small { font-size: .85rem; }

/* -------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.6rem; border-radius: 12px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: all .25s cubic-bezier(.4,0,.2,1);
  font-family: var(--font-body); background: var(--surface-2); color: var(--text);
  white-space: nowrap; position: relative; overflow: hidden; text-align: center;
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -10px rgba(139,92,246,.7); }
.btn-primary:hover { box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-outline { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn-outline:hover { border-color: var(--brand-2); background: var(--surface); transform: translateY(-2px); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-success { background: linear-gradient(135deg,#16a34a,#22c55e); color: #fff; }
.btn-danger { background: linear-gradient(135deg,#dc2626,#ef4444); color: #fff; }
.btn-warning { background: linear-gradient(135deg,#d97706,#f59e0b); color: #fff; }
.btn-sm { padding: .45rem .9rem; font-size: .83rem; border-radius: 9px; }
.btn-lg { padding: 1rem 2.1rem; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; display: flex; justify-content: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* --------------------------------- Badges -------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .26rem .7rem;
  border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.badge-success { background: rgba(34,197,94,.14); color: #4ade80; border-color: rgba(34,197,94,.35); }
.badge-danger { background: rgba(239,68,68,.14); color: #f87171; border-color: rgba(239,68,68,.35); }
.badge-warning { background: rgba(245,158,11,.14); color: #fbbf24; border-color: rgba(245,158,11,.35); }
.badge-info { background: rgba(56,189,248,.14); color: #38bdf8; border-color: rgba(56,189,248,.35); }
.badge-purple { background: rgba(167,139,250,.16); color: #c4b5fd; border-color: rgba(167,139,250,.35); }
.badge-muted { background: var(--surface-2); color: var(--text-3); border-color: var(--border); }

/* --------------------------------- Cards & Structural Limits --------------------------------- */
.card, .glass {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  max-width: 100% !important; min-width: 0 !important; box-sizing: border-box; /* BLOWOUT FIX */
}
.glass {
  background: var(--surface); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(139,92,246,.45); }

/* --------------------------------- Icons --------------------------------- */
.icon { width: 22px; height: 22px; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  background: var(--grad-soft); border: 1px solid rgba(139,92,246,.35); color: #b7a6ff;
}
.icon-chip .icon { width: 26px; height: 26px; }

/* --------------------------------- Forms ---------------------------------- */
.form-group { margin-bottom: 1.15rem; width: 100%; max-width: 100%; }
.form-label { display: block; font-size: .87rem; font-weight: 600; margin-bottom: .45rem; color: var(--text-2); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: .78rem 1rem; border-radius: 12px; font-size: .95rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-body); transition: border-color .2s ease, box-shadow .2s ease;
  box-sizing: border-box; max-width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(139,92,246,.18);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-error { color: var(--danger); font-size: .8rem; margin-top: .35rem; }
.form-hint { color: var(--text-3); font-size: .78rem; margin-top: .35rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; width: 100%; max-width: 100%; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--text-2); cursor: pointer; }
.checkbox input { margin-top: .25rem; accent-color: var(--brand-2); width: 16px; height: 16px; flex: none; }
.input-wrap { position: relative; width: 100%; }
.input-wrap .icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 18px; height: 18px; }
.input-wrap .form-input { padding-left: 2.6rem; }
.password-toggle { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-3); cursor: pointer; display: flex; padding: .2rem; }
.password-meter { height: 5px; border-radius: 4px; background: var(--surface-2); margin-top: .5rem; overflow: hidden; width: 100%; }
.password-meter > div { height: 100%; width: 0; background: var(--danger); transition: width .35s ease, background .35s ease; border-radius: 4px; }

/* --------------------------------- Tables --------------------------------- */
.table-wrap { 
  overflow-x: auto; 
  -webkit-overflow-scrolling: touch; 
  border-radius: var(--radius-sm); 
  border: 1px solid var(--border); 
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important; /* BLOWOUT FIX */
}
.table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 100%; }
.table th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3); padding: .85rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); font-weight: 600;
}
.table td { padding: .95rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .18s ease; }
.table tbody tr:hover { background: var(--surface); }

/* --------------------------------- Header --------------------------------- */
.announcement {
  background: var(--grad); color: #fff; text-align: center; font-size: .8rem;
  padding: .45rem 1rem; font-weight: 500; position: relative; z-index: 60;
  width: 100%; max-width: 100%; overflow: hidden;
}
.announcement a { text-decoration: underline; font-weight: 700; }
.site-header {
  position: sticky; top: 0; z-index: 50; transition: all .3s ease;
  background: transparent; border-bottom: 1px solid transparent; width: 100%; max-width: 100%;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border); box-shadow: 0 10px 40px -18px rgba(2,6,23,.6);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; max-width: 100%; }
.logo { display: flex; align-items: center; gap: .65rem; font-family: var(--font-head); font-weight: 700; font-size: 1.18rem; flex: none; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad);
  display: flex; align-items: center; justify-content: center; color: #fff; flex: none;
  box-shadow: 0 8px 20px -8px rgba(139,92,246,.8);
}
.logo span b { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; }
.nav-links > li > a, .nav-drop > button {
  display: inline-flex; align-items: center; gap: .3rem; padding: .55rem .85rem; border-radius: 10px;
  font-size: .92rem; font-weight: 500; color: var(--text-2); background: none; border: none; cursor: pointer;
  font-family: var(--font-body); transition: color .2s, background .2s; white-space: nowrap;
}
.nav-links > li > a:hover, .nav-links > li > a.active, .nav-drop:hover > button { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: .6rem; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 12px; display: inline-flex;
  align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer; transition: all .2s; flex: none;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.icon-btn .count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--grad); color: #fff; font-size: .64rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.nav-drop { position: relative; }
.nav-drop > button .icon { width: 14px; height: 14px; transition: transform .25s; }
.nav-drop:hover > button .icon { transform: rotate(180deg); }
.mega {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(12px);
  width: min(720px, 100%); padding: 1.3rem; border-radius: 18px; opacity: 0; visibility: hidden;
  transition: all .28s cubic-bezier(.4,0,.2,1);
  background: color-mix(in srgb, var(--bg-2) 92%, transparent); backdrop-filter: blur(22px);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; z-index: 100; max-width: 100%; box-sizing: border-box;
}
.nav-drop:hover .mega, .nav-drop:focus-within .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega a { display: flex; gap: .85rem; padding: .75rem; border-radius: 12px; transition: background .2s; }
.mega a:hover { background: var(--surface); }
.mega .icon-chip { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.mega .icon-chip .icon { width: 20px; height: 20px; }
.mega b { font-size: .9rem; display: block; }
.mega small { color: var(--text-3); font-size: .76rem; display: block; line-height: 1.35; margin-top: .1rem; }
.mega-footer { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: .8rem .75rem .2rem; border-top: 1px solid var(--border); margin-top: .3rem; font-size: .85rem; color: var(--text-3); flex-wrap: wrap; }
.drop-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; padding: .5rem;
  border-radius: 14px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .25s;
  background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(20px);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 100;
}
.nav-drop:hover .drop-menu, .nav-drop:focus-within .drop-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.drop-menu a, .drop-menu button {
  display: flex; align-items: center; gap: .6rem; width: 100%; padding: .6rem .8rem; border-radius: 9px;
  font-size: .88rem; color: var(--text-2); background: none; border: none; cursor: pointer; text-align: left; font-family: var(--font-body);
}
.drop-menu a:hover, .drop-menu button:hover { background: var(--surface-2); color: var(--text); }
.drop-menu .icon { width: 17px; height: 17px; }
.drop-divider { height: 1px; background: var(--border); margin: .4rem .6rem; }
.hamburger { display: none; background: transparent; border: none; color: var(--text); cursor: pointer; padding: .5rem; }

.mobile-drawer {
  position: fixed; inset: 0; z-index: 90; background: var(--bg-2);
  transform: translateX(105%); transition: transform .38s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; padding: 1.2rem 1.5rem; overflow-y: auto;
  max-width: 100%; visibility: hidden; /* Hides horizontal stretching when closed */
}
.mobile-drawer.open { transform: translateX(0); visibility: visible; }
.mobile-drawer .drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.mobile-drawer a.drawer-link {
  display: flex; align-items: center; gap: .8rem; padding: .95rem .8rem; font-size: 1.05rem;
  font-weight: 500; border-radius: 12px; color: var(--text-2);
}
.mobile-drawer a.drawer-link:hover, .mobile-drawer a.drawer-link.active { background: var(--surface-2); color: var(--text); }

/* ---------------------------------- Hero ---------------------------------- */
.hero {
  position: relative; min-height: calc(100vh - 120px); display: flex; align-items: center;
  overflow: hidden; padding: 4rem 0; width: 100%; max-width: 100%;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: float 14s ease-in-out infinite;
  max-width: 100%; overflow: hidden; pointer-events: none;
}
.orb-1 { width: 480px; height: 480px; background: rgba(99,102,241,.35); top: -140px; left: -120px; }
.orb-2 { width: 420px; height: 420px; background: rgba(217,70,239,.28); bottom: -160px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: rgba(56,189,248,.2); top: 35%; left: 45%; animation-delay: -9s; }
#particles { position: absolute; inset: 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; position: relative; z-index: 2; max-width: 100%; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); font-weight: 700; letter-spacing: -0.02em; }
.typing-line { min-height: 1.35em; display: block; }
.hero p.lead { color: var(--text-2); font-size: 1.12rem; margin: 1.3rem 0 2rem; max-width: 520px; }
.hero-cta { display: flex; gap: .9rem; flex-wrap: wrap; }
.trust-row { display: flex; gap: 1.6rem; margin-top: 2.6rem; flex-wrap: wrap; max-width: 100%; }
.trust-item { display: flex; align-items: center; gap: .55rem; font-size: .86rem; color: var(--text-3); }
.trust-item .icon { width: 18px; height: 18px; color: #4ade80; flex: none; }
.hero-visual { position: relative; max-width: 100%; }
.hero-card {
  border-radius: 22px; padding: 1.6rem; position: relative; z-index: 2;
  animation: float 7s ease-in-out infinite; width: 100%; max-width: 100%; box-sizing: border-box;
}
.hero-visual .float-chip {
  position: absolute; padding: .7rem 1.1rem; border-radius: 14px; font-size: .82rem; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: .5rem; z-index: 3; max-width: 100%;
}
.float-chip .icon { width: 17px; height: 17px; color: #4ade80; flex: none; }
.float-1 { top: 6%; right: -3%; animation: float 6s ease-in-out infinite; }
.float-2 { bottom: 12%; left: -6%; animation: float 8s ease-in-out infinite reverse; }

/* --------------------------------- Sections ------------------------------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; width: 100%; max-width: 100%; min-width: 0; }
.stat-card { text-align: center; padding: 1.8rem 1rem; border-radius: var(--radius); position: relative; overflow: hidden; min-width: 0; }
.stat-card::before { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .3s; }
.stat-card:hover::before { opacity: 1; }
.stat-num { font-family: var(--font-head); font-size: 2.3rem; font-weight: 700; }
.stat-label { color: var(--text-3); font-size: .88rem; margin-top: .2rem; }

.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; width: 100%; max-width: 100%; min-width: 0; }
.service-card { padding: 1.7rem; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .85rem; height: 100%; min-width: 0; }
.service-card::after {
  content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.25), transparent 70%);
  top: -80px; right: -80px; opacity: 0; transition: opacity .4s;
}
.service-card:hover::after { opacity: 1; }
.service-card h3 { font-size: 1.12rem; }
.service-card p { color: var(--text-2); font-size: .89rem; flex: 1; }
.card-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 600; color: #b7a6ff; }
.card-link .icon { width: 16px; height: 16px; transition: transform .25s; flex: none; }
.service-card:hover .card-link .icon { transform: translateX(5px); }
.price-line { font-size: .85rem; color: var(--text-3); }
.price-line b { color: var(--text); font-size: 1rem; }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; position: relative; width: 100%; max-width: 100%; min-width: 0; }
.step-card { padding: 1.6rem; position: relative; min-width: 0; }
.step-num {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem;
  background: var(--grad); color: #fff; box-shadow: 0 8px 18px -6px rgba(139,92,246,.55); flex: none;
}
.step-card h3 { font-size: 1.02rem; margin-bottom: .4rem; }
.step-card p { color: var(--text-2); font-size: .88rem; }

.filter-tabs { display: flex; gap: .55rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2rem; max-width: 100%; }
.filter-tab {
  padding: .5rem 1.2rem; border-radius: 999px; font-size: .86rem; font-weight: 500; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); transition: all .2s;
  white-space: nowrap;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active { background: var(--grad); color: #fff; border-color: transparent; }

.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; width: 100%; max-width: 100%; min-width: 0; }
.portfolio-card { overflow: hidden; padding: 0; position: relative; display: flex; flex-direction: column; min-width: 0; }
.portfolio-thumb { aspect-ratio: 16/10; position: relative; overflow: hidden; width: 100%; max-width: 100%; }
.portfolio-thumb .thumb-art { position: absolute; inset: 0; transition: transform .5s ease; }
.portfolio-card:hover .thumb-art { transform: scale(1.06); }
.portfolio-body { padding: 1.2rem 1.3rem 1.4rem; }
.portfolio-body h3 { font-size: 1.02rem; margin: .3rem 0; }
.portfolio-card .overlay {
  position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(7,11,24,.88));
  display: flex; align-items: flex-end; padding: 1.2rem; opacity: 0; transition: opacity .35s; pointer-events: none;
}
.portfolio-card:hover .overlay { opacity: 1; pointer-events: auto; }

.testi-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; width: 100%; max-width: 100%; min-width: 0; }
.testi-card { padding: 1.7rem; position: relative; min-width: 0; }
.testi-card .quote { font-size: 3rem; line-height: 1; position: absolute; top: .9rem; right: 1.3rem; opacity: .14; font-family: Georgia, serif; pointer-events: none; }
.stars { color: #fbbf24; display: flex; gap: .15rem; margin-bottom: .8rem; }
.stars .icon { width: 15px; height: 15px; flex: none; }
.testi-card p { color: var(--text-2); font-size: .92rem; font-style: italic; }
.testi-author { display: flex; align-items: center; gap: .8rem; margin-top: 1.2rem; }
.testi-author .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-2); flex: none; }
.testi-author b { font-size: .9rem; display: block; }
.testi-author small { color: var(--text-3); font-size: .78rem; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; width: 100%; max-width: 100%; min-width: 0; }
.blog-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; min-width: 0; }
.blog-thumb { aspect-ratio: 16/9; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 100%; }
.blog-body { padding: 1.3rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.blog-body h3 { font-size: 1.04rem; }
.blog-body p { color: var(--text-2); font-size: .88rem; flex: 1; }
.blog-meta { display: flex; gap: .9rem; color: var(--text-3); font-size: .78rem; align-items: center; flex-wrap: wrap; }
.blog-meta .icon { width: 14px; height: 14px; vertical-align: -2px; flex: none; }

.cta-band { position: relative; border-radius: 24px; overflow: hidden; padding: 4rem 2.5rem; text-align: center; width: 100%; max-width: 100%; box-sizing: border-box; }
.cta-band::before { content: ''; position: absolute; inset: 0; background: var(--grad); opacity: .92; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.cta-band p { color: rgba(255,255,255,.85); margin: .8rem auto 1.8rem; max-width: 540px; }
.btn-white { background: #fff; color: #4c1d95; font-weight: 700; }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(0,0,0,.4); }

/* --------------------------------- Footer --------------------------------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: 4rem; width: 100%; max-width: 100%; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.4rem; padding: 3.6rem 0 2.4rem; width: 100%; max-width: 100%; min-width: 0; }
.footer-grid h4 { font-size: .95rem; margin-bottom: 1.1rem; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.footer-grid ul a { color: var(--text-2); font-size: .88rem; transition: color .2s; }
.footer-grid ul a:hover { color: var(--text); }
.footer-about p { color: var(--text-2); font-size: .88rem; margin: .9rem 0 1.2rem; max-width: 300px; }
.social-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.footer-contact li { display: flex; gap: .65rem; align-items: flex-start; color: var(--text-2); font-size: .86rem; word-break: break-word; }
.footer-contact .icon { width: 17px; height: 17px; margin-top: .2rem; color: var(--brand-2); flex: none; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 1.3rem 0; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-3); width: 100%; max-width: 100%; box-sizing: border-box;
}
.newsletter-form { display: flex; gap: .55rem; margin-top: .9rem; max-width: 100%; flex-wrap: wrap; }
.newsletter-form .form-input { padding: .6rem .9rem; font-size: .86rem; flex: 1; min-width: 150px; }

/* --------------------------------- Toasts ---------------------------------- */
.toast-stack { position: fixed; top: 1.2rem; right: 1.2rem; z-index: 999; display: flex; flex-direction: column; gap: .6rem; max-width: min(380px, 100%); overflow-x: hidden; }
.toast {
  display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--border-2); box-shadow: var(--shadow-lg);
  font-size: .88rem; animation: toast-in .35s cubic-bezier(.2,.9,.3,1.2); position: relative; overflow: hidden;
  width: 100%; box-sizing: border-box;
}
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.toast.success::before { background: var(--success); }
.toast.error::before { background: var(--danger); }
.toast.warning::before { background: var(--warning); }
.toast .icon { width: 18px; height: 18px; margin-top: .1rem; flex: none; }
.toast.success .icon { color: var(--success); }
.toast.error .icon { color: var(--danger); }
.toast.warning .icon { color: var(--warning); }
.toast button { background: none; border: none; color: var(--text-3); cursor: pointer; margin-left: auto; padding: .2rem; }
@keyframes toast-in { from { transform: translateX(110%); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.hide { transition: all .3s; transform: translateX(110%); opacity: 0; }

/* ---------------------------------- Modal ---------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(4, 7, 18, .72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 1.2rem;
  opacity: 0; visibility: hidden; transition: all .25s;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; overflow-x: hidden; border-radius: 20px; 
  padding: 1.8rem;
  background: var(--bg-2); border: 1px solid var(--border-2); box-shadow: var(--shadow-lg);
  transform: translateY(18px) scale(.97); transition: transform .3s cubic-bezier(.2,.9,.3,1.1);
  position: relative; box-sizing: border-box !important;
}
.modal-backdrop.open .modal { transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.modal-head h3 { font-size: 1.15rem; }

/* --------------------------------- Accordion -------------------------------- */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem .3rem; background: none; border: none; color: var(--text); font-size: .97rem;
  font-weight: 600; cursor: pointer; text-align: left; font-family: var(--font-body);
}
.accordion-head .icon { width: 18px; height: 18px; color: var(--brand-2); transition: transform .3s; flex: none; }
.accordion-item.open .accordion-head .icon { transform: rotate(45deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; color: var(--text-2); font-size: .9rem; }
.accordion-body > div { padding: 0 .3rem 1.2rem; }

/* ----------------------------------- OTP ----------------------------------- */
.otp-row { display: flex; gap: .65rem; justify-content: center; margin: 1.4rem 0; flex-wrap: wrap; }
.otp-input {
  width: 52px; height: 60px; text-align: center; font-size: 1.5rem; font-weight: 700; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--border-2); color: var(--text); font-family: var(--font-head);
  transition: all .2s;
}
.otp-input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(139,92,246,.2); transform: translateY(-2px); }

/* ----------------------------------- Auth ----------------------------------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
.auth-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 3.5rem; background: var(--bg-2); min-width: 0; }
.auth-visual::before { content: ''; position: absolute; inset: 0; background: var(--grad); opacity: .16; }
.auth-visual > * { position: relative; z-index: 2; }
.auth-visual h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 1.2rem 0 .8rem; }
.auth-visual p { color: var(--text-2); max-width: 380px; }
.auth-points { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.auth-points li { display: flex; gap: .8rem; align-items: center; color: var(--text-2); font-size: .95rem; list-style: none; }
.auth-points .icon { color: #4ade80; flex: none; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; width: 100%; box-sizing: border-box; min-width: 0; }
.auth-card { width: 100%; max-width: 440px; box-sizing: border-box; }
.auth-card h1 { font-size: 1.7rem; margin: 1.4rem 0 .3rem; }
.auth-card > p.sub { color: var(--text-2); margin-bottom: 1.6rem; font-size: .93rem; }
.auth-alt { text-align: center; margin-top: 1.4rem; color: var(--text-3); font-size: .9rem; }
.auth-alt a { color: #b7a6ff; font-weight: 600; }

/* ------------------------------ User dashboard ------------------------------ */
.dash-wrap { 
  display: grid; 
  /* Critical constraint fix for PC Dashboard */
  grid-template-columns: 250px minmax(0, 1fr); 
  gap: 1.6rem; 
  align-items: start; 
  padding: 2.2rem 0 4rem; 
  width: 100%; 
  max-width: 100%;
}
.dash-side { position: sticky; top: 96px; padding: 1rem; z-index: 10; }
.dash-side .user-chip { display: flex; gap: .8rem; align-items: center; padding: .7rem; margin-bottom: .8rem; }
.dash-side .user-chip img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; }
.dash-side .user-chip b { font-size: .9rem; display: block; word-break: break-all; }
.dash-side .user-chip small { color: var(--text-3); font-size: .74rem; word-break: break-all; }
.dash-nav { display: flex; flex-direction: column; gap: .15rem; }
.dash-nav a, .dash-nav button {
  display: flex; align-items: center; gap: .7rem; padding: .68rem .85rem; border-radius: 11px;
  color: var(--text-2); font-size: .9rem; font-weight: 500; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); width: 100%; text-align: left; transition: all .18s;
}
.dash-nav a:hover { background: var(--surface-2); color: var(--text); }
.dash-nav a.active { background: var(--grad-soft); color: var(--text); border: 1px solid rgba(139,92,246,.3); }

/* Anti-blowout container */
.dash-main { min-width: 0 !important; width: 100%; max-width: 100%; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.55rem; }

.timeline { position: relative; padding-left: 1.8rem; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border-2); }
.timeline-item { position: relative; padding-bottom: 1.4rem; }
.timeline-item .dot {
  position: absolute; left: -1.8rem; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-3); border: 2px solid var(--border-2);
}
.timeline-item.done .dot { background: var(--grad); border-color: transparent; box-shadow: 0 0 12px rgba(139,92,246,.7); }
.timeline-item.done .dot::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #fff; opacity: .85; }
.timeline-item b { font-size: .92rem; display: block; }
.timeline-item small { color: var(--text-3); font-size: .79rem; }

/* ------------------------------- Pricing calc ------------------------------- */
.calc-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.6rem; align-items: start; width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
.calc-panel { padding: 1.8rem; min-width: 0; }
.calc-step-label { display: flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 600; margin-bottom: 1.1rem; }
.calc-step-label .n {
  width: 28px; height: 28px; border-radius: 8px; background: var(--grad); color: #fff; font-size: .82rem;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.quick-pages { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.quick-page {
  padding: .55rem 1.2rem; border-radius: 11px; font-weight: 600; font-size: .9rem; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text-2); transition: all .2s; font-family: var(--font-body);
}
.quick-page:hover { border-color: var(--border-2); color: var(--text); }
.quick-page.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -8px rgba(139,92,246,.7); }
.range-wrap { padding: .4rem 0 .2rem; width: 100%; }
input[type="range"] { width: 100%; max-width: 100%; box-sizing: border-box; accent-color: var(--brand-2); height: 34px; cursor: pointer; }
.range-marks { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-3); padding: 0 .2rem; }
.addon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; width: 100%; }
.addon-item {
  display: flex; gap: .7rem; align-items: flex-start; padding: .85rem; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border); transition: all .2s;
}
.addon-item:hover { border-color: var(--border-2); }
.addon-item.selected { border-color: var(--brand-2); background: var(--grad-soft); }
.addon-item input { margin-top: .2rem; accent-color: var(--brand-2); flex: none; }
.addon-item b { font-size: .86rem; display: block; }
.addon-item small { color: var(--text-3); font-size: .75rem; display: block; line-height: 1.35; }
.addon-item .addon-price { margin-left: auto; font-weight: 700; font-size: .85rem; white-space: nowrap; color: #b7a6ff; }
.calc-summary { position: sticky; top: 96px; padding: 1.8rem; min-width: 0; }
.calc-summary h3 { font-size: 1.1rem; margin-bottom: 1.2rem; display: flex; gap: .6rem; align-items: center; }
.summary-row { display: flex; justify-content: space-between; padding: .55rem 0; font-size: .92rem; color: var(--text-2); border-bottom: 1px dashed var(--border); }
.summary-row.total { border-bottom: none; font-size: 1.06rem; font-weight: 700; color: var(--text); padding-top: .9rem; }
.summary-row.total .val { font-family: var(--font-head); font-size: 1.5rem; word-break: break-all; }
.pulse { animation: pulse-val .4s ease; }
@keyframes pulse-val { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* -------------------------------- Packages -------------------------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.3rem; align-items: stretch; width: 100%; max-width: 100%; min-width: 0; }
.pricing-card { display: flex; flex-direction: column; padding: 1.9rem; position: relative; min-width: 0; }
.pricing-card.popular { border-color: rgba(139,92,246,.6); box-shadow: var(--shadow-glow); }
.popular-flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  padding: .32rem 1.1rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  background: var(--grad); color: #fff; box-shadow: 0 8px 20px -6px rgba(139,92,246,.8); text-transform: uppercase; white-space: nowrap;
}
.pricing-card h3 { font-size: 1.15rem; }
.pack-price { margin: 1rem 0 .3rem; }
.pack-price .amount { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; word-break: break-all; }
.pack-price .strike { text-decoration: line-through; color: var(--text-3); font-size: 1.05rem; margin-left: .5rem; }
.pack-price .per { color: var(--text-3); font-size: .85rem; }
.pack-features { list-style: none; display: flex; flex-direction: column; gap: .6rem; margin: 1.3rem 0 1.6rem; flex: 1; }
.pack-features li { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--text-2); }
.pack-features .icon { width: 16px; height: 16px; color: var(--success); margin-top: .25rem; flex: none; }

/* --------------------------------- Checkout --------------------------------- */
.checkout-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.6rem; align-items: start; width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
.secure-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.secure-chip { display: inline-flex; gap: .45rem; align-items: center; font-size: .78rem; color: var(--text-3); }
.secure-chip .icon { width: 15px; height: 15px; color: var(--success); flex: none; }
.gateway-modal .brand-strip { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1.2rem; }
.demo-gateway-flag { font-size: .72rem; padding: .25rem .7rem; border-radius: 999px; background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.4); font-weight: 700; white-space: nowrap; }
.spinner {
  width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff; animation: spin .8s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------- Success page ------------------------------- */
.result-wrap { max-width: 640px; margin: 0 auto; text-align: center; padding: 3rem 1rem; width: 100%; box-sizing: border-box; }
.check-anim { width: 110px; height: 110px; margin: 0 auto 1.5rem; }
.check-anim circle { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 1s ease forwards; }
.check-anim path { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .6s .7s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* --------------------------------- Admin & Charts ----------------------------------- */
.admin-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; width: 100%; max-width: 100%; box-sizing: border-box; }
.admin-side {
  background: var(--bg-2); border-right: 1px solid var(--border); padding: 1.3rem .9rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; z-index: 10;
}
.admin-main { padding: 1.8rem 2rem 4rem; min-width: 0; width: 100%; max-width: 100%; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; width: 100%; max-width: 100%; box-sizing: border-box; }
.kpi { padding: 1.25rem 1.35rem; display: flex; align-items: center; gap: .95rem; min-width: 0; }
.kpi .icon-chip { width: 46px; height: 46px; flex: none; }
.kpi b { font-size: 1.3rem; font-family: var(--font-head); display: block; line-height: 1.15; word-break: break-all; }
.kpi small { color: var(--text-3); font-size: .78rem; }
.chart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.2rem; margin-bottom: 1.2rem; width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
.chart-card { padding: 1.4rem; min-width: 0; max-width: 100%; overflow-x: hidden; }
.chart-card h3 { font-size: .98rem; margin-bottom: 1rem; }
.chart-box { position: relative; height: 260px; width: 100%; max-width: 100%; box-sizing: border-box; }
.bar-row { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; font-size: .82rem; width: 100%; }
.bar-row .bar-label { width: 130px; flex: none; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bar-track { flex: 1; height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; min-width: 50px; }
.bar-row .bar-fill { height: 100%; background: var(--grad); border-radius: 6px; transition: width .6s ease; }
.bar-row .bar-val { width: 80px; text-align: right; color: var(--text-2); flex: none; }

/* --------------------------------- Invoice ---------------------------------- */
.invoice-page { background: #fff; color: #111; min-height: 100vh; padding: 2.5rem 1rem; font-family: 'Inter', Arial, sans-serif; }
.invoice-doc { max-width: 820px; margin: 0 auto; background: #fff; padding: 2.8rem; border: 1px solid #e5e7f0; border-radius: 10px; width: 100%; box-sizing: border-box; }
.invoice-doc h1 { color: #111; word-break: break-all; }
.inv-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .92rem; min-width: 500px; }
.inv-table th { background: #f2f3fb; text-align: left; padding: .7rem .9rem; border: 1px solid #e2e4f2; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.inv-table td { padding: .75rem .9rem; border: 1px solid #ecedf6; }
.inv-totals td { border: none; padding: .35rem .9rem; }
@media print {
  .invoice-page { padding: 0; }
  .invoice-doc { border: none; padding: 0; }
  .no-print { display: none !important; }
}

/* -------------------------------- Legal pages -------------------------------- */
.legal-body h2 { font-size: 1.3rem; margin: 2rem 0 .7rem; }
.legal-body h3 { font-size: 1.06rem; margin: 1.4rem 0 .5rem; }
.legal-body p, .legal-body li { color: var(--text-2); font-size: .94rem; margin-bottom: .7rem; }
.legal-body ul, .legal-body ol { padding-left: 1.4rem; }
.legal-body li { margin-bottom: .4rem; }
.legal-body a { color: #b7a6ff; word-break: break-all; }

/* ------------------------------ Blog article ------------------------------- */
.article-wrap { max-width: 760px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.article-body { font-size: 1.02rem; width: 100%; }
.article-body h2 { font-size: 1.45rem; margin: 2.2rem 0 .8rem; scroll-margin-top: 110px; }
.article-body h3 { font-size: 1.15rem; margin: 1.7rem 0 .6rem; scroll-margin-top: 110px; }
.article-body p { color: var(--text-2); margin-bottom: 1.05rem; }
.article-body ul { padding-left: 1.4rem; color: var(--text-2); margin-bottom: 1rem; }
.toc { position: sticky; top: 96px; padding: 1.3rem; }
.toc a { display: block; padding: .35rem .5rem; font-size: .85rem; color: var(--text-2); border-left: 2px solid var(--border); transition: all .2s; }
.toc a:hover, .toc a.active { color: var(--text); border-left-color: var(--brand-2); }
.toc a.l3 { padding-left: 1.3rem; font-size: .8rem; }

/* ------------------------------- Thumb art ---------------------------------- */
.thumb-art {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.thumb-art .icon { width: 64px; height: 64px; color: rgba(255,255,255,.92); position: relative; z-index: 2; filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); flex: none; }
.thumb-art::before { content: ''; position: absolute; inset: 0; opacity: .9; }
.thumb-art::after {
  content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.10); right: -60px; top: -60px;
}
.art-0::before { background: linear-gradient(135deg, #4338ca, #7c3aed); }
.art-1::before { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.art-2::before { background: linear-gradient(135deg, #b45309, #f59e0b); }
.art-3::before { background: linear-gradient(135deg, #be185d, #f472b6); }
.art-4::before { background: linear-gradient(135deg, #075985, #38bdf8); }
.art-5::before { background: linear-gradient(135deg, #4d7c0f, #84cc16); }
.art-6::before { background: linear-gradient(135deg, #6d28d9, #c026d3); }
.art-7::before { background: linear-gradient(135deg, #b91c1c, #f97316); }

/* --------------------------------- Utility ---------------------------------- */
.grid { display: grid; gap: 1.2rem; max-width: 100%; box-sizing: border-box; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; gap: .8rem; align-items: center; max-width: 100%; box-sizing: border-box; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.empty-state { text-align: center; padding: 3.5rem 1.5rem; width: 100%; box-sizing: border-box; }
.empty-state .icon-chip { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 1.2rem; }
.empty-state .icon-chip .icon { width: 34px; height: 34px; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; } .reveal-d4 { transition-delay: .32s; }

.float-btn-wa {
  position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 80; width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px -8px rgba(34,197,94,.6); transition: transform .25s;
}
.float-btn-wa:hover { transform: scale(1.08); }
.float-btn-wa .icon { width: 26px; height: 26px; flex: none; }

.compare-table td:first-child { font-weight: 600; }

/* ------------------------------- Animations --------------------------------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes gradient-pan { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* =============================================================================
   RESPONSIVE DESIGN (TABLETS & BELOW) - SAFE OVERFLOW LOCKS
   ============================================================================= */

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid, .blog-grid, .testi-track, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .calc-grid, .checkout-grid { grid-template-columns: 1fr; }
  .calc-summary { position: static; }
  .chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: inline-flex; }
  
  /* DASHBOARD MOBILE */
  .dash-wrap { 
      grid-template-columns: 1fr; 
      padding-top: 1rem !important; 
  }
  .dash-side { 
      position: relative !important; 
      padding: 0; 
      top: 0 !important; 
      margin-bottom: 1.5rem; 
      z-index: 10;
  }
  .dash-nav { 
      flex-direction: row; 
      flex-wrap: nowrap; 
      overflow-x: auto; 
      -webkit-overflow-scrolling: touch; 
      gap: 0.5rem; 
      padding-bottom: 0.5rem;
  }
  .dash-nav a, .dash-nav button { 
      white-space: nowrap; 
      flex: none; 
      width: auto; 
  }

  .admin-wrap { grid-template-columns: 1fr; }
  .admin-side { position: fixed; z-index: 95; width: 240px; transform: translateX(-100%); transition: transform .3s; }
  .admin-side.open { transform: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { display: none; }

  /* FIX: Hide off-canvas drawers completely when translated so they don't widen screen */
  .mobile-drawer, [class*="drawer"] {
      visibility: hidden;
  }
  .mobile-drawer.open, [class*="drawer"].open, [class*="drawer"].active {
      visibility: visible;
  }

  /* MAGIC FIX: Homepage Instant Pricing Calculator */
  .section .container > div[style*="background"]:has(.glass),
  .section .container > .card:has(.glass),
  .section .container > div[style*="--grad"]:has(.glass) {
      display: flex !important;
      flex-direction: column !important;
      height: auto !important;
      padding: 2.5rem 1.5rem !important;
      box-sizing: border-box !important;
  }
  .section .container > div[style*="background"]:has(.glass) > div,
  .section .container > .card:has(.glass) > div,
  .section .container > div[style*="--grad"]:has(.glass) > div {
      width: 100% !important;
      max-width: 100% !important;
  }
  .section .container > div[style*="background"]:has(.glass) .glass,
  .section .container > .card:has(.glass) .glass,
  .section .container > div[style*="--grad"]:has(.glass) .glass {
      position: relative !important;
      right: auto !important;
      left: auto !important;
      top: auto !important;
      bottom: auto !important;
      transform: none !important;
      width: 100% !important;
      margin-top: 2rem !important;
      padding: 1.5rem !important;
      box-sizing: border-box !important;
  }
}

@media (max-width: 640px) {
  .services-grid, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .portfolio-grid, .blog-grid, .testi-track { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  
  .addon-grid { grid-template-columns: 1fr !important; }
  .form-row { grid-template-columns: 1fr !important; }
  
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 3.4rem 0; }
  .admin-main { padding: 1.2rem 1rem 4rem; }
  .otp-input { width: 44px; height: 52px; font-size: 1.25rem; }
  
  .card, .stat-card, .service-card, .step-card { padding: 1.2rem; }
  .hero { padding: 3rem 0; }
  .container { padding: 0 1rem; }

  /* OVERFLOW/STRETCH PREVENTION FOR LONG TEXT/MODALS */
  .modal, [id*="cart"], [class*="cart-drawer"] { 
      max-width: 100% !important; 
      padding: 1.2rem !important; 
      box-sizing: border-box !important; 
      overflow-x: hidden !important;
  }
  .calc-panel, .calc-summary, .auth-panel { 
      padding: 1.2rem !important; 
      box-sizing: border-box; 
      width: 100%;
  }
  .summary-row { flex-wrap: wrap; }
  .summary-row span, .item-line-total { word-break: break-word; }
  
  /* Force tables to scroll on very small screens rather than stretch body */
  .table { min-width: 500px !important; }
}

/* Micro-devices */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; }
  .section-title { font-size: clamp(1.4rem, 8vw, 2rem); }
  .kpi-grid { grid-template-columns: 1fr; }
  .toast-stack { right: 0.5rem; left: 0.5rem; width: auto; max-width: 100%; }
  .modal { padding: 1.2rem !important; }
  .invoice-doc { padding: 1.2rem; border: none; }
  .footer-bottom { flex-direction: column; text-align: center; justify-content: center; gap: 1.2rem; }
  .social-row { justify-content: center; width: 100%; }
  .float-btn-wa { bottom: 1rem; right: 1rem; width: 50px; height: 50px; }
  .logo { font-size: 1.05rem; }
}