/* ==============================
   RESPONSIVE DESIGN SYSTEM
   Mobile-First Approach with Vanilla CSS
   ============================== */

/* Mobile Hamburger Menu Styles */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 2.5px;
  background: #2c3e50;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Sidebar Menu */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -60%;
  width: 60%;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 999;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
  z-index: 10000;
}

.mobile-menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #2c3e50;
  padding: 1rem;
  transition: all 0.2s ease;
}

.mobile-menu-close:active {
  transform: scale(0.9);
}

.mobile-menu-content {
  flex: 1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-menu-section {
  border-bottom: 1px solid #e9ecef;
  padding: 1rem;
}

.mobile-menu-section:last-child {
  border-bottom: none;
  margin-top: auto;
}

.mobile-menu-section h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #000000;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.8rem;
}

.mobile-menu-link {
  display: block;
  padding: 0.75rem 0;
  color: #2c3e50;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  padding-left: 0.75rem;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
  color: #da3743;
  border-left-color: #da3743;
}

.mobile-menu-button {
  display: block;
  width: 100%;
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
  border: none;
  background: transparent;
  color: #2c3e50;
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  padding-left: 0.75rem;
}

.mobile-menu-button:hover,
.mobile-menu-button.active {
  color: #da3743;
  border-left-color: #da3743;
}

