/* Custom Styles for Gracious Angeli Travel & Tours */

/* Package Category Button Styles */
.package-category-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.package-category-btn.active {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: currentColor;
    font-weight: bold;
}

.package-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Specific active states for each category */
.package-category-btn[data-category="asia"].active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: #dc2626;
}

.package-category-btn[data-category="europe"].active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: #2563eb;
}

.package-category-btn[data-category="philippines"].active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #059669;
}

/* Package Carousel Styles */
.package-card {
    transition: all 0.3s ease;
}

.package-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Responsive Package Cards */
@media (max-width: 1024px) {
    .package-card {
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .package-card {
        min-width: 260px;
    }
    
    .package-category-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 640px) {
    .package-card {
        min-width: 240px;
    }
    
    .package-category-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Star Rating Display */
.star-rating-display {
    transition: all 0.3s ease;
}

.star-rating-display span {
    transition: all 0.3s ease;
}

.rating-text {
    transition: all 0.3s ease;
}

/* Logo styling */
.nav-logo {
    transition: all 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-logo img {
    object-fit: contain;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .nav-logo img {
        width: 3rem;
        height: 2.25rem;
    }
    
    .nav-logo h1 {
        font-size: 1.25rem;
    }
    
    .nav-logo span {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .nav-logo img {
        width: 2.5rem;
        height: 1.875rem;
    }
    
    .nav-logo h1 {
        font-size: 1.125rem;
    }
    
    .nav-logo span {
        font-size: 0.7rem;
    }
}

.nav-gradient {
    background: linear-gradient(90deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Navigation scroll animations */
.nav-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.nav-visible {
    transform: translateY(0);
    opacity: 1;
}
.card-gradient {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}
.button-gradient {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
}
.button-gradient:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
}
.section-gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.tab-button.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: white;
}
.tab-button:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
}
.travel-card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}
.rating-stars {
    color: #fbbf24;
}
.price-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile menu styles */
.tab-button-mobile.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: white;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Focus styles for better accessibility */
button:focus, input:focus, textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Services slider enhancements */
#servicesSlider {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s ease-in-out;
    width: fit-content; /* Allow container to fit content */
}

/* Services slider container responsive adjustments */
@media (max-width: 768px) {
    #servicesSlider {
        gap: 1rem; /* Smaller gap on mobile */
    }
}

@media (max-width: 480px) {
    #servicesSlider {
        gap: 0.75rem; /* Even smaller gap on very small screens */
    }
}

/* Progress bar styling */
#servicesProgress {
    transition: width 0.5s ease-in-out;
}

/* Service card styling for grid layout */
.service-card {
    width: 100%; /* Cards take full width in grid */
    height: auto; /* Natural height */
}

/* Service card hover effects */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Back to Top Button - Visible on all devices */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    /* Ensure it's visible on all screen sizes */
    display: block !important;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile-specific adjustments for back to top button */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        /* Ensure it's visible within mobile viewport */
        transform: scale(0.9);
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .back-to-top {
        bottom: 10px;
        right: 10px;
        /* Ensure button stays within mobile viewport */
        right: 10px;
    }
}

/* Very small mobile devices */
@media (max-width: 375px) {
    .back-to-top {
        bottom: 10px;
        right: 5px;
        /* Minimal right margin for very small screens */
        transform: scale(0.75);
    }
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    /* Larger touch targets for mobile */
    button, .tab-button, .tab-button-mobile {
        min-height: 44px; /* iOS recommended minimum touch target */
        min-width: 44px;
    }
    
    /* Improved form field spacing */
    input, textarea, select {
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        margin-bottom: 16px;
    }
    
    /* Better card spacing on mobile */
    .travel-card {
        margin-bottom: 16px;
    }
    
    /* Swipe indicator for sliders */
    .slider-container::after {
        content: "← Swipe →";
        display: block;
        text-align: center;
        color: #6b7280;
        font-size: 0.875rem;
        margin-top: 8px;
    }
}

/* Mobile landscape improvements */
@media (max-width: 768px) and (orientation: landscape) {
    /* Reduce navigation height in landscape */
    .nav-logo img {
        width: 2.5rem;
        height: 1.875rem;
    }
    
    .nav-logo h1 {
        font-size: 1.125rem;
    }
}

/* Services grid layout - all services displayed beautifully */
#services {
    position: relative;
    /* Natural content flow for grid layout */
}

/* Philippines section spacing fix */
.philippines-section {
    margin-top: 8rem !important; /* 128px - increased spacing */
}

/* Responsive spacing for Philippines section */
@media (max-width: 768px) {
    .philippines-section {
        margin-top: 6rem !important; /* 96px for tablets */
    }
}

@media (max-width: 480px) {
    .philippines-section {
        margin-top: 4rem !important; /* 64px for mobile */
    }
}

/* Europe Package Cards - Uniform styling */
.package-card h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Europe package text container styling */
.europe-country-text {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    height: 100%;
    width: 100%;
}

/* Uniform card heights for Europe packages */
.package-card {
    display: flex;
    flex-direction: column;
}

/* Ensure Europe and Philippines package cards have consistent layout */
.package-card[style*="h-[600px]"] {
    height: 600px !important;
}

.package-card[style*="h-[580px]"] {
    height: 580px !important;
}

.package-card .p-4 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Europe package specific layout for button alignment */
.package-card .h-full {
    height: 100% !important;
}

.package-card .flex-grow {
    flex-grow: 1;
}

.package-card .flex-shrink-0 {
    flex-shrink: 0;
}

/* Make sure inclusion/exclusion grid fills available space in Europe cards */
.package-card .grid.flex-1 {
    align-content: start;
    flex: 1;
}