/* ============================================
   RENTOHOMES — Responsive Breakpoints
   ============================================ */

/* --- 1440px — Large Desktop --- */
@media (max-width: 1440px) {
  :root {
    --container-padding: clamp(20px, 3.5vw, 60px);
  }

  .hero-grid {
    gap: var(--space-2xl);
  }

  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .footer-grid > *:last-child {
    grid-column: 1 / -1;
    margin-top: var(--space-md);
  }

  .gallery-grid {
    height: 480px;
  }
}

/* --- 1280px — Standard Desktop --- */
@media (max-width: 1280px) {
  .grid--4 {
    grid-template-columns: repeat(3, 1fr);
  }

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



  .prop-card {
    min-width: 340px;
    height: 420px;
  }

  .property-list-card {
    grid-template-columns: 240px 1fr auto;
  }
}

/* --- 1024px — Tablet Landscape --- */
@media (max-width: 1024px) {
  :root {
    --nav-height: 80px;
    --space-4xl: 96px;
    --space-3xl: 72px;
  }

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

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

  .hero-grid {
    min-height: auto;
    padding: var(--space-3xl) 0;
  }

  .hero-title {
    max-width: 600px;
  }

  .search-widget {
    max-width: 100%;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    height: 400px;
  }

  .amenities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-destinations {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .grid-destinations .dest-card:first-child {
    grid-row: auto;
  }

  .filter-bar {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .filter-group {
    min-width: calc(33% - var(--space-sm));
  }

  .property-list-card {
    grid-template-columns: 200px 1fr;
  }

  .property-list-pricing {
    grid-column: 1 / -1;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
  }

  /* Hide Swiper Buttons on Tablet (Swiping is preferred) */
  .swiper-button-prev,
  .swiper-button-next {
    display: none !important;
  }
}

/* --- 991px — Tablet / Navigation Break --- */
@media (max-width: 991px) {
  .nav-menu {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

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

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

  .filter-sidebar {
    position: static;
    margin-bottom: var(--space-xl);
    padding: 16px;
  }

  .filter-mobile-toggle {
    display: flex;
    margin-bottom: 0;
  }

  .filter-sidebar-content {
    display: none;
    margin-top: var(--space-lg);
  }

  .filter-sidebar-content.open {
    display: block;
  }

  /* Single Property Page Layout */
  .single-property-layout {
    grid-template-columns: 1fr !important;
  }

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

  .newsletter-form {
    flex-direction: column;
  }

  .prop-card {
    min-width: 300px;
    height: 380px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .hero-stat {
    flex: 1;
    min-width: 120px;
  }

  .author-card {
    flex-direction: column;
    text-align: center;
  }
}

/* --- 767px — Tablet Portrait / Mobile --- */
@media (max-width: 767px) {
  :root {
    --space-4xl: 80px;
    --space-3xl: 56px;
    --space-2xl: 48px;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

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

  .dest-card {
    aspect-ratio: 16/10;
  }

  .search-widget--hero {
    max-width: 100%;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-2xl);
  }

  .hero-grid {
    padding: var(--space-xl) 0;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    height: auto;
    gap: var(--space-xs);
  }

  .gallery-item:first-child {
    grid-column: span 2;
    height: 280px;
  }

  .gallery-item:not(:first-child) {
    height: 160px;
  }

  .amenities-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .amenity-item {
    flex-direction: column;
    text-align: center;
    padding: var(--space-sm);
  }

  .filter-bar {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .filter-group {
    min-width: 100%;
  }

  .sort-dropdown {
    width: 100%;
    margin-left: 0;
  }

  .sort-dropdown select {
    flex: 1;
  }

  .pagination-btn {
    width: 42px;
    height: 42px;
    font-size: var(--fs-small);
  }

  .page-hero {
    height: 40vh;
    min-height: 320px;
  }

  .booking-widget {
    position: static;
    margin-top: var(--space-xl);
  }

  /* Show mobile booking bar on single property page */
  .single-property-page .mobile-booking-bar {
    display: flex;
  }

  .single-property-page .booking-widget {
    display: none;
  }

  .property-list-card {
    grid-template-columns: 1fr;
  }

  .property-list-image {
    height: 200px;
  }

  .property-list-pricing {
    grid-column: auto;
  }

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

  .stat-card {
    padding: var(--space-md);
  }

  .breadcrumb {
    font-size: var(--fs-xs);
    flex-wrap: wrap;
  }

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

  .newsletter-section {
    margin: 0 var(--space-sm);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-md);
  }

  .modal {
    width: 95%;
    padding: var(--space-xl);
  }

  /* Swiper Adjustments */
  .swiper-button-prev,
  .swiper-button-next {
    display: none !important;
  }

  .blog-card-image {
    height: 180px;
  }

  .property-card-image {
    height: 220px;
  }

  .marquee-item {
    font-size: 1rem;
  }

  .marquee-track {
    gap: var(--space-xl);
  }
}

/* --- 479px — Small Mobile --- */
@media (max-width: 479px) {
  :root {
    --space-4xl: 64px;
    --space-3xl: 48px;
    --space-2xl: 40px;
    --container-padding: 16px;
  }

  h1, .h1 {
    letter-spacing: -0.02em;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-stat {
    padding: var(--space-sm);
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

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

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

  .gallery-item:first-child {
    grid-column: auto;
    height: 240px;
  }

  .gallery-item:not(:first-child) {
    height: 180px;
  }

  .booking-dates {
    grid-template-columns: 1fr;
  }

  .booking-date:first-child {
    border-right: none;
    border-bottom: 1.5px solid var(--border);
  }

  .btn {
    padding: 14px 28px;
    font-size: var(--fs-xs);
  }

  .btn--lg {
    padding: 16px 36px;
    font-size: var(--fs-small);
  }

  .property-card-image {
    height: 200px;
  }

  .property-card-body {
    padding: var(--space-sm) var(--space-sm) var(--space-md);
  }

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

  .feature-card-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .section-label {
    font-size: 0.7rem;
  }

  .section-label::before {
    width: 24px;
  }

  .prop-card {
    min-width: 260px;
    height: 340px;
  }

  .stat-value {
    font-size: 2rem;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

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

  .page-hero {
    height: 35vh;
    min-height: 280px;
  }

  .newsletter-section {
    margin: 0 var(--space-xs);
    border-radius: var(--radius-md);
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .marquee-track {
    animation: none;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }
}

/* --- Print Styles --- */
@media print {
  .navbar,
  .footer,
  .mobile-booking-bar,
  .newsletter-section,
  .scroll-progress {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .hero {
    min-height: auto;
    background: none;
  }
}
