/**
 * Megrez Homepage Styles
 * Sections: Testimonials · Services · News · Jose Strip
 * Targets only front page — enqueued conditionally via megrez-homepage-styles.php
 */

.megrez-hero-line { display: none; }

/* ─── TICKER — fondo claro ───────────────────────────────────────────────── */
.megrez-hero-ticker {
  background: #E0E0E0 !important;
}

.megrez-hero-ticker .ticker-link,
.megrez-hero-ticker .ticker-link strong,
.megrez-hero-ticker .ticker-link:hover {
  color: #000000 !important;
}

/* ─── VALUE STRIP — Kadence Row Layout (WordPress-native block) ─────────── */
/* Selector: .kb-row-layout-id1741_c94685-63                                  */
/* 3 columns: f7da9f-e4 · 8e0514-87 · 6db90c-c6                              */

.kb-row-layout-id1741_c94685-63 {
  background: #CB110B;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  width: 100vw !important;
  padding: 15px 0 !important;
  margin-top: 30px !important;
  margin-bottom: 0 !important;
}

.kb-row-layout-id1741_c94685-63 > .kt-row-column-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0 !important;
  max-width: 1290px !important;
  margin: 0 auto !important;
  padding: 0 100px !important;
}

/* Auto-size columns to their content (override Kadence equal-thirds) */
.kb-row-layout-id1741_c94685-63 .wp-block-kadence-column {
  width: auto !important;
  flex: 0 0 auto !important;
  padding: 0 !important;
}

.kb-row-layout-id1741_c94685-63 .kt-inside-inner-col {
  padding: 0 !important;
}

/* Phrase text */
.kb-row-layout-id1741_c94685-63 .wp-block-paragraph {
  font-size: 12px !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.85) !important;
  white-space: nowrap !important;
  margin: 0 !important;
  padding: 0 20px !important;
  line-height: 1 !important;
  border: none !important;
}

/* Bold words */
.kb-row-layout-id1741_c94685-63 .wp-block-paragraph strong {
  font-weight: 700 !important;
  color: #FFFFFF !important;
}

/* Color override — broad selectors to beat Kadence/GeneratePress inheritance */
.kb-row-layout-id1741_c94685-63,
.kb-row-layout-id1741_c94685-63 p,
.kb-row-layout-id1741_c94685-63 span,
.kb-row-layout-id1741_c94685-63 .kt-row-column-wrap {
  color: rgba(255, 255, 255, 0.85) !important;
}

.kb-row-layout-id1741_c94685-63 strong {
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

/* Dot separators after columns 1 and 2 (not 3) */
.kadence-column1741_f7da9f-e4 .kt-inside-inner-col > p::after,
.kadence-column1741_8e0514-87 .kt-inside-inner-col > p::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: inline-block;
  margin: 0 20px;
  vertical-align: middle;
}

/* ─── GAP FIXES: hero → value strip → testimonials ──────────────────────── */
/* .megrez-hero-col-right has top: 80px — need padding-bottom > 80px         */
/* so the shifted right column (stats) isn't covered by the red strip         */
.megrez-hero-main {
  padding-bottom: 48px !important;
}

/* Testimonials already at padding-top: 12px — no change needed              */

