/*
 * Huteco — Global Effects
 * Progress bar, floating CTA, scroll-reveal, transitions
 */

/* ── Scroll progress bar ─────────────────────────────────────────────────── */
.huteco-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #27b3e9, #7dd4f5);
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(39,179,233,0.5);
    pointer-events: none;
}

/* ── Floating CTA ────────────────────────────────────────────────────────── */
.huteco-float-cta {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 900;
    display: flex;
    align-items: stretch;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.35s ease;
    filter: drop-shadow(0 8px 24px rgba(39,179,233,0.35));
}

.huteco-float-cta.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Main order button */
.huteco-float-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: #27b3e9;
    color: #fff !important;
    font-family: var(--huteco-font, 'Inter', sans-serif);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-decoration: none;
    border-radius: 50px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, background 0.2s ease;
}

.huteco-float-cta__btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* Pulse ring */
.huteco-float-cta__btn::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50px;
    border: 2px solid #27b3e9;
    animation: huteco-ring-pulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes huteco-ring-pulse {
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.18); }
}

.huteco-float-cta__btn:hover {
    background: #1a95c8;
    transform: translateY(-2px) scale(1.03);
    color: #fff !important;
}

.huteco-float-cta__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.huteco-float-cta__label {
    position: relative;
}

.huteco-float-cta__badge {
    background: #fff;
    color: #27b3e9;
    font-size: 0.6875rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 50px;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* Phone call button */
.huteco-float-cta__call {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #1a1a2e;
    color: #fff !important;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    animation: huteco-call-ring 3s ease-in-out infinite;
}

.huteco-float-cta__call:hover {
    background: #27b3e9;
    transform: scale(1.1);
}

@keyframes huteco-call-ring {
    0%, 85%, 100% { transform: rotate(0deg); }
    87%           { transform: rotate(-15deg); }
    90%           { transform: rotate(15deg); }
    93%           { transform: rotate(-10deg); }
    96%           { transform: rotate(8deg); }
    99%           { transform: rotate(0deg); }
}

/* Mobile: full-width bottom bar */
@media (max-width: 600px) {
    .huteco-float-cta {
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100px);
        width: 100%;
        border-radius: 0;
        gap: 0;
        filter: none;
        align-items: stretch;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    }

    .huteco-float-cta.is-visible {
        transform: translateY(0);
    }

    .huteco-float-cta__btn {
        flex: 1;
        border-radius: 0;
        justify-content: center;
        padding: 14px 16px;
        font-size: 0.875rem;
        align-self: stretch;
    }

    .huteco-float-cta__btn::after { display: none; }

    .huteco-float-cta__call {
        width: 56px;
        align-self: stretch;
        height: auto;
        border-radius: 0;
        animation: none;
        flex-shrink: 0;
    }
}

/* ── Scroll-reveal base ──────────────────────────────────────────────────── */
.huteco-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.huteco-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Cards fade up faster */
.huteco-policy__card.huteco-reveal,
.huteco-uc__item.huteco-reveal,
.huteco-pg__item.huteco-reveal {
    transform: translateY(20px) scale(0.97);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.huteco-policy__card.huteco-reveal.is-revealed,
.huteco-uc__item.huteco-reveal.is-revealed,
.huteco-pg__item.huteco-reveal.is-revealed {
    transform: translateY(0) scale(1);
}

/* Feature rows slide from left */
.huteco-fg__row.huteco-reveal {
    transform: translateX(-24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.huteco-fg__row.huteco-reveal.is-revealed {
    transform: translateX(0);
}

/* ── Heading reveal ──────────────────────────────────────────────────────── */
.huteco-reveal-heading {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.huteco-reveal-heading.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Global smooth interactions ──────────────────────────────────────────── */

/* Image hover zoom — apply to any section image */
.huteco-block img {
    transition: transform 0.4s ease;
}

/* Content images open in Fancybox; keep the video poster's play interaction. */
#main .huteco-block img[data-fancybox="huteco-page-images"] {
    cursor: zoom-in;
}

#main .huteco-block img[data-fancybox="huteco-page-images"]:focus-visible {
    outline: 3px solid var(--huteco-accent, #27b3e9);
    outline-offset: 4px;
}

/* Section entry breathing room */
.huteco-block {
    scroll-margin-top: 80px;
}

/* Card hover lift — universal */
.huteco-policy__card,
.huteco-guarantees__card,
.huteco-reviews__card {
    transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}

/* Accent underline on section labels */
.huteco-spec__label,
.huteco-fg__label,
.huteco-uc__label {
    transition: background 0.2s ease, border-color 0.2s ease;
}

.huteco-spec__label:hover,
.huteco-fg__label:hover,
.huteco-uc__label:hover {
    background: rgba(39,179,233,0.12);
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .huteco-reveal,
    .huteco-reveal-heading,
    .huteco-float-cta,
    .huteco-float-cta__btn::after,
    .huteco-float-cta__call,
    .huteco-progress-bar {
        transition: none !important;
        animation: none !important;
    }

    .huteco-reveal,
    .huteco-reveal-heading {
        opacity: 1;
        transform: none;
    }

    .huteco-float-cta {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
