/* CiviHelv | Paridad móvil Android, Samsung Internet, Chrome y Safari iOS
   Aprobación 13/11/2026: NO modificar escritorio ni imágenes originales.
   Alcance: portada fotográfica, Mi historia y Por qué nació CiviHelv.
   Los estilos solo actúan en pantalla de hasta 700px. */
@media screen and (max-width:700px) {
  /* Portada: mantener el mismo formato fotográfico aprobado, sin huecos vacíos. */
  body.ch-cinema.ch-future[data-ch-section="inicio"] .ch-home-dashboard
  .ch-svc-grid.ch-civic-services {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:13px!important;
    align-items:start!important;
  }
  body.ch-cinema.ch-future[data-ch-section="inicio"] .ch-home-dashboard
  .ch-svc-grid.ch-civic-services a.ch-svc.ch-photo-card:not(.ch-founder-final) {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto auto!important;
    gap:8px!important;
    align-items:start!important;
    align-content:start!important;
    justify-items:stretch!important;
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    padding:9px 9px 15px!important;
    text-align:left!important;
    overflow:hidden!important;
  }
  body.ch-cinema.ch-future[data-ch-section="inicio"] .ch-home-dashboard
  .ch-svc-grid.ch-civic-services a.ch-svc.ch-photo-card:not(.ch-founder-final) img.ch-service-art {
    display:block!important;
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    height:clamp(104px,28vw,146px)!important;
    max-width:none!important;
    max-height:none!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    object-fit:cover!important;
    object-position:center!important;
    border-radius:13px!important;
  }
  body.ch-cinema.ch-future[data-ch-section="inicio"] .ch-home-dashboard
  .ch-svc-grid.ch-civic-services a.ch-svc.ch-photo-card:not(.ch-founder-final) strong {
    display:block!important;
    grid-column:1!important;
    grid-row:2!important;
    align-self:start!important;
    justify-self:stretch!important;
    margin:2px 0 0!important;
    padding:0 9px!important;
    text-align:left!important;
    font-size:clamp(16px,4.6vw,19px)!important;
    line-height:1.25!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
  }
  body.ch-cinema.ch-future[data-ch-section="inicio"] .ch-home-dashboard
  .ch-svc-grid.ch-civic-services a.ch-svc.ch-photo-card:not(.ch-founder-final) small {
    display:block!important;
    grid-column:1!important;
    grid-row:3!important;
    align-self:start!important;
    justify-self:stretch!important;
    margin:0!important;
    padding:0 9px!important;
    text-align:left!important;
    font-size:clamp(13px,3.65vw,15px)!important;
    line-height:1.42!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
  }
  /* Respeta el bloque editorial del fundador: no lo convierte en tarjeta de servicio. */
  body.ch-cinema.ch-future[data-ch-section="inicio"] a.ch-founder-final.ch-founder-editorial {
    max-width:calc(100% - 18px)!important;
  }
  /* Mi historia: texto equilibrado, imagen visible y márgenes de lectura. */
  body.ch-cinema.ch-story-page section.hero.ch-story-hero {
    width:calc(100% - 24px)!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:240px!important;
    margin:12px auto!important;
    padding:30px 20px 34px!important;
    box-sizing:border-box!important;
  }
  body.ch-cinema.ch-story-page section.hero.ch-story-hero .inner {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:0!important;
  }
  body.ch-cinema.ch-story-page section.hero.ch-story-hero .tag {
    display:block!important;
    font-size:clamp(10px,2.9vw,12px)!important;
    line-height:1.45!important;
    letter-spacing:.105em!important;
    overflow-wrap:break-word!important;
  }
  body.ch-cinema.ch-story-page section.hero.ch-story-hero h1 {
    font-size:clamp(29px,8vw,39px)!important;
    line-height:1.13!important;
    letter-spacing:-.025em!important;
    margin:12px 0 16px!important;
    overflow-wrap:break-word!important;
  }
  body.ch-cinema.ch-story-page section.hero.ch-story-hero p {
    font-size:clamp(15px,4.1vw,18px)!important;
    line-height:1.5!important;
    margin:0!important;
    max-width:100%!important;
    overflow-wrap:break-word!important;
  }
  body.ch-cinema.ch-story-page main.main {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:18px 12px 38px!important;
  }
  body.ch-cinema.ch-story-page main.main article.story {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0 auto!important;
    padding:24px clamp(18px,5vw,25px)!important;
    box-sizing:border-box!important;
    overflow-wrap:break-word!important;
  }
  body.ch-cinema.ch-story-page main.main article.story h2 {
    font-size:clamp(21px,5.8vw,28px)!important;
    line-height:1.28!important;
    letter-spacing:-.015em!important;
    overflow-wrap:break-word!important;
    margin:0 0 20px!important;
  }
  body.ch-cinema.ch-story-page main.main article.story p {
    font-size:clamp(15px,4.2vw,17px)!important;
    line-height:1.6!important;
    max-width:100%!important;
  }
  body.ch-cinema.ch-story-page main.main article.story blockquote {
    margin:22px 0!important;
    padding:15px 16px!important;
    font-size:clamp(15px,4.2vw,18px)!important;
    line-height:1.5!important;
  }
  /* Fundador / Por qué CiviHelv: corregir recorte, alineación y titulares desmesurados. */
  body.ch-cinema:has(main.hero .photo) main.hero {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-items:start!important;
    justify-items:stretch!important;
    gap:17px!important;
    width:calc(100% - 24px)!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    margin:12px auto!important;
    padding:22px clamp(18px,5vw,26px) 27px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.ch-cinema:has(main.hero .photo) main.hero .photo {
    width:min(100%,190px)!important;
    max-width:190px!important;
    min-width:0!important;
    margin:0 auto 3px!important;
    border-radius:18px!important;
  }
  body.ch-cinema:has(main.hero .photo) main.hero .photo img {
    width:100%!important;
    height:auto!important;
    display:block!important;
    max-width:100%!important;
    object-fit:contain!important;
  }
  body.ch-cinema:has(main.hero .photo) main.hero article {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    text-align:left!important;
    box-sizing:border-box!important;
    overflow-wrap:break-word!important;
    hyphens:auto!important;
  }
  body.ch-cinema:has(main.hero .photo) main.hero article .tag {
    font-size:clamp(10px,2.8vw,12px)!important;
    line-height:1.5!important;
    letter-spacing:.11em!important;
    overflow-wrap:break-word!important;
  }
  body.ch-cinema:has(main.hero .photo) main.hero article h1 {
    max-width:100%!important;
    font-size:clamp(27px,7.4vw,35px)!important;
    line-height:1.13!important;
    letter-spacing:-.035em!important;
    margin:13px 0 18px!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    hyphens:auto!important;
  }
  body.ch-cinema:has(main.hero .photo) main.hero article h2 {
    max-width:100%!important;
    font-size:clamp(21px,5.6vw,27px)!important;
    line-height:1.24!important;
    margin:12px 0 18px!important;
    overflow-wrap:break-word!important;
  }
  body.ch-cinema:has(main.hero .photo) main.hero article p {
    max-width:100%!important;
    font-size:clamp(15px,4.2vw,17px)!important;
    line-height:1.6!important;
    margin:0 0 18px!important;
    overflow-wrap:break-word!important;
  }
  body.ch-cinema:has(main.hero .photo) main.hero article .buttons {
    display:flex!important;
    flex-wrap:wrap!important;
    gap:10px!important;
    margin-top:16px!important;
  }

  /* Imágenes íntegras: mostrar la fotografía entera, sin recortes por cover. */
  body.ch-cinema.ch-future[data-ch-section="inicio"] .ch-home-dashboard
  .ch-svc-grid.ch-civic-services a.ch-svc.ch-photo-card:not(.ch-founder-final) img.ch-service-art {
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    object-fit:contain!important;
    object-position:center!important;
    background:#061c39!important;
  }
  /* La tarjeta del fundador mantiene su retrato completo. */
  body.ch-cinema.ch-future[data-ch-section="inicio"] a.ch-founder-final.ch-founder-editorial img.ch-service-art {
    object-fit:contain!important;
    object-position:center!important;
  }
  /* Mi historia: la imagen completa primero; lectura del título debajo,
     sin estirar ni ampliar la foto, igual en Android y Safari iOS. */
  body.ch-cinema.ch-story-page section.hero.ch-story-hero {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:0!important;
    background:#081d3c!important;
    background-image:none!important;
    padding:10px 10px 24px!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
  }
  body.ch-cinema.ch-story-page section.hero.ch-story-hero img.ch-story-hero-photo {
    position:relative!important;
    inset:auto!important;
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    object-fit:contain!important;
    object-position:center!important;
    border-radius:12px!important;
    margin:0 auto 12px!important;
    filter:none!important;
    background:#061932!important;
  }
  body.ch-cinema.ch-story-page section.hero.ch-story-hero .ch-story-photo-shade {
    display:none!important;
  }
  body.ch-cinema.ch-story-page section.hero.ch-story-hero .inner {
    position:relative!important;
    z-index:1!important;
    width:100%!important;
    max-width:100%!important;
    padding:9px clamp(9px,3vw,18px) 0!important;
    text-align:left!important;
  }

  /* Fotografía completa en todas las tarjetas de Qué ofrece hoy CiviHelv.
     NO ampliar/cortar el original, incluso en teléfonos estrechos. */
  body.ch-cinema.ch-future[data-ch-section="inicio"] .ch-home-dashboard
  .ch-svc-grid.ch-civic-services a.ch-svc.ch-photo-card:not(.ch-founder-final) > img.ch-service-art{
    display:block!important;
    position:static!important;
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    object-fit:contain!important;
    object-position:center center!important;
    background-color:#071e3d!important;
    box-sizing:border-box!important;
    clip-path:none!important;
  }
  body.ch-cinema.ch-future[data-ch-section="inicio"] .ch-home-dashboard
  .ch-svc-grid.ch-civic-services a.ch-svc.ch-photo-card:not(.ch-founder-final){
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:max-content max-content max-content!important;
    align-content:start!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
  }
  /* Si vuelve a mostrarse un mosaico fotográfico HTML, mantener
     fotos completas sin afectar iconos, banderas, logos ni retratos. */
  body.ch-cinema.ch-future[data-ch-section="inicio"] .ch-legacy-home-grid .tile-visual img,
  body.ch-cinema.ch-future[data-ch-section="inicio"] .section .grid a.tile .tile-visual img{
    width:100%!important;
    max-width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
  }
}


/* 2026-11-18 · Navegación móvil en una sola línea + Navigator visible */
@media screen and (max-width:700px){
  header.top{
    width:100%!important;
    max-width:100%!important;
    padding-left:12px!important;
    padding-right:12px!important;
    overflow:visible!important;
  }
  header.top nav{
    order:3!important;
    display:flex!important;
    flex:0 0 100%!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:10px!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-x:contain!important;
    scroll-snap-type:x proximity!important;
    scrollbar-width:none!important;
    padding:4px 2px 9px!important;
  }
  header.top nav::-webkit-scrollbar{display:none!important}
  header.top nav a{
    flex:0 0 auto!important;
    min-width:max-content!important;
    white-space:nowrap!important;
    scroll-snap-align:start!important;
    padding:9px 11px!important;
    border:1px solid #276a92!important;
    border-radius:12px!important;
    background:#071b3dbf!important;
  }
  header.top nav a:first-child{
    border-color:#64eaff!important;
    box-shadow:0 0 11px #2be5ff45!important;
  }
  header.top .brand{flex:1 1 auto!important;min-width:0!important}
  header.top .lang{
    flex:0 0 auto!important;
    flex-wrap:nowrap!important;
  }
  body{overflow-x:hidden!important}
  .actions .ch-navigator-primary{
    border-color:#74f1ff!important;
    background:linear-gradient(105deg,#007adf,#21b7d8,#733ed4)!important;
    box-shadow:0 0 22px #35e7ff66!important;
  }
}