@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
/* CONNECT Brand Identity System - Light Matured Theme */
:root {
  --primary-blue: #1E3A8A; /* Official Connect Blue */
  --primary-blue-hover: #1E40AF;
  --primary-teal: #10B981; /* Official Emerald Accent */
  --primary-teal-hover: #059669;
  --bg-color: #FFFFFF; /* High Contrast White bg from app */
  --surface: #FFFFFF;
  --text-dark: #0F172A;
  --text-muted: #475569;
  --border-color: #E2E8F0;
  --header-bg: rgba(255, 255, 255, 0.98);
  --header-height: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
img { max-width: 100%; height: auto; }
html, body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  position: relative;
}
body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Background Shapes */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.6;
}
.bg-shape-1 {
  width: 600px; height: 600px;
  background: #E0F2FE;
  top: -100px; left: -200px;
}
.bg-shape-2 {
  width: 800px; height: 800px;
  background: #E0F2FE;
  bottom: 10%; right: -300px;
}

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; font-weight: 700; color: var(--text-dark); line-height: 1.2; margin-bottom: 1.5rem; }
h1 { font-size: 3.5rem; letter-spacing: -2px; }
h2 { font-size: 2.5rem; letter-spacing: -1px; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p { font-size: 1.05rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 1.5rem; }
.lead { font-size: 1.25rem; line-height: 1.8; }
.text-tiny { font-size: 0.85rem; }


.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* Buttons */
.btn-outline {
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-dark);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.2s;
}
.btn-outline:hover { border-color: var(--text-dark); }

.btn-primary-teal {
  background: var(--primary-teal);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.2s;
}
.btn-primary-teal:hover { background: var(--primary-teal-hover); }

.btn-primary-blue {
  background: var(--primary-blue);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: 0.2s;
  display: inline-block;
}
.btn-primary-blue:hover { background: var(--primary-blue-hover); }

.btn-primary-blue.small { padding: 0.4rem 1rem; font-size: 0.85rem; }

.btn-outline-blue {
  border: 1px solid var(--primary-blue);
  color: var(--primary-blue);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: 0.2s;
  display: inline-block;
}
.btn-outline-blue:hover { background: #EFF6FF; }

/* Header */
header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.85); /* 100x Glassmorphism */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  padding: 1.25rem 0;
  transition: all 0.3s ease;
}
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand img { vertical-align: middle; }
.brand-text { font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--text-dark); letter-spacing: -0.5px; display: inline-flex; align-items: center; }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }

/* Mobile navigation toggle */
/* Mobile navigation toggle */
.nav-toggle { 
  display: none; 
  background: none; 
  border: none; 
  font-size: 1.5rem; 
  color: var(--text-dark); 
  cursor: pointer; 
  padding: 0.5rem;
  z-index: 1100;
}

.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 500; font-size: 0.9rem; letter-spacing: 0.2px; position: relative; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--primary-blue); }
.nav-links a.active { color: var(--primary-teal); font-weight: 800; }
.nav-links a.active::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 100%; height: 2px; background: var(--primary-teal); border-radius: 2px; opacity: 1; }
.nav-links .actions-mobile { display: none; }
.hide-mobile { display: inline; }
@media (max-width: 768px) {
  .hide-mobile { display: none; }
}

.actions { display: flex; gap: 1rem; align-items: center; }

/* Hero Section */
.hero-section { padding: 4rem 0; }
@media (max-width: 768px) {
  .hero-section { padding: 2rem 0 3rem; }
}
.hero-content p { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 90%; }
.hero-buttons { display: flex; gap: 1rem; margin-bottom: 3rem; }

