/* Ellesia Executive Lodge — Mobile & tablet enhancements */

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-tap-highlight-color: rgba(201, 168, 76, 0.2);
}

.accent-bar {
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

.site-header {
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

/* Tablets: use mobile menu before nav links overflow */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-inner {
    padding: 0 16px;
    gap: 12px;
  }

  .logo__img {
    height: 46px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  body {
    font-size: 16px;
  }

  .nav-inner {
    height: var(--nav-height);
  }

  .contact-grid .btn-gold,
  .contact-grid .btn-whatsapp,
  .cta-banner .btn-gold,
  #contact-form .btn-gold,
  #proposal-form .btn-gold {
    display: block;
    width: 100%;
    text-align: center;
    min-height: 48px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .contact-info__value {
    word-break: break-word;
  }

  .contact-info__value a {
    overflow-wrap: anywhere;
  }

  .map-embed iframe {
    min-height: 260px;
    height: 50vw;
    max-height: 320px;
  }

  .footer-bottom p {
    padding: 0 8px;
    line-height: 1.65;
  }

  .footer-privacy-link {
    display: inline-block;
    margin-left: 0;
    margin-top: 8px;
  }

  .footer-social a {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .mobile-menu {
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
  }

  .mobile-menu__close {
    top: calc(var(--accent-bar-height) + var(--safe-top) + 12px);
    right: calc(16px + var(--safe-right));
  }

  .mobile-menu__links {
    max-height: calc(100dvh - 120px - var(--safe-top) - var(--safe-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 24px;
    gap: 24px;
  }

  .search-overlay {
    padding:
      calc(var(--safe-top) + 72px)
      calc(16px + var(--safe-right))
      calc(16px + var(--safe-bottom))
      calc(16px + var(--safe-left));
    align-items: flex-start;
  }

  .search-overlay__input {
    font-size: 16px;
  }

  .search-overlay__result {
    min-height: 48px;
    justify-content: center;
  }

  .whatsapp-float {
    bottom: calc(16px + var(--safe-bottom));
    right: calc(16px + var(--safe-right));
  }

  .scroll-top {
    bottom: calc(82px + var(--safe-bottom));
    right: calc(16px + var(--safe-right));
    width: 44px;
    height: 44px;
  }

  .gallery-filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    scrollbar-width: none;
  }

  .gallery-filters::-webkit-scrollbar {
    display: none;
  }

  .gallery-filter-btn {
    flex-shrink: 0;
  }

  .lightbox__content {
    max-width: 94vw;
    max-height: 85vh;
  }

  .lightbox__image {
    width: 94vw;
    height: auto;
    max-height: 70vh;
  }

  .lightbox__prev,
  .lightbox__next {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .logo__img {
    height: 40px;
  }

  .hero {
    min-height: max(460px, calc(var(--vh, 1vh) * 100));
  }

  .btn-gold,
  .btn-whatsapp,
  .btn-messenger {
    min-height: 48px;
  }

  .mobile-menu__links a {
    font-size: 20px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .room-card:hover {
    transform: none;
  }

  .hero__headline:hover,
  .page-banner__title:hover {
    color: var(--color-gold);
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100dvh;
  }

  .hero__content {
    padding-bottom: 24px;
  }

  .page-banner {
    min-height: 280px;
  }

  .mobile-menu__links {
    gap: 12px;
  }

  .mobile-menu__links a {
    font-size: 17px;
    min-height: 40px;
    padding: 4px 12px;
  }

  .search-overlay {
    padding-top: calc(var(--safe-top) + 48px);
  }
}
