/* Hero dynamic statement */
.hero-service-badge {
    max-width: 100%;
    justify-content: center;
    text-align: center;
}

/* Hero Headline & Capsule Badge */
.hero-heading {
    line-height: 1.24 !important;
    max-width: 960px !important;
}

.hero-capsule-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.06em 0.45em 0.1em;
    border-radius: 1rem;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    color: #03306e !important;
    font-weight: 800;
    box-shadow: 0 4px 14px -4px rgba(3, 48, 110, 0.12);
    vertical-align: middle;
    white-space: nowrap;
    margin-inline: 0.15em;
    min-width: 6ch;
}

#hero-rotating-word {
    display: inline-block;
    color: #03306e !important;
    font-weight: 800;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Hero Persona Quick Switcher */
.hero-persona-picker {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 5px;
    gap: 6px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.hero-persona-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-persona-btn:hover {
    color: #03306e;
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hero-persona-btn.active {
    color: #03306e;
    background: #ffffff;
    border-color: #bfdbfe;
    box-shadow: 0 4px 12px -2px rgba(3, 48, 110, 0.12);
}

/* Hero 3 Guarantees Trust Ribbon */
.hero-trust-ribbon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hero-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hero-trust-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Floating contact control */
.floating-contact {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.24s ease;
}

.floating-contact [data-whatsapp-bubble] {
    display: none;
}

.floating-contact__actions {
    position: relative;
    width: 56px;
    height: 56px;
    transition: width 0.32s ease, height 0.32s ease;
}

.floating-contact__compact {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669, #10b981, #14b8a6);
    box-shadow: 0 14px 30px -10px rgba(5, 150, 105, 0.62);
    transition: opacity 0.24s ease, transform 0.3s ease, visibility 0.3s ease;
}

.floating-contact__compact:hover {
    transform: translateY(-2px) scale(1.06);
}

.floating-contact__compact:active {
    transform: scale(0.96);
}

.floating-contact__compact > svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.floating-contact__status {
    position: absolute;
    top: -4px;
    right: -4px;
    display: grid;
    width: 17px;
    height: 17px;
    place-items: center;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #34d399;
}

.floating-contact__status span {
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: rgba(52, 211, 153, 0.6);
    animation: floatingContactPulse 1.8s ease-out infinite;
}

.floating-contact__dock {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 6px;
    padding: 6px;
    visibility: hidden;
    opacity: 0;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 18px 42px -14px rgba(15, 23, 42, 0.4);
    transform: translateX(10px) scale(0.88);
    transform-origin: right center;
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.32s ease, visibility 0.32s ease;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.floating-contact__dock-button {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    color: #ffffff;
    border-radius: 12px;
    font-size: var(--text-small);
    font-weight: var(--weight-bold);
    line-height: 1;
    white-space: nowrap;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.floating-contact__dock-button:hover {
    filter: brightness(0.96);
    transform: translateY(-1px);
}

.floating-contact__dock-button--whatsapp {
    flex: 0.85;
    background: #5ed268;
}

.floating-contact__dock-button--consultation {
    flex: 1.15;
    background: #0866d9;
}

.floating-contact__dock-button svg {
    width: 17px;
    height: 17px;
}

.floating-contact__dock-button--whatsapp svg {
    fill: currentColor;
}

.floating-contact.is-expanded [data-whatsapp-bubble] {
    display: none !important;
}

.floating-contact.is-expanded .floating-contact__actions {
    width: 360px;
    height: 62px;
}

.floating-contact.is-expanded .floating-contact__compact {
    visibility: hidden;
    opacity: 0;
    transform: translateX(12px) scale(0.72);
    pointer-events: none;
}

.floating-contact.is-expanded .floating-contact__dock {
    visibility: visible;
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.floating-contact a:focus-visible {
    outline: 3px solid rgba(3, 48, 110, 0.35);
    outline-offset: 3px;
}

@keyframes floatingContactPulse {
    0% { opacity: 0.75; transform: scale(0.7); }
    100% { opacity: 0; transform: scale(1.65); }
}

@media (max-width: 639px) {
    .hero-service-badge {
        padding-inline: 12px;
        white-space: nowrap;
    }

    .hero-service-badge .section-eyebrow {
        font-size: clamp(8.5px, 2.55vw, 10px);
        letter-spacing: 0.04em;
    }

    .hero-heading span {
        overflow-wrap: anywhere;
    }

    .hero-dynamic-line {
        min-height: 1.25em;
        padding-inline: 4px;
    }

    .hero-capsule-badge {
        white-space: normal;
        max-width: 100%;
    }

    #hero-rotating-word {
        max-width: 100%;
        white-space: normal;
    }

    .floating-contact {
        right: 12px;
        left: auto;
        bottom: max(12px, env(safe-area-inset-bottom));
        display: flex;
    }

    .floating-contact.is-expanded {
        right: 0;
        left: 0;
        bottom: 0;
    }

    .floating-contact.is-expanded .floating-contact__actions {
        width: 100vw;
        height: calc(72px + env(safe-area-inset-bottom));
    }

    .floating-contact__dock {
        gap: 8px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0;
        background: #ffffff;
    }

    .floating-contact__dock-button {
        gap: 5px;
        min-height: 52px;
        padding: 0 10px;
        border-radius: 999px;
        font-size: 12px;
    }

    .floating-contact.is-footer-visible {
        display: none;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .home-hero {
        min-height: auto !important;
        padding-top: 7.75rem !important;
        padding-bottom: 3.75rem !important;
    }

    .home-hero #stats-ribbon {
        margin-top: 2.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #hero-rotating-word,
    .floating-contact__actions,
    .floating-contact__compact,
    .floating-contact__dock,
    .floating-contact__dock-button {
        transition: none;
    }

    .floating-contact__status span {
        animation: none;
    }
}
