/* =========================================================
   Mobile responsive styles — Gallery detail pages
   Loaded after style.css and galerie-detail.css
   ========================================================= */

@media screen and (max-width: 900px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  body {
    background: var(--cream, #fffaf2);
  }

  .page-shell {
    width: 100%;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
  }

  /* HEADER */

  .site-header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: auto;
    padding: 16px 18px 14px;
  }

  .brand {
    width: 100%;
  }

  .brand img {
    width: 150px;
    max-width: 56vw;
    height: auto;
    margin: 0 auto;
  }

  .main-nav {
    order: 2;
    width: 100%;
    margin: 0;
    padding: 6px 0 8px;
    justify-content: center;
    gap: 18px;
    overflow-x: visible;
    font-size: 0.84rem;
  }

  .main-nav a {
    flex: 0 0 auto;
  }

  .site-header .header-cta {
    display: none;
  }

  /* PAGE */

  .gallery-detail-section {
    width: calc(100% - 40px);
    max-width: 680px;
    padding: 38px 0 44px;
  }

  .gallery-detail-header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    text-align: center;
  }

  .gallery-detail-icon {
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
  }

  .gallery-detail-title-wrap h1 {
    font-size: clamp(3rem, 11vw, 4.25rem);
    line-height: 0.95;
  }

  .gallery-detail-line-heart {
    width: 270px;
    max-width: 78vw;
    margin: -12px auto 0;
  }

  /* INTRO */

  .gallery-detail-intro {
    margin: 0 0 28px;
    padding-right: 0;
    text-align: center;
  }

  .gallery-detail-intro p {
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.06rem;
    line-height: 1.45;
  }

  .gallery-detail-leaf {
    position: static;
    display: block;
    width: 74px;
    margin: 18px auto 0;
    transform: none;
  }

  /* PHOTO GRID */

  .gallery-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
  }

  .gallery-photo-grid img {
    height: 190px;
    border-radius: 8px;
  }

  /* LIGHTBOX */

  .gallery-lightbox {
    padding: 22px;
  }

  .gallery-lightbox-close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
  }

  .gallery-lightbox-nav {
    width: 50px;
    height: 50px;
  }

  .gallery-lightbox-prev {
    left: 18px;
  }

  .gallery-lightbox-next {
    right: 18px;
  }

  .gallery-lightbox-nav::before {
    font-size: 3.7rem;
  }

  /* FOOTER */

  .site-footer {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    padding: 26px 20px;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 0;
  }

  .footer-brand img {
    width: 170px;
    margin: 0 auto;
  }

  .footer-village {
    justify-content: center;
  }

  .footer-village img {
    width: 180px;
    margin: 0 auto;
  }
}

@media screen and (max-width: 520px) {
  .site-header {
    padding-inline: 14px;
  }

  .brand img {
    width: 132px;
  }

  .main-nav {
    justify-content: flex-start;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    font-size: 0.8rem;
  }

  .gallery-detail-section {
    width: calc(100% - 32px);
    padding: 32px 0 38px;
  }

  .gallery-detail-icon {
    width: 64px;
    height: 64px;
  }

  .gallery-detail-title-wrap h1 {
    font-size: 3.05rem;
  }

  .gallery-detail-line-heart {
    width: 230px;
    margin-top: -8px;
  }

  .gallery-detail-intro {
    margin-bottom: 24px;
  }

  .gallery-detail-intro p {
    font-size: 1rem;
    line-height: 1.42;
  }

  .gallery-detail-leaf {
    width: 66px;
    margin-top: 14px;
  }

  .gallery-photo-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .gallery-photo-grid img {
    height: 220px;
  }

  .gallery-lightbox {
    padding: 16px;
  }

  .gallery-lightbox-img {
    max-width: 94vw;
    max-height: 82vh;
  }

  .gallery-lightbox-close {
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
  }

  .gallery-lightbox-nav {
    top: auto;
    bottom: 18px;
    width: 46px;
    height: 46px;
    transform: none;
  }

  .gallery-lightbox-prev {
    left: calc(50% - 64px);
  }

  .gallery-lightbox-next {
    right: calc(50% - 64px);
  }

  .gallery-lightbox-nav::before {
    font-size: 3.3rem;
  }

  .footer-links {
    font-size: 0.94rem;
  }
}