/* ========================================
   RESPONSIVE GLOBAL - TODAS LAS PÁGINAS
   ======================================== */

/* Asegurar que las imágenes sean responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Tablas responsive */
.overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    min-width: 600px;
}

/* Botones responsive */
button, 
.btn, 
a.btn {
    min-height: 44px; /* Tamaño mínimo táctil */
    padding: 12px 20px;
}

/* ========================================
   PAQUETES.PHP RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .paquetes-table {
        font-size: 0.9em;
    }
    
    .paquetes-table th,
    .paquetes-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 768px) {
    /* Tabla de paquetes en mobile */
    .paquetes-table {
        font-size: 0.85em;
    }
    
    .paquetes-table th,
    .paquetes-table td {
        padding: 8px 6px;
    }
    
    /* Ocultar columnas menos importantes en mobile */
    .paquetes-table th:nth-child(3),
    .paquetes-table td:nth-child(3) {
        display: none; /* Ocultar descripción */
    }
    
    .reservar-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .paquetes-table {
        font-size: 0.8em;
    }
    
    /* Ocultar más columnas en pantallas muy pequeñas */
    .paquetes-table th:nth-child(4),
    .paquetes-table td:nth-child(4) {
        display: none; /* Ocultar duración */
    }
}

/* ========================================
   RESERVAR.PHP RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .max-w-4xl {
        max-width: 95%;
        padding: 15px;
    }
    
    /* Formulario de reserva */
    form .space-y-4 > div {
        margin-bottom: 15px;
    }
    
    form input,
    form select {
        font-size: 16px; /* Evitar zoom en iOS */
    }
    
    /* Botones del formulario */
    .flex.gap-4 {
        flex-direction: column;
        gap: 10px;
    }
    
    .flex.gap-4 > * {
        width: 100%;
    }
}

/* ========================================
   VER RESERVAS / MIS RESERVAS RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .max-w-6xl {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    /* Tabla de reservas responsive */
    .min-w-full {
        min-width: auto;
    }
    
    /* Convertir tabla a cards en mobile */
    .min-w-full thead {
        display: none;
    }
    
    .min-w-full tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 15px;
        background: white;
    }
    
    .min-w-full tbody td {
        display: block;
        text-align: left !important;
        padding: 8px 0;
        border: none;
    }
    
    .min-w-full tbody td:before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        width: 120px;
        color: #374151;
    }
    
    /* Botón de nueva reserva */
    .flex.items-center.justify-between {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .flex.items-center.justify-between > a {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   ADMIN RESERVAS RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .max-w-7xl {
        max-width: 95%;
    }
    
    /* Grid de estadísticas */
    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Estadísticas en columna */
    .grid.grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    /* Tabla admin responsive */
    .overflow-x-auto table {
        font-size: 0.85em;
    }
}

/* ========================================
   MÚSICA DESTINO RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .grid.grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid.grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    /* Header con gradiente */
    .bg-gradient-to-r {
        padding: 20px;
    }
    
    .text-4xl {
        font-size: 1.8rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
}

/* ========================================
   LOGIN.PHP RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .form-container {
        padding: 15px;
    }
    
    .w-full.max-w-md {
        max-width: 95%;
    }
    
    /* Tabs de login/registro */
    .flex.border-b button {
        font-size: 0.9em;
        padding: 12px;
    }
    
    /* Formularios */
    .p-8 {
        padding: 20px;
    }
}

/* ========================================
   TOOLTIPS RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .destination-tooltip {
        width: 280px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .tooltip-header h3 {
        font-size: 16px;
    }
    
    .tooltip-description {
        font-size: 12px;
    }
    
    .tooltip-item {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .destination-tooltip {
        width: 250px;
    }
    
    .tooltip-btn {
        font-size: 12px;
        padding: 8px 15px;
    }
}

/* ========================================
   MODALES RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .modal-dialog {
        max-width: 95%;
        margin: 10px;
        max-height: 85vh;
    }
    
    .modal-header-custom {
        padding: 15px 20px;
    }
    
    .modal-header-custom h2 {
        font-size: 18px;
    }
    
    .modal-body-custom {
        padding: 20px;
    }
    
    .modal-body-custom h2 {
        font-size: 18px;
    }
    
    .modal-body-custom section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .modal-dialog {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .modal-header-custom {
        padding: 12px 15px;
        border-radius: 0;
    }
    
    .modal-header-custom h2 {
        font-size: 16px;
    }
    
    .modal-body-custom {
        padding: 15px;
    }
    
    .modal-body-custom h2 {
        font-size: 16px;
    }
    
    .modal-body-custom h3 {
        font-size: 14px;
    }
    
    .modal-body-custom p,
    .modal-body-custom li {
        font-size: 13px;
    }
}

/* ========================================
   UTILIDADES RESPONSIVE GENERALES
   ======================================== */

/* Ocultar en mobile */
@media (max-width: 768px) {
    .hidden-mobile {
        display: none !important;
    }
}

/* Ocultar en desktop */
@media (min-width: 769px) {
    .hidden-desktop {
        display: none !important;
    }
}

/* Texto responsive */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1.1rem; }
    
    p, li, span {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* Espaciado responsive */
@media (max-width: 768px) {
    .p-6 { padding: 1rem; }
    .p-8 { padding: 1.25rem; }
    .mt-8 { margin-top: 1.5rem; }
    .mb-8 { margin-bottom: 1.5rem; }
}

/* Grid responsive general */
@media (max-width: 768px) {
    .grid {
        gap: 1rem;
    }
}

/* Flex responsive */
@media (max-width: 768px) {
    .flex {
        flex-wrap: wrap;
    }
    
    .flex.gap-4 {
        gap: 0.75rem;
    }
}

/* ========================================
   MEJORAS DE ACCESIBILIDAD TÁCTIL
   ======================================== */

/* Aumentar área táctil en mobile */
@media (max-width: 768px) {
    a, button, input[type="submit"], input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Espaciado entre elementos táctiles */
    nav a, nav button {
        margin: 5px;
    }
}

/* ========================================
   OPTIMIZACIONES DE RENDIMIENTO
   ======================================== */

/* Reducir animaciones en dispositivos de bajo rendimiento */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    /* Agregar estilos de modo oscuro si se desea */
}