/* Search Bar */
.hero-search-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 600px;
  height: 64px;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  padding: 6px 6px 6px 1.5rem;
  margin-top: 2.5rem;
  overflow: hidden; /* prevent child overflow */
}
.search-input-main {
  flex: 1;
  min-width: 0; /* Critical: prevents flex overflow */
  height: 100%;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
}
.search-vertical-divider {
  width: 1px;
  flex-shrink: 0;
  height: 32px;
  background: var(--border-color);
  margin: 0 1.25rem;
}
.search-location-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
  width: 140px;
  min-width: 0;
  flex-shrink: 0;
  gap: 0.5rem;
}
.search-location-wrapper span {
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.search-input-location {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
}
::placeholder {
  color: #94A3B8;
  opacity: 1;
}
.search-btn-hero {
  height: 50px;
  width: 50px;
  min-width: 50px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  transition: 0.2s;
  margin-left: 0.5rem;
}
.search-btn-hero:hover {
  background: var(--primary-blue-hover);
}


/* Categories */
.categories-section { padding: 4rem 0; }
.section-title { font-size: 1.5rem; margin-bottom: 2rem; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.category-card {
  border-radius: 20px;
  padding: 1.5rem;
  color: white;
  display: flex; flex-direction: column; justify-content: flex-end;
  height: 160px;
  text-decoration: none;
  transition: transform 0.3s;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.category-card:hover { transform: translateY(-5px); }
.cat-icon { font-size: 2rem; margin-bottom: auto; }
.category-card h3 { color: white; font-size: 1.125rem; margin-bottom: 0.25rem; }
.category-card p { font-size: 0.85rem; opacity: 0.9; }

/* Providers Section */
.providers-section { padding: 4rem 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.nav-arrows { display: flex; gap: 0.5rem; }
.arrow-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-color); background: #fff;
  cursor: pointer; color: var(--text-dark);
}
.arrow-btn.active { background: #EEF2FF; color: var(--primary-blue); border-color: #EEF2FF; }

.provider-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.provider-card {
  background: #fff; border-radius: 20px;
  border: 1px solid var(--border-color);
  overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  transition: 0.3s;
}
.provider-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,0.08); }
.provider-img { height: 180px; width: 100%; }
.provider-info { padding: 1.25rem; }
.provider-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.provider-head h4 { font-size: 1.1rem; }
.rating { font-size: 0.85rem; font-weight: 600; }
.role { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.desc { font-size: 0.85rem; margin-bottom: 0.5rem; line-height: 1.4; }
.location { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.provider-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-color); padding-top: 1rem; }
.price { font-size: 0.8rem; color: var(--text-muted); line-height: 1.2; }
.price strong { font-size: 1rem; color: var(--text-dark); }

/* Steps Section */
.steps-section { 
  padding: 8rem 0;
  background: #F8FAFC;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
}
.flex-steps { display: flex; align-items: center; gap: 4rem; }
.steps-illustrations {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  min-width: 0;
}
.steps-content { flex: 1; min-width: 0; }
.steps-list { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2rem; }
.step-item h4 { font-size: 1.1rem; margin-bottom: 0.25rem; display: flex; gap: 0.5rem; }
.step-item p { color: var(--text-muted); font-size: 0.95rem; padding-left: 1.5rem; }

/* Footer */
footer { 
  background: #0A0F1C; /* Ultra-premium deep SaaS navy */
  color: #F8FAFC; 
  padding-top: 5rem; 
  border-top: 1px solid rgba(255,255,255,0.08); 
  position: relative;
  overflow: hidden;
}
/* Optional subtle top glow */
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.4), transparent);
}
.footer-content { 
  display: grid; 
  grid-template-areas: 
    "logo links"
    "social links";
  grid-template-columns: 1fr auto;
  row-gap: 1.5rem;
  margin-bottom: 4rem; 
  position: relative; 
  z-index: 10; 
  align-items: center;
}
.footer-logo { grid-area: logo; display: flex; align-items: center; gap: 0.75rem; font-family: 'Outfit', sans-serif; font-size: 2.2rem; font-weight: 900; letter-spacing: -0.5px; }
.footer-logo img { height: 42px !important; width: auto; }
.footer-social { grid-area: social; display: flex; gap: 1rem; margin-top: 0; }
.footer-social a { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  width: 40px; 
  height: 40px; 
  background: rgba(255,255,255,0.1); 
  color: #fff; 
  border-radius: 50%; 
  text-decoration: none; 
  transition: all 0.3s ease;
  font-size: 1.2rem;
}
.footer-social a:hover { background: var(--primary-teal); color: #fff; transform: translateY(-3px); }
.footer-links-grid { grid-area: links; display: flex; gap: 4rem; }
.footer-col h4 { color: #fff; margin-bottom: 1.5rem; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 1rem; }
.footer-col ul a { color: #94A3B8; text-decoration: none; font-size: 0.95rem; font-weight: 400; transition: color 0.2s ease, transform 0.2s ease; display: inline-block; }
.footer-col ul a:hover { color: #38BDF8; transform: translateX(4px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 2rem 0; text-align: center; color: #64748B; font-size: 0.9rem; position: relative; z-index: 10; }

/* Global Centered Alignment System */
.page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto 6rem;
    width: 100%;
}

.page-header h1 {
    font-size: 4rem;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    max-width: 900px;
}

.page-header p.lead-meta {
    color: var(--primary-teal);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.page-header p {
    font-family: inherit;
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

.grid-2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6rem;
    width: 100%;
    min-width: 0;
}

.grid-2 > div {
    flex: 1;
    min-width: min(300px, 100%); /* Ensures stacking when space is tight */
    min-width: 0; /* Prevent flex overflow */
}

.grid-2 img {
    max-width: 100%;
    height: auto;
    display: block;
}

.feature-detail-card, .content-section {
    width: 100%;
    margin-bottom: 5rem;
}

.hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-bottom: 6rem;
}

.hero-image-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.hero-image-box {
    background: #F8FAFC;
    border-radius: 32px;
    padding: 1rem;
    overflow: hidden;
}
/* High-Fidelity Mobile Device Frame */
.mobile-view-frame {
    width: 280px;
    height: 580px;
    margin: 0 auto;
    background: #000;
    padding: 12px;
    border-radius: 44px;
    border: 8px solid #1e293b;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2), inset 0 0 15px rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    user-select: none;
}
.mobile-view-frame::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 120px; height: 30px;
    background: #1e293b;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    z-index: 20;
}
.mobile-view-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 32px;
    display: block;
}
.mobile-view-frame::after {
    content: '';
    position: absolute;
    bottom: 8px; left: 50%;
    transform: translateX(-50%);
    width: 100px; height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    z-index: 10;
}

/* Hero Section Refinement for Mobile Mockups */
.hero-image-box {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Job Mosaic Collage System */
.job-collage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 0.75rem;
    width: 100%;
    aspect-ratio: 1/1;
    background: #F1F5F9;
    padding: 0.75rem;
    border-radius: 32px;
}
.job-tile {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(0.95);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.job-tile:hover {
    transform: scale(1.05);
    filter: brightness(1);
    z-index: 10;
}
.job-tile.large {
    grid-column: span 2;
    grid-row: span 2;
}

.content-section { 
    padding: 4rem 3rem; 
    background: #fff; 
    border-radius: 32px; 
    margin-bottom: 5rem; 
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.04);
}

.content-section.no-box {
    background: transparent;
    border: none;
    padding: 2rem 0;
    margin-bottom: 4rem;
}

/* About / Team styling */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.team-member { text-align: center; }
.team-member img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; border: 4px solid var(--border-color); }
.team-member h4 { font-size: 1.1rem; }
.team-member p { color: var(--text-muted); font-size: 0.9rem; }