.mobile-menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0 1rem;
  /* margin-bottom: 1rem; */
}
.mobile-menu-buttons a{
text-decoration: none;
}
.mobile-menu-button-primary,
.mobile-menu-button-outline {
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.mobile-menu-button-primary {
  background: linear-gradient(135deg, #da3743 0%, #c62d39 100%);
  color: white;
}

.mobile-menu-button-primary:active {
  transform: scale(0.98);
}

.mobile-menu-button-outline {
  background: white;
  color: #da3743;
  border: 2px solid #da3743;
}

.mobile-menu-button-outline:active {
  transform: scale(0.98);
}

/* ==============================
   MOBILE RESPONSIVE BREAKPOINTS
   ============================== */

/* Extra Small Devices (320px - 480px) */
@media (min-width:320px) and (max-width: 480px) {
  html {
    font-size: 14px;
  }
  .footer-bottom {
    flex-direction: column;
  }
  .btn-favorite {
    display: none;
  }

  /* Header Adjustments */
  .header {
    padding: 0;
  }

  .nav-container {
    padding: 0.5rem 1rem !important;
  }

  .hamburger {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  /* Hide desktop navigation elements on mobile */
  .nav-menu,
  .nav-actions,
  .navActionMain {
    display: none;
  }

  /* .nav-brand {
    flex: 1;
    gap: 0.5rem;
  } */

  .logo {
    font-size: 1rem;
    padding-right: 0.75rem;
    border-right: 0px;
  }

  .logo img {
    width: 35px !important;
    height: 30px !important;
  }

  .location-dropdown-content {
    display: none;
    /* width: 200px !important;
    top: 100%;
    left: 0 !important;
    right: auto !important; */
  }

  .nav-icon {
    font-size: 1rem;
    padding: 0.3rem;
  }

  /* Top Bar */
  .top-bar {
    display: none;
  }

  /* Search Section */
  .search-form {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-input {
    padding: 0.7rem 2rem !important;
    font-size: 0.9rem;
  }

  .btn-search {
    padding: 0.7rem 1.2rem !important;
    font-size: 0.85rem;
    min-height: auto;
  }

  /* Hero Section */
  .hero {
    height: 60vh;
    min-height: 400px;
  }

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

  .hero-subtitle {
    font-size: 1rem !important;
  }

  /* Search Popup */
  .search-popup {
    width: 95%;
    padding: 1.5rem;
    border-radius: 12px;
  }

  .search-popup-close {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    top: 1rem;
    right: 1rem;
  }

  .mainSearch {
    flex-direction: column;
    gap: 0.75rem;
  }

  .searchButton {
    width: 100%;
  }

  .btn-search {
    width: 100%;
  }

  /* Typography */
  h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem) !important;
  }

  h2 {
    font-size: clamp(1.2rem, 4vw, 1.8rem) !important;
  }

  h3 {
    font-size: clamp(1rem, 3vw, 1.4rem) !important;
  }

  h4 {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem) !important;
  }

  p {
    font-size: 0.9rem;
  }

  /* Container */
  .container {
    padding: 0 1rem !important;
  }

  /* Buttons */
  .btn {
    padding: 0.65rem 1.5rem !important;
    font-size: 0.7rem !important;
  }

  .btn-large {
    padding: 0.8rem 1.5rem !important;
    font-size: 0.9rem !important;
  }

  /* Stats Section */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .stat-item {
    padding: 1.5rem !important;
  }

  .stat-number {
    font-size: 2.5rem !important;
  }

  .stat-label {
    font-size: 0.9rem !important;
  }

  /* Section Title */
  .section-title {
    font-size: 1.15rem !important;
    font-weight: 600;
  }

  .section-title::after {
    bottom: -0.8rem;
    width: 60px;
    height: 3px;
  }

  /* Featured Cities Grid */
  .cities-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .city-card {
    border-radius: 10px;
  }

  .city-image {
    height: 200px !important;
  }

  .city-info {
    padding: 1rem !important;
  }

  .city-info h3 {
    font-size: 1.1rem !important;
  }

  .city-info p {
    font-size: 0.85rem;
  }

  /* Restaurants Section */
  .restaurants-header {
    flex-direction: row;
    /* gap: 1rem; */
    margin-bottom: 1rem;
  }

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
  }

  .filter-tab {
    padding: 0.8rem 1.2rem !important;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Restaurant Slider */
  .restaurant-slider-container {
    padding: 0 1rem !important;
  }

  .restaurant-slider {
    gap: 10px;
    padding: 0.5rem 0;
  }

  /* Reduced card width from 240px to 180px to ensure 2 cards are visible on screens below 480px */
  .restaurant-card {
    flex: 0 0 calc(50% - 5px) !important;
    height: 300px !important;
  }

  .restaurant-image {
    height: 110px !important;
  }

  .restaurant-info {
    padding: 0.75rem !important;
    height: auto;
  }

  .restaurant-name {
    font-size: 0.9rem !important;
  }

  .restaurant-cuisine {
    font-size: 0.75rem !important;
  }

  .restaurant-location {
    font-size: 0.7rem !important;
  }

  .restaurant-price {
    font-size: 0.8rem !important;
  }

  .restaurant-actions {
    gap: 4px;
  }

  .btn-book {
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
  }

  .btn-favorite {
    width: 32px;
    height: 32px;
    padding: 6px;
  }

  .slider-btn {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.85rem !important;
  }

  .slider-dots {
    gap: 0.6rem;
    margin-top: 1rem;
  }

  .dot {
    width: 8px !important;
    height: 8px !important;
  }

  /* Gallery Grid */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.4rem !important;
    padding: 0 0.5rem !important;
  }

  .gallery-item:nth-child(4n + 1),
  .gallery-item:nth-child(4n) {
    grid-column: span 2 !important;
    grid-row: span 1 !important;
  }

  .gallery-overlay {
    padding: 0.75rem !important;
  }

  .gallery-overlay h3 {
    font-size: 1rem !important;
  }

  .gallery-overlay h4 {
    font-size: 0.85rem !important;
  }

  .gallery-overlay p {
    font-size: 0.75rem !important;
  }

  /* Restaurant Detail Section */
  .restaurant-hero {
    margin-top: 60px;
  }

  .restaurant-hero-image {
    height: 250px !important;
  }

  .restaurant-hero-content h1 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem;
  }

  .restaurant-meta {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .restaurant-actions {
    flex-direction: column;
    gap: 0.8rem;
  }

  /* .btn-primary,
  .btn-outline {
    width: 100%;
  } */

  /* Details Grid */
  .details-grid {
    grid-template-columns: 1fr !important;
  }

  .detail-section {
    margin-bottom: 1.5rem;
  }

  .detail-section h2 {
    font-size: 1.1rem !important;
    margin-bottom: 0.8rem;
  }

  .menu-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .menu-item {
    display: flex;
    gap: 0.75rem;
  }

  .menu-item img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 6px;
    object-fit: cover;
  }

  .menu-item-info h4 {
    font-size: 0.95rem !important;
  }

  .menu-item-info p {
    font-size: 0.8rem;
  }

  .price {
    font-size: 0.9rem !important;
  }

  /* Reviews */
  .review-item {
    padding: 1rem !important;
    margin-bottom: 1rem;
  }

  .reviewer-avatar {
    width: 35px !important;
    height: 35px !important;
  }

  .review-text {
    font-size: 0.85rem;
  }

  /* Scroll to Top Button */
  .scroll-to-top {
    width: 45px !important;
    height: 45px !important;
    bottom: 20px !important;
    right: 20px !important;
    font-size: 0.9rem !important;
  }

  /* Reduce padding/margins overall */
  .restaurants,
  .featured-cities,
  .stats-section,
  .food-gallery {
    padding: 2rem 0 !important;
  }

  section {
    margin: 0 !important;
  }
}

