/* ==========================================================================
   Gruppo Dialisi – stile comune ai sei centri.
   Il colore d'accento (--gd-accent) è l'onda del logo di ciascun centro.
   ========================================================================== */

:root {
	--gd-accent: #3ba7d6;
	--gd-accent-dark: #17709a;
	--gd-accent-soft: #d6edf7;
	--gd-accent-faint: #eef7fb;
	--gd-drop: #b3121f;
	--gd-ink: #33383b;
	--gd-text: #4b5154;
	--gd-muted: #61686b;
	--gd-line: #e3e7e8;
	--gd-bg: #ffffff;
	--gd-radius: 18px;
	--gd-wrap: 1180px;
	--gd-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
	--gd-display: "Cinzel Decorative", Georgia, serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--gd-bg);
	color: var(--gd-text);
	font-family: var(--gd-sans);
	font-size: 1.0625rem;
	line-height: 1.65;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--gd-accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--gd-ink); }
:focus-visible { outline: 3px solid var(--gd-accent-dark); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--gd-ink); font-weight: 500; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }

.gd-wrap { width: 100%; max-width: var(--gd-wrap); margin: 0 auto; padding: 0 24px; }

.gd-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gd-skip { position: absolute; left: 16px; top: -60px; background: var(--gd-ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.gd-skip:focus { top: 12px; color: #fff; }

/* Riga sopra i titoli: maiuscoletto come nei sottotitoli dei loghi */
.gd-eyebrow {
	font-family: var(--gd-display);
	font-size: 1rem;
	letter-spacing: .04em;
	color: var(--gd-accent-dark);
	margin: 0 0 .75rem;
}

/* ---------- Pulsanti ---------- */
.gd-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 12px 26px;
	background: var(--gd-accent-dark); color: #fff;
	border: 1px solid var(--gd-accent-dark); border-radius: 999px;
	font-weight: 600; font-size: 1rem; text-decoration: none;
	transition: background .2s, color .2s, border-color .2s;
}
.gd-btn:hover { background: var(--gd-ink); border-color: var(--gd-ink); color: #fff; }
.gd-btn--ghost { background: transparent; color: var(--gd-ink); border-color: #c9d0d2; }
.gd-btn--ghost:hover { background: var(--gd-ink); color: #fff; }
.gd-btn--small { min-height: 44px; padding: 10px 20px; font-size: .95rem; }
.gd-btn--light { background: #fff; color: var(--gd-ink); border-color: #fff; }
.gd-btn--light:hover { background: var(--gd-ink); color: #fff; border-color: var(--gd-ink); }
.gd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Barra recapiti ---------- */
.gd-topbar { background: var(--gd-accent-faint); color: var(--gd-ink); font-size: .9rem; border-bottom: 1px solid var(--gd-line); }
.gd-topbar__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-top: 8px; padding-bottom: 8px; }
.gd-topbar a { color: var(--gd-ink); font-weight: 600; text-decoration: none; }

/* ---------- Header ---------- */
.gd-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--gd-line); }
.admin-bar .gd-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .gd-header { top: 0; } }
.gd-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; padding-top: 8px; padding-bottom: 8px; }
.gd-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.gd-logo__img { display: block; height: 68px; width: auto; max-width: 260px; object-fit: contain; }

.gd-nav { display: flex; align-items: center; gap: 28px; }
.gd-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 26px; }
.gd-menu a { display: inline-block; padding: 10px 0; color: var(--gd-ink); font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; }
.gd-menu a:hover, .gd-menu .current-menu-item > a { border-bottom-color: var(--gd-accent); color: var(--gd-ink); }
.gd-menu .sub-menu { list-style: none; margin: 0; padding: 8px 0; position: absolute; min-width: 220px; background: #fff; border: 1px solid var(--gd-line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.08); display: none; }
.gd-menu li { position: relative; }
.gd-menu li:hover > .sub-menu, .gd-menu li:focus-within > .sub-menu { display: block; }
.gd-menu .sub-menu a { padding: 8px 18px; display: block; border: 0; }

.gd-menu-toggle { display: none; width: 48px; height: 48px; border: 1px solid var(--gd-line); background: #fff; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; }
.gd-menu-toggle__bars, .gd-menu-toggle__bars::before, .gd-menu-toggle__bars::after { display: block; width: 20px; height: 2px; background: var(--gd-ink); border-radius: 2px; position: relative; transition: transform .2s; }
.gd-menu-toggle__bars::before, .gd-menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.gd-menu-toggle__bars::before { top: -6px; }
.gd-menu-toggle__bars::after { top: 6px; }
.gd-menu-toggle[aria-expanded="true"] .gd-menu-toggle__bars { background: transparent; }
.gd-menu-toggle[aria-expanded="true"] .gd-menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.gd-menu-toggle[aria-expanded="true"] .gd-menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
	.gd-header__inner { min-height: 72px; }
	.gd-logo__img { height: 54px; max-width: 200px; }
	.gd-menu-toggle { display: inline-flex; }
	.gd-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--gd-line); padding: 12px 24px 24px; flex-direction: column; align-items: stretch; gap: 12px; }
	.gd-nav.is-open { display: flex; }
	.gd-menu { flex-direction: column; gap: 0; }
	.gd-menu a { padding: 12px 0; border-bottom: 1px solid var(--gd-line); display: block; }
	.gd-menu .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 16px; }
}

