/* ==========================================================================
   Chillacticos FC — homepage (index.php)
   The homepage doesn't load Bootstrap/Porto, so a minimal base is set here.
   ========================================================================== */

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

body { margin: 0; line-height: 1.55; }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, figure { margin: 0; }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 22px;
	border: 2px solid transparent;
	font: 600 .95rem/1 var(--cfc-font);
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s;
}

.home-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px;
}

@media (min-width: 768px) {
	.home-wrap { padding: 0 32px; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.home-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: min(78vh, 720px);
	padding: 120px 0 48px;
	background: var(--cfc-ink);
	color: #fff;
	overflow: hidden;
}

.home-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
}

.home-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(20, 19, 23, .15) 0%, rgba(20, 19, 23, .55) 45%, rgba(20, 19, 23, .95) 100%);
}

.home-hero__content { position: relative; z-index: 1; width: 100%; }

.home-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	font-size: .8rem;
	font-weight: 600;
}

.home-chip i { color: var(--cfc-pink); }

html body .home-hero__title {
	color: #fff;
	font-family: var(--cfc-font-display);
	font-size: clamp(3.2rem, 13vw, 7.5rem);
	font-weight: 800;
	line-height: .9;
	letter-spacing: .01em;
	text-transform: uppercase;
}

.home-hero__title .home-hero__accent { color: var(--cfc-pink); }

.home-hero__lead {
	max-width: 34ch;
	margin-top: 14px;
	color: rgba(255, 255, 255, .85);
	font-size: clamp(1.05rem, 2.6vw, 1.3rem);
}

.home-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}

html body .home-btn-ghost {
	border-color: rgba(255, 255, 255, .5) !important;
	background: transparent !important;
	color: #fff !important;
}

html body .home-btn-ghost:hover { border-color: #fff !important; background: rgba(255, 255, 255, .1) !important; }

@media (max-width: 479.98px) {
	.home-hero { min-height: 82vh; padding-bottom: 32px; }
	.home-actions .btn { flex: 1 1 100%; min-height: 50px; }
}

/* --------------------------------------------------------------------------
   Facts strip
   -------------------------------------------------------------------------- */
.home-facts { background: var(--cfc-pink); color: var(--cfc-ink); }

.home-facts__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

.home-fact {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 18px 8px;
	text-align: center;
}

.home-fact + .home-fact { border-left: 1px solid rgba(20, 19, 23, .14); }

.home-fact strong {
	font-family: var(--cfc-font-display);
	font-size: clamp(1.8rem, 6vw, 2.6rem);
	font-weight: 800;
	line-height: 1;
}

.home-fact span {
	margin-top: 4px;
	font-size: clamp(.72rem, 2.4vw, .9rem);
	font-weight: 500;
	line-height: 1.25;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.home-section { padding: 56px 0; }
.home-section--tight { padding: 32px 0 8px; }
.home-section--alt { background: var(--cfc-surface); }

@media (min-width: 768px) {
	.home-section { padding: 80px 0; }
}

.home-eyebrow {
	margin-bottom: 6px;
	color: var(--cfc-pink-deep);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

html body .home-heading {
	color: var(--cfc-ink);
	font-family: var(--cfc-font-display);
	font-size: clamp(1.9rem, 5vw, 2.8rem);
	font-weight: 700;
	line-height: 1.05;
	text-transform: uppercase;
}

.home-intro {
	max-width: 60ch;
	margin-top: 12px;
	color: var(--cfc-muted);
	font-size: 1.05rem;
}

/* Shortcuts (logged-in users) */
.home-shortcuts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
	margin-top: 16px;
}

.home-shortcut {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 96px;
	padding: 16px;
	border: 1px solid var(--cfc-line);
	border-radius: var(--cfc-radius);
	background: var(--cfc-surface);
	color: var(--cfc-ink) !important;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none !important;
	transition: border-color .15s, transform .15s;
}

.home-shortcut i { color: var(--cfc-pink-deep); font-size: 1.25rem; }
.home-shortcut:hover { border-color: var(--cfc-pink-strong); transform: translateY(-2px); }

/* Cards */
.home-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin-top: 32px;
}

.home-card {
	padding: 24px;
	border: 1px solid var(--cfc-line);
	border-radius: var(--cfc-radius);
	background: var(--cfc-surface);
	box-shadow: var(--cfc-shadow);
}

.home-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-bottom: 16px;
	border-radius: 12px;
	background: var(--cfc-pink-soft);
	color: var(--cfc-pink-deep);
	font-size: 1.25rem;
}

