/* Custom animations and utilities for Conekta Intermodal */

/* Reveal animation classes */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Animation delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

/* Flow animation for logistics diagram */
@keyframes flowLine {
    0% {
        transform: scaleX(0);
        transform-origin: left;
    }
    50% {
        transform: scaleX(1);
        transform-origin: left;
    }
    50.1% {
        transform-origin: right;
    }
    100% {
        transform: scaleX(0);
        transform-origin: right;
    }
}

.animation-flow {
    animation: flowLine 2s infinite ease-in-out;
}

/* Pattern background for containers */
.pattern-containers {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230f4c81' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h2v4h-2zm0-6v-4h2v4h-2zm-6 6h-4v2h4v-2zm0-6v-4h-4v4h4zm6 6h-4v2h4v-2zm0-6v-4h-4v4h4zm-6 6h-4v2h4v-2zm0-6v-4h-4v4h4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection color */
::selection {
    background: #0891b2;
    color: white;
}

/* Counter styles */
.counter {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: 400px;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

/* Responsive font adjustments */
@media (max-width: 640px) {
    .font-display {
        letter-spacing: -0.02em;
    }
}

/* ISO Card hover effect */
.iso-card {
    position: relative;
    overflow: hidden;
}

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

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

/* Button shine effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.btn-shine:hover::after {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}