:root {
    --krea-blue: #356aa6;
    --krea-blue-dark: #173a63;
    --krea-blue-deep: #102b4b;
    --krea-gold: #d9b462;
    --krea-whatsapp: #25d366;
    --krea-whatsapp-dark: #128c7e;
    --krea-white: #ffffff;
    --krea-text: #17324f;
    --krea-border: #dce5ee;
    --krea-header-height: 76px;
}

/* Nasconde soltanto i contenitori vuoti generati dal tema Hello Biz. */
#site-header.site-header,
#site-footer.site-footer {
    display: none !important;
}

.krea-hf,
.krea-hf *,
.krea-hf *::before,
.krea-hf *::after {
    box-sizing: border-box;
}

.krea-hf a {
    text-decoration: none;
}

.krea-hf--header {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    min-height: var(--krea-header-height);
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--krea-border);
    box-shadow: 0 4px 18px rgba(16, 43, 75, 0.06);
    color: var(--krea-text);
}

.admin-bar .krea-hf--header {
    top: 32px;
}

.krea-hf__header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1200px, calc(100% - 48px));
    min-height: var(--krea-header-height);
    margin-inline: auto;
}

.krea-hf__logo,
.krea-hf__footer-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.krea-hf__logo-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 118px;
    max-height: 56px;
    object-fit: contain;
}

.krea-hf__logo-text {
    color: var(--krea-blue);
    font: 700 1.25rem/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.krea-hf__navigation {
    display: flex;
    align-items: center;
    gap: 28px;
}

.krea-hf__nav-list {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.krea-hf__nav-item {
    position: relative;
}

.krea-hf__nav-parent {
    display: flex;
    align-items: center;
}

.krea-hf__nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--krea-text);
    font: 600 0.95rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: color 160ms ease;
}

.krea-hf__submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--krea-text);
    cursor: pointer;
    transition: color 160ms ease;
}

.krea-hf__submenu-toggle span {
    display: block;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 180ms ease;
}

.krea-hf__submenu-toggle[aria-expanded="true"] span,
.krea-hf__nav-item--has-submenu.is-open .krea-hf__submenu-toggle span {
    transform: translateY(2px) rotate(-135deg);
}

.krea-hf__submenu-toggle:hover,
.krea-hf__submenu-toggle:focus-visible {
    background-color: transparent !important;
    color: var(--krea-text);
}

.krea-hf__nav-item--has-submenu.is-current-section .krea-hf__submenu-toggle {
    background-color: transparent !important;
    color: var(--krea-blue);
}

.krea-hf__submenu {
    position: absolute;
    top: calc(100% - 1px);
    left: 50%;
    z-index: 10;
    width: 270px;
    padding: 10px;
    margin: 0;
    visibility: hidden;
    border: 1px solid var(--krea-border);
    border-top: 3px solid var(--krea-gold);
    border-radius: 0 13px 0 13px;
    background: var(--krea-white);
    box-shadow: 0 18px 38px rgba(16, 43, 75, 0.14);
    opacity: 0;
    pointer-events: none;
    list-style: none;
    transform: translate(-50%, 8px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.krea-hf__submenu-link {
    display: flex;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 7px;
    align-items: center;
    color: var(--krea-text);
    font: 600 0.88rem/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: color 150ms ease, background-color 150ms ease;
}

.krea-hf__submenu-link:hover,
.krea-hf__submenu-link:focus-visible,
.krea-hf__submenu-link.is-current {
    background: rgba(53, 106, 166, 0.08);
    color: var(--krea-blue);
}

.krea-hf__nav-link::after {
    position: absolute;
    right: 0;
    bottom: 5px;
    left: 0;
    height: 2px;
    background: var(--krea-gold);
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 160ms ease;
}

.krea-hf__nav-link:hover,
.krea-hf__nav-link:focus-visible,
.krea-hf__nav-link.is-current {
    color: var(--krea-blue);
}

.krea-hf__nav-link:hover::after,
.krea-hf__nav-link:focus-visible::after,
.krea-hf__nav-link.is-current::after {
    transform: scaleX(1);
}

@media (min-width: 1024px) {
    .krea-hf__nav-item--has-submenu:hover > .krea-hf__submenu,
    .krea-hf__nav-item--has-submenu:focus-within > .krea-hf__submenu,
    .krea-hf__nav-item--has-submenu.is-open > .krea-hf__submenu {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, 0);
    }
}

.krea-hf__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 11px 17px;
    border: 1px solid var(--krea-whatsapp);
    border-radius: 9px;
    background: var(--krea-whatsapp);
    color: var(--krea-white);
    font: 700 0.91rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.krea-hf__cta svg {
    width: 21px;
    height: 21px;
    overflow: visible;
    fill: none;
}

.krea-hf__cta svg circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.krea-hf__cta svg path {
    fill: currentColor;
    stroke: none;
}

.krea-hf__cta svg .krea-hf__whatsapp-tail {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.krea-hf__cta:hover,
.krea-hf__cta:focus-visible {
    border-color: var(--krea-whatsapp-dark);
    background: var(--krea-whatsapp-dark);
    color: var(--krea-white);
    transform: translateY(-1px);
}

.krea-hf__menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--krea-border);
    border-radius: 9px;
    background: var(--krea-white);
    color: var(--krea-blue-dark);
    cursor: pointer;
}