/* Small Devices (481px - 768px) - Tablets */
@media (min-width: 481px) and (max-width: 1024px) {
  html {
    font-size: 15px;
  }
  .btn-favorite {
    display: none;
  }
  .footer-bottom {
    flex-direction: column;
  }
  .slider-navigation {
    display: none;
  }

  .hamburger {
    display: flex;
  }
  .logo {
    border-right: 0px;
  }

  .nav-menu,
  .location-dropdown,
  .navActionMain {
    display: none;
  }

  .top-bar {
    display: none;
  }

  .nav-container {
    padding: 0.5rem 1.5rem !important;
  }

  /* .nav-brand {
    flex: 1;
  } */

  .logo img {
    width: 45px !important;
    height: 38px !important;
  }

  /* Typography Scaling */
  h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem) !important;
  }

  h2 {
    font-size: clamp(1.4rem, 4vw, 2rem) !important;
  }

  h3 {
    font-size: clamp(1.1rem, 3vw, 1.5rem) !important;
  }

  /* Container */
  .container {
    padding: 0 1.5rem !important;
  }

  /* Buttons */
  .btn {
    padding: 0.7rem 1.8rem !important;
    font-size: 0.9rem !important;
  }

  /* Search Form - Horizontal scroll on mobile tablets */
  .search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .search-field {
    flex: 1;
    min-width: 140px;
  }

  .search-popup {
    width: 90%;
    padding: 2rem;
  }

  /* Hero */
  .hero {
    height: 65vh;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }

  /* Cities Grid */
  .cities-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }

  .city-image {
    height: 220px !important;
  }

  /* Filter Tabs - Horizontal scroll */
  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
  }

  .filter-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Restaurant Cards */
  .restaurant-card {
    flex: 0 0 280px !important;
    height: 350px !important;
  }

  .restaurant-image {
    height: 140px !important;
  }

  .restaurant-name {
    font-size: 1rem !important;
  }

  /* Gallery Grid */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.8rem !important;
    padding: 0 1rem !important;
  }

  .gallery-item:nth-child(4n + 1),
  .gallery-item:nth-child(4n) {
    grid-column: span 2 !important;
    grid-row: span 2 !important;
  }

  /* Restaurant Detail */
  .restaurant-hero-image {
    height: 300px !important;
  }

  .details-grid {
    grid-template-columns: 1fr 280px !important;
    gap: 2rem !important;
  }

  .menu-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
  }

  .menu-item img {
    width: 100px !important;
    height: 100px !important;
  }

  .scroll-to-top {
    width: 50px !important;
    height: 50px !important;
  }
}

/* Medium Devices (769px - 1024px) - iPad */
@media (min-width: 1024px) and (max-width: 1024px) {
  .nav-menu {
    display: flex !important;
  }

  .navActionMain {
    display: flex !important;
  }

  .hamburger {
    display: none;
  }

  .nav-list {
    gap: 1.5rem !important;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  /* Search Form */
  .search-form {
    gap: 0.5rem;
  }

  .search-input {
    padding: 0.75rem 2rem !important;
    font-size: 0.9rem;
  }

  /* Hero */
  .hero {
    height: 75vh;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Cities Grid */
  .cities-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Restaurant Grid */
  .restaurants-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Gallery Grid */
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .gallery-item:nth-child(6n + 1),
  .gallery-item:nth-child(6n) {
    grid-column: span 2 !important;
    grid-row: span 2 !important;
  }

  /* Details Grid */
  .details-grid {
    grid-template-columns: 1fr 300px !important;
  }

  .menu-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .menu-item {
    flex-direction: column;
  }

  .menu-item img {
    width: 100% !important;
    height: 150px !important;
  }
}

/* Large Devices (1025px and above) - Desktop */
@media (min-width: 1025px) {
  .hamburger {
    display: none;
  }

  .mobile-menu,
  .mobile-menu-overlay {
    display: none;
  }

  .nav-menu {
    display: flex !important;
  }

  .navActionMain {
    display: flex !important;
  }
}

/* ==============================
   UTILITY CLASSES
   ============================== */

/* Horizontal Scrolling Container */
.horizontal-scroll {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 1rem;
  padding: 0.5rem 0;
}

.horizontal-scroll::-webkit-scrollbar {
  height: 4px;
}

.horizontal-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
  background: #da3743;
  border-radius: 10px;
}

.horizontal-scroll::-webkit-scrollbar-thumb:hover {
  background: #c62d39;
}

/* Fade In Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Smooth Transitions */
* {
  transition: var(--transition);
}

/* Improve Touch Targets on Mobile */
@media (max-width: 768px) {
  button,
  a,
  input,
  select,
  textarea {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Better Form Input Styling on Mobile */
@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* ==============================
   ACCESSIBILITY
   ============================== */

/* Focus States for Keyboard Navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #da3743;
  outline-offset: 2px;
}

/* Reduce Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  .hamburger,
  .mobile-menu,
  .mobile-menu-overlay,
  .scroll-to-top {
    display: none !important;
  }
}
