/* ============================================================
   main.css — BeSecureWise
   Single source of truth. All tokens, all sections.
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */

:root {

  /* ----------------------------------------------------------
     Brand Palette
  ---------------------------------------------------------- */
  --navy-950: #081528;
  --navy-900: #0b1f3a;
  --navy-800: #132a4a;
  --navy-700: #1d3a63;

  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;

  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;

  --green-500: #10b981;
  --green-600: #059669;

  --amber-400: #f59e0b;
  --red-500: #ef4444;

  /* ----------------------------------------------------------
     Semantic Colours
  ---------------------------------------------------------- */
  --brand-primary: var(--blue-500);
  --brand-secondary: var(--blue-700);
  --brand-success: var(--green-500);
  --brand-warning: var(--amber-400);
  --brand-danger: var(--red-500);
  --brand-accent: var(--sky-400);

  /* ----------------------------------------------------------
     Text
  ---------------------------------------------------------- */
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --text-accent: var(--sky-400);

  /* ----------------------------------------------------------
     Surfaces & Borders
  ---------------------------------------------------------- */
  --bg-base: var(--navy-950);
  --bg-surface: var(--navy-900);
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-accent: rgba(30, 41, 59, 0.60);

  --border-subtle: rgba(148, 163, 184, 0.10);
  --border-strong: rgba(148, 163, 184, 0.18);
  --border-hover: rgba(56, 189, 248, 0.30);
  --border-teal: rgba(20, 184, 166, 0.20);

  /* ----------------------------------------------------------
     Gradients
  ---------------------------------------------------------- */
  --gradient-page: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --gradient-primary: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-700) 100%);
  --gradient-success: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
  --gradient-accent: linear-gradient(135deg, var(--sky-400) 0%, var(--sky-500) 100%);
  --gradient-brand: linear-gradient(135deg, var(--sky-400), var(--blue-600));
  --gradient-cta: linear-gradient(90deg, #34d399, var(--sky-400));

  /* Section alternating backgrounds */
  --section-bg-a: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  --section-bg-b: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  --section-bg-c: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);

  /* ----------------------------------------------------------
     Typography Scale
  ---------------------------------------------------------- */
  --font-weight-body: 400;
  --font-weight-heading: 700;
  --font-weight-title: 800;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: clamp(2.2rem, 4vw, 3rem);
  --text-hero: clamp(2.4rem, 5vw, 3.5rem);

  /* ----------------------------------------------------------
     Spacing Scale (4px base grid)
  ---------------------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 5rem;
  --space-14: 6rem;

  /* ----------------------------------------------------------
     Border Radius Scale
  ---------------------------------------------------------- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 28px;
  --radius-full: 9999px;

  /* ----------------------------------------------------------
     Shadows
  ---------------------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.10);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.35);
  --shadow-2xl: 0 25px 60px rgba(0, 0, 0, 0.45);
  --shadow-blue: 0 10px 25px rgba(59, 130, 246, 0.30);
  --shadow-teal: 0 10px 25px rgba(20, 184, 166, 0.25);

  /* ----------------------------------------------------------
     Transitions
  ---------------------------------------------------------- */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.40s ease;

  /* ----------------------------------------------------------
     Motion — standardised lift distances
     sm:   buttons, links, pills
     card: content/category/why cards
     hero: featured hero, large blocks
  ---------------------------------------------------------- */
  --lift-sm: translateY(-2px);
  --lift-card: translateY(-6px);
  --lift-hero: translateY(-8px);
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--text-base);
  font-weight: var(--font-weight-body);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--gradient-page);
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-heading);
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-rendering: optimizeLegibility;
}

h1 {
  font-size: var(--text-hero);
  font-weight: var(--font-weight-title);
}

h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--blue-400);
}

img {
  max-width: 100%;
  display: block;
}


/* ============================================================
   3. LAYOUT
   ============================================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section {
  display: none;
}

.section.active {
  display: block;
}

#browse-section.active,
#write-section.active,
#upload-section.active,
#manage-section.active,
#content-cms-section.active,
#users-section.active {
  background: var(--section-bg-a);
  padding-bottom: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Spacing utilities */
.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: var(--space-1);
}

.mt-2 {
  margin-top: var(--space-2);
}

.mt-3 {
  margin-top: var(--space-4);
}

.mt-4 {
  margin-top: var(--space-5);
}

