/* ===========================================================================
   C-QBO | Responsive Experience Layer | 02-12-2026
   ALCANCE: pantallas <= 1200px. Diseno de PC >1200px intacto.
   Se carga al FINAL de las hojas CSS de las 6 paginas existentes.
   No cambia DOM, rutas, APIs, PHP, formularios ni JavaScript.
   =========================================================================== */

@media (max-width: 1200px) {
  :root { --cq-mobile-gutter: clamp(18px, 4.6vw, 42px); }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
  body { overflow-wrap: break-word; }
  img, video, iframe { max-width: 100%; }
  .content-wrap, .site-footer-grid, .contact-layout,
  .project-feature-grid, .experience-grid, .services-solution-grid,
  .featured-solution-grid, .industry-flow-grid, .cq-gallery-grid,
  .company-intro, .value-cards, .dev-areas { min-width: 0; }
  .content-wrap > *, .section-heading, .site-footer-grid > *,
  .contact-layout > *, .project-card, .cq-gallery-card,
  .project-feature-grid > *, .service-unit-card, .services-solution-card,
  .industry-flow-card, .featured-solution-card { min-width: 0; }
  h1, h2, h3, p { overflow-wrap: break-word; }
  .page-hero h1, .home-hero h1, .contact-page h1 { text-wrap: balance; }
  .section-heading h2, .cta-band h2 { text-wrap: balance; }
  .button, .button-accent, .nav-cta { min-height: 44px; }
  .experience-grid .project-card img, .cq-gallery-zoom img { object-position: center; }
  .whatsapp-fab { z-index: 45; }
  #proyecto-sala-dgac, #soluciones, .services-solution-card { scroll-margin-top: 94px; }
}

