/* Animations */

/* --- 2. PRELOADER ANIMATION --- */
@keyframes float-logo {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}
body.loading { overflow: hidden; }
body.overflow-hidden { overflow: hidden !important; overscroll-behavior: none; }

/* --- 3. TEXT GRADIENT (ΚΙΝΟΥΜΕΝΟ ΧΡΩΜΑ) --- */
.full-red-blue-gradient {
    background: linear-gradient(135deg, #dc2626 0%, #2563eb 50%, #dc2626 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientFlow 6s linear infinite;
    display: inline; 
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
    will-change: background-position;
}
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

#imagePreviewModal {
    z-index: 10001 !important; /* Πάνω από όλα τα άλλα στοιχεία */
}

.image-preview-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10004;
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #dc2626;
    color: #ffffff;
    border: 3px solid #ffffff;
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.55);
    font-size: 1.8rem;
    transition: transform 0.15s ease, background-color 0.15s ease;
}
.image-preview-close:hover {
    background: #b91c1c;
    transform: scale(1.06);
}
.image-preview-toolbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10003;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}
.image-preview-toolbar button {
    width: 2.35rem;
    height: 2.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 800;
    transition: transform 0.15s ease, background-color 0.15s ease;
}
.image-preview-toolbar button:hover {
    background: #fee2e2;
    transform: translateY(-1px);
}
#imagePreviewZoomLabel {
    min-width: 3.4rem;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    text-align: center;
}
.image-preview-viewport {
    width: 100vw;
    height: 100dvh;
    overflow: auto;
    padding: 5.5rem 1rem 2rem;
    display: block;
    text-align: center;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
}
.image-preview-viewport.is-zoomed {
    cursor: grab;
    touch-action: none;
}
.image-preview-viewport.is-dragging {
    cursor: grabbing;
}
.image-preview-viewport.is-dragging,
.image-preview-viewport.is-dragging * {
    user-select: none;
}
.image-preview-img {
    width: auto;
    height: auto;
    max-width: min(94vw, 1100px);
    max-height: 86dvh;
    border-radius: 0.75rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    cursor: zoom-in;
    display: block;
    margin: 0 auto;
    transition: width 0.15s ease, max-height 0.15s ease;
    user-select: none;
    -webkit-user-drag: none;
}
.image-preview-viewport.is-zoomed .image-preview-img {
    cursor: inherit;
}

@media (max-width: 640px) {
    .image-preview-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 3rem;
        height: 3rem;
    }
    .image-preview-toolbar {
        left: 0.75rem;
        right: 4.25rem;
        transform: none;
        justify-content: center;
    }
    .image-preview-viewport {
        padding-top: 5rem;
    }
}

