/* ============================================================
   DiDiritto26 — componenti non esprimibili in theme.json
   ============================================================ */

/* --- Layout boxed (contenuto bianco su sfondo scuro) --- */
body {
	background-color: #303030;
}

.wp-site-blocks {
	max-width: 1220px; /* uguale al box originale (.gdlr-boxed-style) */
	margin-left: auto;
	margin-right: auto;
	background-color: #ffffff;
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
}

/* --- Header --- */
.dd-topbar-contacts a,
.dd-topbar-contacts {
	text-decoration: none;
}

.dd-header .dd-social .wp-social-link,
.dd-header .dd-social a {
	padding: 4px;
}

.dd-brand .wp-block-site-title {
	margin: 0;
}

.dd-header-main {
	position: relative;
}

/* Navigazione: sottolineatura oro sull'attivo */
.dd-nav .wp-block-navigation-item.current-menu-item > a,
.dd-nav .wp-block-navigation-item.current_page_item > a {
	color: var(--wp--preset--color--gold);
}

/* Header appiccicoso con ombra allo scroll (enhancement JS) */
.dd-header.is-stuck {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

/* --- Banner titolo pagina --- */
.dd-page-banner .wp-block-post-title,
.dd-page-banner h1 {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
}

/* --- Hero slider --- */
.dd-hero {
	position: relative;
	background: #000;
}

.dd-hero.dd-hero--js {
	min-height: 530px;
}

.dd-hero.dd-hero--js .dd-hero-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 600ms ease;
	will-change: opacity;
}

.dd-hero.dd-hero--js .dd-hero-slide.is-active {
	opacity: 1;
	z-index: 2;
}

.dd-hero-title,
.dd-hero-title.wp-block-heading {
	color: #dea90f !important; /* titolo hero sempre giallo/oro */
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
	line-height: 1.15;
}

.dd-hero-sub {
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* Pallini di navigazione slider */
.dd-hero-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 18px;
	z-index: 5;
	display: flex;
	gap: 9px;
	justify-content: center;
}

.dd-hero-dots button {
	width: 11px;
	height: 11px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
	transition: background 200ms ease, transform 200ms ease;
}

.dd-hero-dots button.is-active {
	background: var(--wp--preset--color--gold);
	transform: scale(1.2);
}

@media (max-width: 600px) {
	.dd-hero.dd-hero--js {
		min-height: 70vh;
	}
}

/* --- Card articoli --- */
.dd-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 4px;
	overflow: hidden;
	height: 100%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.dd-card:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.dd-card .dd-card-thumb img {
	width: 100%;
	height: 210px;
	object-fit: cover;
	display: block;
}

.dd-card .wp-block-post-title a {
	color: #000;
	text-decoration: none;
}

.dd-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--gold);
}

/* --- Sezione scura "Ci stiamo occupando di" --- */
.dd-occupando-thumb img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	display: block;
}

/* --- Team --- */
.dd-team-thumb img {
	width: 100%;
	aspect-ratio: 4 / 5; /* ritratto, come l'originale (440x550) */
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.dd-team-card:hover .dd-team-thumb img {
	transform: scale(1.03);
}

.dd-team-card .wp-block-post-title a {
	color: var(--wp--preset--color--heading);
	text-decoration: none;
}

.dd-team-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--gold);
}

/* --- Come funziona (step + frecce) --- */
.dd-steps {
	align-items: flex-start;
}

.dd-step {
	position: relative;
	text-align: center;
}

.dd-step-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: var(--wp--preset--color--gold);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 26px;
	font-weight: 700;
	line-height: 64px;
}

.dd-step:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 26px;
	right: -10px;
	width: 12px;
	height: 12px;
	border-right: 2px solid #c9b27a;
	border-bottom: 2px solid #c9b27a;
	transform: rotate(-45deg);
}

@media (max-width: 781px) {
	.dd-step:not(:last-child)::after {
		display: none;
	}
}

/* --- Le nostre sedi --- */
.dd-sede-pin {
	font-size: 26px;
	margin: 0 0 4px;
}

.dd-sede-name {
	color: var(--wp--preset--color--heading);
}

/* --- CTA --- */
.dd-cta .wp-block-heading {
	margin-bottom: 8px;
}

/* --- Tag pill (single) --- */
.dd-tags a,
.dd-single-tags .wp-block-post-terms a {
	display: inline-block;
	padding: 6px 13px;
	margin: 0 4px 4px 0;
	background-color: var(--wp--preset--color--gold);
	color: #fff;
	font-size: 12px;
	border-radius: 2px;
	text-decoration: none;
}

.dd-tags a:hover {
	background-color: var(--wp--preset--color--gold-dark);
	text-decoration: none;
}

/* --- Paginazione --- */
.dd-pagination {
	gap: 6px;
	margin-top: 40px;
}

.dd-pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 3px;
	background: #fff;
	color: #979797;
	border: 1px solid var(--wp--preset--color--border);
	text-decoration: none;
	line-height: 1;
}

.dd-pagination .page-numbers:hover,
.dd-pagination .page-numbers.current {
	background: var(--wp--preset--color--gold);
	color: #fff;
	border-color: var(--wp--preset--color--gold);
}

