/**
 * TaylorMade Law — global responsive overrides
 * Complements Elementor structure: hero full / content boxed @1200px
 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: clip;
}

.elementor img,
.elementor video {
  max-width: 100%;
  height: auto;
}

/* ── Tablet (≤1024px) ─────────────────────────────── */
@media (max-width: 1024px) {
  .e-con.e-parent > .e-con-inner {
    max-width: 100% !important;
  }

  /* Phase 1 boxed sections full width on tablet */
  body .elementor-page .e-con.e-parent.e-con-boxed > .e-con-inner {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ── Mobile (≤767px) ──────────────────────────────── */
@media (max-width: 767px) {
  #page,
  .site,
  .elementor-page,
  .elementor-location-header {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Section padding — page content only (not header/footer templates) */
  body .elementor-page .e-con.e-parent {
    --padding-left: 20px;
    --padding-right: 20px;
  }

  body .elementor-page .e-con.e-parent:first-of-type {
    --padding-top: 56px;
    --padding-bottom: 56px;
  }

  body .elementor-page .e-con.e-parent:not(:first-of-type) {
    --padding-top: 48px;
    --padding-bottom: 48px;
  }

  /* Phase 1 grids — single column fallback on mobile */
  body .elementor-page .e-con.e-grid > .e-con-inner {
    --e-con-grid-template-columns: repeat(1, 1fr) !important;
    --grid-column-gap: 16px !important;
    --grid-row-gap: 16px !important;
  }

  /* Keep compact horizontal rows (evidence chips, icon+heading) */
  body .elementor-page .e-con.sp-keep-row.e-flex.e-con--row {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  body .elementor-page .e-con.sp-keep-row .elementor-widget-heading {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  body .elementor-page .e-con.sp-keep-row .elementor-widget-icon {
    flex: 0 0 auto !important;
  }

  /* Hero / CTA button rows may wrap */
  body .elementor-page .sp-hero-v2 .e-con.e-flex.e-con--row,
  body .elementor-page .sp-helps-band .e-con.e-flex.e-con--row {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
  }

  /* Boxed sections use full viewport width on small screens */
  .e-con.e-parent.e-con-boxed > .e-con-inner {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

    /* ── Mobile typography (site-wide, scoped) ──
   * Large clamps apply only to page heroes & section titles.
   * Paragraph-style headings, footer, nav, cards, and labels keep readable sizes.
   */

  /* Elementor "default" headings on <p> — links, labels, small titles (NOT hero size) */
  body .elementor-page .elementor-widget-heading p.elementor-heading-title.elementor-size-default {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  /* Page heroes — h1 in hero sections only */
  body .elementor-page .sp-hero-v2 h1.elementor-heading-title,
  body .elementor-page .sp-home-hero h1.elementor-heading-title,
  body .elementor-page > .e-con.e-parent:first-of-type h1.elementor-heading-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
    line-height: 1.15 !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }

  /* Section titles — h2 in page content (exclude header/footer templates) */
  body .elementor-page .e-con.e-parent:not(.elementor-location-footer):not(.elementor-location-header) h2.elementor-heading-title {
    font-size: clamp(1.375rem, 5vw, 1.875rem) !important;
    line-height: 1.2 !important;
  }

  /* Subsection titles — h3 in page content */
  body .elementor-page .e-con.e-parent:not(.elementor-location-footer):not(.elementor-location-header) h3.elementor-heading-title {
    font-size: clamp(1.125rem, 4vw, 1.375rem) !important;
    line-height: 1.25 !important;
  }

  /* Template cards & compact UI — preserve designed sizes */
  body .elementor-page .sp-feature-card .elementor-heading-title,
  body .elementor-page .sp-bento-card .elementor-heading-title,
  body .elementor-page .sp-related-card .elementor-heading-title,
  body .elementor-page .sp-home-practice-card .elementor-heading-title,
  body .elementor-page .sp-home-trust-label .elementor-heading-title,
  body .elementor-page .sp-home-city-link .elementor-heading-title,
  body .elementor-page .sp-keep-row .elementor-heading-title {
    font-size: unset !important;
    line-height: unset !important;
  }

  /* Nav menus & lists */
  .elementor-location-footer .elementor-widget-nav-menu a,
  .elementor-location-footer .elementor-widget-icon-list .elementor-icon-list-text,
  .elementor-location-header .elementor-nav-menu a {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }

  .elementor-location-header .elementor-nav-menu--dropdown a {
    font-size: 16px !important;
    line-height: 1.45 !important;
  }

  /* FAQ accordion titles */
  body .elementor-page .elementor-widget-accordion .elementor-accordion-title {
    font-size: 1rem !important;
    line-height: 1.45 !important;
  }

  /* Counter labels */
  body .elementor-page .elementor-widget-counter .elementor-counter-title {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
  }

  /* Body copy baseline */
  .elementor-widget-text-editor {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  /* Buttons — keep label text proportional */
  body .elementor-page .elementor-button .elementor-button-text {
    font-size: 0.9375rem !important;
    line-height: 1.3 !important;
  }

  /* Hero / band CTAs may stay larger */
  body .elementor-page .sp-hero-v2 .elementor-button .elementor-button-text,
  body .elementor-page .sp-home-hero .elementor-button .elementor-button-text,
  body .elementor-page .sp-final-cta .elementor-button .elementor-button-text,
  body .elementor-page .sp-helps-band .elementor-button .elementor-button-text {
    font-size: unset !important;
    line-height: unset !important;
  }
.wpforms-submit {
    min-height: 44px;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  /* Touch-friendly primary CTAs — not inline related-link buttons */
  body .elementor-page .sp-final-cta .elementor-button,
  body .elementor-page .sp-helps-band .elementor-button,
  body .elementor-page .sp-hero-v2 .elementor-button {
    min-height: 44px;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  body .elementor-page .sp-final-cta .elementor-button-wrapper {
    width: 100%;
  }

  body .elementor-page .sp-final-cta .elementor-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Practice Areas — stat cards 2×2 on mobile */
  [data-id="888687e"] {
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }

  [data-id="888687e"] > .e-con.e-child {
    width: 50% !important;
    flex: 1 1 50% !important;
  }

  /* Practice Areas — card grid single column */
  [data-id="pagridcards"] {
    flex-direction: column !important;
  }

  [data-id="pagridcards"] > .e-con.e-child {
    width: 100% !important;
  }

  /* Hide decorative hero images on small screens */
  .pa-hero-img-wrap,
  [data-id="paheroimg"] {
    display: none !important;
  }

  /* Contact — form stacks cleanly */
  .wpforms-container-full,
  .wpforms-form {
    max-width: 100% !important;
  }

  .wpforms-field input,
  .wpforms-field textarea,
  .wpforms-field select {
    font-size: 16px !important;
  }

  /* FAQ accordion touch targets */
  .elementor-accordion .elementor-tab-title {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  /* Footer — stack columns */
  .elementor-location-footer .e-con.e-flex.e-con--row {
    flex-direction: column !important;
    gap: 24px;
  }

  .elementor-location-footer .e-con.e-flex.e-con--row > .e-con.e-child {
    width: 100% !important;
  }

  /* Counter / icon-list spacing */
  .elementor-widget-counter .elementor-counter-number-wrapper,
  .elementor-widget-icon-list .elementor-icon-list-items {
    justify-content: center;
  }

  /* Prevent fixed-width inner rows from overflowing */
  body .elementor-page .e-con[style*="width: 1200px"],
  body .elementor-page .e-con.e-child[style*="width: 1200px"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  body .elementor-page .e-con.e-parent .e-con.e-child {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .elementor-page .sp-feature-card,
  body .elementor-page .sp-bento-card,
  body .elementor-page .sp-related-card {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ── Small phones (≤480px) ───────────────────────── */
@media (max-width: 480px) {
  [data-id="888687e"] > .e-con.e-child {
    width: 100% !important;
    flex: 1 1 100% !important;
  }

  body .elementor-page .e-con.e-parent {
    --padding-left: 16px;
    --padding-right: 16px;
  }
}

/* TML Header Mobile Fix */
@media (max-width: 767px) {
  .elementor-location-header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
    width: 100% !important;
    max-width: 100vw !important;
    --tml-header-offset: 104px;
  }

  .elementor-location-header [data-id="132e4701"] {
    --padding-top: 0 !important;
    --padding-bottom: 0 !important;
    --padding-left: 0 !important;
    --padding-right: 0 !important;
    animation: none !important;
    width: 100% !important;
    z-index: inherit !important;
  }

  .elementor-location-header [data-id="52e339a9"],
  .elementor-location-header [data-id="4e59bca4"] {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    overflow: visible !important;
    width: 100% !important;
  }

  .elementor-location-header [data-id="4e59bca4"] {
    position: relative !important;
    justify-content: space-between !important;
    background: #ffffff !important;
  }

  .elementor-location-header [data-id="4cf559d1"] {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 55% !important;
  }

  .elementor-location-header [data-id="164243"] {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin-left: auto !important;
    overflow: visible !important;
    position: static !important;
  }

  .elementor-location-header .elementor-sticky--active {
    position: sticky !important;
    top: 0 !important;
    width: 100% !important;
  }

  .elementor-location-header .elementor-sticky__spacer {
    display: none !important;
    height: 0 !important;
  }

  /* Keep page heroes below the header */
  .elementor-page > .e-con.e-parent:first-child {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
  }

  /* Hide all horizontal nav variants on mobile */
  .elementor-location-header .elementor-nav-menu--main,
  .elementor-location-header .elementor-widget-nav-menu .elementor-nav-menu--layout-horizontal {
    display: none !important;
  }

  .elementor-location-header .elementor-widget-nav-menu .elementor-menu-toggle {
    display: flex !important;
  }

  .elementor-location-header .elementor-widget-nav-menu,
  .elementor-location-header .elementor-widget-nav-menu .elementor-widget-container,
  .elementor-location-header .elementor-element-164243 {
    position: static !important;
    overflow: visible !important;
  }

  /* Closed by default; open only when hamburger expanded */
  .elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    display: none !important;
  }

  .elementor-location-header .elementor-menu-toggle[aria-expanded="true"] ~ .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    display: block !important;
    position: fixed !important;
    top: var(--tml-header-offset, 104px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 99999 !important;
    max-height: calc(100vh - var(--tml-header-offset, 104px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #faf9f7 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }

  .elementor-location-header .elementor-nav-menu--dropdown .elementor-nav-menu {
    flex-direction: column !important;
    width: 100% !important;
  }

  .elementor-location-header .elementor-nav-menu--dropdown .elementor-nav-menu li {
    width: 100% !important;
  }

  .elementor-location-header .elementor-nav-menu--dropdown .elementor-nav-menu a {
    justify-content: flex-start !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    white-space: normal !important;
  }
}

/* ── Specialty / trust page templates (Phase 1) ───── */
body .elementor-page .sp-hero-v2 {
  min-height: 80vh !important;
  display: flex !important;
  align-items: center !important;
}

body .elementor-page .sp-hero-v2 .elementor-heading-title {
  word-break: normal;
  white-space: normal;
}

body .elementor-page .sp-related-inline .elementor-button-wrapper,
body .elementor-page .sp-relinw .elementor-button-wrapper {
  margin: 0;
}

/* ── Homepage (ID 153) ─────────────────────────────── */
/* Hero image + testimonial overlay */
body .elementor-page .sp-home-hero-img-wrap {
  position: relative;
  overflow: visible !important;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
}

body .elementor-page .sp-home-hero-frame {
  background-color: #230036 !important;
  padding: 16px !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 50px -12px rgba(35, 0, 54, 0.25);
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden;
}

body .elementor-page .sp-home-hero-frame .elementor-widget-image {
  flex: 1 1 auto;
  min-height: 0;
}

body .elementor-page .sp-home-hero-frame .elementor-widget-image,
body .elementor-page .sp-home-hero-frame .elementor-widget-image .elementor-widget-container,
body .elementor-page .sp-home-hero-frame .elementor-widget-image img {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

body .elementor-page .sp-home-hero-frame .elementor-widget-image img {
  object-fit: cover;
  border-radius: 12px;
}

body .elementor-page .sp-home-testimonial {
  position: absolute;
  bottom: -24px;
  left: -24px;
  z-index: 3;
  max-width: 240px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.12);
}

body .elementor-page .sp-home-practice-card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

body .elementor-page .sp-home-practice-card:hover .sp-home-pa-icon .elementor-icon {
  transform: scale(1.1);
  color: #3a164d !important;
}

body .elementor-page .sp-home-practice-card .sp-home-pa-icon .elementor-icon {
  transition: transform 0.3s ease, color 0.3s ease;
}

body .elementor-page .sp-home-practice-card .elementor-heading-title {
  color: #230036 !important;
}

/* Trust stack */
body .elementor-page .sp-home-trust-section {
  background-color: #f4f3f1 !important;
  border-top: 1px solid #cec3cf;
  border-bottom: 1px solid #cec3cf;
}

body .elementor-page .sp-home-trust-grid {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

body .elementor-page .sp-home-trust-item {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 16px;
  min-width: 0;
}

body .elementor-page .sp-home-trust-item .elementor-widget-icon .elementor-icon {
  color: #230036 !important;
  font-size: 32px;
}

body .elementor-page .sp-home-trust-label .elementor-heading-title {
  display: block !important;
  color: #230036 !important;
  font-family: "Plus Jakarta Sans", sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 4px !important;
}

body .elementor-page .sp-home-trust-item .elementor-widget-text-editor {
  color: #4c444e !important;
  font-family: "Source Serif 4", serif !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

/* How It Works */
body .elementor-page .sp-home-how-section {
  background-color: #faf9f7 !important;
  overflow: visible !important;
}

body .elementor-page .sp-home-how-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px !important;
  width: 100%;
}

body .elementor-page .sp-home-how-header > .elementor-widget-heading .elementor-heading-title {
  color: #230036 !important;
  font-family: "Plus Jakarta Sans", sans-serif !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  text-align: center;
  margin: 0 !important;
}

body .elementor-page .sp-home-gold-bar {
  width: 80px !important;
  max-width: 80px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  align-self: center !important;
}

body .elementor-page .sp-home-gold-bar .elementor-divider {
  padding: 0 !important;
  margin: 0 auto !important;
}

body .elementor-page .sp-home-gold-bar .elementor-divider-separator {
  width: 80px !important;
  max-width: 80px !important;
  margin: 0 auto !important;
  border-top: 4px solid #C5B097 !important;
}

body .elementor-page .sp-home-how-grid {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  gap: 48px;
  overflow: visible !important;
}

body .elementor-page .sp-home-how-step {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center;
  gap: 16px;
  overflow: visible !important;
}

body .elementor-page .sp-home-step-circle {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 64px !important;
  flex: 0 0 64px !important;
  align-self: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #3a164d !important;
  border-radius: 50% !important;
}

body .elementor-page .sp-home-step-circle .elementor-heading-title {
  color: #ffffff !important;
  font-family: "Plus Jakarta Sans", sans-serif !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  width: auto !important;
}

body .elementor-page .sp-home-how-step .elementor-widget-heading h3.elementor-heading-title {
  color: #230036 !important;
  font-family: "Plus Jakarta Sans", sans-serif !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

body .elementor-page .sp-home-how-step .elementor-widget-text-editor {
  color: #4c444e !important;
  font-family: "Source Serif 4", serif !important;
  font-size: 16px !important;
  line-height: 1.625 !important;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

body .elementor-page .sp-home-why-img {
  background-color: #230036;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(35, 0, 54, 0.25);
}

body .elementor-page .sp-home-why-img .elementor-widget-image img {
  opacity: 0.8;
}

body .elementor-page .sp-home-final-cta-band > .e-con-inner,
body .elementor-page .sp-home-final-cta-band > .e-con {
  position: relative;
  z-index: 1;
}

/* How It Works — dashed connectors between step circles (desktop 3-col only) */
body .elementor-page .sp-home-how-step-mid {
  position: relative;
  overflow: visible !important;
}

@media (min-width: 1025px) {
  body .elementor-page .sp-home-how-grid {
    --e-con-grid-template-columns: repeat(3, 1fr) !important;
  }

  body .elementor-page .sp-home-how-step-mid {
    position: relative;
    overflow: visible !important;
  }

  body .elementor-page .sp-home-how-step-mid::before,
  body .elementor-page .sp-home-how-step-mid::after {
    content: "";
    position: absolute;
    top: 32px;
    width: calc(50% + 24px);
    border-top: 2px dashed #cec3cf;
    pointer-events: none;
    z-index: 0;
  }

  body .elementor-page .sp-home-how-step-mid::before {
    left: calc(-50% - 24px);
  }

  body .elementor-page .sp-home-how-step-mid::after {
    right: calc(-50% - 24px);
  }

  body .elementor-page .sp-home-step-circle {
    position: relative;
    z-index: 1;
  }
}

@media (max-width: 1024px) {
  body .elementor-page .sp-home-how-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

@media (max-width: 767px) {
  body .elementor-page .sp-home-trust-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }
}

/* Locations — plain text city links */
body .elementor-page .sp-home-city-link .elementor-heading-title {
  color: #ffffff !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

body .elementor-page .sp-home-city-link .elementor-heading-title:hover {
  color: #C5B097 !important;
}

@media (max-width: 767px) {
  body .elementor-page .sp-home-testimonial {
    position: static;
    margin-top: 16px;
    width: 100% !important;
  }

  body .elementor-page .sp-home-final-cta .elementor-button-wrapper {
    width: 100%;
  }

  body .elementor-page .sp-home-final-cta .elementor-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  body .elementor-page .sp-hero-v2 {
    min-height: 60vh !important;
  }


  body .elementor-page .sp-hero-v2 .elementor-button-wrapper {
    width: auto !important;
    max-width: 100% !important;
  }

  body .elementor-page .sp-hero-v2 .elementor-button {
    width: auto !important;
    max-width: 100% !important;
  }
}