/* --- 6. ROAD ANIMATION (CARS) --- */
.road-scene { position: absolute; left: 0; width: 100%; height: 100px; background-color: #0e1821; border-top: 4px solid #95a5a6; border-bottom: 4px solid #95a5a6; overflow: hidden; pointer-events: none; z-index: 0; box-shadow: 0 10px 20px rgba(0,0,0,0.5); top: 220px; bottom: auto; }
.road-scene:before { content: ''; position: absolute; top: 50%; width: 100%; height: 4px; background: linear-gradient(to right, rgba(255,255,255,0.6) 50%, transparent 50%); background-size: 80px 100%; transform: translateY(-50%); }

@media (min-width: 768px) {
    .road-scene { height: 160px; top: 40%; bottom: auto; transform: translateY(-50%); border-top-width: 6px; border-bottom-width: 6px; }
    .road-scene:before { height: 6px; background-size: 100px 100%; }
}

.miss-offer-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Arial Black', sans-serif; font-size: 20px; color: #fff; text-align: center; background: #a30e0e; padding: 8px 15px; border-radius: 8px; border: 2px solid white; box-shadow: 0 0 15px rgba(239, 68, 68, 0.8); z-index: 5; white-space: nowrap; animation: textPulse 8s linear infinite; opacity: 0; }
@media (min-width: 768px) { .miss-offer-text { font-size: 20px; padding: 10px 25px; } }

.chase-group { position: absolute; bottom: -1px; left: 0; display: flex; align-items: flex-end; gap: 10px; transform: translateX(-120vw); animation: speedChase 8s linear infinite; will-change: transform; }
.police-car-wrapper { position: relative; font-size: 60px; z-index: 2; transform: scaleX(-1); animation: carBounceFlipped 0.2s infinite alternate; margin-bottom: -10px; will-change: transform; }
@media (min-width: 768px) { .police-car-wrapper { font-size: 90px; } }

.civilian-car-wrapper { position: relative; z-index: 2; width: 60px; height: 35px; animation: carBounceFlipped 0.2s infinite alternate; margin-left: 150px; margin-bottom: 30px; will-change: transform; }
@media (min-width: 768px) { .civilian-car-wrapper { width: 90px; height: 50px; } }

.car-container { position: absolute; width: 300px; height: 160px; bottom: 0; left: 0; transform: scale(0.2); transform-origin: bottom left; animation: carBounce 0.4s infinite alternate ease-in-out; will-change: transform; }
@media (min-width: 768px) { .car-container { transform: scale(0.3); } }

.car-top { position: absolute; top: 0; left: 55px; width: 170px; height: 80px; background-color: black; border-radius: 40px 40px 0 0; z-index: 1; display: flex; justify-content: center; align-items: flex-end; gap: 12px; padding-bottom: 5px; }
.window { width: 60px; height: 50px; background-color: white; }
.window.front { border-radius: 20px 0 0 0; }
.window.back { border-radius: 0 20px 0 0; }
.car-body { position: absolute; top: 65px; left: 0; width: 290px; height: 90px; background-color: black; border-radius: 60px 20px 20px 20px; z-index: 2; }
.wheel { position: absolute; bottom: -15px; width: 70px; height: 70px; background-color: black; border-radius: 50%; z-index: 3; border: 6px solid white; display: flex; justify-content: center; align-items: center; animation: spinWheel 0.6s linear infinite; }
.wheel::before { content: ''; position: absolute; width: 60px; height: 6px; background-color: white; border-radius: 3px; }
.wheel span { position: absolute; width: 6px; height: 60px; background-color: white; border-radius: 3px; }
.wheel::after { content: ''; position: absolute; width: 24px; height: 24px; background-color: white; border-radius: 50%; z-index: 4; }
.wheel.left { left: 40px; }
.wheel.right { right: 45px; }

.siren { position: absolute; top: 25%; width: 15%; height: 10%; border-radius: 5px; z-index: 3; opacity: 0.8; }
.siren.blue { left: 25%; background-color: #00f; box-shadow: 0 0 10px #00f; animation: flashLight 0.2s infinite alternate; }
.siren.red { left: 45%; background-color: #f00; box-shadow: 0 0 10px #f00; animation: flashLight 0.2s infinite alternate-reverse; }

@keyframes speedChase { 0% { transform: translateX(-120vw); } 30%, 100% { transform: translateX(150vw); } }
@keyframes textPulse { 0%, 30% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); } 35% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); } 40% { transform: translate(-50%, -50%) scale(1); } 45% { transform: translate(-50%, -50%) scale(1.1); } 50% { transform: translate(-50%, -50%) scale(1); } 55% { transform: translate(-50%, -50%) scale(1.1); } 60% { transform: translate(-50%, -50%) scale(1); } 65% { transform: translate(-50%, -50%) scale(1.1); } 70% { transform: translate(-50%, -50%) scale(1); } 75% { transform: translate(-50%, -50%) scale(1.1); } 80% { transform: translate(-50%, -50%) scale(1); } 90% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 95%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); } }
@keyframes flashLight { 0% { opacity: 0.3; transform: scale(1); } 100% { opacity: 1; transform: scale(1.5); box-shadow: 0 0 20px currentColor; } }
@keyframes carBounceFlipped { from { transform: scaleX(-1) translateY(0); } to { transform: scaleX(-1) translateY(-2px); } }
@keyframes spinWheel { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes carBounce { from { transform: scale(0.2) translateY(0); } to { transform: scale(0.2) translateY(-10px); } }
@media (min-width: 768px) {
    @keyframes carBounce { from { transform: scale(0.3) translateY(0); } to { transform: scale(0.3) translateY(-10px); } }
}

/* --- 7. ANIMATION: ΚΑΡΔΙΑ/EKG (ΥΓΕΙΑ) --- */
.ekg-line { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawLine 3s linear infinite; }
@keyframes drawLine { 0% { stroke-dashoffset: 1000; } 100% { stroke-dashoffset: 0; } }
@keyframes heartBeat { 0% { transform: scale(1); } 14% { transform: scale(1.3); } 28% { transform: scale(1); } 42% { transform: scale(1.3); } 70% { transform: scale(1); } }
.pulse-line { position: absolute; bottom: 20%; left: 0; width: 100%; height: 2px; background: linear-gradient(to right, transparent 0%, #0ea5e9 20%, #0ea5e9 80%, transparent 100%); opacity: 0.3; }
.pulse-blip { position: absolute; bottom: 20%; left: -10%; width: 6px; height: 6px; background-color: #0ea5e9; border-radius: 50%; box-shadow: 0 0 10px #0ea5e9, 0 0 20px #0ea5e9; animation: pulseMove 4s linear infinite; }
@keyframes pulseMove { 0% { left: -10%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: 110%; opacity: 0; } }
@keyframes moveLine { to { stroke-dashoffset: 0; } }
.animate-ekg-line { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: moveLine 4s linear infinite; }

/* --- 8. WIDGET STYLE (ΚΕΝΤΡΙΚΟ ΚΟΥΜΠΙ & ΦΟΥΣΚΑ) --- */
@keyframes float-character { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.character-float { animation: float-character 4s ease-in-out infinite; filter: drop-shadow(0 15px 15px rgba(0,0,0,0.2)); }
@keyframes bubble-pop { 0% { opacity: 0; transform: scale(0.3) translateY(40px); } 80% { transform: scale(1.05); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.bubble-appear { animation: bubble-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s backwards; transform-origin: bottom center; }

.bubble-tail::before { content: ''; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); border-width: 12px 12px 0 12px; border-style: solid; border-color: #f1f5f9 transparent transparent transparent; }
.bubble-tail::after { content: ''; position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); border-width: 10px 10px 0 10px; border-style: solid; border-color: #ffffff transparent transparent transparent; }

@keyframes policeBeacon { 0%, 100% { color: #2563eb; text-shadow: 0 0 12px rgba(37, 99, 235, 0.9); transform: scale(1); } 50% { color: #dc2626; text-shadow: 0 0 18px rgba(220, 38, 38, 0.9); transform: scale(1.15); } }

.options-wrapper { transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform: scale(0.8); pointer-events: none; opacity: 0; }
.group:hover .options-wrapper { opacity: 1; transform: scale(1); pointer-events: auto; }

@media (max-width: 767px) {
    
    .bubble-tail::before, .bubble-tail::after { bottom: auto !important; top: -12px !important; transform: translateX(-50%) rotate(180deg) !important; border-width: 0 12px 12px 12px !important; border-color: transparent transparent #ffffff transparent !important; }
    #phoneBubble, #viberBubble { margin-bottom: 0 !important; margin-top: 1rem !important; }
}

/* --- OFFICIAL INTRO LOAD ANIMATION --- */
.official-intro-card {
    animation: officialIntroIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.official-intro-badge,
.official-intro-title,
.official-intro-text,
.official-intro-tags {
    animation: officialIntroContentIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.official-intro-title { animation-delay: 0.08s; }
.official-intro-text { animation-delay: 0.16s; }
.official-intro-tags { animation-delay: 0.24s; }

@keyframes officialIntroIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* --- OFFICIAL INTRO PREMIUM MOTION --- */
.official-intro-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.15),
        rgba(59, 130, 246, 0.75),
        rgba(239, 68, 68, 0.75),
        rgba(255, 255, 255, 0.15)
    );
    background-size: 250% 250%;
    animation: officialBorderFlow 7s ease-in-out infinite;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.official-intro-card::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -80%;
    width: 55%;
    height: 180%;
    transform: rotate(18deg);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.16),
        transparent
    );
    animation: officialLightSweep 6s ease-in-out infinite;
    pointer-events: none;
}

.official-intro-glow-blue {
    animation: officialGlowFloatBlue 8s ease-in-out infinite;
}

.official-intro-glow-red {
    animation: officialGlowFloatRed 9s ease-in-out infinite;
}

.official-intro-badge {
    position: relative;
    overflow: hidden;
}

.official-intro-badge::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    animation: officialBadgeShine 4.5s ease-in-out infinite;
}

.official-intro-tags button {
    animation: officialTagFloat 4.5s ease-in-out infinite;
}

.official-intro-tags button:nth-child(2) {
    animation-delay: 0.25s;
}

.official-intro-tags button:nth-child(3) {
    animation-delay: 0.5s;
}

.official-intro-tags button:nth-child(4) {
    animation-delay: 0.75s;
}

.official-intro-tags i {
    animation: officialIconPulse 2.8s ease-in-out infinite;
}

@keyframes officialBorderFlow {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.75;
    }
    50% {
        background-position: 100% 50%;
        opacity: 1;
    }
}

@keyframes officialLightSweep {
    0%, 45% {
        left: -80%;
        opacity: 0;
    }
    55% {
        opacity: 1;
    }
    100% {
        left: 130%;
        opacity: 0;
    }
}

@keyframes officialGlowFloatBlue {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-30px, 28px) scale(1.15);
    }
}

@keyframes officialGlowFloatRed {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(34px, -24px) scale(1.12);
    }
}

@keyframes officialBadgeShine {
    0%, 35% {
        left: -120%;
    }
    65%, 100% {
        left: 130%;
    }
}

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

@keyframes officialIconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.18);
        opacity: 1;
    }
}

