/* WorkHive — Modern, clean design */
:root {
  --primary: #1D9E75;
  --primary-dark: #0F6E56;
  --primary-50: #E1F5EE;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --border: #e5e7eb;
  --danger: #dc2626;
  --warning: #f59e0b;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--primary); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: white;
  position: sticky; top: 0; z-index: 50;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 32px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; }
.logo-mark {
  width: 28px; height: 28px; background: var(--primary); color: white;
  border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.main-nav { display: flex; gap: 24px; flex: 1; }
.main-nav a { color: var(--text-muted); font-weight: 500; font-size: 14px; }
.main-nav a:hover { color: var(--text); }
.nav-auth { display: flex; align-items: center; gap: 14px; }
.nav-auth a { font-size: 14px; font-weight: 500; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 14px; border: none; cursor: pointer;
  transition: all 0.15s; text-align: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-outline { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Hero */
.hero { background: var(--primary-50); padding: 64px 0; text-align: center; }
.hero h1 { font-size: 40px; font-weight: 700; color: var(--primary-dark); margin-bottom: 12px; letter-spacing: -0.02em; }
.hero p { color: var(--primary-dark); font-size: 17px; margin-bottom: 32px; }

/* Search bar */
.search-bar {
  background: white; border-radius: 12px; padding: 8px;
  display: flex; gap: 8px; max-width: 720px; margin: 0 auto;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.search-bar input {
  flex: 1; border: none; padding: 12px 16px; font-size: 15px; outline: none;
  background: transparent; min-width: 0;
}
.search-bar .divider { width: 1px; background: var(--border); margin: 8px 0; }
.search-bar button { padding: 12px 24px; }

/* Sections */
section { padding: 48px 0; }
section h2 { font-size: 24px; font-weight: 600; margin-bottom: 24px; letter-spacing: -0.01em; }

/* Job cards */
.job-grid { display: grid; gap: 12px; }
.job-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; background: white; display: flex; gap: 16px;
  transition: all 0.15s;
}
.job-card:hover { border-color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.job-logo {
  width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); font-weight: 600; color: var(--text);
}
.job-info { flex: 1; min-width: 0; }
.job-title { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.job-title a { color: var(--text); }
.job-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 10px; }
.job-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  background: var(--bg-soft); color: var(--text-muted);
  padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
}
.tag-new { background: var(--primary-50); color: var(--primary-dark); }
.tag-urgent { background: #FEF3C7; color: #92400E; }

/* Filters */
.layout-2col { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
@media (max-width: 768px) { .layout-2col { grid-template-columns: 1fr; } }
.filter-panel { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.filter-panel h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; cursor: pointer; }

/* Forms */
.form-card { max-width: 460px; margin: 48px auto; background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form-card h1 { font-size: 24px; margin-bottom: 8px; }
.form-card .subtitle { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 16px 0; font-size: 14px; }
.alert-success { background: var(--primary-50); color: var(--primary-dark); }
.alert-error { background: #FEE2E2; color: var(--danger); }

/* Job detail */
.job-detail { display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding: 32px 0; }
@media (max-width: 900px) { .job-detail { grid-template-columns: 1fr; } }
.job-detail-main h1 { font-size: 28px; margin-bottom: 8px; }
.job-detail-company { color: var(--text-muted); margin-bottom: 16px; }
.job-detail-section { margin: 24px 0; }
.job-detail-section h3 { font-size: 16px; margin-bottom: 8px; }
.job-detail-sidebar { position: sticky; top: 88px; align-self: start; background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.sidebar-meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; font-size: 14px; }
.sidebar-meta div { display: flex; justify-content: space-between; }
.sidebar-meta .label { color: var(--text-muted); }

/* Dashboard */
.dashboard { padding: 32px 0; }
.dashboard h1 { margin-bottom: 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .label { color: var(--text-muted); font-size: 13px; margin-bottom: 6px; }
.stat-card .value { font-size: 28px; font-weight: 600; }
.table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { background: var(--bg-soft); font-weight: 600; font-size: 13px; color: var(--text-muted); }
.table tr:last-child td { border-bottom: none; }

/* Status pills */
.status { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; display: inline-block; }
.status-submitted { background: var(--bg-soft); color: var(--text-muted); }
.status-reviewing { background: #DBEAFE; color: #1E40AF; }
.status-shortlisted { background: var(--primary-50); color: var(--primary-dark); }
.status-interview { background: #FEF3C7; color: #92400E; }
.status-offered { background: var(--primary-50); color: var(--primary-dark); }
.status-rejected { background: #FEE2E2; color: var(--danger); }

/* Footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 48px 0 24px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.footer-grid a { display: block; padding: 4px 0; font-size: 14px; color: var(--text-muted); }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; }
.muted { color: var(--text-muted); }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 32px 0; }
.pagination a, .pagination span {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px;
}
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }

/* Star rating */
.stars { color: var(--warning); letter-spacing: 2px; }

/* =============================================================
   MOBILE MENU TOGGLE BUTTON (hidden on desktop, shown on mobile)
   ============================================================= */
.mobile-menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; margin: 0;
  color: var(--text);
  font-size: 22px;
}
.mobile-menu-toggle:focus { outline: 2px solid var(--primary); border-radius: 4px; }

/* =============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================= */

/* Tablet and below */
@media (max-width: 900px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; }
  section { padding: 32px 0; }
  section h2 { font-size: 20px; }
}

/* Mobile - 768px and below */
@media (max-width: 768px) {
  body { font-size: 14px; }

  /* Header — clean mobile layout: Logo | spacer | Sign in | Join | ☰ */
  .nav { gap: 8px; height: 56px; flex-wrap: nowrap; }
  .logo { font-size: 15px; gap: 6px; }
  .logo-mark { width: 26px; height: 26px; font-size: 13px; }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center; justify-content: center;
    margin-left: auto;             /* push hard to the right */
    order: 99;                     /* always render last */
    padding: 6px;
    color: var(--text);
  }

  /* Hide desktop-only items on mobile */
  .desktop-only { display: none !important; }

  /* Main nav becomes drop-down drawer */
  .main-nav {
    display: none;
    position: absolute; top: 56px; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: 8px 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    z-index: 100;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a {
    padding: 14px 20px; font-size: 15px;
    border-bottom: 1px solid var(--bg-soft);
    color: var(--text);
  }
  .main-nav a:last-child { border-bottom: none; }

  /* Mobile-only auth section inside the drawer */
  .mobile-only-auth {
    display: block;
    border-top: 2px solid var(--bg-soft);
    margin-top: 4px;
  }
  .mobile-only-auth a {
    display: block; padding: 14px 20px; font-size: 15px;
    color: var(--text);
    border-bottom: 1px solid var(--bg-soft);
  }
  .mobile-only-auth a:last-child { border-bottom: none; }

  /* Auth area — keep Sign in + Join visible, but compact */
  .nav-auth {
    display: flex; align-items: center; gap: 8px;
    margin-left: auto;             /* push to right of logo */
  }
  .nav-auth a.auth-link {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
    padding: 6px 4px;
    white-space: nowrap;
  }
  .nav-auth .btn { padding: 8px 14px; font-size: 13px; white-space: nowrap; }

  /* When hamburger is present, give nav-auth less right margin */
  .nav .mobile-menu-toggle ~ * { margin-right: 0; }
}

/* Desktop — make sure mobile-only items stay hidden */
@media (min-width: 769px) {
  .mobile-only-auth { display: none !important; }
}

/* Mobile - 768px and below (layout) */
@media (max-width: 768px) {
  /* Hero — stack search vertically */
  .hero { padding: 32px 0; }
  .hero h1 { font-size: 26px; line-height: 1.2; }
  .hero p { font-size: 14px; margin-bottom: 20px; }

  .search-bar {
    flex-direction: column; padding: 12px; gap: 8px;
    max-width: 100%;
  }
  .search-bar input { width: 100%; padding: 10px 12px; }
  .search-bar .divider { display: none; }
  .search-bar button { width: 100%; padding: 12px; }

  /* Section headings */
  section { padding: 28px 0; }
  section h2 { font-size: 18px; }

  /* Job cards */
  .job-card { padding: 14px; gap: 12px; }
  .job-logo { width: 40px; height: 40px; font-size: 13px; }
  .job-title { font-size: 14px; }
  .job-meta { font-size: 12px; }
  .tag { font-size: 11px; padding: 2px 8px; }

  /* Two-column layouts stack */
  .layout-2col { grid-template-columns: 1fr !important; }
  .filter-panel { padding: 16px; }

  /* Forms */
  .form-card { padding: 24px 20px; margin: 24px auto; }
  .form-card h1 { font-size: 20px; }
  .form-row { grid-template-columns: 1fr !important; gap: 0; }

  /* Tables - allow horizontal scroll */
  .table-wrap, .admin-table { overflow-x: auto; }
  .table, .admin-table table { font-size: 13px; min-width: 480px; }
  .table th, .table td { padding: 10px 12px; }

  /* Stats grid */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .value { font-size: 22px; }

  /* Job detail */
  .job-detail { grid-template-columns: 1fr; gap: 20px; padding: 20px 0; }
  .job-detail-main h1 { font-size: 22px; }
  .job-detail-sidebar { position: static; }

  /* Pagination */
  .pagination a, .pagination span { padding: 6px 10px; font-size: 13px; }

  /* Dashboard */
  .dashboard h1 { font-size: 22px; }

  /* CMS pages — better line length */
  .cms-page h1 { font-size: 22px !important; }
  .page-content { font-size: 14px; }

  /* Site footer */
  .site-footer { padding: 32px 0 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
  .footer-grid h4 { font-size: 11px; }
}

/* Extra small phones */
@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .filter-panel { padding: 12px; }
}

/* Prevent horizontal overflow on any device */
html, body { overflow-x: hidden; max-width: 100vw; }
img, video, iframe { max-width: 100%; height: auto; }

/* =============================================================
   HOMEPAGE ANIMATIONS
   ============================================================= */

/* Animated hero */
.hero-animated {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #E1F5EE 0%, #FFFFFF 100%);
  padding: 56px 0 64px;
}

.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-bg-shapes .shape {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(29,158,117,0.18) 0%, transparent 70%);
}
.shape-1 { top: -80px; right: -40px; width: 320px; height: 320px; animation: float-1 14s ease-in-out infinite; }
.shape-2 { bottom: -60px; left: 10%; width: 220px; height: 220px; animation: float-2 18s ease-in-out infinite; }
.shape-3 { top: 30%; left: 30%; width: 160px; height: 160px; animation: float-3 12s ease-in-out infinite; opacity: 0.6; }

@keyframes float-1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-30px, 20px) scale(1.05); }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px, -25px) scale(1.08); }
}
@keyframes float-3 {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(20px, 30px); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-left { animation: fadeInUp 0.6s ease 0.1s both; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: white;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #DC2626;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.pulse-dot::before {
  content: '';
  position: absolute; inset: 0;
  background: #DC2626;
  border-radius: 50%;
  animation: pulse-ring 1.6s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(2.8); opacity: 0; }
}

.hero-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 520px;
}

.hero-search { max-width: 100%; box-shadow: 0 4px 20px rgba(15,110,86,0.12); }

.trending-row {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center;
  font-size: 13px;
}
.trending-label { color: var(--text-muted); margin-right: 4px; }
.trending-row a {
  color: var(--primary);
  background: white;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.trending-row a:hover { background: var(--primary); color: white; transform: translateY(-1px); }

/* Floating job cards on the right */
.hero-right {
  position: relative;
  min-height: 380px;
}

.float-card {
  position: absolute;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; gap: 12px; align-items: center;
  box-shadow: 0 8px 24px rgba(10,31,26,0.08);
  width: 320px;
  max-width: 100%;
}

.float-card-1 {
  top: 0; right: 20px;
  animation: card-float-1 6s ease-in-out infinite, fadeInRight 0.6s ease 0.3s both;
}
.float-card-2 {
  top: 130px; right: 80px;
  animation: card-float-2 7s ease-in-out infinite, fadeInRight 0.6s ease 0.5s both;
  z-index: 2;
}
.float-card-3 {
  top: 260px; right: 30px;
  animation: card-float-3 8s ease-in-out infinite, fadeInRight 0.6s ease 0.7s both;
}

@keyframes card-float-1 {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes card-float-2 {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}
@keyframes card-float-3 {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.fc-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  color: white; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.fc-title { font-weight: 600; font-size: 14px; color: var(--text); }
.fc-meta  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* =============================================================
   LIVE ACTIVITY TICKER
   ============================================================= */
.activity-ticker {
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.activity-ticker.is-visible { opacity: 1; transform: translateY(0); }

.ticker-container {
  display: flex;
  gap: 20px;
  align-items: center;
}
.ticker-label {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-right: 16px;
  border-right: 1px solid var(--border);
}
.ticker-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}
.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =============================================================
   ANIMATED STATS STRIP
   ============================================================= */
.stats-strip {
  padding: 48px 0;
  background: var(--bg-soft);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stats-strip.is-visible { opacity: 1; transform: translateY(0); }

.stats-grid-animated {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-animated {
  background: white;
  padding: 28px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-animated:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15,110,86,0.08);
}
.stat-num {
  font-size: 40px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label { font-size: 13px; color: var(--text-muted); }

/* =============================================================
   HOW IT WORKS
   ============================================================= */
.how-it-works {
  padding: 64px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.how-it-works.is-visible { opacity: 1; transform: translateY(0); }

.hiw-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
}
.hiw-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hiw-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(15,110,86,0.12);
}
.hiw-step {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: white;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.hiw-icon { font-size: 36px; margin-bottom: 10px; }
.hiw-card h3 { margin: 8px 0; font-size: 18px; }
.hiw-card p { color: var(--text-muted); font-size: 14px; margin: 0; }

.hiw-arrow {
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--primary);
  font-weight: 300;
}

/* =============================================================
   RESPONSIVE — homepage animations
   ============================================================= */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-right { display: none; }       /* hide float-cards on tablets+phones */
  .hero-title { font-size: 34px; }
  .hero-animated { padding: 36px 0 44px; }
  .stats-grid-animated { grid-template-columns: 1fr 1fr; }
  .hiw-grid { grid-template-columns: 1fr; }
  .hiw-arrow { transform: rotate(90deg); padding: 4px 0; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 14px; }
  .hero-eyebrow { font-size: 12px; padding: 5px 12px; }
  .stat-num { font-size: 30px; }
  .ticker-label { font-size: 11px; padding-right: 10px; }
  .ticker-item { font-size: 13px; }
  .ticker-track { gap: 30px; animation-duration: 45s; }
  .hiw-card { padding: 22px 16px; }
  .hiw-icon { font-size: 30px; }
  .trending-row { gap: 6px; }
  .trending-row a { padding: 3px 10px; font-size: 12px; }
}

@media (max-width: 420px) {
  .stats-grid-animated { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-animated { padding: 20px 10px; }
  .stat-num { font-size: 26px; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .shape, .float-card, .pulse-dot::before, .ticker-track,
  .hero-left, .hero-right, .stats-strip, .activity-ticker, .how-it-works {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =============================================================
   AUTH PAGES (login + register) — two-column layout
   ============================================================= */
.auth-page {
  min-height: calc(100vh - 64px);
  background: linear-gradient(135deg, var(--bg-soft) 0%, white 100%);
  display: flex;
  align-items: stretch;
  padding: 24px 0;
}
.auth-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  padding: 0 24px;
  width: 100%;
}

/* Left teal panel with brand + value props */
.auth-left {
  background: linear-gradient(135deg, var(--primary-dark, #0F6E56), var(--primary, #1D9E75));
  color: white;
  padding: 48px 40px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-left::after {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.auth-left::before {
  content: ''; position: absolute; bottom: -60px; left: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 40px; position: relative; z-index: 1;
}
.auth-brand .logo-mark {
  background: white !important;
  color: var(--primary) !important;
  font-weight: 800;
}
.auth-brand-name { font-size: 22px; font-weight: 700; }
.auth-tagline {
  font-size: 32px; font-weight: 800; line-height: 1.15;
  margin: 0 0 16px; position: relative; z-index: 1;
}
.auth-sub {
  font-size: 15px; opacity: 0.92; line-height: 1.55;
  margin-bottom: 28px; position: relative; z-index: 1;
}
.auth-perks {
  list-style: none; padding: 0; margin: 0;
  position: relative; z-index: 1;
}
.auth-perks li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 6px 0; font-size: 14px; opacity: 0.95;
}
.auth-check {
  width: 22px; height: 22px; flex-shrink: 0;
  background: rgba(255,255,255,0.2); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* Right form card */
.auth-right { display: flex; align-items: center; }
.auth-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 10px 40px rgba(15,110,86,0.06);
  width: 100%;
}
.auth-card h1 {
  font-size: 26px; font-weight: 800;
  margin: 0 0 6px; color: var(--text);
}
.auth-card .subtitle {
  color: var(--text-muted); font-size: 14px;
  margin: 0 0 24px;
}

/* Role toggle (register page) */
.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.role-option {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background: white;
}
.role-option:hover { border-color: var(--primary); }
.role-option input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.role-option.is-active {
  border-color: var(--primary);
  background: var(--bg-soft);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.1);
}
.role-icon { font-size: 24px; margin-bottom: 4px; }
.role-label { font-weight: 700; font-size: 14px; color: var(--text); }
.role-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Divider with "or" */
.auth-divider {
  display: flex; align-items: center;
  margin: 22px 0 18px;
  color: var(--text-muted); font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-divider span { padding: 0 12px; }

.auth-switch {
  text-align: center; font-size: 14px; margin: 0;
  color: var(--text-muted);
}
.auth-switch a { color: var(--primary); text-decoration: none; }

.btn-lg { padding: 14px 24px; font-size: 15px; font-weight: 600; }
.btn-block { display: block; width: 100%; }

/* Mobile responsive auth */
@media (max-width: 900px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 480px;
    gap: 20px;
  }
  .auth-left { padding: 32px 28px; border-radius: 14px; }
  .auth-tagline { font-size: 24px; }
  .auth-perks li { font-size: 13px; }
  .auth-card { padding: 28px 24px; border-radius: 14px; }
}
@media (max-width: 600px) {
  .auth-left { display: none; }   /* hide teal panel on small phones — saves vertical space */
  .auth-page { padding: 16px 0; align-items: flex-start; }
  .auth-container { padding: 0 16px; }
  .auth-card { padding: 24px 20px; }
  .auth-card h1 { font-size: 22px; }
  .role-toggle { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr !important; }
}

/* =============================================================
   CMS PAGES (Privacy, Terms, About, etc.) — hero + body
   ============================================================= */
.cms-hero {
  background: linear-gradient(135deg, #E1F5EE 0%, #FFFFFF 100%);
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
}
.cms-hero::before {
  content: ''; position: absolute; top: -100px; right: -50px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(29,158,117,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.cms-hero-inner { position: relative; text-align: center; }
.cms-hero-icon  { font-size: 56px; margin-bottom: 12px; line-height: 1; }
.cms-hero-title { font-size: 40px; font-weight: 800; color: var(--text); margin: 0 0 8px; line-height: 1.1; }
.cms-hero-sub   { font-size: 14px; color: var(--text-muted); }

.cms-page-wrap { padding: 48px 20px; max-width: 820px; }
.cms-page {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 4px 20px rgba(15,110,86,0.04);
  opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s;
}
.cms-page.is-visible { opacity: 1; transform: translateY(0); }

/* Style the actual content properly */
.page-content { font-size: 16px; line-height: 1.7; color: var(--text); }
.page-content h1, .page-content h2, .page-content h3 {
  color: var(--text); font-weight: 700; line-height: 1.3;
  margin-top: 32px; margin-bottom: 12px;
}
.page-content h1 { font-size: 28px; }
.page-content h2 { font-size: 22px; border-bottom: 2px solid var(--bg-soft); padding-bottom: 8px; }
.page-content h3 { font-size: 18px; color: var(--primary); }
.page-content p  { margin-bottom: 16px; }
.page-content ul, .page-content ol { padding-left: 24px; margin-bottom: 16px; }
.page-content li { margin-bottom: 6px; }
.page-content a  { color: var(--primary); }
.page-content strong { color: var(--text); font-weight: 600; }
.page-content code { background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; font-size: 90%; }
.page-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 8px 0 8px 20px; margin: 16px 0;
  color: var(--text-muted); font-style: italic;
  background: var(--bg-soft);
}

.cms-page-footer {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.cms-page-footer .btn { margin: 4px; }

@media (max-width: 768px) {
  .cms-hero { padding: 40px 0 28px; }
  .cms-hero-icon { font-size: 44px; }
  .cms-hero-title { font-size: 28px; }
  .cms-page { padding: 28px 20px; }
  .cms-page-wrap { padding: 24px 16px; }
  .page-content { font-size: 15px; }
  .page-content h1 { font-size: 22px; }
  .page-content h2 { font-size: 19px; }
}

/* =============================================================
   PRICING PAGE
   ============================================================= */
.pricing-hero {
  background: linear-gradient(135deg, #0A1F1A 0%, #0F6E56 100%);
  padding: 72px 0 56px;
  color: white;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.pricing-hero::before {
  content: ''; position: absolute; top: -100px; right: -50px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(29,158,117,0.4) 0%, transparent 70%);
}
.pricing-hero::after {
  content: ''; position: absolute; bottom: -100px; left: -50px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.2) 0%, transparent 70%);
}
.pricing-hero-inner { position: relative; }
.pricing-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  margin-bottom: 20px;
}
.pricing-hero h1 { font-size: 48px; font-weight: 800; margin: 0 0 12px; line-height: 1.1; }
.pricing-sub { font-size: 18px; color: #9FE1CB; margin: 0 0 24px; }
.pricing-trial-badge {
  display: inline-block;
  background: #F59E0B; color: #0A1F1A;
  padding: 10px 20px; border-radius: 24px;
  font-weight: 700; font-size: 14px;
}

.pricing-plans { padding: 56px 0; background: var(--bg-soft); }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.plan-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  position: relative;
  display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0; transform: translateY(20px);
}
.plan-card.is-visible { opacity: 1; transform: translateY(0); transition: opacity 0.6s, transform 0.6s; }
.plan-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(15,110,86,0.12); }
.plan-featured {
  border: 2px solid var(--primary);
  box-shadow: 0 8px 24px rgba(15,110,86,0.12);
  transform: scale(1.03);
}
.plan-featured.is-visible { transform: scale(1.03); }
.plan-featured:hover { transform: translateY(-6px) scale(1.03); }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: white;
  padding: 4px 14px; border-radius: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
}
.plan-name { font-size: 14px; font-weight: 700; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }
.plan-price { margin: 12px 0; }
.plan-price-num { font-size: 44px; font-weight: 900; color: var(--text); }
.plan-price-period { display: block; font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.plan-tagline { color: var(--text-muted); font-size: 14px; margin: 0 0 24px; min-height: 40px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan-features li { padding: 8px 0; border-bottom: 1px solid var(--bg-soft); font-size: 14px; }
.plan-features li:last-child { border-bottom: none; }
.plan-check { color: var(--primary); font-weight: 700; margin-right: 6px; }
.pricing-note {
  text-align: center; margin-top: 32px;
  font-size: 13px; color: var(--text-muted);
}

/* Trust strip */
.pricing-trust { padding: 64px 0; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-icon {
  font-size: 28px; flex-shrink: 0;
  width: 48px; height: 48px;
  background: var(--bg-soft);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.trust-item strong { display: block; margin-bottom: 4px; }
.trust-item p { margin: 0; font-size: 13px; }
.pricing-trust.reveal-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.pricing-trust.is-visible { opacity: 1; transform: translateY(0); }

/* FAQ */
.pricing-faq { padding: 64px 0; background: var(--bg-soft); opacity: 0; transition: opacity 0.6s; }
.pricing-faq.is-visible { opacity: 1; }
.faq-title { text-align: center; font-size: 28px; margin: 0 0 32px; }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 10px;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 15px;
  list-style: none; position: relative; padding-right: 24px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 0; top: 0;
  font-size: 22px; color: var(--primary); transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding-top: 12px; color: var(--text-muted); line-height: 1.6; }

/* Final CTA */
.pricing-cta { padding: 64px 0; opacity: 0; transition: opacity 0.6s; }
.pricing-cta.is-visible { opacity: 1; }
.cta-card {
  background: linear-gradient(135deg, #0F6E56 0%, #1D9E75 100%);
  color: white; text-align: center;
  border-radius: 20px; padding: 56px 32px;
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.cta-card h2 { font-size: 32px; margin: 0 0 8px; position: relative; }
.cta-card > p { font-size: 16px; color: #9FE1CB; margin: 0 0 24px; position: relative; }
.cta-card .btn { position: relative; }
.cta-card .muted { color: rgba(255,255,255,0.7) !important; position: relative; }
.cta-card .muted a { color: white; text-decoration: underline; }

/* Pricing — mobile */
@media (max-width: 900px) {
  .plans-grid { grid-template-columns: 1fr; max-width: 420px; }
  .plan-featured { transform: none; }
  .plan-featured.is-visible { transform: none; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .pricing-hero h1 { font-size: 34px; }
  .pricing-sub { font-size: 15px; }
}
@media (max-width: 600px) {
  .trust-grid { grid-template-columns: 1fr; }
  .pricing-hero { padding: 48px 0 36px; }
  .pricing-hero h1 { font-size: 28px; }
  .cta-card { padding: 36px 20px; }
  .cta-card h2 { font-size: 22px; }
}

/* =============================================================
   ACTIVE TAB / AUTH STATES  (added 2026-05)
   Highlight whichever menu item / auth link matches the current page,
   plus a brisk tap feedback on touch devices.
   ============================================================= */

/* Desktop main nav active state */
.main-nav a.is-active {
  color: var(--primary);
  font-weight: 600;
}

/* Desktop Sign in / Dashboard active link */
.nav-auth a.auth-link.is-active {
  color: var(--primary);
}

/* Active "Join" button — slightly darker shade so it reads as selected */
.nav-auth .btn-primary.is-active {
  background: var(--primary-dark);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.4);
}

/* Tap feedback on all nav links / buttons (touch devices) */
.main-nav a:active,
.nav-auth a.auth-link:active,
.mobile-only-auth a:active {
  background: var(--primary-50);
  color: var(--primary-dark);
}
.nav-auth .btn:active,
.btn:active {
  transform: scale(0.97);
  filter: brightness(0.95);
}

@media (max-width: 768px) {
  /* In the drawer, the active item gets a green pill instead */
  .main-nav a.is-active,
  .mobile-only-auth a.is-active {
    color: var(--primary-dark);
    background: var(--primary-50);
    font-weight: 600;
    border-left: 4px solid var(--primary);
    padding-left: 16px;
  }

  /* Mobile Sign in — turns green when on /login.php */
  .nav-auth a.auth-link.is-active {
    color: var(--primary);
    background: var(--primary-50);
    border-radius: 999px;
    padding: 6px 12px;
  }
}

/* =============================================================
   OFFLINE OVERLAY
   Full-screen block when navigator.onLine is false. JS in header
   toggles the [hidden] attribute on/off as connection state changes.
   ============================================================= */
.net-offline {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: rb-rise .25s ease-out;
}
.net-offline[hidden] { display: none; }
.net-offline-card {
  background: #fff;
  border-radius: 18px;
  padding: 36px 28px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.net-offline-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: #FEE2E2;
  color: #DC2626;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.net-offline-card h3 {
  font-size: 20px; font-weight: 600;
  margin-bottom: 8px; color: var(--text);
}
.net-offline-card p {
  font-size: 14px; color: var(--text-muted);
  margin-bottom: 18px; line-height: 1.5;
}
.net-offline-card .btn { width: 100%; padding: 12px; }
