:root {
    --color-primary: #043273;
    --color-accent: #1592d1;
    --color-bg: #edf4f8;
    --color-text: #1c1c1c;
    --color-dark: #101b2a;
    --container: 1000px;
    --container-home: 1160px;
}

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

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
    color: var(--color-text);
    background: #fff;
    line-height: 1.5;
    overflow-x: clip;
}

body.courtesy-page-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(130deg, #052245 0%, #0a3b6f 55%, #14619d 100%);
}

body.courtesy-page-body #agestel-consent-open {
    display: none !important;
}

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

body.home .container {
    width: min(100% - 2rem, var(--container-home));
}

.site-header {
    background: #fff;
    border-bottom: 1px solid #e2e8ef;
    color: var(--color-dark);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 30;
}

body.admin-bar .site-header {
    top: 32px;
}

.site-header,
.custom-logo {
    transition: padding 0.2s ease, max-height 0.2s ease;
}

.site-header .container {
    width: 100%;
    max-width: none;
    padding-left: 1rem;
    padding-right: 1rem;
    min-height: 58px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

body.home .site-header .container,
body:not(.home) .site-header .container {
    width: 100%;
    max-width: none;
}

.site-logo {
    max-width: 260px;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.custom-logo {
    height: auto;
    max-height: 46px;
    width: auto;
    transform-origin: left center;
    transition: transform 0.2s ease;
    will-change: transform;
}

.site-header.is-compact {
    padding: 0.2rem 0;
}

.site-header.is-compact .custom-logo {
    transform: scale(0.74);
}

.site-logo-text {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.55rem;
}

.site-nav a {
    color: var(--color-nav, #043273);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.06rem;
    text-transform: none;
    letter-spacing: 0.02em;
}

.site-nav a:hover {
    color: var(--color-primary);
}

.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a {
    color: var(--color-nav-active, #E5021B);
}

.site-nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid #d1dbe6;
    border-radius: 10px;
    background: #fff;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.site-nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--color-nav, #043273);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav.is-open {
    display: block;
}

.site-main {
    min-height: 70vh;
    padding: 0;
}

.hero {
    background: var(--color-bg);
    background-size: cover;
    background-position: center;
    color: #fff;
    margin-bottom: 2.5rem;
    min-height: 620px;
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero::before {
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: grayscale(1) contrast(1.28);
    z-index: 0;
}

.hero::after {
    background: rgba(80, 85, 154, 0.45);
    z-index: 1;
}

.hero-inner {
    min-height: 620px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.hero-banner {
    background: rgba(0, 0, 0, 0.62);
    padding: 0.7rem 1rem;
    width: fit-content;
    max-width: min(100%, 1280px);
}

.hero-banner h1 {
    margin: 0;
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

.hero-banner h1 strong {
    font-weight: 700;
}

.hero-banner p {
    margin: 0.35rem 0 0;
    font-size: 1rem;
    opacity: 0.97;
}

.home-intro {
    margin-bottom: 2.25rem;
    text-align: center;
}

.home-intro h2 {
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body.home .home-intro p {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

body.home .content-page .wp-block-heading.has-text-align-center,
body.home .content-page p.has-text-align-center {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.home-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.page-hero {
    min-height: 380px;
    background: linear-gradient(120deg, #0c3f72 0%, #1a6da7 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
    margin-bottom: 2rem;
}

.page-hero-inner {
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2rem;
}

.page-hero-banner {
    background: rgba(0, 0, 0, 0.48);
    padding: 0.9rem 1.15rem;
    max-width: min(100%, 900px);
}

.page-hero-banner h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 600;
}

.page-hero-banner p {
    margin: 0.4rem 0 0;
    font-size: 1rem;
}

.content-page {
    margin-bottom: 3rem;
}

.content-page .alignwide {
    width: min(100%, 1200px);
    margin-left: auto;
    margin-right: auto;
}

.content-page .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.content-page h2,
.content-page h3 {
    color: var(--color-primary);
}

/* Global vertical rhythm for Gutenberg/Spectra content. */
.content-page .wp-block-group,
.content-page .wp-block-columns,
.content-page .uagb-block-container {
    margin-top: 0;
    margin-bottom: 1.2rem;
}

.content-page h1,
.content-page h2,
.content-page h3,
.content-page h4 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    line-height: 1.2;
}

.content-page p {
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.72;
}

.content-page .wp-block-paragraph,
.content-page article > p {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

body.home .content-page .wp-block-paragraph,
body.home .content-page article > p {
    max-width: 900px;
}

.content-page :where(.wp-block-heading, .wp-block-list, .wp-block-buttons, .wp-block-quote) {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

h3.wp-block-heading {color:#333 !Important}

.content-page .wp-block-list {
    padding-left: 1.2rem;
    line-height: 1.68;
}

/* Legacy "Presentazione" template content alignment. */
body.page-template-template-page-simple .content-page .service_details,
body.page-template-template-page-simple .content-page .mce-edit {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.content-page .wp-block-buttons {
    margin-top: 0.9rem;
    margin-bottom: 0.9rem;
}

.content-page .wp-block-image,
.content-page .wp-block-uagb-image {
    margin-top: 0.7rem;
    margin-bottom: 0.8rem;
}

.home-cards .wp-block-image,
.home-cards .wp-block-uagb-image {
    margin-top: 0;
    margin-bottom: 0;
}

.home-cards .wp-block-uagb-image__figure,
.home-cards figure.wp-block-image {
    margin: 0 !important;
}

.home-cards .wp-block-uagb-image {
    line-height: 0;
}

/* Spectra cards in editor pages may not use the .home-cards wrapper. */
.content-page .agestel-tinted-image,
.content-page .agestel-tinted-image .wp-block-uagb-image__figure,
.content-page .agestel-tinted-image figure.wp-block-image {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.content-page .agestel-tinted-image .wp-block-uagb-image__figure {
    display: block;
    line-height: 0;
}

.layout-landing-content {
    margin-bottom: 3rem;
}

.layout-simple {
    margin: 2.5rem auto 3rem;
}

.layout-simple-header {
    margin-bottom: 1.5rem;
}

.layout-simple-header h1 {
    margin: 0 0 0.45rem;
}

.layout-simple-header p {
    margin: 0;
    color: #555;
}

.layout-two-columns {
    margin: 2.5rem auto 3rem;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 2rem;
    align-items: start;
}

.layout-two-columns-main h1 {
    margin-top: 0;
}

.layout-two-columns-side {
    padding: 1rem 1.1rem;
    border: 1px solid #d7e0ea;
    border-radius: 10px;
    background: #f8fbff;
}

.layout-two-columns-side h3 {
    margin-top: 0;
    color: var(--color-primary);
}

.contact-page {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    padding-top: 1.25rem;
}

.contact-page__card {
    background: #1f2329;
    color: #f0f2f5;
    border-radius: 8px;
    padding: 1.25rem;
    font-size: 0.96rem;
    line-height: 1.65;
}

.contact-page__logo {
    width: 96px;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
    background: #fff;
    border-radius: 6px;
    padding: 0.45rem;
}

.contact-page__card p {
    margin: 0 0 0.8rem;
    color: #f0f2f5;
}

.contact-page__card a {
    color: #cfe2ff;
}

.contact-page__main h2 {
    max-width: none;
    margin: 0 0 0.8rem;
    color: #4d5a9b;
    border-bottom: 1px solid #d8dee8;
    padding-bottom: 0.7rem;
}

.contact-page__intro {
    max-width: none;
    margin: 0 0 1rem;
    color: #3f4a59;
    text-transform: uppercase;
    font-size: 0.92rem;
}

.contact-page__form {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
}

.contact-page__notice {
    border-radius: 6px;
    padding: 0.7rem 0.85rem;
    margin: 0 0 0.8rem;
    font-weight: 600;
}

.contact-page__notice--success {
    background: #e7f4ea;
    color: #1e6a37;
    border: 1px solid #b8dfc1;
}

.contact-page__notice--validation,
.contact-page__notice--error {
    background: #fbecec;
    color: #8e2323;
    border: 1px solid #ebc1c1;
}

.contact-page__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
}

.contact-page__form input:not([type="checkbox"]):not([type="radio"]),
.contact-page__form textarea {
    width: 100%;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    padding: 0.72rem 0.8rem;
    font: inherit;
}

.contact-page__privacy-title {
    margin: 0.5rem 0 0;
    font-weight: 700;
}

.contact-page__privacy-text {
    margin: 0;
    color: #4f5968;
    line-height: 1.55;
}

.contact-page__consent {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
}

.contact-page__consent input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #2f5f9b;
}

.contact-page__captcha {
    margin: 0.2rem 0 0.35rem;
}

.contact-page__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.contact-page__form button {
    align-self: flex-start;
    border: 0;
    background: #2f5f9b;
    color: #fff;
    border-radius: 4px;
    padding: 0.72rem 1.05rem;
    font-weight: 600;
    cursor: pointer;
}

.contact-page__form button:hover {
    background: #244c7d;
}

.contact-page__form-wrap .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
}

.contact-page__form-wrap .wpcf7-form p {
    margin: 0;
}

.contact-page__form-wrap .wpcf7-form-control-wrap {
    display: block;
}

.contact-page__form-wrap input:not([type="checkbox"]):not([type="radio"]),
.contact-page__form-wrap textarea {
    width: 100%;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    padding: 0.72rem 0.8rem;
    font: inherit;
}

.contact-page__form-wrap input[type="submit"] {
    align-self: flex-start;
    border: 0;
    background: #2f5f9b;
    color: #fff;
    border-radius: 4px;
    padding: 0.72rem 1.05rem;
    font-weight: 600;
    cursor: pointer;
}

.contact-page__form-wrap input[type="submit"]:hover {
    background: #244c7d;
}

.contact-page__form-wrap .wpcf7-not-valid-tip {
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

.contact-page__form-wrap .wpcf7-response-output {
    margin: 0.2rem 0 0;
}

.courtesy-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: grid;
    place-items: center;
    padding: 5rem 0;
    margin: 0;
    background: transparent;
    color: #fff;
    overflow: hidden;
}

.courtesy-page__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.16), transparent 36%),
        radial-gradient(circle at 88% 80%, rgba(21, 146, 209, 0.2), transparent 42%);
}

.courtesy-page__inner {
    position: relative;
    z-index: 1;
    width: min(100% - 2rem, 780px);
    text-align: center;
    padding: 2.25rem 1.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
}

.courtesy-page__brand {
    margin: 0 auto 1rem;
}

.courtesy-page__brand .custom-logo-link {
    display: inline-flex;
    justify-content: center;
}

.courtesy-page__brand .custom-logo {
    max-height: 78px;
    width: auto;
    filter: brightness(0) invert(1);
}

.courtesy-page__brand-text {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
}

.courtesy-page__eyebrow {
    margin: 0;
    font-size: 0.82rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    color: #b9dfff;
}

.courtesy-page__title {
    margin: 0.6rem 0 0;
    font-size: clamp(2rem, 4.5vw, 3.3rem);
    line-height: 1.15;
}

.courtesy-page__subtitle {
    margin: 1rem auto 0;
    width: min(100%, 640px);
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: #eaf5ff;
}

.courtesy-page__content {
    margin: 1.25rem auto 0;
    width: min(100%, 650px);
    color: #d8e9f8;
}

.courtesy-page__content p {
    margin: 0.45rem 0;
}

.courtesy-page__button {
    display: inline-block;
    margin-top: 1.55rem;
    padding: 0.78rem 1.35rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #1592d1 0%, #0f78b1 100%);
    box-shadow: 0 10px 24px rgba(7, 45, 81, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.courtesy-page__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(7, 45, 81, 0.5);
}

.home-card {
    border: 1px solid #d7e0ea;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 30, 70, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(0, 30, 70, 0.14);
}

.home-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    filter: grayscale(1) contrast(1.28);
}

.home-card-image {
    position: relative;
}

.home-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(80, 85, 154, 0.45);
    pointer-events: none;
}

/* Reusable image tint effect for block-based pages (Spectra/Gutenberg). */
.agestel-tinted-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.agestel-tinted-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(1) contrast(1.28);
}

.agestel-tinted-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(80, 85, 154, 0.45);
    pointer-events: none;
}

.agestel-hero-cover .wp-block-cover__image-background {
    filter: grayscale(1) contrast(1.28);
}

.agestel-hero-cover .wp-block-cover__background {
    background: rgba(80, 85, 154, 0.45) !important;
}

.agestel-hero-cover .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
    opacity: 1;
}

.agestel-hero-cover .wp-block-cover__inner-container h1,
.agestel-hero-cover .wp-block-cover__inner-container h2,
.agestel-hero-cover .wp-block-cover__inner-container h3,
.agestel-hero-cover .wp-block-cover__inner-container p {
    color: #fff !important;
    opacity: 1 !important;
}

body.home .agestel-hero-cover .wp-block-cover__inner-container {
    max-width: min(100% - 2rem, 1080px);
    margin-left: auto;
    margin-right: auto;
}

body.home .agestel-hero-cover .wp-block-cover__inner-container h1,
body.home .agestel-hero-cover .wp-block-cover__inner-container h2,
body.home .agestel-hero-cover .wp-block-cover__inner-container h3,
body.home .agestel-hero-cover .wp-block-cover__inner-container p {
    max-width: none;
}

.home-card-content {
    padding: 1rem;
    border-top: 4px solid var(--color-primary);
}

.home-card-content h3 {
    margin-top: 0;
    color: var(--color-primary);
    text-transform: uppercase;
    font-size: 1.05rem;
}

h3.wp-block-heading a {
	color: var(--color-primary) !Important;	
	text-decoration:none;
}


.home-card-link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.site-footer {
    background: #04245A;
    color: #f2f2f2;
    padding: 2.4rem 0;
    font-size: 0.92rem;
}

.site-footer a {
    color: #f2f2f2;
}

.footer-title {
    margin-top: 0;
    font-weight: 700;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.footer-widget-title {
    margin-top: 0;
    margin-bottom: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column p {
    margin: 0 0 0.5rem;
}

.footer-widget .textwidget {
    white-space: normal;
}

.footer-contact-row {
    margin: 0 0 0.45rem;
}

.footer-logo .custom-logo {
    max-height: 58px;
    filter: brightness(0) invert(1);
}

.footer-legal {
    margin: 1.35rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.84rem;
    line-height: 1.4;
    text-align: center;
    opacity: 0.95;
}

.footer-bottom-links {
    margin: 0.75rem 0 0;
    font-size: 0.84rem;
    text-align: center;
    opacity: 0.95;
}

.footer-bottom-links a {
    text-decoration: none;
}

.footer-bottom-links span {
    display: inline-block;
    margin: 0 0.45rem;
}

.meta {
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .site-header .container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .site-header.is-compact .custom-logo {
        transform: scale(0.7);
    }

    .site-nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        margin-top: 0;
        padding: 0.85rem 1rem;
        border: 0;
        border-radius: 0;
        background: #fff;
        box-shadow: 0 14px 26px rgba(9, 35, 66, 0.16);
        z-index: 40;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
        transition: transform 0.24s ease, opacity 0.2s ease, visibility 0.2s ease;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }

    .site-nav a {
        display: block;
        font-size: 1.06rem;
        width: 100%;
        padding: 0.62rem 0.2rem;
    }

    .site-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .hero,
    .hero-inner {
        min-height: 460px;
    }

    .hero-inner {
        padding-bottom: 1.25rem;
    }

    .hero-banner {
        width: 100%;
    }

    .hero-banner h1 {
        white-space: normal;
    }

    .page-hero,
    .page-hero-inner {
        min-height: 280px;
    }

    .layout-two-columns {
        grid-template-columns: 1fr;
    }

    .contact-page {
        grid-template-columns: 1fr;
    }

    body.admin-bar .site-header {
        top: 46px;
    }

    .home-cards {
        grid-template-columns: 1fr;
    }

    .footer-columns {
        grid-template-columns: 1fr;
    }

    .footer-column {
        text-align: center;
    }

    .footer-logo {
        display: flex;
        justify-content: center;
    }

    .footer-widget-title,
    .footer-column p,
    .footer-bottom-links,
    .footer-legal {
        text-align: center;
    }

    .courtesy-page {
        min-height: auto;
        padding: 3.5rem 0;
    }

    .courtesy-page__inner {
        padding: 1.6rem 1.2rem;
    }
}