.mt-5 {
  margin-top: var(--space-6);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: var(--space-1);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-3 {
  margin-bottom: var(--space-4);
}

.mb-4 {
  margin-bottom: var(--space-5);
}

.mb-5 {
  margin-bottom: var(--space-6);
}

.p-0 {
  padding: 0;
}

.p-1 {
  padding: var(--space-1);
}

.p-2 {
  padding: var(--space-2);
}

.p-3 {
  padding: var(--space-4);
}

.p-4 {
  padding: var(--space-5);
}

.p-5 {
  padding: var(--space-6);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.hidden {
  display: none !important;
}

.muted-text {
  color: var(--text-muted);
}

.muted-link {
  color: var(--text-muted);
  transition: color var(--transition-base);
}

.muted-link:hover {
  color: var(--blue-400);
}


/* ============================================================
   4. BASE CARD SYSTEM
   .category-card, .featured-card, .why-card all extend this.
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  transition:
    transform var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background var(--transition-base);
}

.card:hover {
  transform: var(--lift-card);
  border-color: var(--teal-500);
  box-shadow: var(--shadow-2xl);
  background: var(--bg-card-hover);
}


/* ============================================================
   5. HEADER & NAVIGATION
   ============================================================ */

.main-header {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0;
}

.logo {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-heading);
  color: var(--text-accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-base);
}

.nav-links a:hover {
  color: var(--text-accent);
}

.nav-links li.has-submenu {
  position: relative;
}

.nav-links li.has-submenu>a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links .submenu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: var(--navy-800);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2) 0;
  z-index: 200;
  opacity: 0;
  transform: translateY(6px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--transition-base),
    transform var(--transition-base),
    visibility var(--transition-base);
}

.nav-links .submenu li {
  list-style: none;
}

.nav-links .submenu a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-secondary);
}

.nav-links .submenu a:hover {
  background: rgba(59, 130, 246, 0.10);
  color: var(--blue-400);
}

.nav-links li.has-submenu.open>.submenu {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {

  .nav-links li.has-submenu:hover>.submenu,
  .nav-links li.has-submenu:focus-within>.submenu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: var(--text-xl);
  cursor: pointer;
}


/* ============================================================
   6. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 24px;
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.btn:hover {
  transform: var(--lift-sm);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.35);
  color: #ffffff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.28);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.btn-success {
  background: var(--gradient-success);
}

.btn-success:hover {
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.30);
}


/* ============================================================
   7. HERO
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #ffffff;
  padding: 6rem 0 5rem;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle,
      rgba(20, 184, 166, 0.25) 0%,
      rgba(20, 184, 166, 0.12) 30%,
      rgba(20, 184, 166, 0.05) 55%,
      transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20, 184, 166, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 184, 166, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  margin-bottom: var(--space-4);
}

.hero p {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.80);
  margin-bottom: var(--space-6);
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: var(--text-xs);
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.30);
  border-radius: var(--radius-full);
  color: var(--sky-300);
  margin-bottom: var(--space-5);
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: var(--font-weight-title);
  line-height: 1.15;
  margin-bottom: var(--space-4);
  background: linear-gradient(90deg, #a5f3fc, var(--sky-400), var(--blue-600));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.hero-subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto var(--space-8) auto;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.hero-stats {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat strong {
  display: block;
  font-size: var(--text-xl);
  font-weight: var(--font-weight-heading);
  color: #ffffff;
}

.hero-stat span {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.60);
}


/* ============================================================
   8. ACTION TABS
   ============================================================ */

.action-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.action-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 24px;
  background: var(--bg-accent);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.action-tab:hover,
.action-tab.active {
  background: var(--gradient-primary);
  color: #ffffff;
  transform: var(--lift-sm);
  box-shadow: var(--shadow-blue);
}


/* ============================================================
   9. CONTROLS (search / filters)
   ============================================================ */

.controls-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--space-6) 0;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.search-controls {
  display: flex;
  gap: var(--space-4);
  flex: 1;
  min-width: 300px;
}

.search-bar {
  flex: 1;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.50);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.search-bar:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
}

.filter-select {
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.50);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  min-width: 150px;
  transition: border-color var(--transition-base);
}

.filter-select:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.view-controls {
  display: flex;
  gap: var(--space-2);
}

.view-btn {
  padding: 8px 12px;
  background: var(--bg-accent);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.view-btn:hover,
.view-btn.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--brand-primary);
  color: var(--blue-400);
}


/* ============================================================
   10. BROWSE CONTENT LAYOUT
   ============================================================ */