.krea-hf__menu-icon,
.krea-hf__menu-icon span {
    display: block;
}

.krea-hf__menu-icon {
    position: relative;
    width: 23px;
    height: 18px;
}

.krea-hf__menu-icon span {
    position: absolute;
    left: 0;
    width: 23px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: top 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.krea-hf__menu-icon span:nth-child(1) { top: 1px; }
.krea-hf__menu-icon span:nth-child(2) { top: 8px; }
.krea-hf__menu-icon span:nth-child(3) { top: 15px; }

.krea-hf__menu-toggle[aria-expanded="true"] .krea-hf__menu-icon span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

.krea-hf__menu-toggle[aria-expanded="true"] .krea-hf__menu-icon span:nth-child(2) {
    opacity: 0;
}

.krea-hf__menu-toggle[aria-expanded="true"] .krea-hf__menu-icon span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

.krea-hf--footer {
    width: 100%;
    margin-top: 0;
    background: var(--krea-blue-deep);
    color: rgba(255, 255, 255, 0.82);
}

.krea-hf__footer-inner {
    width: min(1200px, calc(100% - 48px));
    margin-inline: auto;
    padding: 58px 0 24px;
}

.krea-hf__footer-main {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(130px, 0.62fr) minmax(205px, 0.9fr) minmax(210px, 0.95fr);
    gap: 42px;
    padding-bottom: 42px;
}

.krea-hf__footer-logo .krea-hf__logo-image {
    max-width: 132px;
    max-height: 64px;
    filter: brightness(0) invert(1);
}

.krea-hf__footer-brand p {
    max-width: 390px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font: 400 0.98rem/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.krea-hf__footer-main h2 {
    margin: 0 0 18px;
    color: var(--krea-white);
    font: 700 1rem/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.krea-hf__footer-nav ul,
.krea-hf__footer-bottom ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.krea-hf__footer-nav ul {
    display: grid;
    gap: 6px;
}

.krea-hf__footer-nav .krea-hf__nav-link {
    min-height: 38px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
}

.krea-hf__footer-nav .krea-hf__nav-link:hover,
.krea-hf__footer-nav .krea-hf__nav-link:focus-visible {
    color: var(--krea-gold);
}

.krea-hf__footer-nav .krea-hf__nav-link::after {
    display: none;
}

.krea-hf__footer-contact address {
    display: grid;
    gap: 10px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font: normal 400 0.95rem/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.krea-hf__footer-contact address a {
    width: fit-content;
    color: rgba(255, 255, 255, 0.84);
}

.krea-hf__footer-contact address a:hover,
.krea-hf__footer-contact address a:focus-visible {
    color: var(--krea-gold);
}

.krea-hf__footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.krea-hf__footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font: 400 0.84rem/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.krea-hf__footer-bottom ul {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.krea-hf__footer-bottom a {
    color: rgba(255, 255, 255, 0.68);
    font: 500 0.84rem/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.krea-hf__footer-bottom a:hover,
.krea-hf__footer-bottom a:focus-visible {
    color: var(--krea-gold);
}

.krea-hf a:focus-visible,
.krea-hf button:focus-visible {
    outline: 3px solid var(--krea-gold);
    outline-offset: 3px;
}

@media (max-width: 1023px) {
    :root {
        --krea-header-height: 68px;
    }

    .krea-hf__header-inner {
        width: calc(100% - 32px);
    }

    .krea-hf__logo-image {
        max-width: 96px;
        max-height: 48px;
    }

    .krea-hf__menu-toggle {
        display: inline-flex;
    }

    .krea-hf__navigation {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: grid;
        gap: 18px;
        max-height: 0;
        padding: 0 16px;
        overflow: hidden;
        visibility: hidden;
        background: var(--krea-white);
        border-bottom: 1px solid transparent;
        box-shadow: 0 16px 24px rgba(16, 43, 75, 0.1);
        opacity: 0;
        transition: max-height 240ms ease, padding 240ms ease, opacity 180ms ease, visibility 180ms ease;
    }

    .krea-hf__navigation.is-open {
        max-height: calc(100vh - var(--krea-header-height));
        padding: 14px 16px 20px;
        overflow-y: auto;
        overscroll-behavior: contain;
        visibility: visible;
        border-color: var(--krea-border);
        opacity: 1;
    }

    .krea-hf__nav-list {
        display: grid;
        gap: 0;
        width: 100%;
    }

    .krea-hf__nav-link {
        width: 100%;
        min-height: 50px;
        border-bottom: 1px solid var(--krea-border);
        font-size: 1.03rem;
    }

    .krea-hf__nav-link::after {
        display: none;
    }

    .krea-hf__nav-parent {
        width: 100%;
        border-bottom: 1px solid var(--krea-border);
    }

    .krea-hf__nav-parent .krea-hf__nav-link {
        width: auto;
        flex: 1 1 auto;
        border-bottom: 0;
    }

    .krea-hf__submenu-toggle {
        width: 50px;
        height: 50px;
        flex: 0 0 auto;
    }

    .krea-hf__submenu {
        position: static;
        width: 100%;
        max-height: 0;
        padding: 0 0 0 14px;
        overflow: hidden;
        visibility: hidden;
        border: 0;
        border-radius: 0;
        background: #f8fafc;
        box-shadow: none;
        opacity: 0;
        pointer-events: none;
        transform: none;
        transition: max-height 220ms ease, padding 220ms ease, opacity 160ms ease, visibility 160ms ease;
    }

    .krea-hf__nav-item--has-submenu.is-open > .krea-hf__submenu {
        max-height: 310px;
        padding-top: 7px;
        padding-bottom: 7px;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .krea-hf__submenu-link {
        min-height: 42px;
        padding: 9px 12px;
        border-radius: 6px;
        font-size: 0.94rem;
    }

    .krea-hf__cta {
        width: 100%;
        min-height: 50px;
    }

    body.krea-menu-open {
        overflow: hidden;
    }

    .krea-hf__footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 42px;
    }

    .krea-hf__footer-contact {
        grid-column: auto;
    }
}

@media (max-width: 782px) {
    .admin-bar .krea-hf--header {
        top: 46px;
    }
}

@media (max-width: 640px) {
    .krea-hf__footer-inner {
        width: calc(100% - 40px);
        padding-top: 42px;
    }

    .krea-hf__footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-bottom: 34px;
    }

    .krea-hf__footer-contact {
        grid-column: auto;
    }

    .krea-hf__footer-logo .krea-hf__logo-image {
        max-width: 116px;
    }

    .krea-hf__footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .krea-hf *,
    .krea-hf *::before,
    .krea-hf *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
