/* ============================================
   STAYS MEXICO - RESPONSIVE & MOBILE STYLES
   ============================================ */

@media (max-width: 1024px) {
  :root {
    --spacing-2xl: 2.5rem;
    --spacing-3xl: 3rem;
  }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1rem; }
  .property-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
  }
}

/* ============================================
   TABLETS & MOBILE MENU
   ============================================ */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
    --spacing-3xl: 2.5rem;
  }

  /* Header & Navigation */
  .menu-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--header-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.77,0.2,0.05,1.0);
    box-shadow: -5px 0 15px var(--shadow-color);
    z-index: 1000;
    padding: var(--spacing-2xl);
    gap: var(--spacing-xl);
  }

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

  .nav-menu li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-md);
  }

  .nav-menu a {
    font-size: 1.5rem;
    display: block;
    color: var(--text-primary);
  }

  body.no-scroll {
    overflow: hidden;
  }

  /* Hero Section */
  .hero {
    min-height: 400px;
    padding: var(--spacing-2xl) var(--spacing-lg);
  }
  .hero h1 { font-size: 1.75rem; }

  /* Properties Section */
  .property-grid { grid-template-columns: 1fr; }
  .property-card { flex-direction: column; }
  .property-image { width: 100%; height: 250px; }
}

/* ============================================
   CARRUSEL DE FOTOS (VANILLA)
   ============================================ */
.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  background: var(--bg-tertiary);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.carousel-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev { left: 15px; }
.carousel-next { right: 15px; }

.carousel-nav {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
  background: rgba(0,0,0,0.2);
  padding: 5px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background: #fff;
  width: 20px;
  border-radius: 4px;
}

/* ============================================
   MODO OSCURO - REGLAS ADICIONALES
   ============================================ */
[data-theme="dark"] .carousel-btn {
  background: rgba(30, 30, 30, 0.8);
  color: #eee;
}

[data-theme="dark"] .hero-overlay {
  background: var(--hero-overlay);
}

/* ============================================
   MOBILE PHONES
   ============================================ */
@media (max-width: 480px) {
  .header-container { padding: 0 1rem; }
  .logo-text { font-size: 1.1rem; }
  .carousel-container { aspect-ratio: 4 / 3; }
  .carousel-btn { width: 36px; height: 36px; }
}