/* --- PREMIUM MOBILE OFFER MOTION --- */
.mobile-offer-bg::before {
    animation: premiumMobileGlow 8s ease-in-out infinite;
}

.mobile-offer-bg::after {
    animation: premiumMobileGrid 14s linear infinite;
}

.mobile-orbit-one {
    animation: premiumMobileOrbit 16s linear infinite;
}

.mobile-orbit-two {
    animation: premiumMobileOrbitReverse 18s linear infinite;
}

.mobile-signal-lines span {
    animation: premiumSignalPulse 2.8s ease-in-out infinite;
}

.mobile-signal-lines span:nth-child(2) {
    animation-delay: 0.25s;
}

.mobile-signal-lines span:nth-child(3) {
    animation-delay: 0.5s;
}

.mobile-network-chip {
    animation: premiumChipFloat 4.8s ease-in-out infinite;
}

.mobile-data-pill-red,
.mobile-data-pill-blue {
    animation: premiumPillFloat 5.2s ease-in-out infinite;
}

.mobile-data-pill-blue {
    animation-delay: 0.8s;
}

@keyframes premiumMobileGlow {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.82;
    }
    50% {
        transform: translate3d(-18px, 14px, 0) scale(1.05);
        opacity: 1;
    }
}

@keyframes premiumMobileGrid {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 38px 38px, 38px 38px;
    }
}