/* Custom Feature Detail Card Responsiveness */
@media (max-width: 768px) {
  .feature-detail-card { padding: 1.5rem !important; }
  .grid-2 { gap: 2rem !important; }
  .feature-grid-3 { grid-template-columns: 1fr !important; }
  .mini-feature { padding: 1.5rem !important; }
}

/* Steps Section Layout */
.steps-illustrations, .steps-content {
    flex: 1;
}

@media (max-width: 991px) {
    .flex-steps { gap: 3rem; }
}

@media (max-width: 768px) {
    .steps-section { padding: 3rem 0 !important; }
    .flex-steps {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2.5rem;
    }
    .steps-illustrations, .steps-content {
        width: 100%;
        flex: none;
    }
    .steps-illustrations img {
        margin: 0 auto;
        display: block;
    }
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.step-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
    font-weight: 700;
}

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

/* Browse Search Module Responsiveness */
.search-module-wrapper {
    max-width: 900px;
    margin: 0 auto 10rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    width: 100%;
}

.search-bar-inner {
    width: 100%;
    display: flex;
    gap: 1rem;
    background: #fff;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.06);
    align-items: center;
}

.search-col-main, .search-col-loc {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
}

.search-col-main { flex: 2; border-right: 1px solid var(--border-color); }
.search-col-loc { flex: 1; }

.search-bar-inner input {
    border: none;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 1.1rem;
}

