/* ============================================================
   MOBILE FIXES — loaded LAST on every page so it wins the cascade
   This overrides per-page <style> blocks that were too aggressive
   on phones.
   ============================================================ */

/* Kill any horizontal overflow */
html, body { overflow-x: hidden !important; }
img, video, iframe { max-width: 100% !important; height: auto; }

/* ============================================================
   PHONES (≤ 700px)
   ============================================================ */
@media (max-width: 700px) {

  /* ---------- TOP NAV ---------- */
  nav.main {
    padding: 10px 16px !important;
    flex-wrap: nowrap !important;
  }
  nav.main.scrolled, nav.main.solid {
    padding: 8px 16px !important;
  }
  .nav-logo {
    height: 48px !important;
    width: auto !important;
  }
  nav.main.scrolled .nav-logo, nav.main.solid .nav-logo {
    height: 40px !important;
  }
  .nav-fhe { display: none !important; }
  .nav-cta { display: none !important; }
  .nav-phone { display: none !important; }
  .nav-menu { display: none !important; }
  .nav-right { gap: 8px !important; }
  .nav-hamburger {
    margin-right: 0 !important;
    width: 36px !important;
    height: 30px !important;
  }
  .nav-hamburger span { width: 26px !important; }

  /* Top strip — stack on phones */
  .top-strip {
    padding: 6px 16px !important;
    font-size: 9px !important;
    flex-direction: column !important;
    gap: 4px !important;
    text-align: center;
  }
  .top-strip-right { gap: 14px !important; }

  /* ---------- HOMEPAGE HERO ---------- */
  .hero {
    height: auto !important;
    min-height: 540px !important;
    padding: 100px 20px 60px !important;
  }
  .hero-content {
    padding: 0 !important;
    text-align: center;
  }
  .hero h1 {
    font-size: clamp(34px, 9vw, 50px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 18px !important;
  }
  .hero p {
    font-size: 15px !important;
    line-height: 1.55 !important;
    margin-bottom: 24px !important;
  }
  .hero-tag {
    font-size: 11px !important;
    letter-spacing: 0.32em !important;
  }
  .hero-cta {
    padding: 14px 28px !important;
    font-size: 11px !important;
    letter-spacing: 0.18em !important;
  }
  .hero-dots { bottom: 28px !important; }

  /* ---------- INNER PAGE HEADERS ---------- */
  .page-header {
    height: auto !important;
    min-height: 360px !important;
    padding: 100px 20px 50px !important;
  }
  .page-header-content {
    padding: 0 !important;
    margin-top: 0 !important;
    max-width: 100% !important;
  }
  .page-header h1 {
    font-size: clamp(30px, 8.5vw, 44px) !important;
    letter-spacing: 0.02em !important;
    line-height: 1.05 !important;
  }
  .page-header p {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }
  .page-header img.crest {
    width: 52px !important;
    height: 52px !important;
    margin-bottom: 14px !important;
  }

  /* ---------- SECTIONS / BLOCKS ---------- */
  section.block,
  section.block.cream,
  section.cream,
  .charity-feature,
  .culture-section,
  .gbi-intro,
  .gbi-pillars,
  .gbi-how,
  .gbi-elig,
  .gbi-nomiddleman,
  .gbi-contact,
  .geo-intro,
  .geo-cases,
  .geo-faq,
  .geo-connect,
  .stats-section,
  .social-section,
  .embed-contact,
  .hero-contact,
  .pillars,
  .owners-section,
  .leads-section {
    padding: 50px 20px !important;
  }

  /* Force any inline section padding to phone-friendly */
  section[style*="padding:"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
    padding-top: 50px !important;
    padding-bottom: 50px !important;
  }

  .block-inner,
  .geo-intro-inner,
  .geo-how-inner,
  .geo-cases-inner,
  .geo-faq-inner,
  .gbi-intro-inner,
  .gbi-pillars-inner,
  .gbi-how-inner,
  .gbi-elig-inner,
  .charity-feature .inner,
  .culture-inner,
  .embed-contact-inner,
  .hero-contact-inner {
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* ---------- TYPOGRAPHY ---------- */
  .section-title {
    font-size: clamp(28px, 8vw, 40px) !important;
    line-height: 1.1 !important;
    letter-spacing: 0.01em !important;
  }
  .section-sub { font-size: 14px !important; line-height: 1.65 !important; }
  .eyebrow {
    font-size: 10px !important;
    letter-spacing: 0.28em !important;
    margin-bottom: 12px !important;
  }
  /* DO NOT auto-hyphenate — proper names and brand words must stay whole */
  h1, h2, h3, h4, h5, h6, p, li, span, a, div {
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  /* ---------- ALL MULTI-COL GRIDS → 1 COL ---------- */
  .feature-grid,
  .process-grid,
  .stats-grid,
  .pillar-grid,
  .pillars-grid,
  .geo-tri-grid,
  .geo-cases-grid,
  .geo-how-grid,
  .gbi-pillars-grid,
  .gbi-how-grid,
  .gbi-elig-inner,
  .gbi-intro-inner,
  .geo-intro-inner,
  .charity-feature .inner,
  .embed-contact-inner,
  .hero-form-grid,
  .footer-grid,
  .leads-grid,
  .owners-grid,
  .ig-grid,
  .ts-grid,
  .top-producers,
  .producers-grid,
  .agent-grid,
  .agents-grid,
  .townlist-grid,
  .pillars-row,
  .feat-row,
  .listings-grid,
  .three-col,
  .two-col,
  .charity-meta {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* IG grid stays 2-up because it's photos */
  .ig-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }

  /* Listings grid stays 1-col but with smaller gap */
  .listings-grid { gap: 18px !important; }

  /* ---------- BIG IMAGE BREAK ---------- */
  .big-image-break {
    height: 220px !important;
    background-attachment: scroll !important;
  }

  /* ---------- BUTTONS / CTA ROWS ---------- */
  .hero-actions,
  .hero-cta-row,
  .geobrix-hero-actions,
  .gbi-hero-actions,
  .charity-cta-row,
  .geo-connect .btn-row,
  .gbi-contact-row,
  .ts-cta-row,
  .pillar-cta-row,
  [class*="-actions"],
  [class*="-cta-row"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .hero-actions a,
  .hero-cta-row a,
  .gbi-hero-actions a,
  .geo-connect .btn-row a,
  .charity-cta {
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* ---------- HERO CONTACT FORM (site-wide) ---------- */
  .hero-contact { padding: 50px 20px !important; }
  .hero-contact h2 {
    font-size: clamp(28px, 8vw, 40px) !important;
    margin-bottom: 28px !important;
  }
  .hero-form-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .hero-form-submit {
    width: 100% !important;
    padding: 16px 30px !important;
  }

  /* ---------- MOSAIC GALLERY (events page) ---------- */
  .mosaic {
    grid-template-columns: 1fr 1fr !important;
    grid-auto-rows: 130px !important;
    gap: 8px !important;
  }
  .mosaic .tile.t-2x2,
  .mosaic .tile.t-2x1,
  .mosaic .tile.t-1x2,
  .mosaic .tile.t-3x1 {
    grid-column: span 2 !important;
    grid-row: span 1 !important;
  }

  /* ---------- FOOTER ---------- */
  footer {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    gap: 12px !important;
    text-align: center;
    padding-top: 24px !important;
  }
  .footer-bottom > div:last-child a { margin: 0 8px !important; }
  .footer-col { margin-bottom: 8px; }
  .footer-col h5 {
    margin-bottom: 12px !important;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(189,176,139,0.15);
  }
  .footer-col a { font-size: 14px !important; margin-bottom: 10px !important; }
  .footer-col a.footer-phone-link { font-size: 17px !important; }

  /* ---------- BIO / OWNERS CARDS ---------- */
  .owner-card,
  .lead-card,
  .agent-card,
  .producer-card {
    padding: 24px !important;
  }
  .owner-photo, .lead-photo, .agent-photo {
    aspect-ratio: 4/5;
    width: 100%;
    height: auto !important;
  }

  /* ---------- BIO SECTIONS (leadership.html) ---------- */
  .bio-section {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  .bio-photo {
    max-width: 280px !important;
    margin: 0 auto !important;
  }

  /* ---------- LISTING CARDS ---------- */
  .listing-card { padding: 0 !important; }

  /* ---------- HERO IMAGE STACK (FHE, Smoke Rise) ---------- */
  .img-stack { aspect-ratio: 4/5 !important; }

  /* ---------- AGENT PORTAL CARDS ---------- */
  .portal-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .portal-card { padding: 32px 26px !important; }

  /* ---------- VENDOR CARDS ---------- */
  .vendor-grid,
  .vendors-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* ---------- TOWN/COUNTY PAGE LISTS ---------- */
  .twn-grid,
  .twn-features,
  .areas-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ============================================================
   TABLETS (701–900px) — partial collapse
   ============================================================ */
@media (max-width: 900px) and (min-width: 701px) {
  .nav-cta { display: none !important; }
  .nav-fhe { height: 38px !important; }
  .nav-logo { height: 60px !important; }
  nav.main { padding: 14px 30px !important; }
  section.block { padding: 70px 30px !important; }
  .section-title { font-size: clamp(36px, 6vw, 52px) !important; }

  .feature-grid,
  .stats-grid,
  .geo-tri-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
  }
}

/* ============================================================
   MASTER MOBILE OVERRIDES — applied LAST, beat every page style
   Loaded via mobile-fixes.css link AFTER each page's own <style>.
   ============================================================ */

/* Kill auto-hyphenation across the entire site at every viewport.
   Proper names like "Montemarano", "Amendolia", and brand words like
   "Smoke Rise" must NEVER be split with a soft hyphen. */
* {
  hyphens: none !important;
  -webkit-hyphens: none !important;
}

@media (max-width: 700px) {

  /* Universal: any class ending in "-grid" or containing "grid-" collapses
     to one column on phones — except photo grids and the IG grid. */
  [class*="-grid"]:not(.ig-grid):not(.mosaic):not(.mega-offices-grid),
  [class*="grid-"]:not(.ig-grid):not(.mosaic),
  [class$="-row"]:not(.cat-row):not(.btn-row):not(.gbi-contact-row):not(.charity-cta-row),
  .lead-grid,
  .leads-grid,
  .values-grid,
  .three-values-grid,
  .pillars-row,
  .pillars,
  .pillars-grid,
  .tech-grid,
  .marketing-grid,
  .mentor-grid,
  .mentorship-grid,
  .program-grid,
  .facts-grid,
  .location-grid,
  .ts-grid,
  .pricing-grid,
  .plans-grid,
  .plan-grid,
  .stats-row,
  .stat-row,
  .meta-grid,
  .meta-row,
  .pillar-grid,
  .ops-grid,
  .ops-row,
  .seller-process-grid,
  .process-row,
  .case-grid,
  .scope-grid,
  .audience-grid,
  .reasons-grid,
  .pillar-row,
  .features-grid,
  .why-grid,
  .resource-grid,
  .resources-grid,
  .pdf-grid,
  .download-grid,
  .download-row,
  .gold-grid,
  .silver-grid,
  .platinum-grid,
  .three-col,
  .four-col,
  .two-col,
  .col-2,
  .col-3,
  .col-4,
  .row-2,
  .row-3,
  .row-4,
  div[style*="grid-template-columns"]:not(.mega-offices-grid) {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    gap: 18px !important;
  }

  /* Inline-styled section grids in HTML (e.g. property-management bio,
     leadership bio) — collapse via attribute selectors. */
  [style*="grid-template-columns:"] {
    grid-template-columns: 1fr !important;
  }

  /* SHRINK giant serif headings so long words like "Montemarano" and
     "Amendolia" stay on one line. */
  h1 { font-size: clamp(28px, 8vw, 40px) !important; line-height: 1.1 !important; letter-spacing: 0.01em !important; }
  h2 { font-size: clamp(24px, 7vw, 34px) !important; line-height: 1.15 !important; }
  h3 { font-size: clamp(20px, 6vw, 28px) !important; line-height: 1.2 !important; }
  h4 { font-size: clamp(16px, 4.6vw, 22px) !important; line-height: 1.25 !important; }

  /* Specific known display headers that were too big on mobile */
  .hero h1, .gbi-hero h1, .geobrix-hero h1, .page-header h1,
  .section-title, .culture-head h2, .charity-feature h2,
  .gbi-intro h2, .gbi-pillar h3, .geo-intro h2, .geo-cases-inner h2,
  .gbi-nomiddleman h2, .gbi-elig-content h2, .gbi-contact h2 {
    font-size: clamp(26px, 7.5vw, 38px) !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
  }

  /* Lead/owner cards (Jeff + Jason on Smoke Rise page) — stack and
     keep names on one or two clean lines */
  .lead-grid,
  .leads-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
  .lead-card, .leads-card {
    max-width: 460px !important;
    margin: 0 auto !important;
    text-align: center !important;
  }
  .lead-card h3, .leads-card h3,
  .lead-info h3, .lead-info .name, .lead-card .name {
    font-size: 26px !important;
    line-height: 1.15 !important;
    margin-top: 18px !important;
    word-spacing: 0.05em;
  }
  .lead-img, .lead-photo, .leads-photo {
    max-width: 320px !important;
    margin: 0 auto !important;
    aspect-ratio: 1 !important;
  }

  /* Card title sizes — keep them readable, not display-size */
  .feature-card h4,
  .geo-tri-card h4,
  .gbi-step h5,
  .gbi-pillar h3,
  .portal-card h3,
  .producer-card h3,
  .lead-card h3,
  .agent-card h3,
  .vendor-card h3 {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }

  /* Ribbon/case-study card titles */
  .geo-case .ribbon h3 {
    font-size: 18px !important;
  }

  /* Pricing plan card titles (Silver / Gold / Platinum) */
  .plan-card h3,
  .pricing-card h3,
  .plan-name {
    font-size: 22px !important;
  }

  /* Hero subtitles and decks - prevent overflow */
  .hero p,
  .gbi-hero p,
  .page-header p {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  /* Make eyebrows / pill labels smaller so they don't wrap with hyphens */
  .eyebrow,
  .gb-tag,
  .eyebrow-mark,
  .label,
  [class*="eyebrow"] {
    font-size: 10px !important;
    letter-spacing: 0.22em !important;
    line-height: 1.4 !important;
  }
  .geo-tri-card .label,
  .gbi-step .num + h5,
  .gbi-pillar .num {
    font-size: 11px !important;
  }

  /* Step numbers in process cards — smaller */
  .process-num,
  .geo-step .num,
  .gbi-step .num {
    font-size: 36px !important;
  }

  /* Smoke Rise commute strip — three columns side by side ("Port
     Authority / Midtown Manhattan / Highway Access") collapses */
  .commute-stats,
  .commute-grid,
  .ts-grid,
  .stat-strip,
  [class*="commute"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    text-align: center;
  }

  /* The "marketing plan / talk to listing agent" callout box on FHE
     and similar pages */
  .download-callout,
  .resource-card,
  .free-resource-card {
    padding: 28px 22px !important;
  }

  /* Side-by-side image+text "img-stack + content" sections (charity
     feature, FHE, etc.) — stack and reduce the image height */
  .img-stack {
    aspect-ratio: 4/5 !important;
    max-width: 100% !important;
  }

  /* Property management "Operations team" 4-card row that was still
     showing 2-up. Force 1-col. */
  .ops-team-grid,
  .feature-grid,
  .geo-tri-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .feature-card {
    padding: 28px 24px !important;
  }

  /* Fine Homes & Estates "Five Pillars" rows */
  .pillar-row,
  .pillars-grid,
  .pillars,
  [class*="pillars"] {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .pillar,
  .pillar-card {
    padding: 24px !important;
  }
  .pillar h3,
  .pillar-card h3 {
    font-size: 22px !important;
    line-height: 1.2 !important;
  }

  /* Mentorship program cards (01/02/03 + Duration/Compensation/Tracking) */
  .mentor-grid,
  .mentorship-grid,
  .program-grid,
  .program-cards,
  [class*="mentor"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Probate / seller process two-column "What is X" / "Why work" cards */
  .why-card,
  .what-card,
  .info-card {
    padding: 24px !important;
  }
  .why-card h3,
  .what-card h3,
  .info-card h3 {
    font-size: 20px !important;
    line-height: 1.2 !important;
  }

  /* Three21 values grid (Empowerment / Growth / Joy) */
  [class*="values"],
  .three-values,
  .three21,
  .three21-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .value-card,
  .value-block,
  .three21-card {
    padding: 24px !important;
  }
  .value-card .label,
  .value-block .label {
    font-size: 12px !important;
    letter-spacing: 0.22em !important;
    word-spacing: 0;
  }

  /* Make sure card content doesn't have padding-collapse weirdness */
  [class*="-card"] {
    box-sizing: border-box !important;
  }

  /* Long button labels on mobile (DOWNLOAD THE MARKETING PLAN) — wrap nicer */
  .btn-block, .download-btn, .resource-btn, [class*="download-btn"],
  a[class*="btn"][class*="block"] {
    text-align: center !important;
    white-space: normal !important;
    word-spacing: 0.05em !important;
    letter-spacing: 0.18em !important;
    padding: 16px 22px !important;
  }

  /* The PDF preview thumbnail next to "DOWNLOAD THE MARKETING PLAN"
     — make sure it's not floating over text */
  .pdf-preview,
  .pdf-thumb,
  .resource-thumb {
    max-width: 200px !important;
    margin: 0 auto 16px !important;
    display: block !important;
  }

  /* The two-column "Inside the program" + "Duration/Compensation"
     mentorship section — force stack */
  .mentor-2col,
  .program-2col,
  [class*="2col"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}


/* ============================================================
   ALTMAN-STYLE MOBILE MEGA MENU — accordion drawer
   Shows only top-level categories; tap to expand sub-items.
   Activated by `mobile-menu.js` toggling .mm-open class on <h4>.
   ============================================================ */
@media (max-width: 900px) {
  .mega-menu {
    width: 100% !important;
    border-left: none !important;
    background: var(--black) !important;
  }
  .mega-content {
    padding: 24px 28px 32px !important;
  }
  .mega-brand { margin-bottom: 32px !important; }
  .mega-brand img { height: 44px !important; }

  .mega-close {
    top: 22px !important;
    right: 22px !important;
    width: 40px !important;
    height: 40px !important;
  }

  /* Stack columns into one accordion list */
  .mega-columns {
    display: block !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    margin-bottom: 32px !important;
  }
  .mega-col { margin: 0 !important; }

  /* Each H4 becomes a tappable accordion row */
  .mega-col h4 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 !important;
    padding: 22px 4px !important;
    border-bottom: 1px solid rgba(189,176,139,0.18) !important;
    color: var(--cream) !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-tap-highlight-color: rgba(189,176,139,0.1);
    transition: color 0.2s;
  }
  .mega-col h4:not(:first-child) { margin-top: 0 !important; }

  /* Chevron arrow on the right */
  .mega-col h4::after {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background: var(--tan);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/></svg>") no-repeat center / contain;
    transition: transform 0.3s ease;
  }
  .mega-col h4.mm-open::after { transform: rotate(180deg); }
  .mega-col h4.mm-open { color: var(--tan) !important; }

  /* Hide all sub-lists by default */
  .mega-col ul {
    max-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: max-height 0.4s ease, padding 0.3s ease !important;
    border-bottom: 1px solid rgba(189,176,139,0.18) !important;
  }
  /* When open, expand */
  .mega-col ul.mm-open {
    max-height: 800px !important;
    padding: 12px 0 18px !important;
  }

  /* Items inside the expanded list */
  .mega-col ul li a {
    display: block !important;
    padding: 12px 14px !important;
    color: rgba(245,242,236,0.78) !important;
    font-size: 15px !important;
    letter-spacing: 0.06em !important;
    text-transform: none !important;
    font-weight: 400 !important;
    border-left: 2px solid transparent;
  }
  .mega-col ul li a:hover {
    color: var(--tan-light) !important;
    border-left-color: var(--tan) !important;
    padding-left: 18px !important;
  }
  .mega-col ul.sub {
    max-height: none !important;
    padding-left: 18px !important;
    border-left: 1px solid rgba(189,176,139,0.18) !important;
    border-bottom: none !important;
    margin: 0 0 0 14px !important;
  }
  .mega-col ul.sub li a {
    font-size: 13px !important;
    padding: 8px 12px !important;
    color: rgba(245,242,236,0.6) !important;
  }
  .mega-col ul li.divider {
    height: 1px !important;
    background: rgba(189,176,139,0.18) !important;
    margin: 8px 14px !important;
  }

  /* CONTACT BLOCK — bottom of drawer, Altman-style */
  .mega-contact-block {
    padding-top: 30px !important;
    margin-top: 0 !important;
    border-top: 1px solid rgba(189,176,139,0.2) !important;
  }
  .mega-phone {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--cream) !important;
    margin-bottom: 22px !important;
    gap: 12px !important;
  }
  .mega-phone .ico {
    width: 22px !important;
    height: 22px !important;
    background: var(--tan);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2a15.05 15.05 0 0 1-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01A11.36 11.36 0 0 1 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2a15.05 15.05 0 0 1-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01A11.36 11.36 0 0 1 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z'/></svg>") no-repeat center / contain;
  }
  .mega-offices-grid {
    display: block !important;
    margin-bottom: 28px !important;
  }
  .mega-office {
    margin-bottom: 18px !important;
    padding-left: 30px !important;
    position: relative;
    color: rgba(245,242,236,0.78) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    letter-spacing: 0.04em;
  }
  .mega-office::before {
    content: '';
    position: absolute;
    left: 0; top: 2px;
    width: 16px; height: 16px;
    background: var(--tan);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>") no-repeat center / contain;
  }
  .mega-office .loc {
    font-family: 'Manrope', sans-serif;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--cream) !important;
    margin-bottom: 4px !important;
  }
  .mega-cta {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 18px 24px !important;
    border: 1.5px solid var(--tan) !important;
    background: transparent !important;
    color: var(--cream) !important;
    font-weight: 700 !important;
    letter-spacing: 0.32em !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   HOMEPAGE-SPECIFIC FIXES — owner cards + hero carousel
   ============================================================ */
@media (max-width: 700px) {

  /* HERO carousel — shrink so photos actually fit a phone screen */
  .hero {
    height: auto !important;
    min-height: 440px !important;
    max-height: 600px !important;
    padding: 90px 20px 50px !important;
  }
  .hero-slides {
    position: absolute !important;
    inset: 0 !important;
  }
  .hero-slide {
    background-size: cover !important;
    background-position: center !important;
    height: 100% !important;
    width: 100% !important;
  }
  /* Stronger overlay specifically for mobile so text cuts through bright photos */
  .hero::after {
    background: linear-gradient(180deg, rgba(22,23,27,0.78) 0%, rgba(22,23,27,0.62) 35%, rgba(22,23,27,0.78) 65%, rgba(22,23,27,0.96) 100%),
                radial-gradient(ellipse 95% 75% at 50% 50%, rgba(22,23,27,0.82) 0%, rgba(22,23,27,0.45) 60%, rgba(22,23,27,0) 95%) !important;
  }
  .hero-content {
    position: relative !important;
    z-index: 3 !important;
    text-align: center;
    padding: 0 !important;
  }
  .hero-tag {
    font-size: 10px !important;
    letter-spacing: 0.32em !important;
    margin-bottom: 14px !important;
    color: #f5f2ec !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.95), 0 0 24px rgba(0,0,0,0.8), 0 1px 2px rgba(0,0,0,1) !important;
  }
  .hero h1 {
    font-size: clamp(30px, 8vw, 44px) !important;
    line-height: 1.05 !important;
    margin-bottom: 14px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 0 3px 18px rgba(0,0,0,0.95), 0 0 36px rgba(0,0,0,0.85), 0 1px 3px rgba(0,0,0,1) !important;
  }
  .hero h1 em {
    color: #d4c08a !important;
    font-weight: 500 !important;
  }
  .hero p {
    font-size: 13px !important;
    line-height: 1.55 !important;
    margin-bottom: 22px !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    text-shadow: 0 2px 12px rgba(0,0,0,0.95), 0 0 24px rgba(0,0,0,0.8), 0 1px 2px rgba(0,0,0,1) !important;
  }
  .hero-cta {
    padding: 13px 24px !important;
    font-size: 11px !important;
    letter-spacing: 0.18em !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    background: rgba(0,0,0,0.35) !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9) !important;
  }
  .hero-dots {
    bottom: 18px !important;
  }
  .hero-dot {
    width: 8px !important;
    height: 8px !important;
  }

  /* OWNER CARDS — Jeff + Jason on homepage. Force a clean stack:
     image on top with capped height, info below. No overlapping. */
  .owners-section {
    padding: 60px 20px !important;
  }
  .owners-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    max-width: 100% !important;
  }
  .owner-card {
    display: block !important;
    grid-template-columns: 1fr !important;
    overflow: hidden !important;
    position: relative !important;
  }
  .owner-img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: 360px !important;
    aspect-ratio: 4 / 5 !important;
    object-fit: cover !important;
    object-position: center 18% !important;
    position: static !important;
  }
  .owner-info {
    padding: 24px 22px 28px !important;
    position: static !important;
    display: block !important;
  }
  .owner-info .role {
    font-size: 10px !important;
    letter-spacing: 0.26em !important;
    margin-bottom: 8px !important;
  }
  .owner-info h3 {
    font-size: 24px !important;
    line-height: 1.15 !important;
    margin-bottom: 12px !important;
    word-spacing: 0.04em !important;
  }
  .owner-info p {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
  }
  .owner-info .read-more-btn {
    padding: 12px 24px !important;
    font-size: 11px !important;
    letter-spacing: 0.22em !important;
  }

  /* OPERATIONAL LEADS section — same treatment */
  .leads-section {
    padding: 60px 20px !important;
  }
  .leads-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
  .lead-card {
    display: block !important;
    grid-template-columns: 1fr !important;
  }
  .lead-img, .lead-photo {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 5 !important;
    max-height: 320px !important;
    object-fit: cover !important;
  }
  .lead-info {
    padding: 20px 18px 24px !important;
  }
  .lead-info h3,
  .lead-card h3 {
    font-size: 20px !important;
    line-height: 1.2 !important;
  }

  /* TOP PRODUCERS / agent grids on homepage */
  .producers-grid,
  .top-producers,
  .agents-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .producer-card,
  .agent-card {
    max-width: 360px !important;
    margin: 0 auto !important;
  }

  /* Big image breaks (the parallax image dividers between sections) */
  .big-image-break {
    height: 200px !important;
    background-attachment: scroll !important;
  }

  /* MOSAIC GALLERY (events page) — make every tile show faces.
     Force every tile to a portrait aspect ratio with object-position
     biased toward heads. The Group Celebration tile gets a slightly
     taller aspect ratio so all the people fit. Higher-specificity
     selectors so they beat the .mosaic .tile.t-2x1 collapse rule. */
  .mosaic .tile.t-2x1,
  .mosaic .tile.t-2x2,
  .mosaic .tile.t-1x2,
  .mosaic .tile.t-3x1,
  .mosaic .tile {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: 0 !important;
  }
  .mosaic .tile img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 30% !important;
  }

  /* Group Celebration tile — taller (whole image fits, no crop) */
  .mosaic .tile.t-2x1.group-celeb-host,
  .mosaic .tile.group-celeb-host {
    grid-column: span 2 !important;
    grid-row: span 1 !important;
    aspect-ratio: 3 / 4 !important;
  }
  .mosaic .tile.group-celeb-host img.group-celeb-tile {
    object-fit: cover !important;
    object-position: center 50% !important;
  }
}

