/* Mobile adjustments only. original.css remains unchanged. */
@media screen and (max-width: 920px) {
  body { -webkit-text-size-adjust: 100%; }
  .ldn-hero-picture { display: contents; }
  .block--desktop-hidden { display: grid !important; }
  .block--mobile-hidden { display: none !important; }
  .block-layout, .layout-element, .text-box { min-width: 0; }
  .text-box, .text-box p, .text-box h1, .text-box h2, .text-box h3, .text-box h4, .text-box h5, .text-box h6 { white-space: normal !important; }
  .text-box p, .text-box h6 { overflow-wrap: break-word; }
  .text-box p { font-size: 16px !important; line-height: 1.6 !important; }
  .text-box p + p { margin-top: 12px; }
  .text-box p[data-mobile-empty] { display: none; }
  .text-box h1 { font-size: clamp(28px, 8vw, 36px) !important; line-height: 1.15 !important; }
  .grid-button { min-width: 0 !important; min-height: 44px !important; font-size: 15px !important; line-height: 1.35 !important; padding: 12px 18px !important; white-space: normal !important; }

  /* Preserve the logo and blue navigation; give touch controls enough space. */
  .block-header-layout-mobile { min-height: 66px; padding: 11px 0 !important; }
  .burger { width: 44px !important; height: 44px !important; flex-shrink: 0; }
  .burger__bun, .burger__meat { left: 10px !important; width: 24px !important; transform-origin: center !important; }
  .burger__bun:first-child { top: 13px !important; }
  .burger__meat { top: 21px !important; }
  .burger__bun:last-child { top: 29px !important; }
  .burger--open .burger__bun:first-child, .burger--open .burger__bun:last-child { top: 21px !important; }
  .burger--open .burger__meat { width: 0 !important; }
  .block-header-layout-mobile__dropdown--open { background: rgba(14, 93, 150, .97) !important; overflow-y: auto !important; overscroll-behavior: contain; padding-bottom: max(24px, env(safe-area-inset-bottom)) !important; }
  .block-header-layout-mobile__dropdown .item-content { min-height: 44px; display: inline-flex; align-items: center; }
  .block-header-layout-mobile__dropdown .item-content__icon-container-wrapper { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .block-header-layout-mobile__dropdown .block-header-item__dropdown { margin-top: 8px; gap: 8px; }

  /* Portrait backgrounds stay attached to their section as browser bars move. */
  #zvnITt .block-background__image, #zvnITt .block-background__overlay,
  #zLvAo6 .block-background__image, #zLvAo6 .block-background__overlay { position: absolute; height: 100%; object-position: center; }
  #zvnITt > .block-layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(24px, 1fr) auto 12px auto 28px auto auto minmax(32px, 1fr) auto 24px; min-height: min(760px, calc(100svh - 66px)); max-width: 640px; padding: 24px 20px; }
  #zvnITt .layout-element { grid-column: 1; width: 100%; left: auto; min-height: 0; }
  #zvnITt [data-mobile-id="zmdmyu"] { grid-row: 2; }
  #zvnITt [data-mobile-id="z0Jfb_"] { grid-row: 4; }
  #zvnITt [data-mobile-id="zPtLvc"] { grid-row: 6; height: auto; }
  #zvnITt [data-mobile-id="zJi3nJ"] { grid-row: 7; height: auto; }
  #zvnITt [data-mobile-id="z8WGRF"] { grid-row: 6 / 8; }
  #z8WGRF { position: absolute; inset: 0; height: 100% !important; min-height: 0 !important; }
  #zvnITt [data-mobile-id="zhobEd"] { grid-row: 9; height: auto; }
  #zmdmyu p { font-size: clamp(17px, 4.5vw, 21px) !important; line-height: 1.25 !important; margin: 0 !important; text-align: center; }
  #z0Jfb_ h2 { font-size: clamp(30px, 8.2vw, 42px) !important; line-height: 1.1 !important; margin: 0 !important; }
  #zPtLvc { padding: 14px 16px 6px; text-align: center; }
  #zJi3nJ { padding: 0 16px 14px; text-align: center; }
  #zPtLvc h5, #zPtLvc h5 * { font-size: 15px !important; line-height: 1.5 !important; margin: 0 !important; }
  #zJi3nJ h5, #zJi3nJ h5 * { font-size: 13px !important; line-height: 1.5 !important; margin: 0 !important; }
  [data-mobile-kind="social"] a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

  /* Keep both photo cards and their overlays, with rows sized by their content. */
  #ai-ENfUbm > .block-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: 24px auto 18px auto 22px auto 24px 32px 24px auto 18px auto 22px auto 24px; min-height: 0; max-width: 640px; padding: 32px 20px; }
  #ai-ENfUbm .layout-element { grid-column: 1; height: auto; }
  #ai-ENfUbm [data-mobile-kind="image"] { height: 100%; }
  #ai-ENfUbm [data-mobile-kind="text"], #ai-ENfUbm [data-mobile-kind="button"] { width: calc(100% - 48px); margin-inline: auto; }
  #ai-ENfUbm [data-mobile-id="ai-M9gUGp"] { grid-row: 1 / 8; }
  #ai-ENfUbm [data-mobile-id="ai-wXcLeW"] { grid-row: 2; }
  #ai-ENfUbm [data-mobile-id="zop6_m"] { grid-row: 4; }
  #ai-ENfUbm [data-mobile-id="zqZxn3"] { grid-row: 6; }
  #ai-ENfUbm [data-mobile-id="ai-QX0tGH"] { grid-row: 9 / 16; }
  #ai-ENfUbm [data-mobile-id="zOwGt2"] { grid-row: 10; }
  #ai-ENfUbm [data-mobile-id="zdg6Bn"] { grid-row: 12; }
  #ai-ENfUbm [data-mobile-id="zp_MZu"] { grid-row: 14; }
  #ai-ENfUbm [data-mobile-kind="button"] { justify-items: center; }
  #ai-ENfUbm .text-box h6 { font-size: 18px !important; line-height: 1.4 !important; }
  #ai-ENfUbm .grid-button { justify-self: center !important; color: #fff !important; background: transparent !important; border: 1px solid #fff !important; }
  #ai-ENfUbm .image-wrapper { max-height: none !important; }

  /* The existing family photo arrangement remains; remove fixed text heights. */
  #ai-GOJBzc > .block-layout { max-width: 640px; padding: 32px 20px; min-height: 0; grid-template-rows: 0 auto 24px auto 32px 20px auto 20px 16px 20px auto 20px 0; }
  #ai-kKHhq_ h2 { font-size: clamp(28px, 7vw, 36px) !important; line-height: 1.2 !important; }
  #ai-agLrmB h6 { font-size: 18px !important; line-height: 1.5 !important; }

  /* About LDN: same content, cards and colors with natural vertical sizing. */
  #zLvAo6 > .block-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; min-height: clamp(460px, calc(100vw * 16 / 9 - 66px), calc(100svh - 66px)); max-width: none; padding: 20px; align-items: center; }
  #zLvAo6 .layout-element { grid-row: 1; grid-column: 1; height: auto; text-align: center; }
  #zor3o- p { margin: 0 !important; font-size: clamp(18px, 5vw, 24px) !important; line-height: 1.3 !important; }
  #zNomtU > .block-layout, #zBvnlu > .block-layout { display: block; min-height: 0; max-width: 640px; padding: 32px 20px; }
  #zNomtU .layout-element, #zBvnlu .layout-element { height: auto; }
  #ai-C6vtQL h3 { font-size: clamp(25px, 6.5vw, 32px) !important; line-height: 1.25 !important; }
  #ai-C6vtQL h6 { font-size: 19px !important; line-height: 1.45 !important; }
  #zBvnlu [data-mobile-kind="image"] { aspect-ratio: 1.05; }

  #quienes-somos { padding: 24px 20px; }
  #quienes-somos > .block-layout { position: relative; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto auto auto 12px auto auto auto; gap: 18px; min-height: 0; max-width: 600px; padding: 28px 20px; }
  #quienes-somos .layout-element { grid-column: 1; height: auto; }
  #quienes-somos [data-mobile-id="zDL4nN"] { position: absolute; inset: 0; width: 100%; height: 100%; grid-row: auto; grid-column: auto; }
  #quienes-somos [data-mobile-id="zBYdPF"] { grid-row: 1; }
  #quienes-somos [data-mobile-id="zv3E47"] { grid-row: 2; }
  #quienes-somos [data-mobile-id="zwB1t5"] { grid-row: 3; width: 48px; height: 48px; justify-self: center; }
  #quienes-somos [data-mobile-id="zpQnWx"] { grid-row: 4 / 7; height: 100%; }
  #quienes-somos [data-mobile-id="zVuomB"] { grid-row: 4; padding: 14px 12px 0; }
  #quienes-somos [data-mobile-id="z2Jif3"] { grid-row: 5; padding-inline: 12px; }
  #quienes-somos [data-mobile-id="zABM6b"] { grid-row: 6; padding: 0 16px 16px; }
  #quienes-somos [data-mobile-id="z109ph"] { grid-row: 8 / 11; height: 100%; }
  #quienes-somos [data-mobile-id="zm5g22"] { grid-row: 8; padding: 14px 12px 0; }
  #quienes-somos [data-mobile-id="zQ0QqI"] { grid-row: 9; padding-inline: 12px; }
  #quienes-somos [data-mobile-id="z0Lh6C"] { grid-row: 10; padding: 0 16px 16px; }
  #quienes-somos h2 { font-size: clamp(25px, 6.5vw, 32px) !important; line-height: 1.25 !important; }
  #quienes-somos h4 { font-size: 22px !important; line-height: 1.3 !important; }
  #quienes-somos h6 { font-size: 17px !important; line-height: 1.5 !important; }
  #quienes-somos [data-mobile-id="zBYdPF"] h6 { font-size: 14px !important; }
  #quienes-somos .image-wrapper { max-height: none !important; }

  #experiencia { padding: 24px 20px; }
  #experiencia > .block-layout { position: relative; display: flex; flex-direction: column; gap: 20px; min-height: 0; max-width: 600px; padding: 28px 20px; }
  #experiencia .layout-element { height: auto; }
  #experiencia [data-mobile-kind="image"] { display: none; }
  #experiencia [data-mobile-id="z_sApl"] { display: grid; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
  #experiencia [data-mobile-kind="text"] { z-index: 1; }
  #experiencia .image-wrapper { max-height: none !important; }
  #experiencia h2 { font-size: clamp(25px, 6.5vw, 32px) !important; line-height: 1.25 !important; }
  #experiencia h6 { font-size: 16px !important; line-height: 1.45 !important; }
  #zzhL0c p { margin-bottom: 16px !important; }
  #zzhL0c p:has(> strong:only-child) { margin-top: 26px !important; font-size: 19px !important; }

  /* Belief cards: keep backgrounds; citations wrap inside usable touch targets. */
  body[data-page="creencias-y-valores-iglesia-ldn"] section:not(.block--footer) > .block-layout { position: relative; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; gap: 16px 12px; min-height: 0; max-width: 640px; padding: 36px 36px; }
  body[data-page="creencias-y-valores-iglesia-ldn"] section:not(.block--footer) .layout-element { grid-row: auto; grid-column: auto; height: auto; }
  body[data-page="creencias-y-valores-iglesia-ldn"] section:not(.block--footer) [data-mobile-kind="text"] { grid-column: 1 / -1; }
  body[data-page="creencias-y-valores-iglesia-ldn"] section:not(.block--footer) [data-mobile-kind="image"] { position: absolute; inset: 12px 20px; width: calc(100% - 40px); height: calc(100% - 24px); z-index: 0; }
  body[data-page="creencias-y-valores-iglesia-ldn"] section:not(.block--footer) [data-mobile-kind="text"],
  body[data-page="creencias-y-valores-iglesia-ldn"] section:not(.block--footer) [data-mobile-kind="button"] { z-index: 1; }
  body[data-page="creencias-y-valores-iglesia-ldn"] section:not(.block--footer) .image-wrapper { max-height: none !important; }
  body[data-page="creencias-y-valores-iglesia-ldn"] section:not(.block--footer) .text-box p:first-child { font-size: 20px !important; line-height: 1.3 !important; }
  #z18PEv > .block-layout { gap: 20px !important; }
  #z18PEv h6 { font-size: 22px !important; line-height: 1.4 !important; }

  /* Contact: remove fixed gaps, let the email break, and keep the map in bounds. */
  #zlMrnb > .block-layout { display: flex; flex-direction: column; gap: 28px; min-height: 0; max-width: 640px; padding: 36px 20px; }
  #zlMrnb .layout-element { height: auto; }
  #zlMrnb [data-mobile-id="zaCbon"] { order: 0; }
  #zlMrnb [data-mobile-id="zP0iW4"] { order: 1; height: clamp(220px, 60vw, 360px); }
  #zlMrnb [data-mobile-id="zYj_9J"] { order: 2; }
  #zlMrnb [data-mobile-id="zDIJWZ"] { order: 3; }
  #zlMrnb [data-mobile-id="z-UF0i"] { order: 4; }
  #zlMrnb a[href^="mailto:"] { overflow-wrap: anywhere; }
  #zlMrnb p { margin-bottom: 12px !important; }

  /* Existing footer content in the same order, with no large empty bottom row. */
  #zi07eb > .block-layout { display: flex; flex-direction: column; gap: 12px; max-width: 640px; min-height: 0; padding: 40px 20px max(40px, env(safe-area-inset-bottom)); }
  #zi07eb .layout-element { height: auto; }
  #zi07eb h6 { font-size: 18px !important; line-height: 1.5 !important; }
  #zi07eb [data-mobile-id="zVVUOP"] { order: 0; }
  #zi07eb [data-mobile-id="zPa5BD"] { order: 1; }
  #zi07eb [data-mobile-id="zIgSqS"] { order: 2; }
  #zi07eb [data-mobile-id="z75jKm"] { order: 3; }
  #zi07eb [data-mobile-id="z_mEXf"] { order: 4; }
  #zi07eb [data-mobile-id="z0786f"] { order: 5; margin-top: 20px; }
  #zi07eb [data-mobile-id="zVTHBK"] { order: 6; }
  #zVTHBK p > span { display: block; }
  #zVTHBK a { white-space: normal !important; }
  #zi07eb [data-mobile-id="z2c_U0"] { order: 7; margin-top: 20px; }
  #zi07eb [data-mobile-id="zBljVC"] { order: 8; }
  #zi07eb [data-mobile-id="zr6YUr"] { order: 9; }
  #zi07eb [data-mobile-id="zmkCKW"] { order: 10; }
  #zi07eb [data-mobile-id="zVVUOP"] h6, #zi07eb [data-mobile-id="z0786f"] h6,
  #zi07eb [data-mobile-id="z2c_U0"] h6 { font-size: 15px !important; }
}

@media screen and (max-width: 920px) and (orientation: landscape) {
  #zvnITt > .block-layout { min-height: 440px; }
  #zLvAo6 > .block-layout { min-height: max(240px, calc(100svh - 66px)); }
}