/* TABLET: 769-1200px. Cambios contenidos, sin afectar la web de PC. */
@media (min-width: 769px) and (max-width: 1200px) {
  .site-header { height: 74px; }
  .site-nav { padding-inline: var(--cq-mobile-gutter); gap: clamp(10px, 2vw, 22px); }
  .desktop-nav { gap: clamp(9px, 1.25vw, 19px); font-size: clamp(11px, 1vw, 14px); }
  .nav-cta { padding: 12px 14px; white-space: nowrap; font-size: 12px; }
  .site-header .logo-shell { width: 62px; height: 58px; }
  .site-header .logo-shell .logo-full { width: 62px; max-width: 62px; height: auto; }
  .section { padding-inline: var(--cq-mobile-gutter); }
  .project-feature-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
  .project-feature-grid > a:nth-child(n) { margin-top: 0; }
  .experience-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
  .empresa-page .dev-areas { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cq-gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
  .cq-gallery-card-top { height: auto; min-height: 154px; }
  .cq-gallery-card-top h3 { font-size: clamp(18px,2vw,22px); }
  .cq-gallery-card .cq-gallery-track { height: clamp(230px,29vw,310px); }
  .services-promise-copy { padding: clamp(35px,5vw,70px); }
  .services-promise-copy h2 { font-size: clamp(30px,3.2vw,43px); }
  .contact-layout { gap: clamp(22px,4vw,44px); }
}

/* TOUCH LAYOUT: >=320px en telefono/tablet vertical. */
@media (max-width: 900px) {
  :root { --cq-mobile-gutter: clamp(18px, 5vw, 32px); }
  body { font-size: 16px; line-height: 1.6; }

  /* Cabecera: logo real visible, botones accesibles y menu sin tapar pagina. */
  .site-header, .site-header.is-scrolled { height: 70px; min-height: 70px; background: #071d2c; }
  .site-nav { height: 70px; padding-inline: var(--cq-mobile-gutter); gap: 12px; }
  .site-header .logo-shell { display:grid; width: 81px; height: 54px; padding: 0; place-items: center; overflow: visible; }
  .site-header .logo-shell .logo-full,
  .site-nav .logo-shell .logo-full { display: block !important; width: 78px; max-width: 78px; height: auto; max-height: 52px; object-fit: contain; filter: none; }
  .site-header .logo-symbol { display: none !important; }
  .menu-button { display: grid; place-items: center; margin-left: auto; width: 46px; height: 46px; min-width: 46px; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; background: rgba(255,255,255,.065); font-size: 23px; font-weight: 400; line-height: 1; cursor: pointer; }
  .menu-button:focus-visible { outline: 3px solid #73cfe7; outline-offset: 2px; }
  .desktop-nav, .nav-cta { display: none; }
  .site-header .mobile-menu, .mobile-menu { display: none; }
  .site-header .mobile-menu.is-open, .mobile-menu.is-open {
    position: fixed; inset: 70px 0 0; z-index: 55; display: flex;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    width: 100%; height: calc(100dvh - 70px); max-height: none;
    padding: 18px var(--cq-mobile-gutter) max(32px,env(safe-area-inset-bottom));
    gap: 4px; overflow-y: auto; -webkit-overflow-scrolling: touch;
    color: #fff; background: #071d2c; visibility: visible; opacity: 1;
    transform: none; box-shadow: 0 20px 28px #071d2c40;
  }
  .mobile-menu > a, .mobile-menu .mobile-cta {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 54px; padding: 12px 16px; border-radius: 10px;
    border-bottom: 1px solid rgba(255,255,255,.11); font-size: 16px; font-weight: 600;
  }
  .mobile-menu > a.active { color: #86deef; background: rgba(39,172,206,.1); }
  .mobile-menu > a:focus-visible { outline: 2px solid #86deef; outline-offset: -2px; }
  .mobile-menu .mobile-cta { margin-top: 15px; background: #146bc4; color: #fff; border: 0; justify-content: center; gap: 10px; }
  body.menu-open { overflow: hidden; }

  /* Ritmo y legibilidad compartidos. */
  .section { padding: clamp(60px,8vw,86px) var(--cq-mobile-gutter); }
  .content-wrap { width: 100%; max-width: 100%; margin-inline: auto; }
  .section-heading { margin-bottom: clamp(28px,5vw,42px); }
  .section-heading h2 { font-size: clamp(28px,4.9vw,42px); line-height: 1.12; letter-spacing: -.025em; }
  .section-heading p { font-size: clamp(15px,1.65vw,18px); line-height: 1.65; }
  .page-hero { height: auto; min-height: 0; padding: 124px 0 66px; }
  .page-hero-long { min-height: 0; }
  .page-hero > img,.page-hero > .hero-overlay,.page-hero > .technical-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
  .page-hero-content { position: relative; inset: auto; left: auto; right: auto; bottom: auto; top: auto; margin-inline: 0; padding: 0 var(--cq-mobile-gutter); max-width: 790px; }
  .page-hero-content h1 { font-size: clamp(33px,5vw,51px); line-height: 1.08; margin: 14px 0 18px; }
  .page-hero-content p { font-size: clamp(16px,2vw,19px); line-height: 1.6; }

  /* Inicio: los CTA y datos quedan antes de las secciones siguientes. */
  .home-hero { height: auto; min-height: 0; padding-top: 70px; }
  .home-hero .hero-slides, .home-hero > .hero-overlay, .home-hero > .technical-grid { position: absolute; inset: 0; }
  .home-hero .hero-layout { position: relative; display: grid; grid-template-columns: minmax(0,1fr); gap: 28px; padding: clamp(56px,8vw,84px) var(--cq-mobile-gutter) 58px; }
  .home-hero-content { position: relative; inset: auto; top: auto; bottom: auto; left: auto; right: auto; grid-column: auto; width: 100%; max-width: 760px; }
  .home-hero h1 { font-size: clamp(34px,5.4vw,52px); line-height: 1.08; margin: 14px 0 17px; }
  .home-hero p { font-size: clamp(16px,1.9vw,18px); line-height: 1.65; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
  .hero-actions .button { flex: 1 1 220px; margin-top: 0; padding: 13px 18px; text-align: center; }
  .stat-panel { position: relative; inset: auto; right: auto; bottom: auto; grid-column: auto; width: 100%; max-width: 560px; min-width: 0; margin: 0; }
  .stat-chips { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-chips > * { min-width: 0; }
  .area-strip-inner { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .area-strip-item { height: auto; min-height: 66px; padding: 13px 16px; }
  .editorial-intro,.solution-editorial>.content-wrap { grid-template-columns: minmax(0,1fr); gap: 34px; }
  .editorial-intro>.image-reveal { min-height: 320px; }
  .values-line { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .purpose-split { min-height: 0; grid-template-columns: minmax(0,1fr); }
  .purpose-split>div:first-child { padding: 64px var(--cq-mobile-gutter); }
  .purpose-split>.image-reveal { min-height: 320px; }
  .purpose-chain { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .value-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .value-strip > *, .value-strip-row > * { min-width: 0; }
  .solution-intro { position: static; }
  .solution-list-home>a { grid-template-columns: 27px 36px minmax(0,1fr) 18px; gap: 10px; padding: 20px 4px; }
  .solution-list-home h3, .solution-list-home h2 { overflow-wrap: anywhere; }
  .industry-band { padding: 76px var(--cq-mobile-gutter); }
  .industry-band .industry-tags { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .project-feature-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .project-feature-grid > a:nth-child(n) { margin-top: 0; }
  .project-feature-grid > a { min-height: 0; padding: 25px 23px 58px; border-radius: 12px; }
  .project-feature-grid h3 { font-size: clamp(19px,3vw,24px); margin: 16px 0 11px; line-height: 1.2; }
  .trusted-section { overflow: hidden; }
  .trusted-marquee { width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  .trusted-track { animation: none !important; transform: none !important; will-change: auto; }
  .trusted-client { scroll-snap-align: center; }

  /* C-QBO: adaptacion de bloques corporativos. */
  .empresa-page .company-intro { grid-template-columns: minmax(0,1fr); gap: 35px; }
  .empresa-page .company-visual { width: 100%; max-width: 100%; }
  .empresa-page .company-values { padding-block: 70px; }
  .empresa-page .value-cards, .empresa-page .dev-areas { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
  .empresa-page .value-cards article, .empresa-page .dev-areas article { min-height: 0; }
  .empresa-page .company-process-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .empresa-page .company-process-grid li:last-child { grid-column: auto; }
  .empresa-page .discipline-system { max-width: 100%; }
  .field-gallery-head { padding-inline: var(--cq-mobile-gutter); }
  .field-marquee { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type:x proximity; -webkit-overflow-scrolling: touch; }
  .field-track { animation: none !important; transform: none !important; will-change: auto; }
  .field-track > figure { scroll-snap-align: center; }

  /* Servicios: tarjetas desplegables con zonas tactiles amplias. */
  .services-promise { grid-template-columns: minmax(0,1fr); min-height: 0; }
  .services-promise-image { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
  .services-promise-copy { min-width: 0; padding: 58px var(--cq-mobile-gutter) 64px; }
  .services-promise-copy h2 { font-size: clamp(32px,5vw,48px); line-height: 1.1; }
  .services-solution-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .services-solution-card { min-height: 0; touch-action: manipulation; }
  .industry-flow-grid, .featured-solution-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .industry-flow-line { display: none; }
  .industry-flow-card,.featured-solution-card { padding: 25px 22px; }

  /* Experiencia: cards, modelos y galerias sin recortes. */
  .experience-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
  .experience-grid > .project-card { min-width: 0; }
  .experience-grid .project-image-wrap { aspect-ratio: 16 / 10; }
  .experience-grid .project-image-wrap>img { object-fit: contain !important; }
  .experience-grid .project-card > p { font-size: 14px; line-height: 1.62; }
  .experience-grid .project-card > h3 { line-height: 1.22; }
  .experience-grid .cq-technical-media { aspect-ratio: 16/10; }
  .cq-tech-view-switch { gap: 8px; }
  .cq-gallery-section { padding-block: 70px 84px; }
  .cq-gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items:stretch; }
  .cq-gallery-grid > .cq-gallery-card { display: flex; flex-direction: column; min-width: 0; height: 100%; }
  .cq-gallery-card-top { height: auto; min-height: 155px; padding: 23px 21px 19px; }
  .cq-gallery-card-top h3 { margin: 9px 0 8px; font-size: 20px; }
  .cq-gallery-card-top p { margin-top: auto; }
  .cq-gallery-card .cq-gallery-stage { min-width: 0; flex-shrink: 0; }
  .cq-gallery-card .cq-gallery-track { height: clamp(250px,32vw,320px); }
  .cq-gallery-zoom { touch-action: pan-x pan-y; }
  .cq-gallery-card .cq-gallery-slide img { object-fit: contain; }
  .cq-gallery-card .cq-gallery-controls { min-height: 70px; padding: 12px 16px; margin-top: auto; }
  .cq-gallery-buttons button { width: 44px; height: 44px; font-size: 18px; }
  .cq-gallery-dots button { min-width: 10px; min-height: 10px; }
  .cq-lightbox { width: 96vw; max-width: 96vw; max-height: 92dvh; }
  .cq-lightbox-body img { max-height: 68dvh; }
  .cq-lightbox-body button { width: 44px; height: 44px; }
  .cq-technical-dialog { width: 96vw; max-width: 96vw; max-height: 92dvh; }
  .cq-technical-dialog [data-cq-tech-modal-image] { max-width: 100%; max-height: calc(92dvh - 116px); }
  .cq-technical-open { min-height: 42px; }

  /* Contacto: formulario legible, sin zoom automatico de iOS. */
  .contact-page { min-height: 0; padding: 120px var(--cq-mobile-gutter) 72px; }
  .contact-layout { grid-template-columns: minmax(0,1fr); gap: 34px; }
  .contact-page h1 { font-size: clamp(34px,5vw,48px); line-height: 1.1; }
  .contact-data { margin-top: 28px; gap: 18px; }
  .contact-data a { overflow-wrap:anywhere; }
  .contact-layout form { width:100%; min-width:0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding: clamp(20px,4vw,32px); border-radius: 15px; }
  .contact-layout label { min-width: 0; font-size: 13px; }
  .contact-layout input:not([type=checkbox]), .contact-layout select, .contact-layout textarea { box-sizing: border-box; width: 100%; min-width:0; min-height: 48px; margin-top: 7px; padding: 12px 13px; font-family:inherit; font-size:16px; line-height:1.4; border-radius: 9px; }
  .contact-layout textarea { min-height: 140px; resize: vertical; }
  .contact-layout .check { align-items:flex-start; line-height:1.5; }
  .contact-layout .check input { flex:none; width:20px; height:20px; margin-top:2px; }
  .contact-layout form button[type=submit] { min-height: 50px; }

  /* Privacidad, CTA y pie. */
  .legal-page { min-height:0; padding: 120px var(--cq-mobile-gutter) 65px; }
  .legal-page h1 { font-size: clamp(36px,5vw,46px); line-height: 1.08; }
  .legal-page aside { margin-top:30px; padding:19px; }
  .cq-privacy-extra { padding: 30px var(--cq-mobile-gutter); }
  .cta-band { gap: 22px; padding: 65px var(--cq-mobile-gutter); }
  .cta-band h2 { font-size: clamp(28px,5vw,43px); line-height: 1.12; }
  .cta-band .button, .cta-band .button-accent { width: auto; min-height: 48px; }
  .site-footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 28px; row-gap: 34px; }
  .site-footer-grid > div { min-width: 0; }
  .footer-base { flex-wrap: wrap; gap: 10px 16px; }
  .whatsapp-fab { width: 54px; height: 54px; right: max(14px,env(safe-area-inset-right)); bottom:max(16px,env(safe-area-inset-bottom)); }
  .cq-consent { max-height: min(70dvh,600px); overflow-y:auto; }
  .cq-consent-buttons button { min-height: 44px; }
}

/* CELULAR / TABLET ESTRECHA: una columna, sin elementos minusculos. */
@media (max-width: 700px) {
  .home-hero .hero-layout { padding-block: 48px 46px; gap:24px; }
  .home-hero h1 { font-size: clamp(31px,8.2vw,42px); }
  .home-hero .home-hero-content p { font-size: 16px; }
  .hero-actions { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
  .hero-actions .button { width:100%; }
  .stat-panel { max-width:100%; padding: 21px 18px; }
  .section { padding: 62px var(--cq-mobile-gutter); }
  .section-heading h2 { font-size: clamp(28px,7.5vw,36px); }
  .page-hero { padding: 110px 0 53px; }
  .page-hero-content h1 { font-size: clamp(30px,7.9vw,41px); }
  .page-hero-content p { font-size: 16px; }
  .area-strip-inner { grid-template-columns: minmax(0,1fr); }
  .area-strip-item { min-height: 54px; padding: 12px var(--cq-mobile-gutter); }
  .editorial-intro > .image-reveal { min-height: 260px; }
  .values-line { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .purpose-split > div:first-child { padding: 57px var(--cq-mobile-gutter); }
  .purpose-split > .image-reveal { min-height: 290px; }
  .purpose-chain { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:6px; }
  .purpose-chain span { padding: 12px 10px; font-size:13px; }
  .value-strip { grid-template-columns: minmax(0,1fr); }
  .value-strip > div { border-right:0; }
  .solution-list-home>a { grid-template-columns: 24px 30px minmax(0,1fr); padding: 20px 0; }
  .solution-list-home>a>svg:last-child { display:none; }
  .industry-band { padding: 64px var(--cq-mobile-gutter); }
  .industry-band .industry-tags { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-feature-grid { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .project-feature-grid > a { min-height: 0; padding: 26px 24px 58px; }
  .project-feature-grid h3 { font-size: 22px; }
  .trusted-client { flex-basis: 220px; }
  .empresa-page .company-intro { gap: 26px; }
  .empresa-page .company-values { padding-block: 62px; }
  .empresa-page .value-cards { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .empresa-page .dev-areas { grid-template-columns: minmax(0,1fr); gap: 13px; }
  .empresa-page .company-process-grid { gap: 13px; }
  .field-gallery-head { padding-inline: var(--cq-mobile-gutter); }
  .services-promise-image { aspect-ratio: 16/10; }
  .services-promise-copy { padding: 52px var(--cq-mobile-gutter) 58px; }
  .services-promise-copy h2 { font-size: clamp(31px,7.6vw,41px); }
  .services-solution-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
  .service-unit-card,.catalog-card,.services-solution-card { min-height:0; }
  .experience-grid { grid-template-columns:minmax(0,1fr); gap:18px; }
  .experience-grid .project-image-wrap { aspect-ratio:16/10; }
  .experience-grid .project-card .project-meta { margin-top:auto; }
  .experience-grid .project-card>p { font-size:14px; }
  .cq-gallery-section { padding-block: 58px 70px; }
  .cq-gallery-grid { grid-template-columns: minmax(0,1fr); gap:17px; }
  .cq-gallery-card-top { height:auto; min-height:0; padding:22px 22px 17px; }
  .cq-gallery-card-top h3 { font-size:clamp(20px,5vw,24px); line-height:1.18; }
  .cq-gallery-card-top p { margin-top: 0; }
  .cq-gallery-card .cq-gallery-track { height: clamp(260px,80vw,390px); }
  .cq-gallery-card .cq-gallery-controls { min-height:76px; padding:12px 14px; }
  .cq-gallery-buttons button { width:44px; height:44px; }
  .cq-gallery-position { min-width:48px; }
  .cq-gallery-dots { gap:5px; }
  .cq-technical-dialog { border-radius: 10px; }
  .cq-tech-modal-top { padding:12px 14px; }
  .cq-technical-open { right: 9px; bottom: 9px; padding:9px 12px; }
  .contact-page { padding: 108px var(--cq-mobile-gutter) 66px; }
  .contact-layout form { grid-template-columns:minmax(0,1fr); gap: 15px; padding:20px 18px; }
  .contact-layout label { grid-column:1/-1; }
  .contact-layout form button[type=submit] { width:100%; }
  .legal-page { padding-top:106px; }
  .cta-band .button,.cta-band .button-accent { width:100%; text-align:center; }
  .site-footer-grid { grid-template-columns:minmax(0,1fr); gap:30px; }
  .footer-base { flex-direction:column; align-items:flex-start; gap:9px; }
  .cq-consent { bottom:max(7px,env(safe-area-inset-bottom)); left:8px; right:8px; max-width:none; padding:17px; }
  .cq-consent-buttons { display:flex; flex-wrap:wrap; gap:8px; }
  .cq-consent-buttons button { flex:1 1 130px; min-height:44px; white-space:normal; }
}

/* Compactos, plegables y pantallas muy estrechas (320px). */
@media (max-width: 390px) {
  :root { --cq-mobile-gutter: 18px; }
  .site-header .logo-shell,.site-header .logo-shell .logo-full { max-width:72px; width:72px; }
  .home-hero h1 { font-size:clamp(30px,8.2vw,35px); }
  .page-hero-content h1 { font-size:clamp(29px,7.9vw,34px); }
  .stat-panel { padding:18px 15px; }
  .stat-chips { gap:7px; }
  .stat-chips span { font-size:11px; }
  .cq-gallery-card .cq-gallery-track { height:280px; }
  .cq-gallery-card .cq-gallery-controls { padding-inline: 10px; gap: 5px; }
  .cq-gallery-dots { gap:4px; }
  .cq-gallery-buttons { gap:5px; }
  .cq-gallery-buttons button { width:42px; height:42px; }
  .cq-lightbox-body { grid-template-columns: 32px minmax(0,1fr) 32px; padding:6px; gap:4px; }
  .cq-lightbox-body button { width:32px; height:42px; }
  .cq-technical-dialog,.cq-lightbox { width:98vw; max-width:98vw; }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 540px) {
  .site-header,.site-header.is-scrolled,.site-nav { height: 60px; min-height:60px; }
  .site-header .mobile-menu.is-open,.mobile-menu.is-open { inset:60px 0 0; height:calc(100dvh - 60px); }
  .home-hero .hero-layout { padding-block:32px; }
  .page-hero { padding-top:88px; padding-bottom:40px; }
  .cq-lightbox-body img { max-height:50dvh; }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .trusted-track,.field-track { animation:none !important; }
  .mobile-menu { transition:none !important; }
  .cq-gallery-stage { scroll-behavior:auto !important; }
}