/* ---------- Onda decorativa ---------- */
.gd-wave { position: absolute; pointer-events: none; display: block; }
.gd-wave path { vector-effect: non-scaling-stroke; }

/* ---------- Hero ---------- */
.gd-hero { position: relative; overflow: hidden; padding: 72px 0 96px; background: linear-gradient(180deg, #fff 0%, var(--gd-accent-faint) 100%); }
.gd-hero__wave { left: -5%; right: -5%; width: 110%; bottom: 0; height: 240px; opacity: .9; }
.gd-hero__inner { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.gd-hero__text { flex: 1 1 460px; min-width: 0; }
.gd-hero__title { font-size: 2.6rem; font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
.gd-hero__lead { font-size: 1.15rem; color: var(--gd-muted); max-width: 36em; margin: 20px 0 0; }
.gd-hero__media { flex: 1 1 400px; min-width: 0; }
.gd-hero__img { display: block; width: 100%; height: 400px; object-fit: cover; border-radius: 28px; box-shadow: 0 24px 60px rgba(30,40,45,.12); }
.gd-hero__brand { display: flex; align-items: center; justify-content: center; min-height: 340px; padding: 32px; background: rgba(255,255,255,.7); border: 1px solid var(--gd-line); border-radius: 28px; }
.gd-hero__brand img { width: 100%; max-width: 440px; height: auto; }
@media (max-width: 700px) {
	.gd-hero { padding: 48px 0 80px; }
	.gd-hero__img { height: 260px; }
	.gd-hero__brand { min-height: 220px; }
}

/* ---------- Sezioni ---------- */
.gd-section { padding: 80px 0; }
.gd-section--tint { background: var(--gd-accent-faint); }
.gd-section--flush { padding-top: 0; }
.gd-section__head { max-width: 680px; margin-bottom: 36px; }
.gd-section__title { font-size: 2rem; font-size: clamp(1.6rem, 3vw, 2.25rem); margin: 0; }

.gd-grid { display: grid; gap: 24px; }
.gd-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.gd-grid--cards { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }

.gd-points { padding: 56px 0; }
.gd-point { position: relative; padding-top: 22px; }
.gd-point::before { content: ""; position: absolute; top: 0; left: 0; width: 56px; height: 3px; border-radius: 3px; background: var(--gd-accent); }
.gd-point__title { font-size: 1.45rem; margin: 0 0 6px; }
.gd-point p { margin: 0; color: var(--gd-muted); }

.gd-card { background: #fff; border: 1px solid var(--gd-line); border-radius: var(--gd-radius); padding: 26px 26px 24px; display: flex; flex-direction: column; gap: 6px; }
.gd-card__title { font-size: 1.15rem; font-weight: 600; margin: 0; }
.gd-card p { margin: 0; color: var(--gd-muted); }
.gd-card__tel { font-size: 1.1rem; font-weight: 600; text-decoration: none; margin-top: 6px; }
.gd-card__link { margin-top: auto; padding-top: 8px; font-weight: 500; }
.gd-card--place { border-top: 3px solid var(--gd-accent); }

.gd-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; }
.gd-people, .gd-docs, .gd-plain { list-style: none; margin: 0; padding: 0; }
.gd-people li { display: flex; flex-direction: column; padding: 14px 0; border-bottom: 1px solid var(--gd-line); }
.gd-people strong { color: var(--gd-ink); font-weight: 600; font-size: 1.2rem; }
.gd-people span { color: var(--gd-muted); }
.gd-docs li { border-bottom: 1px solid var(--gd-line); }
.gd-docs a { display: block; padding: 16px 0; font-weight: 500; text-decoration: none; }
.gd-docs a::after { content: " ↓"; }

.gd-banner { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; padding: 48px; border-radius: 28px; background: var(--gd-accent-dark); color: #fff; }
.gd-banner__wave { inset: 0; width: 100%; height: 100%; opacity: .35; }
.gd-banner__text { position: relative; flex: 1 1 420px; min-width: 0; }
.gd-banner h2 { color: #fff; font-size: 1.8rem; font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 8px; }
.gd-banner p { margin: 0; color: rgba(255,255,255,.92); font-size: 1.08rem; }
.gd-banner .gd-btn { position: relative; }
@media (max-width: 600px) { .gd-banner { padding: 32px 24px; } }

.gd-contacts p { margin: 0 0 6px; }
.gd-label { font-size: .85rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gd-muted); margin: 0 0 10px; }
.gd-plain li { padding: 2px 0; }

/* ---------- Centri del gruppo ---------- */
.gd-group { padding: 56px 0; border-top: 1px solid var(--gd-line); }
.gd-group__title { font-family: var(--gd-display); font-size: 1.15rem; color: var(--gd-muted); text-align: center; margin: 0 0 28px; }
.gd-group__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 40px; }
.gd-group__item { display: flex; align-items: center; justify-content: center; height: 88px; padding: 8px; border-radius: 12px; }
.gd-group__item img { max-height: 72px; max-width: 190px; width: auto; height: auto; filter: grayscale(.25); opacity: .9; transition: filter .2s, opacity .2s; }
.gd-group__item:hover img, .gd-group__item:focus-visible img { filter: none; opacity: 1; }

/* ---------- Footer ---------- */
.gd-footer { position: relative; overflow: hidden; background: #f4f6f6; color: var(--gd-text); font-size: .95rem; }
.gd-footer__wave { left: 0; top: -40px; width: 100%; height: 140px; opacity: .6; }
.gd-footer__inner { position: relative; display: grid; gap: 20px; padding-top: 56px; padding-bottom: 32px; }
.gd-footer__brand { display: flex; flex-direction: column; }
.gd-footer__brand strong { color: var(--gd-ink); font-weight: 600; font-size: 1.15rem; }
.gd-footer__brand span { font-family: var(--gd-display); color: var(--gd-muted); }
.gd-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.gd-footer__menu a { color: var(--gd-ink); }
.gd-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid #dde2e3; color: var(--gd-muted); }
.gd-footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.gd-footer__links a { color: var(--gd-ink); }

/* ---------- Pagine interne ---------- */
.gd-page-head { position: relative; overflow: hidden; padding: 64px 0 56px; background: linear-gradient(180deg, #fff 0%, var(--gd-accent-faint) 100%); margin-bottom: 48px; }
.gd-page-head__wave { left: 0; bottom: -30px; width: 100%; height: 160px; }
.gd-page-head__title { position: relative; font-size: 2.2rem; font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 0; }
.gd-prose { max-width: 820px; padding-bottom: 80px; }
.gd-prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.gd-prose h3 { font-size: 1.25rem; margin-top: 1.4em; }
.gd-prose img { border-radius: 14px; }
.gd-meta { color: var(--gd-muted); font-size: .9rem; }
.gd-excerpt { padding: 24px 0; border-bottom: 1px solid var(--gd-line); }
.gd-excerpt h2 { margin: 0 0 4px; font-size: 1.35rem; }
.gd-excerpt h2 a { color: var(--gd-ink); text-decoration: none; }

/* Elementor: nessun margine aggiunto dal tema */
.elementor-page .gd-main { padding: 0; }

/* WordPress core */
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption-text, figcaption { color: var(--gd-muted); font-size: .9rem; }

/* ---------- Foto nelle sezioni ---------- */
.gd-card--media { padding-top: 0; overflow: hidden; }
.gd-card__img { display: block; width: calc(100% + 52px); max-width: none; margin: 0 -26px 14px; aspect-ratio: 16 / 10; height: auto; object-fit: cover; }

.gd-people .gd-person { flex-direction: row; align-items: center; gap: 20px; }
.gd-person__img, .gd-person__initials { flex-shrink: 0; width: 96px; height: 96px; border-radius: 50%; }
.gd-person__img { object-fit: cover; }
.gd-person__initials { display: flex; align-items: center; justify-content: center; background: var(--gd-accent-soft); color: var(--gd-accent-dark); font-weight: 600; font-size: 1.6rem; letter-spacing: .04em; }
.gd-person__text { display: flex; flex-direction: column; }
.gd-person__text strong { color: var(--gd-ink); font-weight: 600; font-size: 1.2rem; }
.gd-person__text span { color: var(--gd-muted); }

.gd-banner--media { padding: 0; align-items: stretch; gap: 0; }
.gd-banner--media .gd-banner__text { padding: 48px 0 48px 48px; align-self: center; }
.gd-banner--media .gd-btn { margin: 0 48px 48px; align-self: flex-end; }
.gd-banner__media { position: relative; flex: 1 1 360px; min-height: 280px; }
.gd-banner__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
@media (min-width: 900px) {
	.gd-banner--media { flex-wrap: nowrap; }
	.gd-banner--media .gd-banner__text { flex: 1 1 50%; padding-right: 32px; }
	.gd-banner--media .gd-btn { align-self: center; margin: 0 32px 0 0; flex-shrink: 0; }
	.gd-banner__media { flex: 0 0 40%; }
}
@media (max-width: 899px) {
	.gd-banner--media .gd-banner__text { padding: 32px 24px 0; }
	.gd-banner--media .gd-btn { margin: 20px 24px 28px; align-self: flex-start; }
	.gd-banner__media { flex-basis: 100%; order: -1; min-height: 220px; }
}

/* ---------- Galleria ---------- */
.gd-slider { position: relative; }
.gd-slider__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; border-radius: 28px; scrollbar-width: none; }
.gd-slider__track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .gd-slider__track { scroll-behavior: auto; } }
.gd-slider__slide { flex: 0 0 100%; margin: 0; position: relative; scroll-snap-align: start; }
.gd-slider__img { display: block; width: 100%; height: clamp(260px, 52vw, 560px); max-width: none; object-fit: cover; }
.gd-slider__slide figcaption { position: absolute; left: 20px; bottom: 20px; max-width: calc(100% - 40px); background: rgba(255,255,255,.92); color: var(--gd-ink); padding: 8px 14px; border-radius: 10px; font-size: .95rem; }
.gd-slider__nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.gd-slider__btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid #c9d0d2; background: #fff; color: var(--gd-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.gd-slider__btn:hover { background: var(--gd-ink); color: #fff; border-color: var(--gd-ink); }
.gd-slider__dots { display: flex; gap: 8px; }
.gd-slider__dots span { width: 9px; height: 9px; border-radius: 50%; background: #cfd5d7; transition: background .2s, transform .2s; }
.gd-slider__dots span.is-active { background: var(--gd-accent-dark); transform: scale(1.25); }

.gd-gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gd-gallery-grid a { display: block; border-radius: 16px; overflow: hidden; }
.gd-gallery-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; transition: transform .3s; }
.gd-gallery-grid a:hover img { transform: scale(1.03); }

/* ---------- Torna su ---------- */
.gd-totop { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--gd-accent-dark); color: #fff; box-shadow: 0 8px 24px rgba(30,40,45,.22); opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s, background .2s; }
.gd-totop.is-visible { opacity: 1; transform: none; }
.gd-totop:not(.is-visible) { pointer-events: none; }
.gd-totop:hover, .gd-totop:focus-visible { background: var(--gd-ink); color: #fff; }
.gd-totop[hidden] { display: none; }
#contenuto:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .gd-totop { transition: none; } }
@media print { .gd-totop { display: none !important; } }
