/*
Theme Name: Extutelats de Catalunya
Theme URI: https://extutelatsdecatalunya.cat
Author: Extutelats i Extutelades de Catalunya
Description: Tema institucional seriós per a l'Associació d'Extutelats i Extutelades de Catalunya. Acompanyament a joves que han sortit del sistema de protecció.
Version: 1.0
Requires at least: 6.0
License: GNU General Public License v2 or later
Text Domain: extutelats
*/

/* ---------- Variables ---------- */
:root {
	--navy: #14232f;
	--navy-2: #1c3142;
	--navy-3: #253b4d;
	--espresso: #2a2018;
	--steel: #8ba6b3;
	--steel-soft: #d9e2e6;
	--gold: #c9a25f;
	--paper: #f6f5f1;
	--light: #ffffff;
	--ink: #2b3540;
	--muted: #5a6772;
	--line: #e3e1da;
	--shadow: 0 2px 6px rgba(20, 35, 47, 0.08);
	--serif: Georgia, "Times New Roman", serif;
	--sans: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
	--maxw: 1160px;
	--radius: 6px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--sans);
	color: var(--ink);
	background: var(--light);
	line-height: 1.7;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--navy); margin: 0 0 0.6em; }
h1 { font-size: 2.7rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.25rem; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0, 0, 0, 0); border: 0;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--navy);
	color: #e8eef1;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
	display: flex; align-items: center; justify-content: space-between;
	min-height: 74px; gap: 20px;
}
.site-logo { height: 44px; width: auto; filter: invert(1); }
.site-tagline {
	margin: 4px 0 0; font-size: 0.78rem; color: var(--steel);
	letter-spacing: 0.02em;
}

