/* Mobile Responsive Enhancements for Packages Page */

/* === MOBILE-FIRST PACKAGES PAGE OPTIMIZATIONS === */

/* Hero Section Mobile Enhancements */
@media (max-width: 768px) {
    .packages-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .packages-hero h1 {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
        padding: 0 1rem;
    }
    
    .packages-hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .packages-hero .hero-overlay {
        padding: 1rem;
    }
}

/* Package Categories Mobile Optimization */
@media (max-width: 768px) {
    .package-categories {
        padding: 1.5rem 1rem;
    }
    
    .categories-container {
        gap: 0.8rem;
        padding: 0 0.5rem;
    }
    
    .category-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        min-width: 120px;
        text-align: center;
    }
}

/* Mobile Package Grid */
@media (max-width: 768px) {
    .packages {
        padding: 2rem 1rem;
    }
    
    .packages-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        margin: 2rem 0;
        padding: 0;
    }
    
    .package-card {
        margin: 0;
        max-width: 100%;
        border-radius: 12px;
    }
    
    .package-image img {
        height: 180px;
    }
    
    .package-content {
        padding: 1.5rem;
    }
}

/* Mobile Package Card Content */
@media (max-width: 768px) {
    .package-card h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        line-height: 1.3;
    }
    
    .package-meta {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1rem;
        align-items: flex-start;
    }
    
    .package-meta span {
        background: #f0f4f8;
        padding: 0.3rem 0.8rem;
        border-radius: 15px;
        font-size: 0.85rem;
        color: #1a3c6e;
        font-weight: 600;
        display: inline-block;
    }
    
    .package-description {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
}

/* Mobile Package Highlights & Includes */
@media (max-width: 768px) {
    .package-highlights,
    .package-includes {
        margin-bottom: 1rem;
    }
    
    .package-highlights h4,
    .package-includes h4 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
        color: #1a3c6e;
    }
    
    .package-highlights ul,
    .package-includes ul {
        padding-left: 0;
    }
    
    .package-highlights li,
    .package-includes li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
        line-height: 1.4;
        position: relative;
        padding-left: 1.2rem;
    }
    
    .package-highlights li::before {
        content: "•";
        color: #ff6b35;
        font-weight: bold;
        position: absolute;
        left: 0;
    }
    
    .package-includes li::before {
        content: "✓";
        color: #4caf50;
        font-weight: bold;
        position: absolute;
        left: 0;
    }
}

/* Mobile Package Pricing & Actions */
@media (max-width: 768px) {
    .package-pricing {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid #e0e6ed;
    }
    
    .price-info {
        text-align: center;
        order: 2;
    }
    
    .price-info .price {
        font-size: 1.6rem;
        color: #ff6b35;
        font-weight: 700;
    }
    
    .price-info .per-person {
        display: block;
        font-size: 0.9rem;
        color: #666;
        margin-top: 0.3rem;
    }
    
    .package-actions {
        flex-direction: column;
        gap: 0.8rem;
        order: 1;
    }
    
    .package-actions .cta-button,
    .package-actions .secondary-button {
        width: 100%;
        text-align: center;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 8px;
        text-decoration: none;
        transition: all 0.3s ease;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .package-actions .cta-button {
        background: #25d366;
        color: white;
        border: none;
    }
    
    .package-actions .cta-button:hover {
        background: #128c7e;
        transform: translateY(-2px);
    }
    
    .package-actions .secondary-button {
        background: transparent;
        color: #1a3c6e;
        border: 2px solid #1a3c6e;
    }
    
    .package-actions .secondary-button:hover {
        background: #1a3c6e;
        color: white;
    }
}

/* Mobile Bookmark Button */
@media (max-width: 768px) {
    .bookmark-btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem !important;
        border-radius: 6px !important;
        margin: 0 !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
    }
}

/* Custom Package Section Mobile */
@media (max-width: 768px) {
    .custom-package {
        padding: 3rem 1rem;
    }
    
    .custom-container h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .custom-features {
        flex-direction: column;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .custom-features .feature {
        padding: 1rem 1.5rem;
        min-width: auto;
        text-align: center;
    }
    
    .custom-cta {
        flex-direction: column;
        gap: 0.8rem;
        margin-top: 1.5rem;
    }
    
    .custom-cta .cta-button,
    .custom-cta .secondary-button {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Recently Viewed Section Mobile */
@media (max-width: 768px) {
    #recently-viewed-section {
        margin-bottom: 1.5rem !important;
        padding: 0 1rem;
    }
    
    #recently-viewed-section h3 {
        font-size: 1.3rem;
        text-align: center;
        margin-bottom: 1rem !important;
        color: #1a3c6e;
    }
    
    #recently-viewed-cards {
        overflow-x: auto;
        display: flex !important;
        gap: 1rem;
        padding-bottom: 1rem;
        scroll-snap-type: x mandatory;
    }
    
    #recently-viewed-cards .package-card {
        min-width: 280px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
}

/* Small Mobile Devices (< 480px) */
@media (max-width: 480px) {
    .packages-hero h1 {
        font-size: 1.8rem;
    }
    
    .packages-hero {
        height: 35vh;
        min-height: 250px;
    }
    
    .category-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-width: 100px;
    }
    
    .package-card h3 {
        font-size: 1.2rem;
    }
    
    .package-content {
        padding: 1.2rem;
    }
    
    .package-meta span {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }
    
    .price-info .price {
        font-size: 1.4rem;
    }
    
    .custom-container h2 {
        font-size: 1.5rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .package-card {
        transform: none !important;
    }
    
    .package-card:active {
        transform: scale(0.98);
    }
    
    .category-btn:active {
        transform: scale(0.95);
    }
    
    .cta-button:active,
    .secondary-button:active {
        transform: scale(0.97);
    }
}

/* Loading states for mobile */
@media (max-width: 768px) {
    .package-card.loading {
        opacity: 0.7;
        pointer-events: none;
    }
    
    .package-card.loading::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        border: 2px solid #f3f3f3;
        border-top: 2px solid #ff6b35;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        transform: translate(-50%, -50%);
    }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile Package Badge Improvements */
@media (max-width: 768px) {
    .package-badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
        top: 10px;
        left: 10px;
        border-radius: 15px;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    .package-card:focus-within {
        outline: 3px solid #ff6b35;
        outline-offset: 2px;
    }
    
    .category-btn:focus,
    .cta-button:focus,
    .secondary-button:focus {
        outline: 3px solid #ff6b35;
        outline-offset: 2px;
    }
}