/* Gruppi Locali — single group page */

.gruppo-page { --gruppo-accent: var(--ali-teal, #00C0C6); }

/* Hero */
.gruppo-hero {
	position: relative;
	padding: 80px 24px 56px;
	background: linear-gradient(120deg, var(--ali-teal, #00C0C6), var(--ali-navy-light, #A367A1));
	color: #fff;
}
.gruppo-hero--image::before {
	content: "";
	position: absolute; inset: 0;
	background-image: var(--gruppo-hero-img);
	background-size: cover; background-position: center;
	opacity: .35;
}
.gruppo-hero__content { position: relative; max-width: 1080px; margin: 0 auto; }
.gruppo-back { display: inline-block; color: #fff; opacity: .85; text-decoration: none; margin-bottom: 16px; font-size: .95rem; }
.gruppo-back:hover { opacity: 1; }
.gruppo-hero h1 { margin: 0 0 14px; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; }
.gruppo-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.gruppo-badge {
	display: inline-block; padding: 4px 12px; border-radius: 999px;
	font-size: .82rem; font-weight: 600;
	background: rgba(255,255,255,.22); color: #fff;
}

/* Two-column body */
.gruppo-content {
	max-width: 1080px; margin: 48px auto; padding: 0 24px;
	display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start;
}
.gruppo-main { min-width: 0; }
.gruppo-description { line-height: 1.7; }

/* Stats strip */
.gruppo-stats {
	display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 32px;
}
.gruppo-stat {
	flex: 1 1 140px; min-width: 0;
	background: var(--ali-cream, #FAFAF8); border: 1px solid var(--ali-warm-gray, #E2E8F0);
	border-radius: 12px; padding: 16px;
}
.gruppo-stat__value {
	display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.1;
	color: var(--ali-navy-light, #A367A1); overflow-wrap: anywhere;
}
.gruppo-stat__label {
	display: block; margin-top: 4px; font-size: .8rem; font-weight: 600;
	text-transform: uppercase; letter-spacing: .03em; color: var(--ali-text-secondary, #64748B);
}

/* Come aiutare */
.gruppo-aiuto {
	margin-top: 40px; padding: 24px;
	background: var(--ali-teal-glow, #E5F8F9); border-radius: 14px;
}
.gruppo-aiuto h2 { font-size: 1.4rem; margin: 0 0 12px; }
.gruppo-aiuto__body { line-height: 1.7; }
.gruppo-aiuto__body :first-child { margin-top: 0; }
.gruppo-aiuto__body :last-child { margin-bottom: 0; }

/* Updates feed */
.gruppo-updates { margin-top: 48px; }
.gruppo-updates h2 { font-size: 1.5rem; margin: 0 0 20px; }
.gruppo-updates__list { display: flex; flex-direction: column; gap: 20px; }
.gruppo-update {
	display: flex; gap: 16px;
	background: #fff; border: 1px solid var(--ali-warm-gray, #E2E8F0);
	border-radius: 12px; padding: 16px;
}
.gruppo-update__img { flex: none; width: 110px; }
.gruppo-update__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.gruppo-update__body { min-width: 0; }
.gruppo-update__date {
	display: block; font-size: .8rem; font-weight: 700;
	color: var(--ali-navy-light, #A367A1); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px;
}
.gruppo-update__body p { margin: 0; line-height: 1.6; }

/* Sidebar */
.gruppo-sidebar { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 28px; }
.gruppo-sidebar__heading {
	font-size: .85rem; text-transform: uppercase; letter-spacing: .05em;
	color: var(--ali-navy-light, #A367A1); margin: 0 0 12px;
}
.gruppo-socials { display: flex; flex-wrap: wrap; gap: 10px; }
.gruppo-social {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 10px;
	background: var(--ali-teal, #00C0C6); color: #fff; transition: transform .15s, background .15s;
}
.gruppo-social:hover { transform: translateY(-2px); background: var(--ali-navy-light, #A367A1); }
.gruppo-social svg { width: 20px; height: 20px; }
.gruppo-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gruppo-gallery__item { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.gruppo-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gruppo-gallery__item:hover img { transform: scale(1.05); }

@media (max-width: 860px) {
	.gruppo-content { grid-template-columns: 1fr; }
	.gruppo-sidebar { position: static; }
}

/* Update title + rich text */
.gruppo-update__title { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.3; }
.gruppo-update__text { line-height: 1.6; }
.gruppo-update__text :first-child { margin-top: 0; }
.gruppo-update__text :last-child { margin-bottom: 0; }
.gruppo-update__img a { display: block; width: 100%; height: 100%; }

/* Lightbox */
body.grp-lightbox-open { overflow: hidden; }
.grp-lightbox {
	position: fixed; inset: 0; z-index: 9999;
	display: none; align-items: center; justify-content: center;
	background: rgba(15,23,42,.88); padding: 24px;
}
.grp-lightbox.is-open { display: flex; }
.grp-lightbox__figure {
	margin: 0; max-width: 90vw; max-height: 86vh;
	display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.grp-lightbox__img {
	max-width: 90vw; max-height: 78vh; width: auto; height: auto;
	border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
	animation: grp-lb-in .2s ease;
}
.grp-lightbox__caption { color: #fff; font-size: .9rem; text-align: center; max-width: 90vw; }
.grp-lightbox__close, .grp-lightbox__nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer;
	width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1;
	display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.grp-lightbox__close:hover, .grp-lightbox__nav:hover { background: rgba(255,255,255,.28); }
.grp-lightbox__close { top: 20px; right: 20px; transform: none; width: 44px; height: 44px; font-size: 1.6rem; }
.grp-lightbox__prev { left: 16px; }
.grp-lightbox__next { right: 16px; }
@keyframes grp-lb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .grp-lightbox__img { animation: none; } }
@media (max-width: 600px) {
	.grp-lightbox__nav { width: 40px; height: 40px; font-size: 1.6rem; }
	.grp-lightbox__prev { left: 6px; }
	.grp-lightbox__next { right: 6px; }
}
