/* This application is developed and managed by James Kaburu - an experienced developer, a lawyer, an economist and a Certified Fraud Examiner. Contact him on +254 710 496 209 (call or WhatsApp). */
/* AcademicPapers Main Theme Stylesheet - Animated & Mobile Responsive */
:root {
  --navy: #0b2545;
  --navy-dark: #07172c;
  --navy-light: #133a68;
  --primary: #174b91;
  --primary-hover: #123d78;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --gold: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px -5px rgba(11,37,69,0.12);
  --transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------------------------------------------------------------------
   Typography

   One family for the whole site, at every size. The previous stack named five
   system fonts in the hope the host had one; in practice the page picked up a
   different face on Windows, macOS and Android, and headings inherited whatever
   the browser defaulted to.

   Inter is designed for screens: a tall x-height so it stays readable at 14px,
   open apertures so 'e' and 'c' do not fill in, and tabular figures for prices.
   If the font files are not present the system stack takes over cleanly, so
   this never blocks first paint or leaves a flash of invisible text.

   Sizes descend from a single scale rather than being invented per component:
   12 / 13 / 14 / 15 / 16 / 18 / 22 / 28 / 36. Everything below reads from these
   variables, so a change here is a change everywhere.
--------------------------------------------------------------------------- */
/* Self-hosted: no third-party request, nothing to block first paint on an
   FTP-only host with no CDN, and the files ship with the site. Four weights,
   ~24 KB each, latin subset only - the site has no other scripts. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-400.woff2') format('woff2'),
       local('Inter'), local('Inter-Regular');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/inter-500.woff2') format('woff2'),
       local('Inter Medium');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/inter-600.woff2') format('woff2'),
       local('Inter SemiBold');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/inter-700.woff2') format('woff2'),
       local('Inter Bold');
}

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;

  --leading-tight: 1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* A consistent rhythm: every section breathes by the same amounts. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* Keep the sticky header from covering an anchor target. */
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: var(--leading-normal);
  /* NOT `overflow-x: hidden`.
     
     `hidden` makes <body> a scroll container. That is not cosmetic: an ancestor
     that is a scroll container changes what `position: sticky` sticks to and
     breaks the page's own scroll anchoring. `clip` cuts the same horizontal
     bleed without creating a scroll container, so wide tables and wide code
     blocks stop widening the page and nothing else changes.
     
     What this is NOT is the reason the floating share rail was invisible. A
     `position: fixed` element's containing block is the viewport, so it is not
     clipped by an ancestor's overflow - the rail now also lives in a `popover`,
     which puts it in the top layer regardless, but the rail's problem was
     elsewhere and this rule was never its cause. */
  overflow-x: clip;
  width: 100%;
  /* Inter's default spacing is slightly loose for body copy at 15px. */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Headings share one scale and one rhythm, so a page cannot invent its own. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  color: var(--navy-dark);
  /* A heading with no space above it collides with the paragraph before it. */
  margin: 0 0 var(--space-3);
}
h1 { font-size: clamp(26px, 4vw, var(--text-3xl)); }
h2 { font-size: clamp(22px, 3vw, var(--text-2xl)); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; }

p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }

/* Long-form reading gets a comfortable measure and looser leading. */
.blog-article-body p,
.article-body p,
.prose p { line-height: var(--leading-relaxed); margin-bottom: var(--space-4); }

small { font-size: var(--text-xs); }
strong, b { font-weight: 700; }

/* Prices and counts line up in a column only with tabular figures. */
table, .stat-val, .price, .money { font-variant-numeric: tabular-nums; }

