/* Custom CSS for Velo Club Roubaix Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero Gallery Styles */
.hero-gallery {
    position: relative;
}

/* Hero Content Top - Top Overlay for Title */
.hero-content-top {
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.85) 0%, 
        rgba(0, 0, 0, 0.75) 50%, 
        rgba(0, 0, 0, 0.4) 80%, 
        transparent 100%);
    /* Removed backdrop-blur to prevent image blur - solid gradient provides enough contrast */
}

/* Hero Content Bottom - Bottom Overlay for Buttons */
.hero-content-bottom {
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.85) 0%, 
        rgba(0, 0, 0, 0.75) 50%, 
        rgba(0, 0, 0, 0.4) 80%, 
        transparent 100%);
    /* Removed backdrop-blur to prevent image blur - solid gradient provides enough contrast */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Use smooth rendering for photos (not crisp-edges which is for pixel art) */
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Hardware acceleration for better rendering */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Prevent blur from scaling - use will-change for optimization */
    will-change: transform;
    /* Subtle enhancements */
    filter: brightness(1.05) contrast(1.02) saturate(1.1);
    transition: filter 0.3s ease;
}

.hero-slide.active img {
    filter: brightness(1.1) contrast(1.05) saturate(1.15);
}

/* Improve image quality on high-DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-slide img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-quality;
    }
}

.hero-indicator {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hero-indicator:hover {
    opacity: 1 !important;
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-indicator.active {
    opacity: 1 !important;
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Scroll indicator styling */
.fa-chevron-down {
    cursor: pointer;
    transition: all 0.3s ease;
}

.fa-chevron-down:hover {
    transform: translateY(2px);
    opacity: 0.8;
}

/* VCR Kit Color Strip Headers */
.vcr-strip-header {
    position: relative;
    overflow: hidden;
}

.vcr-strip-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        #f68fac 0%, 
        #f68fac 33%, 
        #ffffff 33%, 
        #ffffff 66%, 
        #2a2c39 66%, 
        #2a2c39 100%);
}

.vcr-strip-header-thick::before {
    height: 12px;
}

.vcr-strip-header-thin::before {
    height: 3px;
}

/* Hero section responsive adjustments */
@media (max-width: 1024px) {
    .hero-content-top {
        background: linear-gradient(to bottom, 
            rgba(0, 0, 0, 0.9) 0%, 
            rgba(0, 0, 0, 0.8) 50%, 
            rgba(0, 0, 0, 0.5) 80%, 
            transparent 100%);
    }
    
    .hero-content-bottom {
        background: linear-gradient(to top, 
            rgba(0, 0, 0, 0.9) 0%, 
            rgba(0, 0, 0, 0.8) 50%, 
            rgba(0, 0, 0, 0.5) 80%, 
            transparent 100%);
    }
}

@media (max-width: 768px) {
    .hero-content-top {
        background: linear-gradient(to bottom, 
            rgba(0, 0, 0, 0.95) 0%, 
            rgba(0, 0, 0, 0.85) 50%, 
            rgba(0, 0, 0, 0.6) 80%, 
            transparent 100%);
    }
    
    .hero-content-bottom {
        background: linear-gradient(to top, 
            rgba(0, 0, 0, 0.95) 0%, 
            rgba(0, 0, 0, 0.85) 50%, 
            rgba(0, 0, 0, 0.6) 80%, 
            transparent 100%);
    }
    
    /* Ensure buttons are full width on mobile and visible */
    .hero-content-bottom .flex.flex-col.sm\:flex-row {
        width: 100%;
    }
    
    .hero-content-bottom .flex.flex-col.sm\:flex-row > a {
        width: 100%;
    }
    
    /* Use a more reasonable height on mobile - not full screen */
    section.relative.h-\[85vh\] {
        min-height: 85vh;
        height: 85vh;
    }
    
    /* Ensure bottom section is always visible */
    .hero-content-bottom {
        position: relative;
        z-index: 10;
    }
}

/* Enhanced Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse-slow {
    animation: pulse 2s infinite;
}

/* Enhanced Hover Effects */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(246, 143, 172, 0.3);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .mobile-text-center {
        text-align: center;
    }
    
    .mobile-p-4 {
        padding: 1rem;
    }
    
    .mobile-mb-4 {
        margin-bottom: 1rem;
    }
    
    .mobile-grid-1 {
        grid-template-columns: 1fr;
    }
    
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full-width {
        width: 100%;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #DC2626;
    border-radius: 4px;
}

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

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #DC2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hover effects for cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover: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);
}

/* Button animations */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.btn-animate:hover::before {
    left: 100%;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #1E40AF, #DC2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom focus styles */
.focus-ring:focus {
    outline: none;
    ring: 2px;
    ring-color: #1E40AF;
    ring-opacity: 0.5;
}

/* 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);
    }
}

/* Calendar customizations */
.fc-event {
    border-radius: 4px !important;
    border: none !important;
    padding: 2px 4px !important;
}

.fc-event-title {
    font-weight: 500 !important;
}

.fc-button-primary {
    background-color: #DC2626 !important;
    border-color: #DC2626 !important;
}

.fc-button-primary:hover {
    background-color: #B91C1C !important;
    border-color: #B91C1C !important;
}

.fc-button-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.25) !important;
}

/* Form styling enhancements */
.form-input {
    transition: all 0.2s ease;
}

.form-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

/* Alert styling */
.alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #D1FAE5;
    border-color: #10B981;
    color: #065F46;
}

.alert-error {
    background-color: #FEE2E2;
    border-color: #EF4444;
    color: #991B1B;
}

/* Route card hover effects */
.route-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.route-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Difficulty badges */
.difficulty-easy {
    background-color: #10B981;
    color: white;
}

.difficulty-moderate {
    background-color: #F59E0B;
    color: white;
}

.difficulty-challenging {
    background-color: #EF4444;
    color: white;
}

.difficulty-expert {
    background-color: #7C3AED;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

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

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        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;
    }
}

