:root {
    --lmd-blue: #123f52;
    --lmd-blue-dark: #082c3a;
    --lmd-coral: #e76152;
    --lmd-cream: #f6f3ed;
    --lmd-ink: #1c2c33;
    --lmd-line: #dce4e7;
}

.lmd-layout-page #header,
.lmd-layout-page #footer,
.lmd-layout-page #socket,
.lmd-layout-page .title_container { display: none !important; }
.lmd-layout-page #main { padding-top: 0 !important; }
.lmd-layout-page #main > .container_wrap_first > .container { max-width: 1270px !important; width: calc(100% - 48px) !important; padding: 0 24px !important; margin: 0 auto !important; }
.lmd-layout-page #main .template-page.content { width: 100% !important; padding: 0 !important; border: 0 !important; }
.lmd-layout-page #main .post-entry-type-page > .entry-content-wrapper { width: 100% !important; margin: 0 !important; }
.lmd-layout-page #main .sidebar { display: none !important; }

.lmd-site-shell,
.lmd-site-shell * { box-sizing: border-box; }
.lmd-site-shell {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    color: var(--lmd-ink);
    background: #fff;
    font-family: inherit;
}
.lmd-container { width: min(1220px, calc(100% - 48px)); margin: 0 auto; }

.lmd-topbar { min-height: 46px; border-bottom: 1px solid var(--lmd-line); background: #fff; }
.lmd-topbar-inner { min-height: 46px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; }
.lmd-home-link { color: var(--lmd-blue); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; }
.lmd-association-line { display: flex; align-items: center; gap: 14px; color: #5f6b70; font-size: 13px; }
.lmd-association-line strong { color: var(--lmd-blue); text-transform: uppercase; letter-spacing: .04em; }
.lmd-association-line span { display: block; width: 1px; height: 16px; background: var(--lmd-line); }
.lmd-association-line em { font-style: normal; }
.lmd-socials { display: flex; gap: 7px; }
.lmd-socials a { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--lmd-line); border-radius: 50%; color: var(--lmd-blue); font-size: 10px; font-weight: 900; text-decoration: none; text-transform: uppercase; transition: .2s ease; }
.lmd-socials a:hover { border-color: var(--lmd-coral); color: #fff; background: var(--lmd-coral); }
.lmd-socials a svg { display: block; width: 14px; height: 14px; fill: currentColor; }

.lmd-main-header { background: #fff; }
.lmd-header-inner { min-height: 124px; display: grid; grid-template-columns: minmax(180px, 1.15fr) 1fr 1.1fr auto; align-items: center; gap: 38px; }
.lmd-logo { display: flex; align-items: center; gap: 12px; color: var(--lmd-blue); text-decoration: none; }
.lmd-logo img { display: block; width: auto; max-width: 240px; max-height: 82px; }
.lmd-logo-mark { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px 8px 18px 8px; background: var(--lmd-coral); color: #fff; font-weight: 900; letter-spacing: -.05em; }
.lmd-logo-text { font-size: 19px; font-weight: 900; line-height: .98; text-transform: uppercase; }
.lmd-contact-card { min-width: 0; display: flex; align-items: center; gap: 13px; color: var(--lmd-ink); text-decoration: none; }
.lmd-contact-card:hover b { color: var(--lmd-coral); }
.lmd-contact-icon { flex: 0 0 44px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--lmd-cream); color: var(--lmd-coral); }
.lmd-contact-icon svg { width: 21px; height: 21px; fill: currentColor; }
.lmd-contact-card > span:last-child { min-width: 0; }
.lmd-contact-card b, .lmd-contact-card small { display: block; }
.lmd-contact-card b { color: var(--lmd-blue); font-size: 15px; font-weight: 900; line-height: 1.2; transition: .2s ease; }
.lmd-contact-card small { margin-top: 3px; color: #707b80; font-size: 12px; line-height: 1.35; }
.lmd-location-card b { text-transform: uppercase; font-size: 11px; letter-spacing: .1em; }
.lmd-donate-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 27px; border: 2px solid var(--lmd-coral); border-radius: 999px; color: var(--lmd-coral); font-size: 13px; font-weight: 900; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; transition: .2s ease; white-space: nowrap; }
.lmd-donate-button:hover { color: #fff; background: var(--lmd-coral); transform: translateY(-2px); }

.lmd-main-nav { position: relative; z-index: 20; border-top: 1px solid var(--lmd-line); border-bottom: 1px solid var(--lmd-line); background: #fff; }
.lmd-nav-inner { min-height: 62px; display: flex; align-items: stretch; }
.lmd-menu-wrap { width: 100%; }
.lmd-menu { height: 100%; margin: 0 !important; padding: 0 !important; display: flex; align-items: stretch; justify-content: center; list-style: none !important; }
.lmd-menu > li { position: relative; flex: 1 1 auto; margin: 0 !important; border-right: 1px solid var(--lmd-line); }
.lmd-menu > li:first-child { border-left: 1px solid var(--lmd-line); }
.lmd-menu > li > a { min-height: 62px; padding: 0 18px; display: flex; align-items: center; justify-content: center; color: var(--lmd-blue); font-size: 12px; font-weight: 900; letter-spacing: .035em; text-decoration: none; text-transform: uppercase; transition: .2s ease; white-space: nowrap; }
.lmd-menu > li:hover > a, .lmd-menu > li.current-menu-item > a { color: #fff; background: var(--lmd-blue); }
.lmd-menu .sub-menu { position: absolute; top: 100%; left: -1px; min-width: 230px; margin: 0; padding: 9px 0; opacity: 0; visibility: hidden; transform: translateY(8px); list-style: none; background: #fff; border: 1px solid var(--lmd-line); box-shadow: 0 14px 35px rgba(8,44,58,.14); transition: .2s ease; }
.lmd-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lmd-menu .sub-menu a { display: block; padding: 10px 17px; color: var(--lmd-blue); font-size: 13px; text-decoration: none; }
.lmd-menu .sub-menu a:hover { color: var(--lmd-coral); background: var(--lmd-cream); }
.lmd-menu-toggle { display: none; }

.lmd-slider { position: relative; height: clamp(340px, 29vw, 430px); overflow: hidden; background: var(--lmd-blue-dark); }
.lmd-slide { position: absolute; inset: 0; display: grid; align-items: center; opacity: 0; visibility: hidden; background-position: center; background-size: cover; transform: scale(1.025); transition: opacity .7s ease, transform 1.3s ease, visibility .7s; }
.lmd-slide-1 { background: linear-gradient(120deg, #082c3a 0%, #19596e 62%, #e76152 130%); }
.lmd-slide-2 { background: linear-gradient(120deg, #123f52 0%, #467f89 68%, #f1b19c 130%); }
.lmd-slide-3 { background: linear-gradient(120deg, #102e40 0%, #665a73 64%, #e76152 130%); }
.lmd-slide-4 { background: linear-gradient(120deg, #123f52 0%, #31776e 65%, #e0be78 130%); }
.lmd-slide.is-active { opacity: 1; visibility: visible; transform: scale(1); }
.lmd-slide-content { color: #fff; }
.lmd-slide-content > * { max-width: 680px; }
.lmd-eyebrow { margin: 0 0 15px !important; color: #f5c8bc; font-size: 12px !important; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.lmd-slide h1, .lmd-slide h2 { margin: 0 !important; color: #fff !important; font-size: clamp(36px, 4.2vw, 62px) !important; font-weight: 800 !important; letter-spacing: -.045em !important; line-height: .98 !important; }
.lmd-slide-content > p:not(.lmd-eyebrow) { margin: 24px 0 0 !important; color: rgba(255,255,255,.9); font-size: clamp(16px, 1.7vw, 21px) !important; line-height: 1.55; }
.lmd-slide-content > a { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; margin-top: 30px; padding: 0 22px; border-radius: 4px; color: #fff; background: var(--lmd-coral); font-size: 12px; font-weight: 900; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; transition: .2s ease; }
.lmd-slide-content > a:hover { background: #fff; color: var(--lmd-blue); transform: translateY(-2px); }
.lmd-slide-content > a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.lmd-slider-arrow { position: absolute; z-index: 3; top: 50%; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: #fff; background: rgba(8,44,58,.28); font-size: 29px; line-height: 1; cursor: pointer; transform: translateY(-50%); transition: .2s ease; }
.lmd-slider-arrow:hover { background: var(--lmd-coral); border-color: var(--lmd-coral); }
.lmd-prev { left: 24px; }.lmd-next { right: 24px; }
.lmd-slider-dots { position: absolute; z-index: 3; bottom: 25px; left: 50%; display: flex; gap: 10px; transform: translateX(-50%); }
.lmd-slider-dots button { width: 9px; height: 9px; padding: 0; border: 1px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; transition: .2s ease; }
.lmd-slider-dots button.is-active { width: 28px; border-radius: 99px; background: #fff; }

.lmd-sponsors { padding: 54px 0 65px; border-bottom: 1px solid var(--lmd-line); background: #fff; }
.lmd-section-kicker { margin: 0 0 28px !important; color: #899398; font-size: 11px !important; font-weight: 900; letter-spacing: .22em; text-align: center; text-transform: uppercase; }
.lmd-sponsor-grid { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; gap: 0; }
.lmd-sponsor { min-height: 96px; padding: 18px 28px; display: grid; place-items: center; border-right: 1px solid var(--lmd-line); color: #617078; text-decoration: none; filter: none; opacity: 1; transition: .25s ease; }
.lmd-sponsor:last-child { border-right: 0; }
.lmd-sponsor:hover { filter: none; opacity: 1; transform: translateY(-3px); }
.lmd-sponsor img { display: block; max-width: 185px; max-height: 58px; width: auto; height: auto; }
.lmd-sponsor span { font-size: 18px; font-weight: 800; text-align: center; }

/* Modello compatto per le pagine interne */
.lmd-inner-page .lmd-slider { height: 280px; }
.lmd-inner-page .lmd-slide h2 { max-width: 760px; font-size: clamp(34px, 4vw, 52px) !important; }
.lmd-inner-page .lmd-slide-content > p:not(.lmd-eyebrow) { margin-top: 16px !important; font-size: 16px !important; }
.lmd-inner-page .lmd-slide-content > a { min-height: 42px; margin-top: 20px; }
.lmd-inner-page .lmd-sponsors { padding: 27px 0 32px; }
.lmd-inner-page .lmd-section-kicker { margin-bottom: 16px !important; }
.lmd-inner-page .lmd-sponsor { min-height: 66px; padding: 10px 22px; }
.lmd-inner-page .lmd-sponsor img { max-height: 43px; }
.lmd-page-heading { padding: 42px 0 48px; border-bottom: 1px solid var(--lmd-line); background: var(--lmd-cream); }
.lmd-page-heading h1 { margin: 10px 0 0 !important; color: var(--lmd-blue) !important; font-size: clamp(38px, 5vw, 66px) !important; font-weight: 800 !important; letter-spacing: -.045em !important; line-height: 1 !important; }
.lmd-breadcrumbs { display: flex; align-items: center; gap: 9px; color: #758187; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lmd-breadcrumbs a { color: var(--lmd-coral) !important; text-decoration: none; }
.lmd-breadcrumbs a:hover { color: var(--lmd-blue) !important; }

/* Impedisce ai colori globali di Enfold di sovrascrivere quelli del logo */
#top.lmd-layout-page .lmd-home-link,
#top.lmd-layout-page .lmd-association-line strong,
#top.lmd-layout-page .lmd-contact-card b,
#top.lmd-layout-page .lmd-location-card b,
#top.lmd-layout-page .lmd-menu > li > a { color: var(--lmd-blue) !important; }
#top.lmd-layout-page .lmd-home-link:hover,
#top.lmd-layout-page .lmd-contact-card:hover b { color: var(--lmd-coral) !important; }
#top.lmd-layout-page .lmd-donate-button { color: #fff !important; background: var(--lmd-coral) !important; border-color: var(--lmd-coral) !important; }
#top.lmd-layout-page .lmd-donate-button:hover { color: #fff !important; background: var(--lmd-blue) !important; border-color: var(--lmd-blue) !important; }
#top.lmd-layout-page .lmd-menu > li:hover > a,
#top.lmd-layout-page .lmd-menu > li.current-menu-item > a { color: #fff !important; background: var(--lmd-coral) !important; }

/* News Enfold trasformate in card compatte */
.lmd-layout-page .av-alb-blogposts {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    width: 100%;
    padding: 78px 0 44px;
}
.lmd-layout-page .lmd-news-heading {
    grid-column: 1 / -1;
    margin: 0 0 10px !important;
    color: var(--lmd-blue) !important;
    font-size: clamp(32px, 4vw, 48px) !important;
    font-weight: 800 !important;
    letter-spacing: -.035em !important;
    text-align: center;
}
.lmd-layout-page .lmd-news-subtitle {
    grid-column: 1 / -1;
    max-width: 680px;
    margin: -22px auto 12px !important;
    color: #68777d;
    font-size: 16px;
    line-height: 1.55;
    text-align: center;
}
.lmd-layout-page .av-alb-blogposts article.post-entry {
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    overflow: hidden;
    border: 1px solid var(--lmd-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(8,44,58,.08);
    transition: transform .25s ease, box-shadow .25s ease;
}
.lmd-layout-page .av-alb-blogposts article.post-entry:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 46px rgba(8,44,58,.14);
}
.lmd-layout-page .av-alb-blogposts .big-preview {
    width: 100%;
    height: 220px;
    margin: 0 !important;
    overflow: hidden;
}
.lmd-layout-page .av-alb-blogposts .big-preview a,
.lmd-layout-page .av-alb-blogposts .big-preview img {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
.lmd-layout-page .av-alb-blogposts .big-preview img { object-fit: cover; transition: transform .5s ease; }
.lmd-layout-page .av-alb-blogposts article.post-entry:hover .big-preview img { transform: scale(1.04); }
.lmd-layout-page .av-alb-blogposts .blog-meta,
.lmd-layout-page .av-alb-blogposts .post_author_timeline { display: none !important; }
.lmd-layout-page .av-alb-blogposts .entry-content-wrapper.standard-content {
    width: 100% !important;
    padding: 25px 25px 28px !important;
    margin: 0 !important;
}
.lmd-layout-page .av-alb-blogposts .post-title {
    margin: 0 0 12px !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}
.lmd-layout-page .av-alb-blogposts .post-title a { color: var(--lmd-blue) !important; text-decoration: none; }
.lmd-layout-page .av-alb-blogposts .post-title a:hover { color: var(--lmd-coral) !important; }
.lmd-layout-page .av-alb-blogposts .post-meta-infos {
    display: block;
    margin-bottom: 14px;
    color: #8a969b;
    font-size: 11px;
    line-height: 1.45;
}
.lmd-layout-page .av-alb-blogposts .entry-content {
    position: relative;
    max-height: 94px;
    margin: 0 0 20px !important;
    overflow: hidden;
    color: #58666c;
    font-size: 14px;
    line-height: 1.6;
}
.lmd-layout-page .av-alb-blogposts .entry-content::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 38px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 88%);
}
.lmd-layout-page .lmd-readmore {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 17px;
    border: 2px solid var(--lmd-coral);
    border-radius: 999px;
    color: var(--lmd-coral) !important;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: .2s ease;
}
.lmd-layout-page .lmd-readmore:hover { color: #fff !important; background: var(--lmd-coral); }
.lmd-layout-page .av-alb-blogposts .pagination { grid-column: 1 / -1; }

/* Form di contatto Enfold */
.lmd-layout-page form.avia_ajax_form {
    max-width: 860px;
    margin: 42px auto 90px !important;
    padding: clamp(28px, 5vw, 54px) !important;
    border: 1px solid var(--lmd-line);
    border-radius: 20px;
    background: linear-gradient(145deg, #f6f3ed, #f3f8fa);
    box-shadow: 0 18px 48px rgba(8,44,58,.09);
}
.lmd-layout-page form.avia_ajax_form h3 {
    margin: 0 0 28px !important;
    color: var(--lmd-blue) !important;
    font-size: clamp(28px, 4vw, 40px) !important;
    font-weight: 800 !important;
    letter-spacing: -.025em;
    text-align: center;
}
.lmd-layout-page form.avia_ajax_form label {
    color: var(--lmd-blue) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .045em;
    text-transform: uppercase;
}
.lmd-layout-page form.avia_ajax_form input[type="text"],
.lmd-layout-page form.avia_ajax_form input[type="email"],
.lmd-layout-page form.avia_ajax_form textarea {
    width: 100% !important;
    min-height: 48px;
    padding: 12px 15px !important;
    border: 1px solid #d7e0e3 !important;
    border-radius: 8px !important;
    color: var(--lmd-ink) !important;
    background: #fff !important;
    box-shadow: none !important;
}
.lmd-layout-page form.avia_ajax_form textarea { min-height: 150px; resize: vertical; }
.lmd-layout-page form.avia_ajax_form input:focus,
.lmd-layout-page form.avia_ajax_form textarea:focus { border-color: var(--lmd-blue) !important; box-shadow: 0 0 0 3px rgba(18,63,82,.09) !important; }
.lmd-layout-page form.avia_ajax_form input[type="submit"] {
    min-height: 48px;
    padding: 0 28px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: #fff !important;
    background: var(--lmd-coral) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: .07em;
    text-transform: uppercase;
    transition: .2s ease;
}
.lmd-layout-page form.avia_ajax_form input[type="submit"]:hover { background: var(--lmd-blue) !important; transform: translateY(-2px); }

@media (max-width: 990px) {
    .lmd-layout-page .av-alb-blogposts { grid-template-columns: 1fr 1fr; }
    .lmd-layout-page .av-alb-blogposts article.post-entry:last-of-type { grid-column: 1 / -1; width: min(100%, 560px) !important; justify-self: center; }
    .lmd-header-inner { grid-template-columns: 1fr 1fr auto; gap: 24px; padding: 24px 0; }
    .lmd-logo { grid-column: 1 / -1; justify-content: center; }
    .lmd-main-nav { border-top: 0; }
    .lmd-nav-inner { min-height: 56px; display: block; }
    .lmd-menu-toggle { width: 100%; height: 56px; padding: 0; border: 0; display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--lmd-blue); background: #fff; cursor: pointer; }
    .lmd-menu-toggle span { display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--lmd-coral); }
    .lmd-menu-toggle b { margin-left: 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
    .lmd-menu-wrap { display: none; }
    .lmd-main-nav.is-open .lmd-menu-wrap { display: block; }
    .lmd-menu { height: auto; display: block; padding-bottom: 8px !important; }
    .lmd-menu > li, .lmd-menu > li:first-child { border: 0; border-top: 1px solid var(--lmd-line); }
    .lmd-menu > li > a { min-height: 48px; justify-content: flex-start; }
    .lmd-menu .sub-menu { position: static; display: block; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding-left: 18px; }
    .lmd-slider-arrow { display: none; }
    .lmd-slider { height: 360px; }
    .lmd-slide h1, .lmd-slide h2 { font-size: clamp(36px, 6.2vw, 54px) !important; }
    .lmd-inner-page .lmd-slider { height: 250px; }
    .lmd-inner-page .lmd-slide h2 { font-size: clamp(32px, 5.7vw, 46px) !important; }
}

@media (max-width: 720px) {
    .lmd-layout-page #main > .container_wrap_first > .container { width: calc(100% - 28px) !important; padding: 0 14px !important; }
    .lmd-layout-page .av-alb-blogposts { grid-template-columns: 1fr; gap: 20px; padding-top: 58px; }
    .lmd-layout-page .av-alb-blogposts article.post-entry:last-of-type { grid-column: auto; width: 100% !important; }
    .lmd-layout-page form.avia_ajax_form { margin-bottom: 55px !important; }
    .lmd-container { width: min(100% - 32px, 1220px); }
    .lmd-topbar-inner { grid-template-columns: 1fr auto; gap: 12px; padding: 8px 0; }
    .lmd-association-line { grid-column: 1 / -1; grid-row: auto; padding: 3px 0; font-size: 11px; }
    .lmd-association-line em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .lmd-header-inner { grid-template-columns: 1fr 1fr; gap: 18px; padding: 20px 0 24px; }
    .lmd-logo { grid-column: 1 / -1; }
    .lmd-contact-card { align-items: flex-start; }
    .lmd-contact-icon { flex-basis: 38px; width: 38px; height: 38px; }
    .lmd-contact-card b { font-size: 13px; }
    .lmd-contact-card small { font-size: 10px; }
    .lmd-donate-button { grid-column: 1 / -1; min-height: 46px; }
    .lmd-slider { height: 390px; }
    .lmd-slide-content { padding-bottom: 20px; }
    .lmd-slide h1, .lmd-slide h2 { font-size: clamp(34px, 10vw, 48px) !important; }
    .lmd-inner-page .lmd-slider { height: 250px; }
    .lmd-inner-page .lmd-slide-content > p:not(.lmd-eyebrow) { display: none; }
    .lmd-inner-page .lmd-sponsors { padding: 23px 0 26px; }
    .lmd-page-heading { padding: 32px 0 36px; }
    .lmd-slide-content > p:not(.lmd-eyebrow) { font-size: 16px !important; }
    .lmd-sponsor-grid { grid-template-columns: 1fr 1fr; }
    .lmd-sponsor { min-height: 88px; border-bottom: 1px solid var(--lmd-line); }
    .lmd-sponsor:nth-child(2n) { border-right: 0; }
    .lmd-sponsor:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .lmd-site-shell *, .lmd-site-shell *::before, .lmd-site-shell *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