.main-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-8);
  padding: var(--space-8) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.content-area {
  min-height: 600px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.content-card .content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.content-card .content-actions {
  opacity: 0.65;
  transition: opacity var(--transition-base);
}

.content-card:hover .content-actions {
  opacity: 1;
}

@media (hover: none) and (pointer: coarse) {
  .content-card .content-actions {
    opacity: 1;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.pagination button {
  padding: 8px 16px;
  background: var(--bg-accent);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.pagination button:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--brand-primary);
  color: var(--blue-400);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination button.active {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
}


/* ============================================================
   11. SIDEBAR
   ============================================================ */

.sidebar .widget {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.sidebar .widget h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}


/* ============================================================
   12. WHAT WE DO SECTION
   ============================================================ */

.what-we-do {
  padding: var(--space-14) 0;
  background: var(--section-bg-a);
}

.what-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.what-left {
  max-width: 620px;
  margin-left: var(--space-8);
}

.what-label {
  color: var(--teal-500);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.what-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-title);
  line-height: 1.15;
  margin-bottom: var(--space-5);
  color: #ffffff;
}

.what-description {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 520px;
}

.what-right {
  display: flex;
  justify-content: center;
  margin-top: var(--space-14);
}

.what-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-3xl);
  padding: 4rem 3rem;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-2xl);
  max-width: 520px;
  width: 100%;
}

.what-card::before {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 280px;
  background: radial-gradient(circle,
      rgba(20, 184, 166, 0.35) 0%,
      rgba(20, 184, 166, 0.15) 40%,
      transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

.what-card>* {
  position: relative;
  z-index: 1;
}

.what-card-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-5);
}

.what-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
  color: #ffffff;
}

.what-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.what-tags span {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.what-tags span:hover {
  background: rgba(20, 184, 166, 0.15);
  border-color: var(--teal-500);
  color: #ffffff;
}

@media (max-width: 992px) {
  .what-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .what-left {
    margin: 0 auto;
  }

  .what-right {
    margin-top: var(--space-8);
  }
}


/* ============================================================
   13. CATEGORY GRID SECTION
   ============================================================ */

.category-grid-section {
  padding: var(--space-14) 0;
  background: var(--section-bg-b);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-8);
  gap: var(--space-6);
}

.category-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-title);
  color: #ffffff;
}

.category-view-all {
  color: var(--teal-500);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: color var(--transition-base);
}

.category-view-all:hover {
  color: var(--teal-300);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

/* Extends .card */
.category-card {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  cursor: pointer;
  overflow: hidden;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.25), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.category-card:hover {
  border-color: var(--border-hover);
}

.category-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.category-name {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-heading);
  color: #ffffff;
  margin-bottom: 0.6rem;
}

.category-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}

.category-count {
  color: var(--teal-500);
  font-weight: 600;
  font-size: var(--text-sm);
}

@media (max-width: 1100px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
}


/* ============================================================
   14. FEATURED ARTICLES
   ============================================================ */

/* ============================================================
   15. QUICK SAFETY TIPS STRIP
   ============================================================ */

.quick-tips-section {
  padding: var(--space-12) 0;
  background: var(--section-bg-c);
  overflow: hidden;
}

.quick-tips-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.tips-scroll-wrapper {
  overflow: hidden;
  position: relative;
}

.tips-scroll-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: scrollLeft 35s linear infinite;
}

.tips-scroll-track:hover {
  animation-play-state: paused;
}

@keyframes scrollLeft {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.tip-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.tip-pill:hover {
  border-color: var(--teal-500);
  color: var(--text-primary);
  transform: var(--lift-sm);
}

.tips-scroll-wrapper::before,
.tips-scroll-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.tips-scroll-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--navy-900), transparent);
}

.tips-scroll-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--navy-900), transparent);
}


/* ============================================================
   16. WHY BESECUREWISE
   ============================================================ */

.why-section {
  padding: var(--space-14) 0;
  background: var(--section-bg-c);
}

.why-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.why-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-title);
  margin: 0.7rem 0 var(--space-4);
  color: #ffffff;
}

.why-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

.why-grid {
  margin-top: var(--space-10);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

/* Extends .card */
.why-card {
  padding: 28px 24px;
  text-align: center;
}

.why-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-lg);
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid var(--border-teal);
  font-size: var(--text-lg);
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.15);
}

.why-card h3 {
  font-size: var(--text-md);
  margin-bottom: var(--space-2);
  color: #ffffff;
}

.why-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   17. CTA BANNER
   ============================================================ */

