/* SkyBooker Custom Styles */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

/* Line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   Page Preloader
   ============================================================ */
#page-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    transition-property: opacity, visibility;
    transition-duration: 600ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
#page-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

/* Flight scene */
.preloader-scene {
    position: relative;
    width: 280px;
    height: 100px;
    overflow: hidden;
    perspective: 600px;
}

/* Dashed sky trail */
.preloader-trail {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
    background: repeating-linear-gradient(
        90deg,
        #3378ff 0,
        #3378ff 8px,
        transparent 8px,
        transparent 18px
    );
    opacity: 0.22;
    animation: trailScroll 0.8s linear infinite;
}
@keyframes trailScroll {
    from { background-position: 0 0; }
    to   { background-position: -26px 0; }
}

/* The plane */
.preloader-plane {
    position: absolute;
    top: 50%;
    left: -64px;
    width: 64px;
    height: 64px;
    margin-top: -32px;
    color: #3378ff;
    filter: drop-shadow(0 6px 18px rgba(51, 120, 255, 0.5));
    animation: planeFly 2.6s ease-in-out infinite;
}
@keyframes planeFly {
    0%   { left: -64px; transform: rotateY(0deg); }
    38%  { left: 36%;   transform: rotateY(0deg); }
    50%  { left: 50%;   transform: rotateY(360deg); }
    100% { left: 115%;  transform: rotateY(360deg); }
}

/* Clouds */
.preloader-clouds {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.preloader-cloud {
    position: absolute;
    border-radius: 9999px;
    background: #e2e8f0;
    opacity: 0;
    animation: cloudDrift 4s linear infinite;
}
.preloader-cloud:nth-child(1) { width: 34px; height: 12px; top: 20%; left: 80%; animation-delay: 0s; }
.preloader-cloud:nth-child(2) { width: 24px; height:  9px; top: 65%; left: 55%; animation-delay: 1.2s; }
.preloader-cloud:nth-child(3) { width: 28px; height: 10px; top: 30%; left: 20%; animation-delay: 2.6s; }
@keyframes cloudDrift {
    0%   { transform: translateX(0);   opacity: 0; }
    10%  { opacity: 0.55; }
    80%  { opacity: 0.4; }
    100% { transform: translateX(-80px); opacity: 0; }
}

/* Brand name */
.preloader-brand {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
}
.preloader-brand .brand-accent { color: #3378ff; }

/* Loading dots */
.preloader-dots {
    display: flex;
    gap: 7px;
}
.preloader-dots span {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3378ff;
    animation: dotBounce 1.4s ease-in-out infinite;
}
.preloader-dots span:nth-child(1) { animation-delay: 0s; }
.preloader-dots span:nth-child(2) { animation-delay: 0.2s; }
.preloader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.35; }
    40%            { transform: scale(1.15); opacity: 1; }
}

/* Print styles */
@media print {
    nav, footer, .no-print { display: none !important; }
    body { background: white; }
    .print-break { page-break-before: always; }
}
