/* ============================================
   MIRAMAR VILLA 499 — RESPONSIVE
   ============================================ */

/* ---------- Tablet (1024px and below) ---------- */
@media (max-width: 1024px) {
  :root {
    --header-height: 70px;
  }

  .section {
    padding: var(--space-4xl) 0;
  }

  /* Header */
  .nav-links { display: none; }
  .header-cta .btn { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav { display: flex; }

  /* Hero */
  .hero { min-height: 600px; }
  .hero-content { padding-bottom: var(--space-3xl); }
  .property-pills { gap: var(--space-xs); }

  /* Overview */
  .overview-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .overview-image {
    order: -1;
  }

  .overview-image img {
    aspect-ratio: 16/9;
  }

  .overview-features {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 220px);
  }

  .gallery-grid .gallery-item:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  /* Amenities */
  .amenities-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Location */
  .location-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .location-map {
    min-height: 350px;
    order: -1;
  }

  /* Reviews */
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Rates */
  .rates-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

/* ---------- Mobile Large (768px and below) ---------- */
@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-lg);
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .section-header {
    margin-bottom: var(--space-2xl);
  }

  /* Hero */
  .hero {
    min-height: 550px;
    align-items: flex-end;
  }

  .hero h1 {
    font-size: clamp(2rem, 7vw, 2.75rem);
  }

  .hero-tagline {
    font-size: 1.15rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    margin-top: var(--space-xl);
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .property-pills {
    flex-wrap: wrap;
  }

  .property-pill {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .scroll-hint { display: none; }

  /* Overview */
  .overview-features {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  .overview-feature {
    padding: var(--space-md) var(--space-sm);
  }

  .overview-feature span {
    font-size: 0.75rem;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: var(--space-sm);
  }

  .gallery-grid .gallery-item:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: auto;
  }

  .gallery-grid .gallery-item {
    aspect-ratio: 4/3;
  }

  .gallery-item .gallery-label {
    opacity: 1;
    transform: none;
    font-size: 0.6875rem;
    padding: 4px 10px;
  }

  /* Amenities */
  .amenities-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .amenity-card {
    padding: var(--space-lg);
  }

  /* Location Cards */
  .location-card {
    padding: var(--space-md);
    gap: var(--space-md);
  }

  /* Pricing Card */
  .pricing-card {
    padding: var(--space-xl);
  }

  /* Contact Form */
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }

  .quick-contact {
    flex-direction: column;
    align-items: stretch;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

  /* Lightbox */
  .lightbox img {
    max-width: 95vw;
  }

  .lightbox-close {
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .lightbox-prev { left: var(--space-md); }
  .lightbox-next { right: var(--space-md); }
}

/* ---------- Mobile Small (480px and below) ---------- */
@media (max-width: 480px) {
  :root {
    --container-padding: var(--space-md);
  }

  .hero {
    min-height: 500px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .overview-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .amenities-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid .gallery-item:nth-child(1) {
    grid-column: 1;
  }

  .mobile-nav .mobile-nav-link {
    font-size: 1.375rem;
  }

  .testimonial-card {
    padding: var(--space-lg);
    padding-left: calc(var(--space-lg) + 3px);
  }

  .testimonial-card blockquote {
    font-size: 1rem;
  }
}

/* ---------- Gallery Page Specific ---------- */
.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.gallery-page-grid .gallery-item {
  aspect-ratio: 4/3;
}

.gallery-page-grid .gallery-item.featured {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-2xl);
}

.gallery-filter-btn {
  padding: 8px 20px;
  border: 1.5px solid rgba(15, 32, 39, 0.12);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-body);
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-natural);
}

.gallery-filter-btn:hover {
  border-color: var(--caribbean-teal);
  color: var(--caribbean-teal);
}

.gallery-filter-btn.active {
  background: var(--deep-ocean);
  border-color: var(--deep-ocean);
  color: var(--text-white);
}

@media (max-width: 768px) {
  .gallery-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-page-grid .gallery-item.featured {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 480px) {
  .gallery-page-grid {
    grid-template-columns: 1fr;
  }

  .gallery-page-grid .gallery-item.featured {
    grid-column: 1;
  }

  .gallery-filters {
    gap: 4px;
  }

  .gallery-filter-btn {
    padding: 6px 14px;
    font-size: 0.75rem;
  }
}

/* ---------- Sticky Mobile CTA Bar ---------- */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--deep-ocean);
  padding: var(--space-md) var(--space-lg);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.mobile-cta-bar .price-display {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
}

.mobile-cta-bar .price-display span {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(245, 239, 224, 0.5);
}

@media (max-width: 768px) {
  .mobile-cta-bar {
    display: flex;
  }

  /* Add padding to body bottom so footer isn't hidden */
  body {
    padding-bottom: 72px;
  }

  /* Push back-to-top above mobile CTA bar */
  .back-to-top {
    bottom: calc(72px + var(--space-xl));
  }
}