.cta-section {
  padding: var(--space-14) 0;
  background: var(--section-bg-a);
}

.cta-box {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 72px 48px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(circle,
      rgba(20, 184, 166, 0.10) 0%,
      rgba(20, 184, 166, 0.05) 40%,
      transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-weight: var(--font-weight-title);
  font-size: var(--text-3xl);
  line-height: 1.25;
  margin-bottom: var(--space-5);
}

.cta-line-1 {
  display: block;
  color: #e2e8f0;
}

.cta-line-2 {
  display: block;
  background: var(--gradient-cta);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.cta-description {
  max-width: 460px;
  margin: 0 auto var(--space-8) auto;
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
}

.cta-button {
  font-size: var(--text-base);
  padding: 14px 28px;
  box-shadow: var(--shadow-teal);
}


/* ============================================================
   18. FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-10);
  background: var(--navy-950);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: var(--space-8);
}

.footer-logo {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-heading);
  color: var(--text-accent);
  margin-bottom: 14px;
}

.footer-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 320px;
  margin-bottom: 10px;
}

.footer-tagline {
  font-style: italic;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: var(--space-2);
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: inline-block;
  transition:
    color var(--transition-base),
    transform var(--transition-base);
}

.footer-col a:hover {
  color: var(--teal-500);
  transform: translateX(2px);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 18px 0;
  margin-top: var(--space-5);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Simple single-line footer for inner pages */
.main-footer {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--navy-950);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
}

@media (max-width: 480px) {
  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}


/* ============================================================
   19. SCROLL REVEAL ANIMATION
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal>* {
  transition-delay: 0.05s;
}

.reveal>*:nth-child(2) {
  transition-delay: 0.10s;
}

.reveal>*:nth-child(3) {
  transition-delay: 0.15s;
}

.reveal>*:nth-child(4) {
  transition-delay: 0.20s;
}


/* ============================================================
   20. SCROLL CONTROLS (floating)
   ============================================================ */

.scroll-controls {
  position: fixed;
  right: 22px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity var(--transition-base),
    transform var(--transition-base);
}

.scroll-controls.active {
  opacity: 1;
  transform: translateY(0);
}

.scroll-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.90);
  backdrop-filter: blur(6px);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.scroll-btn:hover {
  border-color: var(--teal-500);
  transform: var(--lift-sm);
  box-shadow: var(--shadow-lg);
}

.scroll-btn.hidden {
  display: none;
}


/* ============================================================
   21. LOADING OVERLAY
   ============================================================ */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.80);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-subtle);
  border-top-color: var(--brand-primary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
  margin-bottom: var(--space-4);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}


/* ============================================================
   22. CMS TABLE
   ============================================================ */

.cms-grid {
  display: grid;
  gap: var(--space-4);
}

.cms-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 0.75rem;
  align-items: center;
}


/* ============================================================
   23. PROSE / ARTICLE TYPOGRAPHY
   ============================================================ */

.prose {
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.75;
  font-size: var(--text-md);
  color: var(--text-secondary);
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  margin-top: var(--space-6);
  margin-bottom: 0.75rem;
  line-height: 1.25;
  color: var(--text-primary);
}

.prose h1 {
  font-size: var(--text-2xl);
}

.prose h2 {
  font-size: 1.6rem;
}

.prose h3 {
  font-size: var(--text-lg);
}

.prose h4 {
  font-size: var(--text-md);
}

.prose p {
  margin-bottom: 1.1rem;
}

.prose strong {
  color: var(--text-primary);
}

.prose ul,
.prose ol {
  margin: var(--space-4) 0 var(--space-5) var(--space-5);
  padding-left: var(--space-2);
}

.prose li {
  margin-bottom: var(--space-1);
}

.prose blockquote {
  border-left: 3px solid var(--brand-primary);
  padding-left: var(--space-4);
  margin: var(--space-5) 0;
  color: var(--text-muted);
  font-style: italic;
}

.prose code {
  background: rgba(148, 163, 184, 0.15);
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.95em;
}

.prose pre {
  background: var(--navy-950);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-5) 0;
}

.prose hr {
  margin: var(--space-6) 0;
  border: none;
  border-top: 1px solid var(--border-subtle);
}


/* ============================================================
   24. AUTH / RESET PASSWORD PAGE
   ============================================================ */

.auth-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-8) var(--space-4);
  background: var(--gradient-page);
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-accent);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  backdrop-filter: blur(10px);
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-accent);
  font-weight: var(--font-weight-heading);
  letter-spacing: 0.2px;
  margin-bottom: var(--space-5);
}

