/* Mobile-first navigation and compact editorial layouts. Desktop remains untouched. */
.mobile-quick-nav,
.mobile-swipe-hint {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --mobile-nav-clearance: 82px;
  }

  html {
    scroll-padding-top: 98px;
    scroll-padding-bottom: calc(var(--mobile-nav-clearance) + env(safe-area-inset-bottom));
  }

  body {
    padding-bottom: calc(var(--mobile-nav-clearance) + env(safe-area-inset-bottom));
  }

  .mobile-quick-nav {
    position: fixed;
    z-index: 110;
    left: 50%;
    bottom: calc(7px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: min(calc(100% - 16px), 500px);
    min-height: 64px;
    padding: 6px 5px;
    transform: translateX(-50%);
    border: 1px solid rgba(210, 226, 239, .2);
    border-radius: 17px;
    background: rgba(10, 19, 26, .94);
    box-shadow: 0 10px 36px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    backdrop-filter: blur(22px) saturate(145%);
    transition: opacity .2s ease, transform .2s ease;
  }

  .mobile-quick-link {
    display: flex;
    min-width: 0;
    min-height: 50px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 1px;
    border-radius: 12px;
    color: rgba(237, 242, 246, .76);
    font-size: .53rem;
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-quick-link svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-quick-link.is-active {
    color: #ffc07c;
    background: linear-gradient(145deg, rgba(255, 139, 42, .2), rgba(255, 139, 42, .07));
    box-shadow: inset 0 0 0 1px rgba(255, 173, 91, .19);
  }

  body.mobile-menu-open .mobile-quick-nav {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
  }

  .floating-whatsapp-btn {
    right: 15px;
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .section-presentacion,
  .section-servicios,
  .section-proceso,
  .section-proyectos,
  .section-galeria,
  .section-confianza,
  .section-contacto {
    padding-top: 48px;
    padding-bottom: 48px;
    scroll-margin-top: 96px;
  }

  .section-header-center {
    margin-bottom: 24px;
  }

  .section-header-center .section-subheading {
    font-size: .91rem;
    line-height: 1.65;
  }

  .section-tag {
    margin-bottom: 14px;
  }

  .mobile-swipe-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -7px 0 10px;
    color: rgba(238, 242, 245, .72);
    font-size: .7rem;
    letter-spacing: .02em;
  }

  .mobile-swipe-hint span {
    color: #ffb563;
    font-size: 1rem;
  }

  /* Services and dossier highlights become calm, swipeable horizontal shelves. */
  .services-grid,
  .dossier-projects-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    margin-right: -5.55%;
    margin-left: -5.55%;
    padding: 4px 5.55% 16px;
    scroll-padding-inline: 5.55%;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .services-grid::-webkit-scrollbar,
  .dossier-projects-container::-webkit-scrollbar,
  .gallery-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .services-grid .service-card {
    flex: 0 0 min(83vw, 350px);
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    transform: none;
  }

  .service-img-wrap {
    height: 170px;
  }

  .service-body {
    gap: 7px;
    padding: 18px 18px 19px;
  }

  .service-title {
    font-size: 1rem;
    line-height: 1.35;
  }

  .service-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-height: 1.55;
  }

  .dossier-projects-container .project-cinematic-card {
    display: flex;
    flex: 0 0 min(87vw, 380px);
    min-width: 0;
    flex-direction: column;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .dossier-projects-container .project-cinematic-card.reverse .project-media,
  .dossier-projects-container .project-cinematic-card.reverse .project-info {
    order: initial;
  }

  .dossier-projects-container .project-media {
    height: 194px;
    min-height: 194px;
  }

  .dossier-projects-container .project-info {
    gap: 0;
    padding: 18px;
  }

  .dossier-projects-container .project-media-badge {
    top: 13px;
    left: 13px;
    padding: 5px 10px;
    font-size: .63rem;
  }

  .dossier-projects-container .project-meta-pills {
    gap: 6px;
    margin-bottom: 9px;
  }

  .dossier-projects-container .project-meta-pills .meta-pill {
    padding: 4px 8px;
    font-size: .63rem;
  }

  .dossier-projects-container .project-meta-pills .meta-pill:nth-child(n + 3) {
    display: none;
  }

  .dossier-projects-container .project-title {
    margin-bottom: 8px;
    font-size: 1.3rem;
    line-height: 1.22;
  }

  .dossier-projects-container .project-desc {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: .84rem;
    line-height: 1.5;
  }

  .dossier-projects-container .project-specs-list {
    display: none;
  }

  .dossier-projects-container .btn-open-project-modal {
    align-self: stretch;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    font-size: .83rem;
  }

  .projects-process-note {
    margin-top: 16px;
    padding: 14px 16px;
  }

  .projects-process-note p {
    font-size: .8rem;
    line-height: 1.55;
  }

  /* Keep the construction stages scannable without turning them into a long list. */
  .process-steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .process-step-card {
    min-width: 0;
    padding: 13px 11px;
    border-radius: 12px;
  }

  .step-img-preview {
    height: 82px;
  }

  .step-title {
    margin: 9px 0 5px;
    font-size: .83rem;
    line-height: 1.3;
  }

  .step-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: .7rem;
    line-height: 1.45;
  }

  .step-play-hint {
    margin-top: 8px;
    font-size: .63rem;
  }

  .pilares-list,
  .confianza-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pilar-card,
  .confianza-card {
    padding: 15px 13px;
  }

  .pilar-title,
  .confianza-title {
    font-size: .84rem;
    line-height: 1.35;
  }

  .pilar-desc,
  .confianza-desc {
    font-size: .73rem;
    line-height: 1.5;
  }

  .presentacion-visual .visual-image-wrapper img {
    height: 260px;
  }

  /* Category chips and a small preview keep the photo archive browsable. */
  .gallery-filter-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -5.55% 16px;
    padding: 3px 5.55% 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .gallery-filter-btn {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 13px;
    font-size: .73rem;
    white-space: nowrap;
  }

  .gallery-grid.real-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .real-gallery-grid .gallery-item {
    height: auto;
    aspect-ratio: 1.08 / 1;
    border-radius: 12px;
  }

  .real-gallery-grid .gallery-item-overlay {
    padding: 10px;
    opacity: 1;
    background: linear-gradient(0deg, rgba(5, 12, 18, .9), rgba(5, 12, 18, .05) 88%);
  }

  .real-gallery-grid .gallery-item-category {
    font-size: .52rem;
    letter-spacing: .7px;
  }

  .real-gallery-grid .gallery-item-title {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 3px;
    font-size: .68rem;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .real-gallery-grid .gallery-zoom-icon {
    top: 7px;
    right: 7px;
    width: 29px;
    height: 29px;
    transform: none;
    background: rgba(9, 17, 24, .72);
    border: 1px solid rgba(255, 255, 255, .32);
  }

  .gallery-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 17px;
    border: 1px solid rgba(255, 174, 97, .55);
    border-radius: 12px;
    background: linear-gradient(110deg, rgba(255, 121, 20, .16), rgba(255, 255, 255, .04));
    color: #ffe0c2;
    font: inherit;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
  }

  .gallery-more-btn[hidden] {
    display: none;
  }

  .architecture-journey {
    height: 220svh;
  }

  .journey-final {
    bottom: 12%;
  }
}

@media (max-width: 360px) {
  .mobile-quick-link {
    font-size: .49rem;
  }

  .services-grid .service-card {
    flex-basis: 86vw;
  }

  .dossier-projects-container .project-cinematic-card {
    flex-basis: 89vw;
  }

  .process-steps-grid {
    gap: 8px;
  }
}
