/* ===== SISTEMA DE RESPONSIVIDAD PROFESIONAL ===== */

/* ===== TABLETS (768px - 1024px) ===== */
@media (max-width: 1024px) {
  .container {
    width: 95%;
    padding: 0 15px;
  }

  h1 { 
    font-size: 2.5rem; 
  }
  
  h2 { 
    font-size: 2rem; 
  }

  .slideshow-text h1 {
    font-size: 3rem;
  }

  .habitaciones-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 700px;
  }

  .habitacion-imagen {
    height: 300px;
  }

  .habitacion-descripcion {
    padding: 25px;
    min-height: auto;
  }

  .habitacion-descripcion h2 {
    font-size: 1.5rem;
  }

  .modal-carrusel {
    height: 400px;
  }

  .modal-contenido {
    max-width: 90%;
    max-height: 90vh;
  }

  .mapa {
    height: 500px;
  }

  .contenido {
    flex-direction: column;
    gap: 30px;
  }
}

/* ===== TABLETS PEQUEÑAS Y MÓVILES GRANDES (481px - 768px) ===== */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
    font-size: 0.95rem;
  }

  .container {
    width: 95%;
    padding: 0 15px;
  }

  header {
    height: 70px;
    padding: 10px 0;
  }

  .logo img {
    width: 120px;
    height: auto;
  }

  h1 { 
    font-size: 2.2rem; 
  }
  
  h2 { 
    font-size: 1.8rem; 
  }
  
  h3 { 
    font-size: 1.5rem; 
  }

  .slideshow-text h1 {
    font-size: 2.2rem;
    letter-spacing: 1px;
    padding: 0 20px;
  }

  .prev, .next {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  section {
    padding: 50px 0;
  }

  .habitaciones-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .habitacion-imagen {
    height: 280px;
  }

  .habitacion-descripcion {
    padding: 20px;
    min-height: auto;
  }

  .habitacion-descripcion h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  .habitacion-descripcion p {
    font-size: 0.85rem;
  }

  .precio {
    font-size: 1.3rem;
    padding: 15px 20px;
    margin: 20px 0 15px;
  }

  .precio strong {
    font-size: 1.8rem;
  }

  .btn-mas-info {
    padding: 14px 25px;
    font-size: 0.95rem;
  }

  .modal-contenido {
    max-width: 95%;
    max-height: 95vh;
    margin: 2.5vh auto;
    border-radius: 20px;
  }

  .modal-carrusel {
    height: 300px;
    min-height: 300px;
  }

  .modal-info {
    padding: 20px;
  }

  .modal-info h2 {
    font-size: 1.5rem;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .form-group input[type="date"],
  .form-group input[type="number"] {
    padding: 12px 15px;
    font-size: 1rem;
  }

  .number-input-container {
    padding: 10px;
  }

  .number-input button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .mapa {
    height: 400px;
    border-radius: 12px;
  }

  .reserva {
    padding: 50px 0;
  }

  .reserva h2 {
    font-size: 2rem;
  }

  .reserva p {
    font-size: 1rem;
    padding: 0 20px;
  }

  .btn-reserva {
    padding: 14px 30px;
    font-size: 1rem;
  }

  .qr-code {
    width: 160px;
    height: 160px;
    border-width: 8px;
  }

  .contenido {
    padding: 30px 20px;
  }

  .texto h2::after {
    width: 60px;
  }

  .info-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }

  .social-icons {
    gap: 20px;
  }

  .social-icons a {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  footer {
    padding: 40px 0 20px;
  }
}

/* ===== MÓVILES (320px - 480px) ===== */
@media (max-width: 480px) {
  body {
    padding-top: 65px;
    font-size: 0.9rem;
  }

  .container {
    width: 100%;
    padding: 0 12px;
  }

  header {
    height: 65px;
    padding: 8px 0;
  }

  .logo img {
    width: 100px;
  }

  h1 { 
    font-size: 1.8rem; 
    margin-bottom: 1rem;
  }
  
  h2 { 
    font-size: 1.5rem; 
    margin-bottom: 1rem;
  }
  
  h3 { 
    font-size: 1.3rem; 
  }

  section {
    padding: 40px 0;
  }

  .slideshow-text h1 {
    font-size: 1.5rem;
    padding: 0 15px;
  }

  .prev, .next {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .habitaciones-grid {
    gap: 20px;
  }

  .habitacion-pag {
    border-radius: 16px;
  }

  .habitacion-imagen {
    height: 240px;
  }

  .habitacion-descripcion {
    padding: 18px;
    min-height: auto;
  }

  .habitacion-descripcion h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .habitacion-descripcion h2::after {
    width: 50px;
    height: 2px;
  }

  .habitacion-descripcion > div > p:first-of-type {
    font-size: 0.9rem;
    margin-bottom: 15px;
  }

  .habitacion-descripcion p {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .habitacion-descripcion p strong {
    min-width: 100px;
    font-size: 0.85rem;
  }

  .precio {
    font-size: 1.1rem;
    padding: 12px 18px;
    margin: 15px 0 12px;
    border-radius: 12px;
  }

  .precio strong {
    font-size: 1.5rem;
  }

  .precio span {
    font-size: 0.75rem;
  }

  .btn-mas-info {
    padding: 12px 20px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-radius: 12px;
  }

  .modal-contenido {
    max-width: 98%;
    max-height: 98vh;
    margin: 1vh auto;
    border-radius: 16px;
    padding: 0;
  }

  .modal-carrusel {
    height: 250px;
    min-height: 250px;
    border-radius: 16px 16px 0 0;
  }

  .modal-info {
    padding: 18px;
  }

  .modal-info h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }

  .modal-info > p {
    font-size: 0.85rem;
    padding: 12px;
    margin-bottom: 15px;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .form-group label {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .form-group input[type="date"],
  .form-group input[type="number"] {
    padding: 10px 12px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .number-input-container {
    padding: 8px;
    border-radius: 8px;
  }

  .number-input button {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .number-input input {
    font-size: 1rem;
  }

  .modal-info button[type="button"] {
    padding: 12px 25px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .cerrar {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    top: 10px;
    right: 10px;
  }

  .carrusel-prev,
  .carrusel-next {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .mapa {
    height: 350px;
    border-radius: 10px;
    border-width: 1px;
  }

  .reserva {
    padding: 40px 0;
  }

  .reserva h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .reserva p {
    font-size: 0.9rem;
    padding: 0 15px;
    margin-bottom: 20px;
  }

  .btn-reserva {
    padding: 12px 25px;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  .qr-code {
    width: 140px;
    height: 140px;
    border-width: 6px;
    margin: 20px auto;
  }

  .contenido {
    padding: 25px 15px;
  }

  .texto h2 {
    font-size: 1.5rem;
  }

  .texto h2::after {
    width: 50px;
  }

  .texto p {
    font-size: 0.9rem;
  }

  .info-item {
    padding: 15px;
    margin-bottom: 15px;
  }

  .info-item h3 {
    font-size: 1.2rem;
  }

  .info-item p {
    font-size: 0.85rem;
  }

  .social-icons {
    gap: 15px;
    flex-wrap: wrap;
  }

  .social-icons a {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  footer {
    padding: 30px 0 15px;
  }

  .footer-logo img {
    width: 100px;
  }

  .copyright {
    font-size: 0.8rem;
  }
}

/* ===== MÓVILES MUY PEQUEÑOS (hasta 360px) ===== */
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }

  .logo img {
    width: 90px;
  }

  h1 { 
    font-size: 1.6rem; 
  }
  
  h2 { 
    font-size: 1.3rem; 
  }

  .slideshow-text h1 {
    font-size: 1.3rem;
  }

  .habitacion-imagen {
    height: 220px;
  }

  .habitacion-descripcion {
    padding: 15px;
  }

  .habitacion-descripcion h2 {
    font-size: 1.2rem;
  }

  .precio {
    font-size: 1rem;
    padding: 10px 15px;
  }

  .precio strong {
    font-size: 1.3rem;
  }

  .modal-carrusel {
    height: 220px;
    min-height: 220px;
  }

  .modal-info {
    padding: 15px;
  }

  .qr-code {
    width: 120px;
    height: 120px;
  }

  .mapa {
    height: 300px;
  }
}

/* ===== LAPTOPS GRANDES (1025px - 1440px) ===== */
@media (min-width: 1025px) and (max-width: 1440px) {
  .container {
    max-width: 1200px;
  }

  .habitaciones-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

/* ===== DESKTOPS GRANDES (más de 1440px) ===== */
@media (min-width: 1441px) {
  .container {
    max-width: 1400px;
  }

  .habitaciones-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

/* ===== ORIENTACIÓN HORIZONTAL (LANDSCAPE) ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .slideshow-container {
    height: 100vh;
  }

  .modal-carrusel {
    height: 200px;
    min-height: 200px;
  }

  .habitacion-imagen {
    height: 200px;
  }

  .habitacion-descripcion {
    min-height: auto;
    padding: 15px;
  }
}

/* ===== MEJORAS DE USABILIDAD TOUCH ===== */
@media (hover: none) and (pointer: coarse) {
  button, a, input[type="submit"], .btn {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }

  .habitacion-pag:hover {
    transform: none;
  }

  .habitacion-pag:active {
    transform: scale(0.98);
  }

  .btn-mas-info:hover {
    transform: none;
  }

  .btn-mas-info:active {
    transform: scale(0.95);
  }
}

/* ===== AJUSTES ESPECÍFICOS PARA iOS ===== */
@supports (-webkit-touch-callout: none) {
  select, input[type="date"], input[type="number"] {
    font-size: 16px; /* Evita zoom automático en iOS */
  }
}

/* ===== PREFERENCIA DE MOVIMIENTO REDUCIDO ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== AJUSTES ESPECÍFICOS PARA TEMA CLARO EN MÓVILES ===== */
@media (max-width: 768px) {
  body.theme-light .reserva {
    background-attachment: scroll; /* Mejor rendimiento en móviles */
  }

  body.theme-light .habitacion-pag {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(201, 169, 97, 0.2);
  }

  body.theme-light .modal-contenido {
    background: linear-gradient(145deg, #faf8f3, #f5f0e8);
  }
}

@media (max-width: 480px) {
  body.theme-light .reserva h2 {
    text-shadow: 0 1px 5px rgba(201, 169, 97, 0.2);
  }

  body.theme-light .qr-code {
    box-shadow: 0 8px 25px rgba(201, 169, 97, 0.2),
                0 0 0 2px rgba(201, 169, 97, 0.15);
  }
}

/* ===== IMPRESIÓN ===== */
@media print {
  header, footer, nav, .btn, .modal {
    display: none;
  }

  body {
    padding-top: 0;
  }

  section {
    page-break-inside: avoid;
  }
}