@media (max-width: 768px) {
  .kb-row-layout-id1741_c94685-63 > .kt-row-column-wrap {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .kb-row-layout-id1741_c94685-63 .wp-block-paragraph {
    white-space: normal !important;
    text-align: center !important;
  }
  .kadence-column1741_f7da9f-e4 .kt-inside-inner-col > p::after,
  .kadence-column1741_8e0514-87 .kt-inside-inner-col > p::after {
    display: none;
  }
}

/* ─── SHARED: Section label (H3 used as eyebrow / red uppercase tag) ─────── */
.mgz-label,
h3.mgz-label {
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #CB110B !important;
  line-height: 1.5 !important;
  margin-bottom: 32px !important;
}

/* ─── SHARED: Max-width wrapper for services + news ─────────────────────── */
/* Testimonials (ae77a8) excluded — it uses full-width + padding like services */
.kb-row-layout-id1741_0e872d-6b,
.kb-row-layout-id1741_c32654-b5 {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
}

/* ─── SHARED: Horizontal offset matching hero (net 80px from parent 100px) ── */
.kb-row-layout-id1741_0e872d-6b > .kt-row-column-wrap,
.kb-row-layout-id1741_c32654-b5 > .kt-row-column-wrap {
  margin-left: -30px !important;
  margin-right: -30px !important;
}


/* ═══════════════════════════════════════════════════════════════════════════ */
/* SECTION 1 — TESTIMONIALS                                                    */
/* Styles now managed by megrez-testimonials.php (mu-plugin, wp_head priority  */
/* 20). See that file for all testimonials CSS.                                */
/* ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════════ */
/* SECTION 2 — SERVICES                                                        */
/* Heading: standalone .mgz-label H3 injected before the rowlayout            */
/* Kadence Row Layout: uniqueID 1741_0e872d-6b (equal / 50-50)                */
/* ═══════════════════════════════════════════════════════════════════════════ */


.kb-row-layout-id1741_0e872d-6b {
  padding-top: 0 !important;
  padding-bottom: 40px !important;
  background: #ffffff;
}

.kb-row-layout-id1741_0e872d-6b > .kt-row-column-wrap {
  gap: 48px !important;
}

/* Each service line (paragraph) */
.kb-row-layout-id1741_0e872d-6b .wp-block-paragraph {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.5;
  padding-bottom: 16px;
  border-bottom: 0.5px solid #eeeeee;
  margin-bottom: 16px;
}

.kb-row-layout-id1741_0e872d-6b .wp-block-paragraph:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Make the "— description" text lighter */
.kb-row-layout-id1741_0e872d-6b .wp-block-paragraph {
  /* The dash + description uses the same paragraph — style via content if needed */
  color: #1a1a1a;
}

/* Arrow → turns red */
.kb-row-layout-id1741_0e872d-6b .wp-block-paragraph a {
  color: #CB110B;
  text-decoration: none;
}


/* ═══════════════════════════════════════════════════════════════════════════ */
/* SECTION 3 — LATEST NEWS                                                     */
/* Heading: standalone .mgz-label H3 above the rowlayout                      */
/* Kadence Row Layout: uniqueID 1741_c32654-b5 (3 equal columns)              */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Heading for news — wrap the heading + row in a container-like look */
h3.mgz-label + .wp-block-kadence-rowlayout#kb-row-layout-id1741_c32654-b5,
h3.mgz-label + .kb-row-layout-id1741_c32654-b5 {
  margin-top: 0 !important;
}

/* Outer section background */
.kb-row-layout-id1741_c32654-b5 {
  padding-top: 8px !important;
  padding-bottom: 40px !important;
  background: transparent; /* bg set on the wrapping area below */
}

/* Give the news block + its heading a grey background */
/* Since heading and rowlayout are siblings, we use a pseudo wrapper approach */
/* via a negative-margin trick: extend the bg from the rowlayout */
.kb-row-layout-id1741_c32654-b5::before {
  content: '';
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: 0;
  bottom: 0;
  background: #f9f9f9;
  z-index: -1;
}

.kb-row-layout-id1741_c32654-b5 {
  position: relative;
}

/* Each news item column */
.kb-row-layout-id1741_c32654-b5 .wp-block-paragraph {
  font-size: 14px;
  color: #1a1a1a;
  line-height: 1.6;
  font-weight: 400;
  padding-left: 14px;
  border-left: 2px solid #CB110B;
  margin-bottom: 0;
}

/* Gap between columns */
.kb-row-layout-id1741_c32654-b5 > .kt-row-column-wrap {
  gap: 32px !important;
}

/* Standalone label H3 above news — needs the grey bg too */
/* Target: the H3 immediately before the news rowlayout */
.entry-content > h3.mgz-label:last-of-type {
  background: #f9f9f9;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  padding-left: calc(50vw - 600px + 100px) !important;
  padding-right: calc(50vw - 600px + 100px) !important;
  padding-top: 40px !important;
  margin-bottom: 24px !important;
}


/* ═══════════════════════════════════════════════════════════════════════════ */
/* SECTION 4 — JOSE GODOY STRIP                                               */
/* Group block with class .megrez-jose-strip                                   */
/* ═══════════════════════════════════════════════════════════════════════════ */

.megrez-jose-strip {
  background: #CB110B;
  color: #ffffff;
  padding: 20px 0;
  margin-bottom: 60px !important;
  /* Full-width bleed */
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  padding-left: calc(50vw - 600px);
  padding-right: calc(50vw - 600px);
}

.megrez-jose-strip .wp-block-group__inner-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 100px;
  padding-right: 100px;
}