code, kbd, pre, samp { font-family: var(--font-mono); font-size: 0.92em; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Topbar */
.topbar { background-color: #0b2545; color: #f8fbff; font-size: 13px; padding: 8px 0; border-bottom: 1px solid #173b61; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar-left { display: flex; gap: 18px; align-items: center; font-size: 13px; }
.topbar-right { display: flex; gap: 16px; font-size: 13px; }
.topbar-right a:hover { color: #ffffff; }

/* Header */
.main-header {
  background: #ffffff;
  border-bottom: 2px solid #0b2545;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}
.header-wrap { display: flex; justify-content: space-between; align-items: center; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--navy); }
.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--navy));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(29,78,216,0.25);
}
.logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 3px;
  box-shadow: 0 2px 6px rgba(11, 37, 69, 0.12);
  flex: 0 0 auto;
}
.logo-sm .logo-img { width: 32px; height: 32px; border-radius: 8px; padding: 2px; }
.logo-lg .logo-img { width: 56px; height: 56px; border-radius: 12px; }
.logo-on-dark .logo-img { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.logo-on-dark .logo-text { color: #fff; }
.logo-on-dark .logo-text small { color: #94a3b8; }
.logo-text { display: flex; flex-direction: column; }
.logo-text small { font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.3px; margin-top: -2px; }

.nav-links { display: flex; gap: 24px; list-style: none; font-size: 15px; font-weight: 600; color: #334155; }
.nav-links a { position: relative; padding: 6px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.btn-primary { background-color: var(--primary); color: #ffffff; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(29,78,216,0.3); }

.btn-accent {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  background-size: 200% auto;
  color: #0b2545;
  box-shadow: 0 4px 14px rgba(249,115,22,0.3);
}
.btn-accent:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249,115,22,0.45);
}
.btn-accent::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 35%;
  height: 200%;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(25deg);
  animation: buttonShimmer 4s infinite linear;
}
@keyframes buttonShimmer {
  0% { transform: rotate(25deg) translateX(-150%); }
  25%, 100% { transform: rotate(25deg) translateX(400%); }
}

.btn-outline { background: transparent; border: 1.5px solid var(--border); color: #334155; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }

/* Hamburger Menu Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  transition: var(--transition);
}
.hamburger:hover { background: #e2e8f0; }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--navy);
  border-radius: 2px;
  transition: all 0.25s ease-in-out;
}
.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Drawer Overlay & Container */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(4px);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }

.drawer-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 86vw;
  height: 100vh;
  background: #ffffff;
  z-index: 1300;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 30px rgba(0,0,0,0.22);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.drawer-menu.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 18px;
}
.drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--navy);
  cursor: pointer;
  transition: var(--transition);
}
.drawer-close:hover { background: #fee2e2; color: #ef4444; }

.drawer-user-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drawer-user-info { display: flex; align-items: center; gap: 12px; }
.drawer-user-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }

.drawer-links { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; }
.drawer-links li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  color: #334155;
  transition: var(--transition);
}
.drawer-links li a:hover, .drawer-links li a.active {
  background: #eff6ff;
  color: var(--primary);
  transform: translateX(4px);
}
.drawer-links .drawer-badge {
  margin-left: auto;
  background: var(--accent);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.drawer-contact-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drawer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #475569;
}