.brand .lock {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.auth-title {
  margin-bottom: 0.25rem;
}

.auth-sub {
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.form {
  display: grid;
  gap: var(--space-4);
}

.form-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.input-wrap {
  position: relative;
}

.input {
  width: 100%;
  padding: 12px 44px 12px 12px;
  background: rgba(15, 23, 42, 0.60);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--text-base);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.input-addon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.input-addon:hover {
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.12);
}

.requirements {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: -2px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.requirements .req {
  background: rgba(148, 163, 184, 0.12);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.strength {
  height: 8px;
  background: rgba(148, 163, 184, 0.20);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: var(--space-2);
}

.strength>span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gradient-accent);
  transition: width var(--transition-base);
}

.msg {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
}

.msg.ok {
  border-left: 4px solid var(--brand-success);
  color: var(--text-primary);
}

.msg.error {
  border-left: 4px solid var(--brand-danger);
  color: #fecaca;
}

.actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: flex-end;
  margin-top: var(--space-5);
}

.link-muted {
  color: var(--text-muted);
}

.link-muted:hover {
  color: var(--blue-400);
}

@media (max-width: 420px) {
  .actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}


/* ============================================================
   25. HEADING CONTRAST  (global display heading legibility)
   Note: gradient text elements opt out of text-shadow below
   ============================================================ */

h1,
h2,
.category-title,
.featured-title,
.why-title,
.cta-title,
.what-title {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Gradient clip text can't use text-shadow */
.hero-title,
.cta-line-2 {
  text-shadow: none;
}

/* ============================================================
   FLOATING TIP BUTTON — redesign
   Replaces the original .floating-tip-btn block
   ============================================================ */

@keyframes tip-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes tip-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  70% {
    transform: scale(1.55);
    opacity: 0;
  }

  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@keyframes tip-shimmer {
  0% {
    left: -75%;
  }

  100% {
    left: 125%;
  }
}

.floating-tip-btn {
  position: fixed;
  right: 24px;
  bottom: 128px;
  z-index: 1200;

  /* Layout */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;

  /* Shape */
  border: none;
  border-radius: 50px;

  /* Colours — teal brand gradient */
  background: linear-gradient(135deg, #00BFA5 0%, #00897B 60%, #0097A7 100%);
  color: #ffffff;

  /* Typography */
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;

  /* Depth */
  box-shadow:
    0 4px 16px rgba(0, 191, 165, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.25);

  cursor: pointer;
  overflow: hidden;

  /* Gentle float loop */
  animation: tip-float 3.5s ease-in-out infinite;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    gap 0.2s ease;
}

/* Shimmer sweep — slides across on hover */
.floating-tip-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent 0%,
      rgba(255, 255, 255, 0.28) 50%,
      transparent 100%);
  transform: skewX(-20deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.floating-tip-btn:hover::before {
  opacity: 1;
  animation: tip-shimmer 0.55s ease forwards;
}

/* Pulse ring — ambient glow that breathes */
.floating-tip-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  border: 2px solid rgba(0, 191, 165, 0.65);
  animation: tip-pulse 2.4s ease-out infinite;
  pointer-events: none;
}

.floating-tip-btn:hover {
  animation: none;
  /* pause float on hover */
  transform: translateY(-3px) scale(1.04);
  gap: 0.65rem;
  /* emoji and text breathe apart slightly */
  box-shadow:
    0 8px 28px rgba(0, 191, 165, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.30);
}

.floating-tip-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow:
    0 3px 10px rgba(0, 191, 165, 0.35),
    0 1px 4px rgba(0, 0, 0, 0.25);
}

.content-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  margin-bottom: .75rem;
  position: relative;
}

.content-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.content-image-icon {
  font-size: 40px;
  opacity: .9;
}

/* =========================================
   CSP SAFE DYNAMIC COLORS
========================================= */

.bg-dynamic {
  background: var(--bg-color);
}

/* =========================================
   CSP SAFE BACKGROUND SYSTEM
========================================= */

.featured-bg {
  background-image:
    linear-gradient(to bottom, transparent 20%, rgba(0, 0, 0, 0.82) 80%),
    var(--bg-image);

  background-size: cover;
  background-position: center;
}

.featured-bg-color {
  background:
    linear-gradient(to bottom, transparent 20%, rgba(0, 0, 0, 0.75) 75%),
    var(--bg-color);
}