/* ========================================
   TOURS Y PAQUETES - ESTILOS MEJORADOS
   ======================================== */

/* Grilla de Tours y Paquetes */
.tours-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-top: 1.5rem;
}

@media (max-width: 1024px) {
    .tours-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .tours-grid {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .tours-grid {
        gap: 1rem;
    }
}

/* Tarjeta de Tour/Paquete */
.tour-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    height: auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tour-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Imagen del Tour */
.tour-image {
    position: relative;
    width: 220px;
    height: 220px;
    min-width: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    flex-shrink: 0;
}

.tour-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tour-card:hover .tour-image img {
    transform: scale(1.08);
}

/* Badge de Descuento */
.tour-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Contenido de la Tarjeta */
.tour-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Categoría del Tour */
.tour-category {
    display: inline-block;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: #2563eb;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    margin-bottom: 0.75rem;
    width: fit-content;
}

/* Título del Tour */
.tour-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Descripción */
.tour-content p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Características del Tour */
.tour-features {
    display: flex;
    gap: 1rem;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.tour-features span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Pie de la Tarjeta */
.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    gap: 1rem;
    flex-wrap: wrap;
}

/* Precios */
.tour-price {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-old {
    font-size: 0.8rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.price-current {
    font-size: 1.2rem;
    font-weight: 700;
    color: #10b981;
}

/* Botones */
.btn {
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    text-align: center;
}

.btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-back {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.btn-back:hover {
    background: #2563eb;
    transform: translateX(-5px);
}

/* Estados de Carga y Errores */
.empty-section {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
    font-style: italic;
    grid-column: 1 / -1;
    font-size: 1.1rem;
}

.error {
    color: #dc2626;
    text-align: center;
    padding: 2rem;
    grid-column: 1 / -1;
    font-weight: 500;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    grid-column: 1 / -1;
    font-weight: 500;
}

.load-more-spinner {
    text-align: center;
    padding: 1.5rem;
    color: #6b7280;
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

/* ========================================
   SECCIONES DE PAQUETES
   ======================================== */

.packages-section {
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 0.75rem;
    display: inline-block;
}

.section-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* ========================================
   FILTROS
   ======================================== */

.filters {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group label {
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    font-size: 0.95rem;
}

.filter-select,
.filter-input {
    padding: 0.625rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.membership-banner {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   CATEGORÍAS GRID (Tours)
   ======================================== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 2rem 0;
}

@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

.category-card-rect {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-rect:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.2);
}

.category-card-rect .category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.category-card-rect .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card-rect:hover .category-image img {
    transform: scale(1.1);
}

.category-card-rect .category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    color: white;
    z-index: 2;
    transition: background 0.3s ease;
}

.category-card-rect:hover .category-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.category-card-rect .category-content {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(16, 185, 129, 0.95) 100%);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: all 0.3s ease;
    max-width: 85%;
    backdrop-filter: blur(5px);
}

.category-card-rect:hover .category-content {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.category-card-rect .category-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
    color: white;
}

.category-card-rect .category-content p {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    opacity: 0.95;
    display: none;
    color: white;
    line-height: 1.4;
}

.category-card-rect:hover .category-content p {
    display: block;
}

.category-card-rect .tours-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.4rem 0.9rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    display: inline-block;
    margin-top: 0.5rem;
}

/* Header de Categoría */
.category-header {
    margin: 2rem 0;
}

.category-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
    font-weight: 700;
}

.category-header p {
    color: #6b7280;
    font-size: 1rem;
}

/* ========================================
   RESPONSIVIDAD TABLETAS
   ======================================== */

@media (max-width: 768px) {
    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select,
    .filter-input {
        width: 100%;
    }

    .category-header h2 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* Cambiar tour-card a columna en tablet y móvil */
    .tour-card {
        flex-direction: column;
    }

    .tour-image {
        width: 100%;
        height: 200px;
        min-width: 100%;
    }

    .tour-footer {
        flex-direction: row;
    }

    /* Responsive para tarjetas de categoría (solo tours y paquetes) */
    .category-card-rect {
        height: 250px;
    }

    .category-content {
        padding: 1.2rem 1.5rem;
    }

    .category-content h3 {
        font-size: 1.1rem;
    }

    .category-content p {
        font-size: 0.8rem;
    }
}

/* ========================================
   RESPONSIVIDAD MÓVILES
   ======================================== */

@media (max-width: 480px) {
    .tour-card {
        border-radius: 10px;
        flex-direction: column;
    }

    .tour-image {
        width: 100%;
        height: 180px;
        min-width: 100%;
    }

    .tour-content {
        padding: 1rem;
    }

    .tour-content h3 {
        font-size: 1rem;
    }

    .tour-content p {
        font-size: 0.85rem;
    }

    .tour-footer {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Responsive para tarjetas de categoría en móviles */
    .category-card-rect {
        height: 220px;
    }

    .category-content {
        padding: 1rem 1.2rem;
        max-width: 90%;
    }

    .category-content h3 {
        font-size: 1rem;
    }

    .category-content p {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .tours-count {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }

    .category-header {
        margin: 1.5rem 0;
    }

    .category-header h2 {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .membership-banner {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   MODAL DE MEMBRESÍA Y AUTENTICACIÓN
   ======================================== */

.purchase-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.purchase-modal {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

.modal-icon {
    font-size: 2rem;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
    margin-left: auto;
    transition: color 0.3s ease;
    padding: 0;
}

.modal-close:hover {
    color: #1f2937;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-body p {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.modal-benefits {
    background: rgba(59, 130, 246, 0.05);
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid #3b82f6;
}

.modal-benefits h4 {
    margin: 0 0 0.75rem 0;
    color: #1f2937;
    font-size: 0.95rem;
}

.modal-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-benefits li {
    color: #6b7280;
    font-size: 0.9rem;
    padding: 0.35rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-benefits li:before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
}

.modal-price {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    margin: 1rem 0;
}

.modal-price strong {
    display: block;
    font-size: 1.3rem;
    color: #10b981;
    margin-top: 0.5rem;
}

.modal-price p {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-actions .btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.modal-actions .btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.modal-actions .btn-secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.modal-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.modal-actions .btn-ghost {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-actions .btn-ghost:hover {
    background: #e5e7eb;
}

@media (max-width: 480px) {
    .purchase-modal {
        padding: 1.5rem;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-price strong {
        font-size: 1.1rem;
    }

    .modal-actions .btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}