/* ============================================================
   APAC Maresme — Global chrome: toolbar, header, footer,
   newsletter band, sponsors. Mirrors the hi-fi "Benvinguda" page.
   ============================================================ */

/* ====== ACCESSIBILITY: floating button + panel ============ */
.apac-a11y { position: fixed; right: 18px; bottom: 18px; z-index: 60; }

.apac-a11y__fab {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 52px; padding: 0 18px;
	background: var(--c-petroli-fosc); color: #fff;
	border: none; border-radius: var(--r-pill); cursor: pointer;
	font-family: var(--font-ui); font-weight: 600; font-size: 15px;
	box-shadow: var(--sh-2);
}
.apac-a11y__fab:hover { background: var(--c-petroli); }

.apac-a11y__panel {
	position: absolute; right: 0; bottom: calc(100% + 12px);
	width: 260px; max-width: calc(100vw - 36px);
	background: var(--c-superficie-2); border: 1px solid var(--c-vora);
	border-radius: var(--r-card); box-shadow: var(--sh-2);
	padding: 14px; display: flex; flex-direction: column; gap: 9px;
}
.apac-a11y__panel[hidden] { display: none; }
.apac-a11y__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.apac-a11y__title { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: var(--c-petroli-fosc); }
.apac-a11y__title .material-symbols-rounded { color: var(--c-petroli); }
.apac-a11y__close { border: none; background: transparent; cursor: pointer; color: var(--c-tinta-suau); min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-field); }
.apac-a11y__close:hover { background: var(--c-vora); }
.apac-a11y__row { display: flex; gap: 9px; }
.apac-a11y__row .apac-tool { flex: 1; justify-content: center; }

.apac-tool {
	min-height: 44px; min-width: 44px;
	cursor: pointer; border: 1px solid var(--c-petroli); border-radius: var(--r-field);
	padding: 0 14px;
	font-family: var(--font-ui); font-weight: 600; font-size: 14px;
	background: var(--c-petroli); color: #fff;
	display: inline-flex; align-items: center; gap: 7px;
}
.apac-tool--block { width: 100%; justify-content: center; }
.apac-tool--cta { background: var(--c-terracota); border-color: var(--c-terracota); }
/* Active toggle state — visible on the light panel */
.apac-tool[aria-pressed="true"] { background: var(--c-primari-clar); color: var(--c-petroli-fosc); border-color: var(--c-petroli); }
.apac-tool[aria-pressed="true"] .material-symbols-rounded { font-variation-settings: "FILL" 1, "wght" 500; }