html body .home-card h3 {
	margin-bottom: 6px;
	font-size: 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
}

.home-card p { color: var(--cfc-muted); }

/* Charity band */
.home-band {
	padding: 48px 0;
	background: var(--cfc-pink);
	color: var(--cfc-ink);
}

.home-band__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

html body .home-band h2 {
	font-size: clamp(1.9rem, 5vw, 2.6rem);
	font-weight: 800;
	line-height: 1.05;
	text-transform: uppercase;
}

.home-band p { max-width: 56ch; margin-top: 8px; }

@media (max-width: 479.98px) {
	.home-band .btn { width: 100%; min-height: 50px; }
}

/* Gallery: swipeable strip on phones, grid on desktop */
.home-gallery {
	display: grid;
	grid-auto-columns: 82%;
	grid-auto-flow: column;
	gap: 12px;
	margin-top: 24px;
	padding: 0 16px 8px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 16px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.home-gallery::-webkit-scrollbar { display: none; }

.home-gallery__item {
	aspect-ratio: 4 / 3;
	border-radius: var(--cfc-radius);
	background: var(--cfc-line);
	overflow: hidden;
	scroll-snap-align: start;
}

.home-gallery__item img { width: 100%; height: 100%; object-fit: cover; }

/* Desktop: a packed grid. Photos can be normal (1x1), wide (2 columns) or tall (2 rows). */
@media (min-width: 768px) {
	.home-gallery {
		grid-auto-flow: row dense;
		grid-template-columns: repeat(3, 1fr);
		grid-auto-rows: 240px;
		max-width: 1180px;
		margin: 32px auto 0;
		padding: 0 32px;
		overflow: visible;
	}
	.home-gallery__item { aspect-ratio: auto; }
	.home-gallery__item--wide { grid-column: span 2; }
	.home-gallery__item--tall { grid-row: span 2; }
	.home-gallery__item--tall img { object-position: top; }
}

/* People */
.home-people {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	margin-top: 24px;
}

.home-person {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 20px;
	border: 1px solid var(--cfc-line);
	border-radius: var(--cfc-radius);
	background: var(--cfc-bg);
}

img.home-person__avatar--photo { object-fit: cover; }

.home-person__avatar {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--cfc-ink);
	color: var(--cfc-pink);
	font-family: var(--cfc-font-display);
	font-size: 1.3rem;
	font-weight: 700;
}

html body .home-person h3 { font-size: 1.4rem; font-weight: 700; text-transform: uppercase; }

.home-person__role {
	margin-bottom: 6px;
	color: var(--cfc-pink-deep);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.home-person p:last-child { color: var(--cfc-muted); }

/* Contact */
.home-contact {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 12px;
	margin-top: 24px;
}

.home-contact__item {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 72px;
	padding: 14px 18px;
	border: 1px solid var(--cfc-line);
	border-radius: var(--cfc-radius);
	background: var(--cfc-surface);
	color: var(--cfc-muted) !important;
	text-decoration: none !important;
	transition: border-color .15s;
}

.home-contact__item:hover { border-color: var(--cfc-pink-strong); }

.home-contact__item i {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--cfc-ink);
	color: var(--cfc-pink);
}

.home-contact__item span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.home-contact__item strong { color: var(--cfc-ink); font-size: 1rem; }

/* Footer */
.home-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

/* "Edit homepage" shortcut for site admins */
.home-edit-fab {
	position: fixed;
	right: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom));
	z-index: 1015;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--cfc-ink);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.home-edit-fab:hover { background: var(--cfc-ink-3); }

@media (max-width: 991.98px) {
	.home-edit-fab { bottom: calc(var(--cfc-tabbar-h) + 12px + env(safe-area-inset-bottom)); }
}