/* ---------- Top bar / language switcher ---------- */
.topbar {
	background: var(--navy-2);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner {
	display: flex; align-items: center; justify-content: flex-end;
	min-height: 34px; gap: 16px;
}
.topbar-note { margin: 0; font-size: 0.78rem; color: var(--steel); }
.social-links { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.social-links a { display: inline-flex; align-items: center; color: var(--steel); transition: color 0.2s; }
.social-links a:hover { color: #fff; }
.social-links svg { width: 15px; height: 15px; fill: currentColor; }
.lang-switch { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; }
.lang-switch-item {
	display: inline-block; padding: 2px 8px; color: var(--steel);
	border-radius: 999px; letter-spacing: 0.04em; font-weight: 600;
	transition: background 0.2s, color 0.2s;
}
.lang-switch-item:hover { color: #fff; text-decoration: none; }
.lang-switch-item.is-active { background: var(--gold); color: var(--navy); }

.site-nav { align-self: stretch; display: flex; }
.site-nav .menu {
	display: flex; align-items: stretch; gap: 6px; list-style: none; margin: 0; padding: 0;
	flex: 1;
}
.site-nav .menu > li { position: relative; display: flex; align-items: center; }
.site-nav .menu a {
	display: inline-block; padding: 8px 14px; color: #dbe5ea;
	font-size: 0.95rem; border-radius: var(--radius);
	transition: background 0.2s, color 0.2s;
}
.site-nav .menu a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.site-nav .menu .sub-menu {
	display: none; position: absolute; top: 100%; left: 0; z-index: 20;
	min-width: 210px; margin: 0; padding: 6px 0; list-style: none;
	background: var(--navy-2); border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}
.site-nav .menu li:hover > .sub-menu,
.site-nav .menu li:focus-within > .sub-menu { display: block; }
.site-nav .menu .sub-menu a {
	display: block; padding: 8px 16px; border-radius: 0; white-space: nowrap;
}
.site-nav .menu .sub-menu a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #dbe5ea; margin: 5px 0; }

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: #e8eef1; padding: 90px 0 96px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow {
	font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em;
	color: var(--gold); margin: 0 0 14px; font-weight: 600;
}
.eyebrow-light { color: var(--gold); }
.hero-title { color: #fff; margin-bottom: 14px; }
.hero-tagline {
	font-family: var(--serif); font-style: italic; font-size: 1.35rem;
	color: var(--steel); margin: 0 0 26px; max-width: 30em;
}
.hero-stat {
	display: inline-block; border: 1px solid rgba(201, 162, 95, 0.5);
	color: var(--gold); padding: 8px 16px; border-radius: 999px;
	font-size: 0.92rem; margin: 0 0 30px; font-weight: 600;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
	display: inline-block; padding: 13px 24px; border-radius: var(--radius);
	font-weight: 600; font-size: 0.95rem; transition: background 0.2s, color 0.2s, border 0.2s;
}
.btn-accent { background: var(--gold); color: var(--navy); }
.btn-accent:hover { background: #d4b173; color: var(--navy); text-decoration: none; }
.btn-outline { border: 1px solid var(--steel); color: #fff; }
.btn-outline:hover { background: var(--steel); color: var(--navy); text-decoration: none; }
.hero-media img { border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-light { background: var(--light); }
.section-paper { background: var(--paper); }
.section-dark { background: var(--espresso); color: #e7e0d6; }
.section-title { max-width: 22em; }
.section-title-light { color: #fff; }
.section-dark p { color: #d8d0c4; }
.section-dark .section-title-light { color: #fff; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-reverse .split-media { order: -1; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.with-frame { border: 1px solid var(--line); padding: 10px; background: #fff; }

.quote-card {
	margin: 22px 0 0; padding: 22px 26px; border-left: 3px solid var(--gold);
	background: var(--light); box-shadow: var(--shadow); border-radius: 0 var(--radius) var(--radius) 0;
}
.quote-card blockquote {
	margin: 0 0 8px; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink);
}
.quote-card figcaption { font-size: 0.9rem; color: var(--muted); }
.story-quote {
	margin: 6px 0 18px; padding: 14px 20px; border-left: 3px solid var(--gold);
	background: var(--paper); font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--navy);
}

/* ---------- Cards ---------- */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 30px; }
.card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy-3); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card-title { margin-bottom: 10px; }
.card p { margin-bottom: 0; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 34px; }
.project-card {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.project-card img { aspect-ratio: 16 / 10; object-fit: cover; }
.project-body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.project-sub { font-family: var(--serif); font-style: italic; color: var(--gold); font-weight: 600; margin-bottom: 12px; }
.project-body p { margin-bottom: 0; }
.project-body .list { margin-top: 12px; }

.list { padding-left: 20px; margin: 0 0 1.1em; }
.list li { margin-bottom: 6px; }
.list-light { color: #cdd9df; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 34px; }
.member { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.member-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.member-photo-placeholder {
	display: flex; align-items: center; justify-content: center;
	background: var(--navy-3); color: var(--steel);
	font-family: var(--serif); font-size: 4rem;
}
.member-body { padding: 22px 24px 26px; }
.member-name { margin-bottom: 2px; }
.member-role {
	font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em;
	color: var(--gold); font-weight: 600; margin: 0 0 12px;
}
.member-pending { font-family: var(--serif); font-style: italic; color: var(--muted); margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-inner { text-align: center; max-width: 760px; }
.contact-text { color: #cdd9df; margin: 0 auto 34px; max-width: 46em; }
.contact-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.contact-link {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 14px 22px; border: 1px solid var(--steel); border-radius: var(--radius);
	color: #fff; font-weight: 600;
}
.contact-link:hover { background: var(--steel); color: var(--navy); text-decoration: none; }
.contact-icon { width: 24px; height: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-2); color: #c6d3da; }
.footer-accent { height: 4px; background: linear-gradient(90deg, var(--gold), #d4b173, var(--gold)); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 40px; padding: 60px 24px 40px; }
.footer-title { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.footer-text { font-size: 0.95rem; }
.footer-logo-link { display: inline-block; margin-bottom: 16px; }
.footer-logo { height: 52px; width: auto; filter: brightness(0) invert(1); }
.footer-contact, .footer-links { list-style: none; margin: 0; padding: 0; }
.footer-contact li, .footer-links li { margin-bottom: 10px; }
.footer-contact a, .footer-links a { color: #c6d3da; transition: color 0.2s; }
.footer-contact a:hover, .footer-links a:hover { color: var(--gold); text-decoration: none; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-icon { width: 20px; height: 20px; }
.footer-cta { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius); padding: 24px; }
.footer-cta .btn { margin-top: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer-bottom p { font-size: 0.85rem; color: #93a4ae; padding: 18px 24px; margin: 0; }
.footer-social { display: inline-flex; align-items: center; gap: 14px; margin-top: 16px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 50%; color: #c6d3da; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.footer-social a:hover { color: var(--navy); background: var(--gold); border-color: var(--gold); }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Generic pages ---------- */
.page-content { padding: 0; }
.page-content .entry-title { margin-bottom: 22px; }
.page-content article { max-width: 820px; }

/* ---------- Block editor compatibility ---------- */
figure.wp-block-image { margin: 0; }
.hero-actions p, .contact-actions p { margin: 0; }
.member-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.quote-card p { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink); margin: 0 0 8px; }
.quote-card cite { font-size: 0.9rem; color: var(--muted); font-style: normal; }

/* Els grups de Gutenberg embolcallen el contingut intern en un
   .wp-block-group__inner-container; fem que sigui transparent perquè els
   grid/flex (hero-inner, split, cols-3, project-grid, team-grid...) es
   continuïn aplicant als fills directes. */
.hero-inner > .wp-block-group__inner-container,
.split > .wp-block-group__inner-container,
.cols-3 > .wp-block-group__inner-container,
.project-grid > .wp-block-group__inner-container,
.team-grid > .wp-block-group__inner-container,
.hero-actions > .wp-block-group__inner-container,
.contact-actions > .wp-block-group__inner-container {
	display: contents;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.split, .hero-inner { grid-template-columns: 1fr; gap: 36px; }
	.split-reverse .split-media { order: 0; }
	.cols-3, .project-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
	.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-2); }
	.site-nav.open { display: block; }
	.site-nav .menu { flex-direction: column; align-items: stretch; padding: 12px 24px 20px; gap: 4px; }
	.site-nav .menu > li { height: auto; display: block; }
	.site-nav .menu .sub-menu { position: static; display: block; box-shadow: none; padding: 0 0 4px 18px; }
	.site-nav .menu .sub-menu a { white-space: normal; }
	.nav-toggle { display: block; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	.cols-3, .project-grid, .team-grid { grid-template-columns: 1fr; }
	.hero { padding: 60px 0; }
	h1 { font-size: 2.1rem; }
	.footer-grid { grid-template-columns: 1fr; }
}