/* ============================================================
   applyforbenefitsonline.com – Main Stylesheet
   Theme: Calm, clean, professional
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --clr-primary:      #2E86AB;   /* calm ocean blue */
  --clr-primary-dk:   #1A6485;
  --clr-primary-lt:   #D6EAF8;
  --clr-accent:       #3DAA77;   /* soft green – CTAs */
  --clr-accent-dk:    #2E8A60;
  --clr-bg:           #F4F8FB;   /* very light blue-grey page bg */
  --clr-surface:      #FFFFFF;
  --clr-sidebar-bg:   #EBF4FA;
  --clr-border:       #D5E8F3;
  --clr-text:         #2D3748;
  --clr-text-muted:   #718096;
  --clr-text-light:   #A0AEC0;
  --clr-tag-bg:       #E8F4FD;
  --clr-tag-text:     #2E86AB;
  --radius-sm:        6px;
  --radius-md:        10px;
  --radius-lg:        16px;
  --shadow-sm:        0 1px 4px rgba(46,134,171,.08);
  --shadow-md:        0 4px 16px rgba(46,134,171,.12);
  --shadow-lg:        0 8px 32px rgba(46,134,171,.16);
  --font:             'Inter', system-ui, sans-serif;
  --transition:       0.2s ease;
  --sidebar-w:        300px;
  --content-max:      1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--clr-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--clr-primary-dk); }

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

ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; color: var(--clr-text); }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p  { color: var(--clr-text-muted); }

/* ── Layout Wrapper ── */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ── Header ── */
.site-header {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-primary);
}

.site-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: var(--clr-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.site-logo span { color: var(--clr-text); }
.site-logo span em { color: var(--clr-primary); font-style: normal; }

/* ── Main Nav ── */
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: background var(--transition), color var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--clr-primary-lt);
  color: var(--clr-primary);
}

.nav-cta {
  background: var(--clr-accent) !important;
  color: white !important;
  padding: 7px 18px !important;
}

.nav-cta:hover {
  background: var(--clr-accent-dk) !important;
  color: white !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--clr-text);
  font-size: 1.5rem;
}

/* ── Page Layout: Content + Sidebar ── */
.page-body {
  flex: 1;
}

.page-layout {
  display: flex;
  gap: 28px;
  padding: 32px 0 48px;
  align-items: flex-start;
}

.page-main {
  flex: 1;
  min-width: 0;
}

/* ── Sidebar ── */
.page-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ad-slot {
  background: var(--clr-sidebar-bg);
  border: 1px dashed var(--clr-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--clr-text-light);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ad-slot-medium {
  width: 300px;
  height: 250px;
}

.ad-slot-large {
  width: 300px;
  height: 600px;
}

.ad-slot .ad-label {
  font-size: 0.72rem;
  margin-top: 8px;
  opacity: 0.7;
}

/* Sticky sidebar */
.sidebar-sticky {
  position: sticky;
  top: 88px;
}

/* ── Hero Section ── */
.hero {
  background: linear-gradient(135deg, #2E86AB 0%, #1A6485 40%, #145374 100%);
  color: white;
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: var(--font);
}

.btn-primary {
  background: var(--clr-accent);
  color: white;
}
.btn-primary:hover {
  background: var(--clr-accent-dk);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(61,170,119,.35);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  color: white;
  border-color: white;
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border: 1.5px solid var(--clr-primary);
}
.btn-outline:hover {
  background: var(--clr-primary-lt);
}

.btn-apply {
  background: var(--clr-accent);
  color: white;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.btn-apply:hover {
  background: var(--clr-accent-dk);
  color: white;
  transform: translateY(-1px);
}

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.section-header h2 {
  font-size: 1.5rem;
}

.section-header a {
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Category Cards Grid ── */
.categories-section {
  padding: 48px 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.category-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--clr-text);
}

.category-card:hover {
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--clr-text);
}

.category-card .cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--clr-primary-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.category-card .cat-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.category-card .cat-desc {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  line-height: 1.4;
}

/* ── Listing Cards ── */
.listings-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.listing-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: all var(--transition);
}

.listing-card:hover {
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-md);
}