/* Circular photo placeholder */
.megrez-jose-strip .wp-block-group__inner-container::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

.megrez-jose-strip .wp-block-paragraph {
  color: #ffffff !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5;
  border: none !important;
}

.megrez-jose-strip .wp-block-paragraph:nth-child(1) {
  font-size: 15px;
  font-weight: 500;
}

.megrez-jose-strip .wp-block-paragraph:nth-child(2) {
  font-size: 13px;
  opacity: 0.85;
}


/* ═══════════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE — Mobile (max-width: 768px)                                      */
/* ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Reset negative margins on mobile */
  .kb-row-layout-id1741_ae77a8-26 > .kt-row-column-wrap,
  .kb-row-layout-id1741_0e872d-6b > .kt-row-column-wrap,
  .kb-row-layout-id1741_c32654-b5 > .kt-row-column-wrap {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Testimonials: stack columns */
  .kb-row-layout-id1741_ae77a8-26 > .kt-row-column-wrap {
    flex-direction: column !important;
  }

  /* Services: stack columns */
  .kb-row-layout-id1741_0e872d-6b > .kt-row-column-wrap {
    flex-direction: column !important;
    gap: 0 !important;
  }

  /* News: stack to 1 column */
  .kb-row-layout-id1741_c32654-b5 > .kt-row-column-wrap {
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* News heading: full-width grey bg, override calc → 20px */
  .entry-content > h3.mgz-label:last-of-type {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Remove old outer-element padding overrides (now on kt-row-column-wrap) */
  .kb-row-layout-id1741_ae77a8-26,
  .kb-row-layout-id1741_0e872d-6b,
  .kb-row-layout-id1741_c32654-b5 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Jose strip: center text, photo above text */
  .megrez-jose-strip {
    padding-left: 20px;
    padding-right: 20px;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .megrez-jose-strip .wp-block-group__inner-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .kb-row-layout-id1741_ae77a8-26 {
    padding-top: 20px !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════ */
/* SECTION PADDING — Lateral padding for homepage sections                    */
/*                                                                             */
/* Sections targeted:                                                          */
/*   1741_44856c-93 + 1741_f629c9-7b  → Meet Your Consultant (label + bio)   */
/*   1741_53fae4-36 + 1741_69c59a-0d  → Immigration by industry (label+cards)*/
/*   1741_d6d9a8-e3 + 1741_258107-2c  → Guides for Latin Americans (label+cards)*/
/*   1741_a46fb4-d8 + 1741_add139-3d  → Updates & policy changes (label+blog)*/
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ── Desktop (>1024px): 100px ──────────────────────────────────────────── */
.kb-row-layout-id1741_44856c-93,
.kb-row-layout-id1741_f629c9-7b,
.kb-row-layout-id1741_53fae4-36,
.kb-row-layout-id1741_69c59a-0d,
.kb-row-layout-id1741_d6d9a8-e3,
.kb-row-layout-id1741_258107-2c,
.kb-row-layout-id1741_a46fb4-d8,
.kb-row-layout-id1741_add139-3d {
  padding-left: 100px !important;
  padding-right: 100px !important;
}

/* ── Tablet (768px–1024px): 40px ───────────────────────────────────────── */
@media (max-width: 1024px) and (min-width: 768px) {
  .kb-row-layout-id1741_44856c-93,
  .kb-row-layout-id1741_f629c9-7b,
  .kb-row-layout-id1741_53fae4-36,
  .kb-row-layout-id1741_69c59a-0d,
  .kb-row-layout-id1741_d6d9a8-e3,
  .kb-row-layout-id1741_258107-2c,
  .kb-row-layout-id1741_a46fb4-d8,
  .kb-row-layout-id1741_add139-3d {
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}

/* ── Mobile (<768px): 20px ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  .kb-row-layout-id1741_44856c-93,
  .kb-row-layout-id1741_f629c9-7b,
  .kb-row-layout-id1741_53fae4-36,
  .kb-row-layout-id1741_69c59a-0d,
  .kb-row-layout-id1741_d6d9a8-e3,
  .kb-row-layout-id1741_258107-2c,
  .kb-row-layout-id1741_a46fb4-d8,
  .kb-row-layout-id1741_add139-3d {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}



/* ═══════════════════════════════════════════════════════════════════════════ */
/* SECTION LABELS — paragraph eyebrows in Guides + Updates sections           */
/* Targets the first <p> inside each label row (IMMIGRATE FROM YOUR COUNTRY   */
/* and Latest immigration news). Matches red-dash pattern of other labels.    */
/* ═══════════════════════════════════════════════════════════════════════════ */

.kb-row-layout-id1741_d6d9a8-e3 .kt-inside-inner-col > p:first-child,
.kb-row-layout-id1741_a46fb4-d8 .kt-inside-inner-col > p:first-child {
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #CB110B !important;
  line-height: 1.5 !important;
  margin-bottom: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.kb-row-layout-id1741_d6d9a8-e3 .kt-inside-inner-col > p:first-child::before,
.kb-row-layout-id1741_a46fb4-d8 .kt-inside-inner-col > p:first-child::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 2px;
  background: #CB110B;
}


/* ═══════════════════════════════════════════════════════════════════════════ */
/* GUIDES FOR LATIN AMERICANS — flag/country images                           */
/* Row: kb-row-layout-id1741_258107-2c (4 columns: MX, CL, PE, CO)           */
/* ═══════════════════════════════════════════════════════════════════════════ */

.kb-row-layout-id1741_258107-2c .wp-block-image {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 12px !important;
}

.kb-row-layout-id1741_258107-2c .wp-block-image img {
  width: 80px !important;
  height: 53px !important;
  object-fit: cover !important;
  border-radius: 4px !important;
  display: block !important;
}


/* ═══════════════════════════════════════════════════════════════════════════ */
/* MEET YOUR CONSULTANT — section styles                                       */
/* Label row: 44856c-93 · Outer bio row: f629c9-7b · 2-col: 6e20a6-ef        */
/* Bio col: 24f139-da · Photo col: 681b1c-d2 · Stats row: f1c705-28          */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ── Section label: red dash + uppercase eyebrow ───────────────────────── */
.kb-row-layout-id1741_44856c-93 .kt-inside-inner-col > h3 {
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #CB110B !important;
  line-height: 1.5 !important;
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.kb-row-layout-id1741_44856c-93 .kt-inside-inner-col > h3::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 2px;
  background: #CB110B;
}

/* ── Gap: label → H2 title ~16px total ──────────────────────────────────── */
/* Zero out label row bottom + all nested row/col padding-top              */
.kb-row-layout-id1741_44856c-93 {
  padding-bottom: 0 !important;
}
.kb-row-layout-id1741_f629c9-7b {
  padding-top: 16px !important;
  padding-bottom: 48px !important;
}
/* Strip default Kadence padding-top from intermediate nested rows */
.kb-row-layout-id1741_f0b5ab-3f,
.kb-row-layout-id1741_6e20a6-ef {
  padding-top: 0 !important;
}
/* Strip column inner padding-top from wrapper columns */
.kadence-column1741_8fbe6e-be > .kt-inside-inner-col,
.kadence-column1741_abe207-44 > .kt-inside-inner-col {
  padding-top: 0 !important;
}
/* H2 itself: no extra top margin */
.mgz-consultant-heading {
  margin-top: 0 !important;
}

/* ── H2 title split: bold first line / light gray second line ───────────── */
.mgz-consultant-heading {
  font-size: 32px !important;
  font-weight: 700 !important;
  color: #000000 !important;
  line-height: 1.2 !important;
  margin-bottom: 16px !important;
}
.mgz-heading-light {
  font-weight: 300 !important;
  color: #595959 !important;
}

/* ── Bio paragraphs: justify ─────────────────────────────────────────────── */
.kadence-column1741_24f139-da .kt-inside-inner-col > p {
  text-align: justify !important;
}

/* ── "More about Megrez →" — last paragraph, close to bio text ──────────── */
/* Reduce margin-bottom of the preceding bio paragraph */
.kadence-column1741_24f139-da .kt-inside-inner-col > p:nth-last-of-type(2) {
  margin-bottom: 8px !important;
}
/* Style the link paragraph itself */
.kadence-column1741_24f139-da .kt-inside-inner-col > p:last-of-type {
  font-size: 13px !important;
  margin-top: 0 !important;
  margin-bottom: 16px !important;
  text-align: left !important;
}
.kadence-column1741_24f139-da .kt-inside-inner-col > p:last-of-type a {
  font-size: 13px !important;
  color: #CB110B !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

/* ── Stat cards: full bio-col width, over photo via z-index ─────────────── */
.kb-row-layout-id1741_f1c705-28 {
  max-width: 100% !important;
  padding: 0 !important;
  margin-top: 0 !important;
  position: relative !important;
  z-index: 3 !important;
}
.kb-row-layout-id1741_f1c705-28 > .kt-row-column-wrap {
  gap: 12px !important;
  flex-wrap: nowrap !important;
  padding: 0 !important;
}
.kb-row-layout-id1741_f1c705-28 .wp-block-kadence-column {
  flex: 1 !important;
}
.kb-row-layout-id1741_f1c705-28 .kt-inside-inner-col {
  background: #F5F5F5 !important;
  border-radius: 4px !important;
  border-left: 3px solid #CB110B !important;
  padding: 10px 14px !important;
  min-height: 44px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}
/* Reset all children margins */
.kb-row-layout-id1741_f1c705-28 .kt-inside-inner-col > * {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}
/* Stat number — first element */
.kb-row-layout-id1741_f1c705-28 .kt-inside-inner-col > :first-child {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #000000 !important;
}
/* Stat subtitle — second element */
.kb-row-layout-id1741_f1c705-28 .kt-inside-inner-col > :last-child {
  font-size: 10px !important;
  font-weight: 400 !important;
  color: #595959 !important;
  margin-top: 3px !important;
  white-space: nowrap !important;
}

/* ── Photo column: absolute on right, overlaps text ─────────────────────── */
.kb-row-layout-id1741_6e20a6-ef > .kt-row-column-wrap {
  position: relative !important;
}
.kadence-column1741_681b1c-d2 {
  position: absolute !important;
  right: -40px !important;
  top: -70px !important;
  bottom: -25px !important;
  width: calc(42% + 45px) !important;
  z-index: 4 !important;
  pointer-events: none !important;
}
.kadence-column1741_681b1c-d2 .kt-inside-inner-col {
  padding: 0 !important;
  height: 100% !important;
}
.kadence-column1741_681b1c-d2 img {
  width: 100% !important;
  height: 100% !important;
  max-height: 480px !important;
  object-fit: contain !important;
  object-position: bottom center !important;
  display: block !important;
}

/* ── Responsive: mobile stack ────────────────────────────────────────────── */
@media (max-width: 767px) {
  .kb-row-layout-id1741_6e20a6-ef > .kt-row-column-wrap {
    flex-direction: column !important;
  }
  .kadence-column1741_681b1c-d2 {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    bottom: auto !important;
    right: auto !important;
  }
  .kadence-column1741_681b1c-d2 img {
    max-height: 300px !important;
    object-position: top center !important;
  }
  .kb-row-layout-id1741_f1c705-28 {
    max-width: 100% !important;
  }
}