/* --- Search form --- */
.dd-searchform .wp-block-search__input {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border);
}

/* --- Footer --- */
.dd-footer a {
	color: var(--wp--preset--color--gold);
}

.dd-footer a:hover {
	color: var(--wp--preset--color--gold-hover);
}

.dd-footer .dd-footer-posts {
	list-style: none;
	padding: 0;
	margin: 0;
}

.dd-footer .dd-footer-posts li {
	margin-bottom: 10px;
	font-size: 14px;
}

.dd-footer .wp-block-latest-posts__post-date {
	color: #b9b9b9;
	font-size: 12px;
}

.dd-copyright a {
	color: #cfcfcf;
}

.dd-copyright a:hover {
	color: var(--wp--preset--color--gold);
}

/* --- Pulsanti outline (oro su trasparente) --- */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--gold);
	border: 1px solid var(--wp--preset--color--gold);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--gold);
	color: #fff;
}

/* --- Hero: claim/caption + sottolineatura curva gialla --- */
.dd-hero-caption {
	position: relative;
	display: table; /* larghezza = testo, per centrare la riga sotto */
	margin: 18px auto 0;
	padding-bottom: 22px;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.dd-hero-caption::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%) rotate(-2deg);
	width: 92%;
	height: 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 18' preserveAspectRatio='none'%3E%3Cpath d='M4 11 C 70 19, 150 3, 296 9' fill='none' stroke='%23dea90f' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 100% 100%;
	pointer-events: none;
}

/* --- Intro: due box stessa altezza --- */
.dd-intro {
	gap: 0;
}

.dd-intro .dd-intro-box {
	display: flex;
	flex-direction: column;
}

.dd-intro-gold .wp-block-buttons {
	margin-top: auto;
}

.dd-intro-gold h4,
.dd-intro-light h4 {
	margin-top: 0;
	padding-top: 0;
}

.dd-intro-search .wp-block-search__input {
	background: #fff;
}

/* --- Sezione news (Ultimi articoli / Ci stiamo occupando) --- */
.dd-news-title {
	border-bottom: 2px solid var(--wp--preset--color--tan);
	padding-bottom: 10px;
	margin-bottom: 22px;
}

/* Ultimi articoli — lista verticale con badge data (no card) */
.dd-art-item {
	align-items: flex-start;
	background: transparent;
}

.dd-art-item:last-child {
	border-bottom: 0 !important;
}

.dd-art-date {
	flex: 0 0 auto;
	width: 58px;
	text-align: center;
	background: var(--wp--preset--color--gold);
	color: #fff;
	border-radius: 2px;
	padding: 8px 4px 6px;
	line-height: 1;
}

.dd-art-day,
.dd-art-day time {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 26px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
}

.dd-art-month,
.dd-art-month time {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 3px;
	color: #fff;
}

.dd-art-body {
	flex: 1 1 auto;
	min-width: 0;
}

.dd-art-title a {
	color: var(--wp--preset--color--heading);
	text-decoration: none;
}

.dd-art-title a:hover {
	color: var(--wp--preset--color--gold);
}

.dd-art-excerpt .wp-block-post-excerpt__more-link {
	display: inline-block;
	margin-top: 4px;
	color: var(--wp--preset--color--gold);
	font-weight: 600;
	text-decoration: none;
}

.dd-art-excerpt .wp-block-post-excerpt__more-link:hover {
	text-decoration: underline;
}

.dd-news-all a {
	color: var(--wp--preset--color--gold);
	font-weight: 700;
	text-decoration: none;
}

.dd-news-all a:hover {
	text-decoration: underline;
}

.dd-occ-item {
	align-items: flex-start;
}

.dd-occ-thumb img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

.dd-occ-item .wp-block-post-title a {
	color: #000;
	text-decoration: none;
}

.dd-occ-item .wp-block-post-title a:hover {
	color: var(--wp--preset--color--gold);
}

/* --- Icone titoli box (SVG inline) --- */
.dd-box-head {
	gap: 10px;
	margin-bottom: 14px;
}

.dd-box-head .dd-ico {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	line-height: 0;
}

/* --- Sedi: slider loghi continuo (marquee) --- */
.dd-logos {
	width: 100%;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.dd-logos-track {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 64px;
	width: max-content;
	animation: dd-marquee 45s linear infinite;
}

.dd-logos:hover .dd-logos-track {
	animation-play-state: paused;
}

.dd-logos-track .dd-logo-item {
	margin: 0;
	flex: 0 0 auto;
}

.dd-logos-track .dd-logo-item img {
	height: 78px;
	width: auto;
	max-width: none;
	display: block;
	object-fit: contain;
}

@keyframes dd-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.dd-logos-track {
		animation: none;
		flex-wrap: wrap;
		justify-content: center;
		width: auto;
	}
}

/* --- Responsive --- */
@media (max-width: 781px) {
	.wp-site-blocks {
		box-shadow: none;
	}

	.dd-card .dd-card-thumb img {
		height: 200px;
	}

	.dd-logos-track {
		gap: 40px;
	}

	.dd-logos-track .dd-logo-item img {
		height: 60px;
	}
}