/* On mobile: icon-only round button (compact, always reachable). */
@media (max-width: 860px) {
	.apac-a11y { right: 14px; bottom: 14px; }
	.apac-a11y__fab { width: 56px; min-width: 56px; height: 56px; padding: 0; border-radius: var(--r-pill); justify-content: center; }
	.apac-a11y__fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ====== HEADER (sticky top) =============================== */
.apac-header {
	background: var(--c-superficie-2); border-bottom: 1px solid var(--c-vora);
	position: sticky; top: 0; z-index: 40;
}
/* Unstick on short viewports / high zoom so it never eats the reading space. */
@media (max-height: 520px) {
	.apac-header { position: static; }
}
.apac-header__inner {
	max-width: var(--maxw); margin-inline: auto;
	padding: 14px var(--sp-3);
	display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
}
.apac-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.apac-logo__mark { width: 46px; height: 46px; flex-shrink: 0; }
.apac-logo__word { font-family: var(--font-logo); font-weight: 600; font-size: 21px; color: var(--c-petroli); }

.apac-nav { display: flex; align-items: center; gap: 22px; }
.apac-nav__panel { display: flex; align-items: center; gap: 22px; }
.apac-nav__list { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.apac-nav__list a {
	font-family: var(--font-ui); font-weight: 500; font-size: 15px;
	color: var(--c-tinta-suau); text-decoration: none;
}
.apac-nav__list a:hover,
.apac-nav__list .current-menu-item > a,
.apac-nav__list .current_page_item > a { color: var(--c-petroli-fosc); font-weight: 600; }

.apac-nav__cta {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--c-terracota); color: #fff;
	font-family: var(--font-ui); font-weight: 600; font-size: 15px;
	padding: 11px 18px; border-radius: var(--r-btn); text-decoration: none;
	min-height: var(--hit);
}
.apac-nav__cta:hover { color: #fff; filter: brightness(.96); }
.apac-nav__cta--bar { display: none; }            /* icon-only, mobile bar only */

/* Mobile menu toggle (hidden on desktop) */
.apac-nav__toggle {
	display: none;
	min-width: var(--hit); min-height: var(--hit);
	align-items: center; justify-content: center;
	background: transparent; border: 1px solid var(--c-vora); border-radius: var(--r-field);
	cursor: pointer; color: var(--c-petroli-fosc);
}

@media (max-width: 860px) {
	.apac-nav { gap: 10px; }
	.apac-nav__toggle { display: inline-flex; position: relative; z-index: 55; }

	/* In the bar: only the icon-only CTA (hide its label) + the toggle. */
	.apac-nav__cta--bar { display: inline-flex; padding: 0; width: var(--hit); min-width: var(--hit); justify-content: center; }
	.apac-nav__cta--bar .apac-nav__cta-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

	/* The panel becomes a full-viewport menu. */
	.apac-nav__panel {
		display: none;
		position: fixed; inset: 0; z-index: 44;
		background: var(--c-superficie-2);
		flex-direction: column; align-items: stretch; justify-content: flex-start;
		gap: 4px; padding: 84px var(--sp-3) 32px; overflow-y: auto;
	}
	.apac-nav.is-open .apac-nav__panel { display: flex; }
	.apac-nav__list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
	.apac-nav__list a {
		font-size: 22px; padding: 18px 4px; min-height: 60px;
		display: flex; align-items: center; border-bottom: 1px solid var(--c-vora);
	}
	.apac-nav__cta--full { justify-content: center; font-size: 18px; padding: 16px; margin-top: 20px; }

	/* Keep the header (logo + X) visible above the open menu. */
	body.apac-menu-open .apac-header { z-index: 50; }
	body.apac-menu-open { overflow: hidden; }
}

/* ====== NEWSLETTER BAND =================================== */
.apac-newsletter { max-width: var(--maxw); margin: 40px auto; padding-inline: var(--sp-3); }
.apac-newsletter__card {
	background: var(--c-petroli-fosc); border-radius: 24px; padding: 40px 32px;
	display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between;
}
.apac-newsletter__copy { flex: 1; min-width: 260px; }
.apac-newsletter__kicker { font-family: var(--font-accent); font-size: 26px; color: var(--c-on-dark-accent); }
.apac-newsletter h2 { font-size: 28px; color: #fff; margin: 2px 0 8px; }
.apac-newsletter__copy p { font-size: 16px; color: var(--c-footer-text); margin: 0; max-width: 46ch; line-height: 1.55; }
.apac-newsletter__form { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 10px; }
.apac-newsletter__form label { font-family: var(--font-ui); font-weight: 600; font-size: 15px; color: #fff; }
.apac-newsletter__row { display: flex; gap: 10px; flex-wrap: wrap; }
.apac-newsletter__field {
	flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px;
	background: #fff; border-radius: 13px; padding: 0 14px;
}
.apac-newsletter__field .material-symbols-rounded { color: var(--c-petroli); font-size: 22px; }
.apac-newsletter__field input {
	flex: 1; border: none; outline: none; background: transparent;
	font-family: var(--font-reading); font-size: 16px; color: var(--c-tinta); height: 52px;
}
.apac-newsletter__submit {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--c-terracota); color: #fff; border: none; border-radius: 13px;
	padding: 0 22px; height: 52px; font-family: var(--font-ui); font-weight: 600; font-size: 16px; cursor: pointer;
}
.apac-newsletter__note { font-family: var(--font-reading); font-size: 13px; color: #9FC3BF; }
.apac-newsletter__notice { font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: #fff; background: rgba(255,255,255,.12); border-radius: var(--r-field); padding: 8px 12px; }

/* ====== SPONSORS ========================================= */
.apac-sponsors { max-width: var(--maxw); margin: 0 auto 40px; padding-inline: var(--sp-3); }
.apac-sponsors__head { text-align: center; margin-bottom: 22px; }
.apac-sponsors__kicker { font-family: var(--font-accent); font-size: 26px; color: var(--c-terracota); }
.apac-sponsors__head h2 { font-size: 26px; margin: 2px 0 0; }
.apac-sponsors__grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 16px; margin-bottom: 18px;
}
.apac-sponsor-tile {
	background: var(--c-targeta); border: 1px solid var(--c-vora); border-radius: 14px;
	height: 84px; display: flex; align-items: center; justify-content: center; gap: 8px;
	color: #6E685C; /* 5.5:1 on white — placeholder text meets WCAG AA */
	font-family: var(--font-ui); font-weight: 600; font-size: 14px;
}
.apac-sponsor-tile img { max-height: 56px; width: auto; }
.apac-sponsor-tile--add { border-style: dashed; border-color: #D8B79E; color: #A35A35; flex-direction: column; gap: 2px; }
.apac-sponsors__cta { text-align: center; }

/* ====== FOOTER ========================================== */
.apac-footer { background: var(--c-footer-bg); color: var(--c-footer-text); margin-top: var(--sp-4); }
.apac-footer__cols {
	max-width: var(--maxw); margin-inline: auto; padding: 48px var(--sp-3) 28px;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px;
}
.apac-footer__brandrow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.apac-footer__mark { width: 40px; height: 40px; }
.apac-footer__brandrow span { font-family: var(--font-logo); font-weight: 600; font-size: 19px; color: #fff; }
.apac-footer__tagline { font-family: var(--font-reading); font-size: 15px; line-height: 1.6; color: #9FC3BF; margin: 0 0 14px; max-width: 30ch; }
.apac-footer__social { display: flex; gap: 10px; }
.apac-footer__social a {
	width: 40px; height: 40px; border-radius: 11px; background: var(--c-footer-tile);
	display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.apac-footer__social .material-symbols-rounded { color: var(--c-footer-text); font-size: 20px; }

/* ── Themed social tiles (footer + contact) ─────────────────── */
.apac-social { display: flex; gap: 10px; flex-wrap: wrap; }
.apac-social__tile {
	width: 40px; height: 40px; border-radius: 11px; text-decoration: none;
	display: inline-flex; align-items: center; justify-content: center;
}
.apac-social__tile svg { width: 20px; height: 20px; display: block; }
.apac-social__tile .material-symbols-rounded { font-size: 20px; }
.apac-social--footer .apac-social__tile { background: var(--c-footer-tile); color: var(--c-footer-text); }
.apac-social--footer .apac-social__tile:hover { background: #354541; }
.apac-social--light .apac-social__tile { background: var(--c-primari-clar); color: var(--c-petroli); }
.apac-social--light .apac-social__tile:hover { filter: brightness(.96); }
.apac-footer__col h2 { font-family: var(--font-ui); font-weight: 600; font-size: 15px; color: #fff; margin: 0 0 14px; }
.apac-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.apac-footer__col a { font-family: var(--font-reading); font-size: 15px; color: var(--c-footer-text); text-decoration: none; }
.apac-footer__col a:hover { text-decoration: underline; }
.apac-footer__contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.apac-footer__contact li { display: flex; gap: 9px; align-items: flex-start; font-family: var(--font-reading); font-size: 15px; }
.apac-footer__contact .material-symbols-rounded { color: var(--c-footer-muted); font-size: 20px; }
.apac-footer__bar { border-top: 1px solid var(--c-footer-tile); }
.apac-footer__bar-inner {
	max-width: var(--maxw); margin-inline: auto; padding: 18px var(--sp-3);
	display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
}
.apac-footer__bar-inner, .apac-footer__bar a { font-family: var(--font-reading); font-size: 13px; color: var(--c-footer-muted); }
.apac-footer__legal { display: flex; gap: 18px; }
.apac-footer__bar a { text-decoration: none; }
.apac-footer__bar a:hover { text-decoration: underline; }
