/* Custom Styles for Taxi Đồng Xoài Website */

/* Font Family */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

/* Navigation Links */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #90EE90;
}

.nav-link.active {
    color: #90EE90;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #90EE90;
}

/* Mobile Navigation Links */
.nav-link-mobile {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.nav-link-mobile:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link-mobile.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #90EE90;
}

/* Hero Section Diagonal Separator */
.hero-separator {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 100vh 100vw;
    border-color: transparent transparent transparent #3CB85F;
}

/* Hero Slider Styles - Full Screen */
#heroSlider {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Slider Dots */
.slider-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    opacity: 1 !important;
    background-color: #3CB85F !important;
    transform: scale(1.2);
}

/* Slider Arrows */
.slider-arrow {
    cursor: pointer;
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.slider-arrow:hover {
    background-color: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-50%) scale(1.1);
}

/* Mobile Optimizations for Slider */
@media (max-width: 640px) {
    /* Larger dots for easier tapping on mobile */
    .slider-dot {
        width: 10px !important;
        height: 10px !important;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    
    .slider-dot.active {
        transform: scale(1.3);
    }
    
    /* Ensure slider images load quickly on mobile */
    .hero-slide img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Image Hover Effects */
.group img {
    transition: transform 0.3s ease;
}

.group:hover img {
    transform: scale(1.1);
}

/* Button Animations */
button, a[class*="bg-"] {
    transition: all 0.3s ease;
}

button:hover, a[class*="bg-"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Section Spacing */
section {
    scroll-margin-top: 80px;
}

/* Gallery Image Overlay */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(60, 184, 95, 0);
    transition: background 0.3s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    background: rgba(60, 184, 95, 0.2);
}

/* Floating Call Button Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    /* Larger touch targets for mobile */
    button, a[class*="bg-"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing on mobile */
    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Optimize images for mobile */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Better text readability */
    p, li {
        font-size: 15px;
        line-height: 1.6;
    }
    
    /* Larger buttons on mobile */
    .btn-mobile {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    /* Floating buttons on left side for mobile */
    .fixed.bottom-6.left-6,
    .fixed.bottom-24.left-6 {
        left: 1rem;
    }
    
    /* Better spacing for floating buttons */
    .fixed.bottom-24.left-6 {
        bottom: 5.5rem;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #35a550;
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

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

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

/* Service Card */
.service-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* District Card */
.district-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.district-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Icon Animation */
.icon-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #3CB85F 0%, #1e7c3e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: #3CB85F;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.back-to-top:hover {
    background: #35a550;
    transform: translateY(-5px);
}

/* Mobile Menu Animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobileMenu.show {
    max-height: 500px;
}

/* Image Placeholder */
img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

img[src] {
    background: none;
    animation: none;
}

/* Print Styles */
@media print {
    header, footer, .back-to-top, .floating-call {
        display: none;
    }
}
