/**
 * TaylorMade Law — homepage-only styles (page 153)
 * Loaded after tml-responsive.css so global edits cannot remove these rules.
 */

/* ── Hero: purple frame + inset image + floating testimonial ──
   Live DOM: .sp-home-hero-img-wrap > .e-con-inner > [image widget, testimonial]
   (no .sp-home-hero-frame wrapper on page 153) */

body.elementor-page-153 .sp-home-hero-img-wrap,
body .elementor-page .sp-home-hero-img-wrap,
body .elementor-page [data-id="heror0009"] {
  position: relative !important;
  overflow: visible !important;
  width: 100% !important;
  max-width: 540px !important;
  margin-left: auto !important;
  --padding-top: 0 !important;
  --padding-bottom: 0 !important;
  --padding-left: 0 !important;
  --padding-right: 0 !important;
}

/* Purple matte frame */
body.elementor-page-153 .sp-home-hero-img-wrap > .e-con-inner,
body .elementor-page .sp-home-hero-img-wrap > .e-con-inner,
body .elementor-page [data-id="heror0009"] > .e-con-inner {
  position: relative !important;
  overflow: visible !important;
  background-color: #230036 !important;
  padding: 20px !important;
  border-radius: 16px !important;
  border: 4px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow:
    0 25px 50px -12px rgba(35, 0, 54, 0.35),
    0 12px 28px -8px rgba(35, 0, 54, 0.18) !important;
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  margin: 0 !important;
}

/* Square inset photo */
body.elementor-page-153 [data-id="heroimg0010"],
body .elementor-page .sp-home-hero-img-wrap > .e-con-inner > .elementor-widget-image,
body .elementor-page .sp-home-hero-frame .elementor-widget-image {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.35) !important;
  margin: 0 !important;
}

body.elementor-page-153 [data-id="heroimg0010"] .elementor-widget-container,
body .elementor-page .sp-home-hero-img-wrap .elementor-widget-image .elementor-widget-container,
body .elementor-page .sp-home-hero-frame .elementor-widget-image .elementor-widget-container {
  width: 100% !important;
  height: 100% !important;
}

body.elementor-page-153 [data-id="heroimg0010"] img,
body .elementor-page .sp-home-hero-img-wrap .elementor-widget-image img,
body .elementor-page .sp-home-hero-frame .elementor-widget-image img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  object-fit: cover !important;
  border-radius: 12px !important;
  display: block !important;
}

/* Floating testimonial card */
body.elementor-page-153 [data-id="tcard0011"],
body .elementor-page .sp-home-hero-img-wrap .sp-home-testimonial,
body .elementor-page .sp-home-testimonial {
  position: absolute !important;
  bottom: -24px !important;
  left: -24px !important;
  z-index: 20 !important;
  width: 280px !important;
  max-width: calc(100% - 8px) !important;
  background: #ffffff !important;
  border: 1px solid #cec3cf !important;
  border-radius: 12px !important;
  padding: 24px !important;
  box-shadow:
    0 12px 32px -4px rgba(0, 0, 0, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.08) !important;
  flex: none !important;
  align-self: auto !important;
}

body .elementor-page .sp-home-testimonial .elementor-widget-text-editor {
  font-family: "Source Serif 4", Georgia, serif !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #1a1c1b !important;
}

body .elementor-page .sp-home-testimonial .elementor-widget-text-editor p {
  margin: 0 !important;
}

body .elementor-page .sp-home-testimonial .elementor-widget-text-editor:first-child p,
body .elementor-page .sp-home-testimonial .elementor-widget-text-editor:nth-child(1) p {
  color: #c5b097 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  letter-spacing: 2px;
  line-height: 1 !important;
  margin-bottom: 8px !important;
}

