/* Custom CSS for wVISA - Additional styles and animations */

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Improved dropdown styling for better visibility */
/* Dark background dropdowns (for overlay forms) */
.bg-white\/10 select,
.bg-black select {
    color: white !important;
}

.bg-white\/10 select option,
.bg-black select option {
    background-color: #1f2937 !important;
    color: white !important;
}

/* Light background dropdowns (for white forms) */
.bg-white select,
select.dropdown-select {
    color: #374151 !important;
}

.bg-white select option,
select.dropdown-select option {
    background-color: white !important;
    color: #374151 !important;
}

/* Override for specific dropdown styling */
.dropdown-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* For better browser compatibility */
select::-ms-expand {
    display: none;
}

/* Enhanced carousel transitions */
.carousel-slide {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Form validation styles */
.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Enhanced card hover effects */
.destination-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Dropdown styling fixes */
.dropdown-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="white" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
    min-height: 48px;
}

.dropdown-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgb(249 115 22);
    border-color: rgb(249 115 22);
}

.dropdown-select option {
    background-color: #1f2937 !important;
    color: white !important;
    padding: 8px 12px;
    font-size: 14px;
    border: none;
}

.dropdown-select option:hover,
.dropdown-select option:focus {
    background-color: #374151 !important;
    color: #f59e0b !important;
}

.dropdown-select option:checked,
.dropdown-select option:selected {
    background-color: #f59e0b !important;
    color: white !important;
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    .dropdown-select {
        background-image: none;
        padding-right: 16px;
    }

    .dropdown-select option {
        background: #1f2937;
        color: white;
    }
}

/* Safari and Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .dropdown-select option {
        background: #1f2937;
        color: white;
    }

    .dropdown-select option:hover {
        background: #374151;
        color: #f59e0b;
    }
}

/* Continue with destination card effects */
.destination-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.destination-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.destination-card:hover::before {
    left: 100%;
}

/* Pulse animation for important elements */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Fade in animation for sections */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced button styles */
.btn-primary {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e55a2e, #e0841a);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.4);
}

.btn-outline-primary {
    border: 2px solid #ff6b35;
    color: #ff6b35;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #ff6b35;
    color: white;
    transform: translateY(-2px);
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-subtitle {
        font-size: 1.125rem !important;
    }

    .carousel-controls {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Tab animation */
.tab-content {
    animation: fadeInTab 0.3s ease-in-out;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Success/Error message animations */
.message-slide-in {
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

.message-slide-out {
    animation: slideOutRight 0.5s ease forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced form styling */
.form-floating {
    position: relative;
}

.form-floating input:focus+label,
.form-floating input:not(:placeholder-shown)+label {
    transform: translateY(-1.5rem) scale(0.85);
    color: #ff6b35;
}

.form-floating label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.7);
}

/* Destination grid enhancements */
.destination-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Country flags animation */
.country-flag {
    display: inline-block;
    transition: transform 0.3s ease;
}

.country-flag:hover {
    transform: scale(1.2) rotate(10deg);
}

/* Marquee animation for countries */
.countries-marquee {
    overflow: hidden;
    white-space: nowrap;
}

.countries-marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12px;
        color: black;
    }

    .btn {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid currentColor;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .carousel-slide {
        transition: none;
    }
}

/* Focus styles for accessibility */
.focus-visible {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}