/* Hero Section */
.hero {
  background: radial-gradient(ellipse at 78% 18%, rgba(249, 115, 22, .16), transparent 34%),
              linear-gradient(118deg, #07172c 0%, #0b2545 55%, #123b68 100%);
  color: #f8fbff;
  padding: 70px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -190px;
  right: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96,165,250,.17) 0%, rgba(96,165,250,.04) 40%, transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.96);
  color: #0b2545;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 8px 24px rgba(2, 12, 27, .2);
  animation: heroBadgeFloat 3.5s ease-in-out infinite;
}
@keyframes heroBadgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero h1 { color: #ffffff; font-size: 44px; font-weight: 800; line-height: 1.18; margin-bottom: 18px; letter-spacing: -0.5px; }
.hero h1 span { color: #fb923c; }
.hero p { font-size: 17px; color: #d7e4f4; margin-bottom: 26px; line-height: 1.7; max-width: 62ch; }

.hero-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 30px; font-size: 14px; font-weight: 500; }
.hero .check-item { display: flex; align-items: center; gap: 8px; color: #edf4ff; }
.hero .check-icon { color: #fb923c; font-weight: 900; }

.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero .btn-outline { color: #ffffff !important; border-color: rgba(255,255,255,.65) !important; background: rgba(255,255,255,.06); }
.hero .btn-outline:hover { color: #0b2545 !important; border-color: #ffffff !important; background: #ffffff; }

/* Quote Calculator Card on Hero */
.quote-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 30px;
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.2);
}
.quote-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.quote-card-header h3 { font-size: 19px; font-weight: 700; color: var(--navy); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: #fff;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(147,197,253,0.45); }
.calc-price-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 18px 0 16px;
  border: 1px solid #e2e8f0;
}
.calc-price-bar span { font-size: 13px; font-weight: 600; color: #64748b; }
.calc-price-bar strong { font-size: 24px; font-weight: 800; color: var(--navy); }

/* Section Styles */
.section-py { padding: 75px 0; }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-header h2 { font-size: 32px; font-weight: 800; color: var(--navy); margin-bottom: 12px; letter-spacing: -0.3px; }
.section-header p { font-size: 16px; color: var(--text-muted); }

/* Achievements Counter Bar */
.achievements-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  margin-top: -45px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-number { font-size: 34px; font-weight: 800; color: var(--primary); margin-bottom: 4px; line-height: 1.1; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Services Grid */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.service-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #93c5fd; }
.service-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
  transition: var(--transition);
}
.service-card:hover .service-icon { background: var(--primary); color: #fff; transform: scale(1.08); }
.service-card h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.service-card p { font-size: 14px; color: var(--text-muted); line-height: 1.55; margin-bottom: 16px; }

/* How It Works Steps */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; margin-top: 36px; }
.step-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.step-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.step-number {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  margin: 0 auto 16px;
  box-shadow: 0 4px 10px rgba(29,78,216,0.3);
}

/* Writers Showcase */
.writers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.writer-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.writer-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.writer-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 3px solid #eff6ff; }

/* Testimonials Grid */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.testimonial-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.test-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.test-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #eff6ff; }
.test-name { font-weight: 700; color: var(--navy); font-size: 15px; }
.test-stars { color: #f59e0b; font-size: 14px; margin-top: 2px; }
.test-quote { font-size: 14px; color: #334155; line-height: 1.6; font-style: italic; }

/* Blog Layout */
.blog-layout { display: grid; grid-template-columns: 2.2fr 1fr; gap: 36px; }
.blog-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-card-img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; }
.blog-card-body { padding: 22px; }

/* Newsletter */
.newsletter-banner {
  background: #eff6ff;
  color: #0b2545;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-lg);
  padding: 26px 32px;
  /* A grid, not a flex row. With flex the two columns stretched to each other's
     height, so a three-field form left a tall empty band under the heading -
     on a phone that band was most of the screen. Grid rows size to their own
     content and `align-items: center` keeps the copy level with the button
     rather than stranded at the top of a tall box. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  align-items: center;
  gap: 20px 36px;
  margin: 40px 0;
  box-shadow: var(--shadow-lg);
}
.newsletter-banner__copy { min-width: 0; }
.newsletter-banner__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #1d4ed8;
  margin-bottom: 8px;
}
.newsletter-banner__title { font-size: 26px; font-weight: 800; line-height: 1.2; margin: 0 0 8px; }
.newsletter-banner__text { color: #475569; font-size: 15px; line-height: 1.65; margin: 0; max-width: 46ch; }
.newsletter-banner__text p { margin: 0; }
.newsletter-banner__text p + p { margin-top: 6px; }

.nl-form {
  display: flex;
  flex-direction: column;
  /* Tight on purpose: this is a two-field band across the page, not a screen of
     its own. The gap shrinks the vertical run of label/input pairs without
     crowding the tap targets. */
  gap: 7px;
  min-width: 0;
}
.nl-field { display: block; }
.nl-field__label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #1e40af;
  margin-bottom: 5px;
}
.nl-field__label em { font-style: normal; font-weight: 500; text-transform: none; color: #94a3b8; letter-spacing: 0; }
.nl-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: #0b2545;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.nl-input::placeholder { color: #94a3b8; }
.nl-input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .35); }
.nl-submit { width: 100%; justify-content: center; }
.nl-privacy { font-size: 11px; line-height: 1.45; color: #94a3b8; margin: 0; }
.nl-msg { font-size: 13px; margin: 10px 0 0; color: #334155; }
.nl-msg--ok { color: #166534; }
.nl-msg--err { color: #991b1b; }

/* 4-Column Footer */
.main-footer { background: linear-gradient(145deg, #07172c 0%, #0b2545 70%, #102f52 100%); color: #d7e4f4; padding: 56px 0 20px; border-top: 3px solid #f97316; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 36px; margin-bottom: 36px; }
.footer-col h4 { color: #ffffff; font-size: 16px; font-weight: 700; margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: #d7e4f4; }
.footer-links a:hover { color: #fb923c; text-decoration: underline; }
.footer-badge { background: #ffffff; color: #334155; padding: 14px; border-radius: 8px; margin-top: 18px; border: 1px solid rgba(255,255,255,.35); }
.footer-bottom { border-top: 1px solid rgba(219,234,254,.24); padding-top: 22px; display: flex; justify-content: space-between; font-size: 13px; color: #c0d0e4; }

/* Table Responsive Container */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Animation Engine (Scroll-Reveal & Easing) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-35px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.revealed { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(35px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.revealed { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.revealed { opacity: 1; transform: scale(1); }

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 992px) {
  .hero-grid, .split-grid { grid-template-columns: 1fr !important; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .achievements-card { grid-template-columns: 1fr 1fr; margin-top: -30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .blog-layout { grid-template-columns: 1fr !important; }
  .blog-card { grid-template-columns: 1fr !important; }
  .blog-card-img { height: 200px; }

  /* Universal grid collapse for mobile/tablet */
  [style*="grid-template-columns: 2.2fr 1fr"],
  [style*="grid-template-columns: 1.2fr 0.8fr"],
  [style*="grid-template-columns: 1.3fr 0.7fr"],
  [style*="grid-template-columns: 1.4fr 0.6fr"],
  [style*="grid-template-columns: 1fr 2fr"],
  [style*="grid-template-columns: 1.25fr 0.75fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .topbar-right { display: none; }
  .topbar .container { justify-content: center; }
  .topbar-left { font-size: 11px; gap: 10px; }
  .header-wrap { height: 66px; }
  .header-cta .header-login-btn { display: none; }
  .header-cta .btn-accent { padding: 8px 14px; font-size: 13px; }
  .hero { padding: 48px 0 70px; }
  .hero h1 { font-size: 32px; line-height: 1.22; }
  .hero p { font-size: 15px; }
  .quote-card { padding: 22px 18px; }
  .section-py { padding: 50px 0; }
  .section-header h2 { font-size: 26px; }
  .newsletter-banner {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 22px 18px;
    gap: 14px;
    margin: 34px 0;
  }
  .newsletter-banner__text { max-width: none; }
  .nl-input { padding: 11px 13px; font-size: 16px; } /* 16px prevents iOS zoom-on-focus */
  .nl-privacy { font-size: 11px; }
  .newsletter-banner__title { font-size: 21px; }
  .newsletter-banner__text { font-size: 14px; }
  .nl-form { width: 100%; max-width: none; }
  .wizard-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .logo-text small { display: none; }
  .logo { font-size: 19px; }
  .logo-icon { width: 36px; height: 36px; font-size: 18px; }
  .hero h1 { font-size: 28px; }
  .steps-grid { grid-template-columns: 1fr; }
  .achievements-card { grid-template-columns: 1fr; gap: 14px; padding: 22px 16px; }
  .stat-number { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
  .hero-checklist { grid-template-columns: 1fr; }
}

/* ---------- Shared UI primitives (admin, client, writer, public) ---------- */
.alert { border-radius: 8px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; line-height: 1.6; }
.alert > strong, .alert > a { font-weight: 600; }

/* Field-level validation text, used by the order wizard and the auth screens */
.form-error, .invalid-feedback { display: block; margin: 4px 0 0; font-size: 12.5px; color: #dc2626; }
.form-control.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid { border-color: #dc2626 !important; background-image: none; }
.form-control.is-invalid:focus,
input.is-invalid:focus { outline-color: #fca5a5 !important; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
/* .alert-warning is used by the dashboard nudge (two-factor) and a couple of
   admin screens; without it those banners rendered as bare text. */
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
/* Secondary copy under a heading. Pages already used this class, often with an
   inline colour because the class itself did nothing. */
.muted { color: #64748b; font-size: 13.5px; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-muted { background: #eef2f7; color: #475569; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---------- Vanilla rich text editor (public/assets/js/editor.js) ---------- */
.rt-editor { border: 1px solid #d7dfea; border-radius: 8px; overflow: hidden; background: #fff; }
.rt-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.rt-btn { border: 1px solid #e2e8f0; background: #fff; border-radius: 5px; padding: 4px 8px; font-size: 12px; cursor: pointer; color: #0b2545; }
.rt-btn:hover { background: #eff6ff; border-color: #bfdbfe; }
.rt-btn-alt { margin-left: auto; }
.rt-area { padding: 12px 14px; font-size: 14px; line-height: 1.7; color: #0f172a; outline: none; }
.rt-area h3 { font-size: 17px; margin: 8px 0; }
.rt-area a { color: #2563eb; text-decoration: underline; }

/* ==========================================================================
   Fluid layout & density pass
   --------------------------------------------------------------------------
   Every public page: sections carry less dead space, grids fill the width with
   one more column where it fits (so a phone scroll is shorter and a desktop page
   is not a column of three cards with a wasted fourth slot), and nothing is
   pinned to a fixed pixel height.
   ========================================================================== */

.container { width: 100%; max-width: 1240px; padding-left: clamp(14px, 3vw, 28px); padding-right: clamp(14px, 3vw, 28px); }

.section-py { padding: clamp(38px, 5vw, 64px) 0; }

.services-grid,
.writers-grid { grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: clamp(14px, 2vw, 22px); }

.steps-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: clamp(14px, 2vw, 22px); }

.chip-grid { gap: 8px; }
.chip { padding: 7px 13px; font-size: 13px; }

.section-header { margin-bottom: clamp(20px, 3vw, 34px); }
.section-header h2 { font-size: clamp(21px, 3vw, 30px); }

.hero-grid { gap: clamp(20px, 4vw, 40px); }
.hero h1 { font-size: clamp(26px, 4.6vw, 44px); line-height: 1.18; }

.split-grid { gap: clamp(20px, 3vw, 34px); }

/* Cards share one radius, one border and one shadow on every page. */
.service-card, .writer-card, .step-card, .blog-card, .quote-card, .testimonial-card,
.order-guarantee, .calc-box, .faq-item {
  border-radius: 12px;
}

/* ==========================================================================
   Home page rows
   --------------------------------------------------------------------------
   The services, writers and reviews used to be grids of tall cards. One row per
   item carries the same information in a fraction of the height, stays readable,
   and needs no separate mobile layout.
   ========================================================================== */

.home-rows { display: flex; flex-direction: column; gap: 10px; }

.home-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

a.home-row:hover { border-color: #93c5fd; box-shadow: var(--shadow-sm); transform: translateX(3px); }

.home-row-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: #eff6ff;
  font-size: 18px;
}

.home-row-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.home-row-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-row-main strong { font-size: 14.5px; color: #0b2545; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.home-row-main small { font-size: 12.5px; color: #64748b; line-height: 1.5; }
.home-row-main small.home-row-quote-text { font-style: italic; color: #475569; }

.home-row-meta { font-size: 11.5px; font-weight: 600; color: #94a3b8; }

.home-row-cta { font-size: 12.5px; font-weight: 700; color: #1d4ed8; white-space: nowrap; }
.home-row-quote .home-row-cta { color: #64748b; font-weight: 600; }

@media (max-width: 620px) {
  .home-row { grid-template-columns: auto minmax(0, 1fr); row-gap: 6px; padding: 12px 14px; }
  .home-row-cta { grid-column: 2; justify-self: start; }
  .home-row-main small { -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ==========================================================================
   Home: services in two columns, writers in equal photo cards
   --------------------------------------------------------------------------
   The service rows were one per line, which made a very long column on a wide
   screen; two per row halves the height without losing the description. The
   writer photos are given one fixed box each so portraits and group shots
   occupy exactly the same space.
   ========================================================================== */

.home-rows-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-rows-2col .home-row { transform: none; }
.home-rows-2col .home-row small {
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 860px) {
  .home-rows-2col { grid-template-columns: minmax(0, 1fr); }
  .home-rows-2col .home-row small { -webkit-line-clamp: 3; }
}

.writer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.writer-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.writer-card:hover {
  border-color: #bfd3f5;
  box-shadow: 0 18px 40px -30px rgba(11, 37, 69, 0.6);
  transform: translateY(-2px);
}

/* One box for every photo: crop to fill, never stretch, never reflow. */
.writer-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #eef2f7;
  overflow: hidden;
}

.writer-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.writer-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid #eef2f7;
}

.writer-body strong { font-size: 14.5px; color: #0b2545; line-height: 1.35; }
.writer-body small {
  font-size: 12.5px; color: #64748b; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.writer-meta { font-size: 11.5px; font-weight: 600; color: #94a3b8; margin-top: 2px; }

@media (max-width: 560px) {
  .writer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .writer-body { padding: 10px 11px 12px; }
  .writer-body strong { font-size: 13px; }
  .writer-body small { font-size: 11.5px; -webkit-line-clamp: 2; }
}

/* ==========================================================================
   Pagination (resources/views/vendor/pagination/platform.blade.php)
   --------------------------------------------------------------------------
   Laravel's stock views are Tailwind markup and this platform loads no Tailwind,
   so every ->links() used to render as a row of unstyled links. One plain style,
   shared by the public pages and all three dashboards.
   ========================================================================== */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 0;
  font-size: 13px;
  color: #64748b;
}

.pager-summary { margin: 0; font-size: 12.5px; color: #64748b; }
.pager-summary strong { color: #334155; font-weight: 600; }

.pager-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

a.pager-btn:hover { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }

.pager-btn.is-current {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.pager-btn.is-disabled { color: #cbd5e1; background: #f8fafc; cursor: not-allowed; }

.pager-gap { padding: 0 2px; color: #94a3b8; }

@media (max-width: 600px) {
  .pager { justify-content: center; }
  .pager-summary { width: 100%; text-align: center; }
  .pager-btn { min-width: 32px; height: 32px; padding: 0 8px; font-size: 12px; }
}

/* ---------------------------------------------------------------------------
   Service detail page (/services/<slug>)
   The page was a hard-coded two-column grid: on a phone the 2fr column shrank to
   a few characters per line and the sticky price card sat on top of it. One
   column below 900px, fluid padding, and no sticky card on a small screen.
--------------------------------------------------------------------------- */
.service-detail-wrap { margin: 50px auto 80px; max-width: 1040px; }
.service-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: 28px; align-items: start; }
.service-detail-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 30px; box-shadow: var(--shadow-sm); min-width: 0; overflow-wrap: anywhere; }
.service-detail-card h1 { font-size: 30px; font-weight: 800; color: #0b2545; margin: 0 0 10px; line-height: 1.2; }
.service-detail-card p, .service-detail-card li { font-size: 15px; color: #475569; line-height: 1.75; }
.service-detail-card ul { padding-left: 18px; margin: 0; }
.service-detail-aside { background: #eff6ff; color: #334155; border: 1px solid #dbeafe; border-radius: 14px; padding: 26px; position: sticky; top: 20px; overflow-wrap: anywhere; }
.service-detail-aside .btn { width: 100%; text-align: center; display: block; }
.service-detail-crumbs { font-size: 13px; color: #64748b; margin-bottom: 18px; }
.service-detail-crumbs a { color: #2563eb; }

@media (max-width: 900px) {
  .service-detail-wrap { margin: 22px auto 56px; padding: 0 14px; }
  .service-detail-grid { grid-template-columns: 1fr; gap: 18px; }
  .service-detail-card { padding: 20px; }
  .service-detail-card h1 { font-size: 24px; }
  .service-detail-aside { position: static; padding: 20px; }
}

@media (max-width: 480px) {
  .service-detail-wrap { padding: 0 12px; margin-top: 16px; }
  .service-detail-card { padding: 16px; border-radius: 12px; }
  .service-detail-card h1 { font-size: 21px; }
  .service-detail-aside { padding: 16px; border-radius: 12px; }
}

/* Long tables (admin lists, invoices) scroll inside their card instead of
   pushing the whole page sideways on a phone. */
.table-responsive, .dash-table-wrap { -webkit-overflow-scrolling: touch; }
img, video, iframe { max-width: 100%; }

/* Paragraph copy uses one consistent size across public, client and admin pages.
   !important is intentional: older views set paragraph sizes inline, which
   caused the same kind of copy to render differently from page to page. Keep
   labels, captions, headings and metric values in their own semantic elements. */
p { font-size: var(--text-md) !important; }
