/* 
  Animations for Logistics Vehicles
  This file contains the keyframes and layout styles for the animated decorative bands.
*/

.animation-band {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

/* Common vehicle styling */
.animated-vehicle {
    position: absolute;
    will-change: transform;
    z-index: 10;
}

/* --- The Road --- */
.bg-road {
    background: linear-gradient(to bottom, var(--tw-gradient-from, #e9f1ff) 0%, var(--tw-gradient-from, #e9f1ff) 65%, #656464 65%, #656464 100%);
}

.road-lines {
    position: absolute;
    bottom: 25px; /* Middle of the road */
    width: 100%;
    height: 4px;
    background-image: linear-gradient(to right, #ffffff 50%, transparent 50%);
    background-size: 60px 100%;
    opacity: 0.7;
}

/* The City Skyline */
.scenery-city {
    position: absolute;
    bottom: 63px; /* Just above the road */
    width: 100%;
    height: 120px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 120"><defs><linearGradient id="b1" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="%23cc8877"/><stop offset="100%" stop-color="%23885544"/></linearGradient><linearGradient id="b2" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="%2388ccbb"/><stop offset="100%" stop-color="%23448877"/></linearGradient><linearGradient id="light" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="%23ffeeaa"/><stop offset="100%" stop-color="%23ddeebb"/></linearGradient></defs><g transform="translate(50, 20)"><rect x="0" y="0" width="90" height="100" rx="8" fill="url(%23b1)"/><rect x="0" y="8" width="90" height="92" fill="url(%23b1)"/><rect x="15" y="15" width="15" height="15" fill="%23dbeef4"/><rect x="40" y="15" width="20" height="15" fill="%23dbeef4"/><rect x="70" y="15" width="5" height="15" fill="%23dbeef4"/><rect x="15" y="45" width="60" height="15" fill="%23dbeef4"/><rect x="35" y="75" width="20" height="25" rx="8" fill="%232c3e50"/><rect x="35" y="85" width="20" height="15" fill="%232c3e50"/></g><g transform="translate(180, 25)"><rect x="13" y="15" width="4" height="80" fill="%237f8c8d"/><rect x="0" y="0" width="30" height="20" rx="10" fill="url(%23light)"/></g><g transform="translate(240, 30)"><rect x="20" y="30" width="20" height="60" rx="10" fill="%238d5b4c"/><circle cx="30" cy="20" r="25" fill="%23b9d6c3"/><circle cx="45" cy="30" r="20" fill="%23a3c4b0"/></g><g transform="translate(350, 40)"><rect x="0" y="0" width="80" height="80" rx="6" fill="url(%23b2)"/><rect x="0" y="6" width="80" height="74" fill="url(%23b2)"/><rect x="15" y="15" width="15" height="15" fill="%23dbeef4"/><rect x="45" y="15" width="15" height="15" fill="%23dbeef4"/><rect x="15" y="45" width="15" height="15" fill="%23dbeef4"/><rect x="45" y="45" width="15" height="15" fill="%23dbeef4"/><rect x="30" y="55" width="20" height="25" rx="8" fill="%232c3e50"/><rect x="30" y="65" width="20" height="15" fill="%232c3e50"/></g><g transform="translate(480, 20)"><rect x="20" y="40" width="20" height="60" rx="10" fill="%238d5b4c"/><circle cx="30" cy="25" r="30" fill="%23b9d6c3"/><circle cx="15" cy="40" r="20" fill="%23a3c4b0"/></g><g transform="translate(580, 25)"><rect x="13" y="15" width="4" height="80" fill="%237f8c8d"/><rect x="0" y="0" width="30" height="20" rx="10" fill="url(%23light)"/></g><g transform="translate(640, 10)"><rect x="0" y="0" width="100" height="110" rx="8" fill="url(%23b1)"/><rect x="0" y="8" width="100" height="102" fill="url(%23b1)"/><rect x="15" y="20" width="70" height="20" fill="%23dbeef4"/><rect x="15" y="55" width="20" height="20" fill="%23dbeef4"/><rect x="65" y="55" width="20" height="20" fill="%23dbeef4"/><rect x="40" y="85" width="20" height="25" rx="8" fill="%232c3e50"/><rect x="40" y="95" width="20" height="15" fill="%232c3e50"/></g><g transform="translate(780, 35)"><rect x="15" y="30" width="15" height="55" rx="7" fill="%238d5b4c"/><circle cx="22" cy="20" r="20" fill="%23b9d6c3"/><circle cx="35" cy="30" r="15" fill="%23a3c4b0"/></g><g transform="translate(860, 50)"><rect x="0" y="0" width="90" height="70" rx="6" fill="url(%23b2)"/><rect x="0" y="6" width="90" height="64" fill="url(%23b2)"/><rect x="10" y="10" width="70" height="15" fill="%23dbeef4"/><rect x="10" y="35" width="70" height="15" fill="%23dbeef4"/></g></svg>');
    background-repeat: repeat-x;
    background-size: 1000px 120px;
}

/* --- The Ocean --- */
.bg-ocean {
    background: linear-gradient(to bottom, #dbe9ff 0%, #dbe9ff 55%, #0d1c2d 55%, #233143 100%);
}

.wave-lines {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 80px;
    background-image: radial-gradient(circle at 10px 0px, transparent 15px, #233143 16px);
    background-size: 40px 20px;
    opacity: 0.3;
}

/* --- The Sky --- */
.bg-sky {
    background: linear-gradient(to bottom, #e5efff 0%, #f8f9ff 100%);
}

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 200"><circle cx="100" cy="50" r="30" fill="white"/><circle cx="130" cy="50" r="40" fill="white"/><circle cx="160" cy="50" r="30" fill="white"/><circle cx="500" cy="80" r="40" fill="white"/><circle cx="550" cy="70" r="50" fill="white"/><circle cx="600" cy="80" r="40" fill="white"/><circle cx="850" cy="40" r="25" fill="white"/><circle cx="880" cy="40" r="35" fill="white"/><circle cx="910" cy="40" r="25" fill="white"/></svg>');
    background-repeat: repeat-x;
    background-size: 1000px 200px;
    animation: driftClouds 60s linear infinite;
    opacity: 0.8;
}

/* --- Animations --- */
@keyframes driftClouds {
    from { background-position: 0 0; }
    to { background-position: -1000px 0; }
}

@keyframes driveLeftToRight {
    from { transform: translateX(-200px); }
    to { transform: translateX(calc(100vw + 200px)); }
}

@keyframes driveRightToLeft {
    from { transform: translateX(calc(100vw + 200px)) scaleX(-1); }
    to { transform: translateX(-200px) scaleX(-1); }
}

@keyframes floatShip {
    0% { transform: translateY(0) translateX(-300px); }
    25% { transform: translateY(-4px) translateX(calc(25vw)); }
    50% { transform: translateY(0px) translateX(calc(50vw)); }
    75% { transform: translateY(-4px) translateX(calc(75vw)); }
    100% { transform: translateY(0) translateX(calc(100vw + 300px)); }
}

@keyframes flyPlane {
    0% { transform: translateY(30px) translateX(-300px); }
    100% { transform: translateY(-20px) translateX(calc(100vw + 300px)); }
}

/* Vehicle Types */
.vehicle-truck { width: 140px; height: 55px; bottom: 33px; }
.vehicle-truck-lane-2 { width: 130px; height: 50px; bottom: 5px; filter: brightness(0.8); }

.vehicle-ship { width: 250px; height: 100px; bottom: 20px; }
.vehicle-plane { width: 200px; height: 80px; top: 40px; bottom: auto; }

/* Speeds */
.anim-truck-slow { animation: driveLeftToRight 28s linear infinite; }
.anim-truck-fast { animation: driveLeftToRight 16s linear infinite; }
.anim-truck-reverse { animation: driveRightToLeft 22s linear infinite; }

.anim-ship { animation: floatShip 45s linear infinite; }
.anim-plane { animation: flyPlane 15s linear infinite; }