@keyframes premiumMobileOrbit {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes premiumMobileOrbitReverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes premiumSignalPulse {
    0%, 100% {
        opacity: 0.22;
        transform: rotate(-35deg) scale(0.96);
    }
    50% {
        opacity: 0.75;
        transform: rotate(-35deg) scale(1.04);
    }
}

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

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

/* --- PREMIUM MOBILE CARD SUBTLE MOTION --- */
.premium-mobile-card::after {
    animation: mobileCardLightSweep 7s ease-in-out infinite;
}

.premium-mobile-card .mobile-network-chip {
    animation: mobileChipSoftFloat 4.8s ease-in-out infinite;
}

.premium-mobile-card .mobile-signal-lines span {
    animation: mobileSignalSoftPulse 3.2s ease-in-out infinite;
}

.premium-mobile-card .mobile-signal-lines span:nth-child(2) {
    animation-delay: 0.3s;
}

.premium-mobile-card .mobile-signal-lines span:nth-child(3) {
    animation-delay: 0.6s;
}

.mobile-title-panel {
    animation: mobilePanelGlow 5.5s ease-in-out infinite;
}

.mobile-price-badge {
    animation: mobilePriceGlow 3.8s ease-in-out infinite;
}

@keyframes mobileCardLightSweep {
    0%, 45% {
        left: -75%;
        opacity: 0;
    }
    55% {
        opacity: 1;
    }
    100% {
        left: 125%;
        opacity: 0;
    }
}

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

@keyframes mobileSignalSoftPulse {
    0%, 100% {
        opacity: 0.18;
        transform: rotate(-35deg) scale(0.96);
    }
    50% {
        opacity: 0.55;
        transform: rotate(-35deg) scale(1.04);
    }
}

@keyframes mobilePanelGlow {
    0%, 100% {
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.45);
        border-color: rgba(255, 255, 255, 0.16);
    }
    50% {
        box-shadow: 0 22px 60px rgba(37, 99, 235, 0.22);
        border-color: rgba(191, 219, 254, 0.28);
    }
}

@keyframes mobilePriceGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(250, 204, 21, 0.45);
        transform: rotate(-2deg) scale(1);
    }
    50% {
        box-shadow: 0 0 34px rgba(250, 204, 21, 0.75);
        transform: rotate(-2deg) scale(1.035);
    }
}

