/* Small layout fixes for the pages copied from WordPress. Loaded on every page. */

/* Icon lists: Elementor makes every link inside a list item a flex block (it expects one link wrapping the
   whole item), so a line like "Sources: NYU Stern, IBISWorld, ProjectionHub" stacked each link on its own
   line with stray commas. Links inside the item text flow inline. */
.elementor-widget .elementor-icon-list-item .elementor-icon-list-text a {
  display: inline !important; width: auto !important;
}
.elementor-widget .elementor-icon-list-item > .elementor-icon-list-text { flex: 1 1 auto; min-width: 0; }

/* Phones */
@media (max-width: 767px) {
  /* wide tables scroll sideways inside their own box instead of running off the screen */
  .elementor-widget-text-editor table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .elementor-widget-text-editor table td, .elementor-widget-text-editor table th { min-width: 110px; }
  /* long titles (e.g. "LLC vs. S-Corporation: …") wrap instead of spilling past the edge */
  h1.elementor-heading-title, h2.elementor-heading-title { overflow-wrap: break-word; hyphens: auto; }
}
@media (max-width: 480px) {
  /* footer column headings (Services / Company / Resources) fit their narrow columns */
  [data-elementor-type="footer"] .elementor-heading-title { font-size: 20px !important; }
}

/* Laptops (e.g. a 13" MacBook): the sections are boxed at 1440px with no side padding, so below ~1536px the
   header, hero text and buttons ran into the window edges. Give every top-level section a side gutter. */
@media (min-width: 1025px) and (max-width: 1535px) {
  .elementor .e-con.e-parent {
    padding-left: max(var(--padding-left, 0px), clamp(24px, 3.5vw, 48px)) !important;
    padding-right: max(var(--padding-right, 0px), clamp(24px, 3.5vw, 48px)) !important;
  }
  /* home hero text block is a fixed 650px inside a 49% column; let it shrink instead of spilling left */
  .elementor-element-b64bcc0 { max-width: calc(100% - 2em); }
  /* keep "Schedule a consultation" on one line in the header */
  [data-elementor-type="header"] .elementor-button-text { white-space: nowrap; }
}
/* smaller laptop windows: tighten the menu so logo, links and button fit on one row */
@media (min-width: 1025px) and (max-width: 1279px) {
  [data-elementor-type="header"] .elementor-nav-menu--main > .elementor-nav-menu { flex-wrap: nowrap; }
  [data-elementor-type="header"] .elementor-nav-menu--main .elementor-item {
    padding-left: 7px !important; padding-right: 7px !important; font-size: 14px !important; white-space: nowrap;
  }
  [data-elementor-type="header"] .elementor-button { padding-left: 18px !important; padding-right: 18px !important; font-size: 15px !important; }
  .elementor-element-6945685 { flex: 0 0 auto !important; width: 130px !important; }  /* logo */
  .elementor-element-6945685 img { max-width: 100%; height: auto; }
  .elementor-element-6f7a7c5 { flex: 1 1 auto !important; width: auto !important; min-width: 0; }  /* menu */
  .elementor-element-493f2c7 { flex: 0 0 auto !important; width: auto !important; }  /* button */
}
@media (min-width: 1025px) and (max-width: 1139px) {
  [data-elementor-type="header"] .elementor-nav-menu--main .elementor-item { padding-left: 5px !important; padding-right: 5px !important; }
}

/* Home "services" cards: the grid aligned cards to the top, so a card with less text (Planning) was shorter
   than the others in its row. Stretch them to equal height per row. */
.e-con.elementor-element-0a181b5 { --align-items: stretch; align-items: stretch; }
