/*
 * TopRank Tour & Travels - Responsiveness Sheet
 * Handles ultra-wide screens down to foldables
 */

/* Ultra-wide Screens (> 1600px) */
@media (min-width: 1600px) {
  :root {
    --container-max: 1440px;
  }
}

/* Medium Desktops (1024px - 1280px) */
@media (max-width: 1280px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }
  .hero-title { font-size: 3rem; }
  
  .slider-slide {
    width: calc(100% / 3);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Small Desktops & Tablets (768px - 1023px) */
@media (max-width: 1023px) {
  :root {
    --section-padding-lg: 80px 0;
    --section-padding-md: 60px 0;
    --section-padding-sm: 40px 0;
    --gap-lg: 30px;
    --gap-md: 20px;
    --gap-sm: 15px;
  }

  html {
    font-size: 15px;
  }

  .video-hero-section {
    padding-top: 80px;
    padding-bottom: 60px;
    min-height: auto;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 15px;
  }

  .nav-container {
    height: 80px;
  }

  .mobile-toggle {
    display: flex;
    z-index: 1001;
  }

  /* Hamburger to close icon morphing */
  .mobile-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--dark-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: var(--transition-smooth);
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu a {
    color: var(--white) !important;
    font-size: 1.15rem;
  }

  header.sticky .mobile-toggle span {
    background: var(--text-main);
  }
  
  header.sticky .mobile-toggle.active span {
    background: var(--white);
  }

  /* Stack search form widget */
  .search-form {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .hero-split-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .search-widget {
    margin-top: -50px;
    padding: 20px;
  }

  .slider-slide {
    width: calc(100% / 2);
  }

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

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

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

  .gallery-item.wide {
    grid-column: span 1;
  }

  .newsletter-wrap {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  
  .newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }

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

  .packages-sidebar-layout {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* Mobile Screens (481px - 767px) */
@media (max-width: 767px) {
  :root {
    --section-padding-lg: 60px 0;
    --section-padding-md: 40px 0;
    --section-padding-sm: 30px 0;
    --gap-lg: 20px;
    --gap-md: 15px;
  }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.4rem; }

  .hero-title {
    font-size: 2.1rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

  .top-rated-badge {
    transform: scale(0.85);
    margin-bottom: 10px;
  }

  .btn-hero {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .section-padding {
    padding: 60px 0;
  }

  .sticky-contact-bar {
    display: none; /* Hide on mobile to save vertical space */
  }

  .slider-slide {
    width: 100%;
  }

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

  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .google-map-wrap {
    height: 300px;
  }
  
  .cookie-consent {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }
}

/* Foldables & Ultra-small Devices (< 480px) */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .logo {
    font-size: 1.4rem;
  }

  .btn {
    width: 100%;
    padding: 12px 20px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .newsletter-form {
    flex-direction: column;
    gap: 10px;
  }

  .newsletter-form input {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-item.tall {
    grid-row: span 1;
  }
}

/* Ensure no horizontal overflow on mobile devices */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