body .elementor-page .sp-home-testimonial .elementor-widget-text-editor:nth-child(3) p {
  color: #4c444e !important;
  margin-top: 8px !important;
}

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;
}

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::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;
  }

  body .elementor-page .sp-home-trust-grid {
    --e-con-grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* ── Tablet (768–1024px) ── */
@media (max-width: 1024px) {
  body.elementor-page-153 .sp-home-hero,
  body .elementor-page .sp-home-hero {
    --padding-top: 64px !important;
    --padding-bottom: 40px !important;
    --padding-left: 32px !important;
    --padding-right: 32px !important;
  }

  body .elementor-page .sp-home-how-grid {
    --e-con-grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  body .elementor-page .sp-home-how-step-mid::before,
  body .elementor-page .sp-home-how-step-mid::after {
    display: none !important;
  }

  body .elementor-page .sp-home-trust-grid {
    --e-con-grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }

  body .elementor-page .sp-home-how-header {
    margin-bottom: 32px !important;
  }

  body .elementor-page .sp-home-how-header > .elementor-widget-heading .elementor-heading-title {
    font-size: clamp(1.5rem, 4vw, 2rem) !important;
  }

  /* Hero: single column — text then visual */
  body .elementor-page [data-id="herogrid0003"],
  body .elementor-page .sp-home-hero .e-grid {
    --e-con-grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Override Elementor rule that hides hero image on tablet */
  body.elementor-page-153 [data-id="heror0009"],
  body .elementor-page .sp-home-hero-img-wrap {
    display: flex !important;
    max-width: min(420px, 100%) !important;
    margin: 8px auto 0 !important;
  }

  body .elementor-page .sp-home-why-img .elementor-widget-image img {
    height: auto !important;
    min-height: 280px;
    max-height: 420px;
  }

  body.elementor-page-153 [data-id^="pagrid"] {
    --e-con-grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
}

/* ── Mobile (≤767px) ── */
@media (max-width: 767px) {
  body.elementor-page-153 .sp-home-hero,
  body .elementor-page .sp-home-hero {
    --padding-top: 48px !important;
    --padding-bottom: 32px !important;
    --padding-left: 20px !important;
    --padding-right: 20px !important;
  }

  body .elementor-page .sp-home-trust-section {
    --padding-top: 32px !important;
    --padding-bottom: 32px !important;
  }

  body .elementor-page .sp-home-trust-grid {
    --e-con-grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }

  body .elementor-page .sp-home-trust-item {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
  }

  body .elementor-page .sp-home-trust-item .elementor-widget-icon .elementor-icon {
    font-size: 28px !important;
  }

  body .elementor-page .sp-home-trust-label .elementor-heading-title {
    font-size: 12px !important;
  }

  body .elementor-page .sp-home-trust-item .elementor-widget-text-editor {
    font-size: 11px !important;
  }

  /* Hero typography + CTA */
  body .elementor-page .sp-home-hero h1.elementor-heading-title {
    font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
    line-height: 1.12 !important;
  }

  body .elementor-page .sp-home-hero .elementor-widget-text-editor {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  body .elementor-page .sp-home-hero .elementor-button-wrapper {
    width: 100% !important;
  }

  body .elementor-page .sp-home-hero .elementor-button {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    text-align: center !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  /* Hero visual — compact purple frame + stacked testimonial */
  body.elementor-page-153 [data-id="heror0009"],
  body .elementor-page .sp-home-hero-img-wrap {
    display: flex !important;
    max-width: min(360px, 100%) !important;
    margin: 24px auto 0 !important;
  }

  body.elementor-page-153 [data-id="heror0009"] > .e-con-inner,
  body .elementor-page .sp-home-hero-img-wrap > .e-con-inner {
    padding: 12px !important;
    border-width: 3px !important;
    aspect-ratio: auto !important;
    padding-bottom: 16px !important;
  }

  body.elementor-page-153 [data-id="heroimg0010"],
  body .elementor-page .sp-home-hero-img-wrap > .e-con-inner > .elementor-widget-image {
    aspect-ratio: 4 / 3 !important;
    max-height: 280px !important;
  }

  body.elementor-page-153 [data-id="tcard0011"],
  body .elementor-page .sp-home-hero-img-wrap .sp-home-testimonial {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 16px !important;
    padding: 20px !important;
  }

  /* How It Works */
  body .elementor-page .sp-home-how-section {
    --padding-top: 40px !important;
    --padding-bottom: 40px !important;
  }

  body .elementor-page .sp-home-how-step .elementor-widget-heading h3.elementor-heading-title {
    font-size: clamp(1.125rem, 4.5vw, 1.375rem) !important;
  }

  body .elementor-page .sp-home-how-step .elementor-widget-text-editor {
    font-size: 0.9375rem !important;
    max-width: 100% !important;
  }

  /* Practice areas */
  body .elementor-page .sp-home-practice-card {
    padding: 24px !important;
  }

  body.elementor-page-153 [data-id^="pagrid"] {
    --e-con-grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Why TML */
  body .elementor-page .sp-home-why-img {
    border-radius: 16px !important;
    min-height: 0 !important;
  }

  body .elementor-page .sp-home-why-img .elementor-widget-image,
  body .elementor-page .sp-home-why-img .elementor-widget-image img {
    height: auto !important;
    min-height: 220px !important;
    max-height: 320px !important;
  }

  body .elementor-page .sp-keep-row {
    gap: 12px !important;
  }

  /* Locations */
  body.elementor-page-153 [data-id="loc0120"],
  body .elementor-page [data-id^="loc0"][data-id$="120"] {
    --padding-top: 40px !important;
    --padding-bottom: 40px !important;
  }

  body.elementor-page-153 [data-id^="citygrid"],
  body .elementor-page [data-id^="citygrid"] {
    --e-con-grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px 16px !important;
  }

  body .elementor-page .sp-home-city-link .elementor-heading-title {
    font-size: 13px !important;
    line-height: 1.4 !important;
    padding: 8px 0 !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }

  /* FAQ */
  body.elementor-page-153 [data-id^="faqwrap"],
  body .elementor-page [data-id^="faqwrap"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.elementor-page-153 [data-id^="faqacc"] .elementor-accordion .elementor-tab-title,
  body .elementor-page [data-id^="faqacc"] .elementor-accordion .elementor-tab-title {
    min-height: 48px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    font-size: 1rem !important;
  }

  body.elementor-page-153 [data-id^="faqacc"] .elementor-accordion .elementor-tab-content,
  body .elementor-page [data-id^="faqacc"] .elementor-accordion .elementor-tab-content {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
  }

  /* Final CTA */
  body .elementor-page .sp-home-final-cta {
    --padding-top: 40px !important;
    --padding-bottom: 40px !important;
  }

  body .elementor-page .sp-home-final-cta-band {
    padding: 32px 20px !important;
    border-radius: 16px !important;
  }

  body .elementor-page .sp-home-final-cta .elementor-button-wrapper {
    width: 100% !important;
  }

  body .elementor-page .sp-home-final-cta .elementor-button {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  body .elementor-page .sp-home-final-cta h2.elementor-heading-title {
    font-size: clamp(1.375rem, 5vw, 1.75rem) !important;
  }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
  body.elementor-page-153 .sp-home-hero,
  body .elementor-page .sp-home-hero {
    --padding-left: 16px !important;
    --padding-right: 16px !important;
  }

  body .elementor-page .sp-home-trust-grid {
    --e-con-grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  body .elementor-page .sp-home-trust-item {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  body.elementor-page-153 [data-id="heror0009"],
  body .elementor-page .sp-home-hero-img-wrap {
    max-width: 100% !important;
  }

  body.elementor-page-153 [data-id^="citygrid"],
  body .elementor-page [data-id^="citygrid"] {
    --e-con-grid-template-columns: 1fr !important;
  }
}

/* Hover polish — desktop only */
@media (hover: hover) and (pointer: fine) {
  body .elementor-page .sp-home-practice-card:hover {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body .elementor-page .sp-home-practice-card,
  body .elementor-page .sp-home-practice-card .sp-home-pa-icon .elementor-icon {
    transition: none !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;
}
