/* Custom CSS for Comboios de Portugal Replica */

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #E40521;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B9041A;
}

/* Date picker styling */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.4);
    cursor: pointer;
}

/* Focus states */
input:focus, select:focus, button:focus {
    outline: none;
    ring: 2px;
    ring-color: #E40521;
}

/* Animation for the swap button */
.swap-animation {
    animation: rotate 0.3s ease-in-out;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(180deg); }
}

/* Hero gradient overlay enhancement */
.hero-overlay {
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

/* Loading animation for search button */
@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(228, 5, 33, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(228, 5, 33, 0); }
}

.search-button-loading {
    animation: pulse-red 1.5s infinite;
}

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

.promo-card:hover {
    transform: translateY(-5px);
}

/* Navigation hover underline effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #E40521;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animation */
.mobile-menu-enter {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Booking widget glassmorphism effect for modern browsers */
@supports (backdrop-filter: blur(10px)) {
    .glass-effect {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
}

/* Custom select arrow */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #666;
    pointer-events: none;
}

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