.search-badges {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.search-badges span { display: flex; align-items: center; gap: 0.5rem; }
.search-badges i { color: var(--primary-teal); }

@media (max-width: 768px) {
    .search-module-wrapper { gap: 2rem; margin-bottom: 5rem; }
    .search-bar-inner {
        flex-direction: column;
        border-radius: 24px;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    .search-col-main, .search-col-loc {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0 0 1rem 0;
    }
    .search-bar-inner button { width: 100%; padding: 1.25rem; }
    .search-badges { gap: 1rem; font-size: 0.85rem; }
}


/* Help Center styling */
.faq-list { max-width: 800px; margin: 3rem auto; }
.faq-item { border-bottom: 1px solid var(--border-color); padding: 1rem 0; }
.faq-item h4 { display: flex; justify-content: space-between; cursor: pointer; }
.faq-item p { color: var(--text-muted); margin-top: 0.5rem; display: none; }

/* How it works grid */
.steps-vertical { max-width: 600px; margin: 3rem auto; display: flex; flex-direction: column; gap: 3rem; }
.step-v-item { display: flex; gap: 2rem; align-items: flex-start; }
.step-v-num { font-size: 4rem; font-family: 'Outfit'; font-weight: 800; color: #FCA5A5; line-height: 1; text-shadow: 2px 2px 0px rgba(0,0,0,0.1); }
.step-v-item:nth-child(2) .step-v-num { color: #FCD34D; }
.step-v-item:nth-child(3) .step-v-num { color: #6EE7B7; }
.step-v-item:nth-child(4) .step-v-num { color: #93C5FD; }
.step-v-content h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.step-v-content p { color: var(--text-muted); }

/* Deep Dive Portal — replaces inline gap: 10rem / 15rem wrappers */
.deep-dive-portal {
    max-width: 1000px;
    margin: 5rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

/* =========================================
   RESPONSIVE ARCHITECTURE (Content-Aware Scaling)
   ========================================= */

/* Tablets & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; text-align: center; gap: 4rem; }
  .grid-2 > div { width: 100%; }
  .hero-content h1 { font-size: 3rem; }
  .page-header h1 { font-size: 3rem !important; }
  .hero-search-wrapper { margin: 2.5rem auto; }
  .hero-buttons { justify-content: center; }
  .flex-steps { flex-direction: column; text-align: center; }
  .category-grid, .provider-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-links-grid { gap: 2rem; }
}

/* Mobile Phones (max-width: 768px) */
@media (max-width: 768px) {
  header { padding: 0.75rem 0; }
  .nav-toggle { display: block; }
  
  .nav-links { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh; 
    background: #0A0F1C;
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    gap: 1.75rem; 
    z-index: 1050;
    padding: 2rem;
  }
  
  .nav-links.active { display: flex; }
  .nav-links li a { font-size: 1.2rem; color: #F1F5F9; font-weight: 500; }
  .nav-links li a.active { color: var(--primary-teal); }
  .nav-links li a:hover { color: var(--primary-teal); }
  
  /* Close button style for toggle when menu open */
  .nav-toggle { color: var(--text-dark); }
  .nav-links.active ~ .nav-toggle, 
  body.nav-open .nav-toggle { color: #fff; }

  .actions { display: none; }
  .nav-links .actions-mobile { display: block; margin-top: 1.5rem; }
  .nav-links .actions-mobile a { font-size: 1rem; padding: 0.75rem 2rem; }
  .bg-shape { display: none !important; }

  /* --- Typography --- */
  h1 { font-size: 2.2rem !important; letter-spacing: -1px !important; overflow-wrap: break-word; word-break: break-word; }
  h2 { font-size: 1.75rem !important; letter-spacing: -0.5px !important; overflow-wrap: break-word; }
  h3 { font-size: 1.35rem !important; }
  h4 { font-size: 1.1rem !important; }
  p { font-size: 0.975rem !important; line-height: 1.7 !important; }
  .lead { font-size: 1.05rem !important; line-height: 1.7 !important; }

  /* --- Page & Section Spacing --- */
  main { padding-bottom: 4rem !important; }
  .page-header { margin-bottom: 3rem !important; }
  .page-header h1 { font-size: 2.2rem !important; margin-bottom: 1rem !important; }
  
  /* Override all the hardcoded large gaps in inner flex/grid containers */
  .grid-2 { 
    flex-direction: column !important; 
    gap: 2rem !important; 
  }
  .grid-2 > div { min-width: 100% !important; width: 100% !important; }
  .grid-2 img { max-width: 100% !important; margin: 0 auto !important; }

  /* Content sections: tighter padding */
  .content-section { 
    padding: 1.75rem 1.25rem !important; 
    border-radius: 20px !important;
    margin-bottom: 2rem !important;
  }
  .feature-detail-card { 
    padding: 1.5rem !important; 
    margin-bottom: 2rem !important;
  }
  .feature-detail-card .grid-2 { gap: 2rem !important; }

  /* Override large inline gaps set on wrapper divs of how-it-works & features */
  [style*="gap: 15rem"],
  [style*="gap: 10rem"] {
    gap: 2rem !important;
  }
  [style*="gap: 6rem"] {
    gap: 2rem !important;
  }
  [style*="gap: 4rem"] {
    gap: 1.5rem !important;
  }
  
  /* Force row-reverse back to normal column on mobile */
  [style*="flex-direction: row-reverse"],
  .grid-2 {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* Hero */
  .hero-content { 
    margin-top: 1rem; 
    width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-buttons { flex-direction: column; width: 100%; gap: 1rem; }
  .hero-buttons a { width: 100%; text-align: center; }
  
  /* Smart Search Wrap for Mobile */
  .hero-search-wrapper { 
    height: auto; 
    flex-direction: column; 
    border-radius: 24px; 
    padding: 1.25rem;
    width: 100%;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
  }
  .search-input-main { width: 100%; text-align: center; margin-bottom: 0.5rem; }
  .search-vertical-divider { width: 100%; height: 1px; margin: 0.75rem 0; background: var(--border-color); }
  .search-location-wrapper { width: 100%; justify-content: center; }
  .search-input-location { text-align: center; }
  .search-btn-hero { width: 100%; border-radius: 12px; margin-top: 1rem; margin-left: 0; height: 52px; font-size: 1.2rem; }

  /* Job Mosaic Refinement for Mobile */
  .job-collage { 
    aspect-ratio: auto !important; 
    height: 320px !important; 
    margin-top: 2rem !important;
    width: 100% !important;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Grids */  
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .provider-grid, .team-grid, .feature-grid-3 { grid-template-columns: 1fr; }
  .steps-illustrations img { width: 100%; height: auto; }
  
  /* Deep dive doc portal override */
  .deep-dive-portal {
    margin-top: 2rem !important;
    gap: 2rem !important;
  }
  
  /* Section padding overrides — match both shorthand and longhand inline styles */
  [style*="padding: 8rem"],
  [style*="padding-top: 8rem"],
  [style*="padding-top: 6rem"][style*="padding-bottom: 6rem"] {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  [style*="max-width: 900px"][style*="gap"],
  [style*="max-width: 1000px"][style*="gap"] {
    gap: 2rem !important;
  }
  
  /* Font size overrides for large inline font sizes */
  [style*="font-size: 1.35rem"],
  [style*="font-size: 2.5rem"] {
    font-size: inherit !important;
  }
  [style*="font-size: 4rem"] {
    font-size: 2.2rem !important;
  }

  /* Feature grid mini features */
  .feature-grid-3 { 
    grid-template-columns: 1fr !important; 
    margin: 1.5rem 1rem 3rem !important; 
  }
  .mini-feature { padding: 1.5rem !important; }

  /* Footer */
  footer { padding-top: 3rem; }
  .footer-content { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    gap: 2rem; 
  }
  .footer-logo { justify-content: center; font-size: 1.5rem !important; }
  .footer-social { justify-content: center; }
  .footer-links-grid { flex-direction: column; gap: 2rem; align-items: center; }
  .footer-col { text-align: center; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.9rem !important; }
  h2 { font-size: 1.6rem !important; }
  h3 { font-size: 1.25rem !important; }
  .page-header h1 { font-size: 1.9rem !important; }
  .hero-content h1 { font-size: 1.9rem !important; }
  .job-collage { height: 260px !important; }
  .container { padding: 0 1rem; }
  .content-section { padding: 1.25rem 1rem !important; }
  /* Single column categories on very small screens */
  .category-grid { grid-template-columns: 1fr; }
  /* Prevent hero search from overflowing */
  .hero-search-wrapper { padding: 1rem; border-radius: 20px; }
  /* Ensure no element exceeds viewport width */
  section, .container, main { max-width: 100%; overflow-x: hidden; }
}