.listing-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--clr-primary-lt);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--clr-primary);
  flex-shrink: 0;
  overflow: hidden;
}

.listing-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.listing-body {
  flex: 1;
  min-width: 0;
}

.listing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.listing-company {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--clr-text);
}

.listing-plan-type {
  display: inline-block;
  background: var(--clr-tag-bg);
  color: var(--clr-tag-text);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.listing-desc {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  margin-bottom: 14px;
  line-height: 1.55;
}

.listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.listing-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--clr-text-muted);
}

.meta-badge svg, .meta-badge .icon { opacity: 0.6; }

/* ── Category Page Header ── */
.category-hero {
  background: linear-gradient(135deg, #2E86AB 0%, #1A6485 100%);
  color: white;
  padding: 40px 0 36px;
}

.category-hero h1 {
  color: white;
  font-size: 2rem;
  margin-bottom: 8px;
}

.category-hero p {
  color: rgba(255,255,255,0.82);
  font-size: 1rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 14px;
}

.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb a:hover { color: white; }
.breadcrumb .sep { opacity: 0.5; }

/* ── Filter Bar ── */
.filter-bar {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  white-space: nowrap;
}

.filter-bar select,
.filter-bar input {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.85rem;
  font-family: var(--font);
  color: var(--clr-text);
  background: var(--clr-bg);
  transition: border-color var(--transition);
}

.filter-bar select:focus,
.filter-bar input:focus {
  outline: none;
  border-color: var(--clr-primary);
}

.filter-bar input[type="search"] {
  flex: 1;
  min-width: 160px;
}

.filter-count {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--clr-text-muted);
  white-space: nowrap;
}

/* ── No Results ── */
.no-results {
  text-align: center;
  padding: 60px 24px;
  color: var(--clr-text-muted);
}

.no-results .no-icon { font-size: 3rem; margin-bottom: 12px; }

/* ── Info Box (sidebar) ── */
.info-box {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.info-box h4 {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--clr-text);
}

.info-box p {
  font-size: 0.82rem;
  line-height: 1.55;
}

.info-box ul {
  list-style: disc;
  padding-left: 16px;
  font-size: 0.82rem;
  color: var(--clr-text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

/* ── Homepage Info Banner ── */
.info-banner {
  background: var(--clr-primary-lt);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  padding: 32px 0;
}

.info-banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.info-banner-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.info-icon {
  width: 44px;
  height: 44px;
  background: var(--clr-surface);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  border: 1px solid var(--clr-border);
}

.info-banner-item h4 { font-size: 0.92rem; margin-bottom: 4px; }
.info-banner-item p { font-size: 0.82rem; }

/* ── Footer ── */
.site-footer {
  background: #1A3A4A;
  color: rgba(255,255,255,0.7);
  padding: 40px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .site-logo { color: white; margin-bottom: 12px; }
.footer-brand .site-logo span { color: white; }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; }

.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col ul a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-col ul a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: white; }

/* ── Loading State ── */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
  color: var(--clr-text-muted);
  gap: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--clr-border);
  border-top-color: var(--clr-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilities ── */
.text-muted { color: var(--clr-text-muted); }
.text-sm    { font-size: 0.85rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .page-layout {
    flex-direction: column;
  }
  .page-sidebar {
    width: 100%;
  }
  .ad-slot-medium, .ad-slot-large {
    width: 100%;
    height: 120px;
  }
  .sidebar-sticky { position: static; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  .hero { padding: 40px 0 36px; }
  .hero h1 { font-size: 1.85rem; }
  .site-nav { display: none; }
  .site-nav.open { display: block; position: absolute; top: 68px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--clr-border); padding: 12px 24px; }
  .site-nav.open ul { flex-direction: column; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .listing-card { flex-direction: column; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
