/* ==========================================================================
   KofC site chrome — consolidated stylesheet
   Replaces, for the root-level pages: reset.css + general.css + header.css
   + footer.css and the shared (nav / hero / footer / top-button) parts of
   index.css. Page-specific stylesheets are loaded after this one.
   ========================================================================== */

/* --- Design tokens -------------------------------------------------------- */
:root {
	--lgrey:      #CCCCCC;
	--lgrey60:    #CCCCCC99;
	--grey:       #4D4D4D;
	--grey60:     #4D4D4D99;
	--grey70:     #4D4D4DB3;
	--grey80:     #4D4D4DCC;
	--grey90:     #4D4D4DE6;
	--green:      #25D366;
	--green-hover:#1EBE5D;
	--white:      #FAFAED;
	--white60:    #FAFAED99;
	--white80:    #FAFAEDCC;
	--white90:    #FAFAEDE6;
	--black:      #24221F;
	--black80:    #24221FCC;
	--black90:    #24221FE6;
	--dbrown:     #290102;
	--dbrown70:   #290102B3;
	--dbrown80:   #290102CC;
	--red:        #8F0D1E;
	--dyellow:    #C49943;
	--yellow:     #E3C884;
	--blue:       #314870;
	--blue-hover: #152a4d;
	--blue60:     #31487099;
	--blue80:     #314870CC;
	--blue90:     #314870E6;

	--shadow:    0 10px 25px -5px rgba(0, 0, 0, .05), 0 8px 10px -6px rgba(0, 0, 0, .05);
	--transition: all .3s ease;
	--nav-height: 72px;
}

/* --- Reset (modern, minimal) --------------------------------------------- */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background-color: var(--white);
	color: var(--black);
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

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

ul { list-style: none; }

a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }

button { font: inherit; }

h1, h2, h3, h4 { line-height: 1.25; }

.bold { font-weight: 700; }
.font-blue { color: var(--blue) !important; }

.material-symbols-outlined {
	font-family: 'Material Symbols Outlined';
	font-weight: normal;
	font-style: normal;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	display: inline-block;
	white-space: nowrap;
	word-wrap: normal;
	direction: ltr;
	-webkit-font-feature-settings: 'liga';
	-webkit-font-smoothing: antialiased;
}

/* Visually hidden but available to screen readers */
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: 2000;
	padding: .6rem 1rem;
	background: var(--blue);
	color: var(--white);
	border-radius: 4px;
}
.skip-link:focus { top: .5rem; }

/* --- Navigation ---------------------------------------------------------- */
.navbar {
	position: fixed;
	top: 0;
	width: 100%;
	min-height: var(--nav-height);
	background-color: var(--blue90);
	backdrop-filter: blur(5px);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1.2rem 8%;
	box-shadow: 0 2px 15px rgba(0, 0, 0, .05);
	z-index: 1000;
}

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--white);
}

.img-logo { width: 2.5rem; }

.nav-links {
	display: flex;
	gap: 2rem;
}

.nav-links a {
	color: var(--white);
	font-weight: 500;
	transition: var(--transition);
}
.nav-links a:hover { color: var(--yellow); }

.nav-active { color: var(--yellow) !important; }

.hamburger {
	display: none;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 8px;
}

.bar {
	display: block;
	width: 35px;
	height: 5px;
	margin: 8px auto;
	border-radius: 10px;
	background-color: var(--white);
	transition: all .3s ease-in-out;
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
	padding: calc(var(--nav-height) + 108px) 8% 100px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
}

.hero h1 {
	font-size: clamp(2rem, 5vw, 3.5rem);
	color: var(--black);
}

.hero-content { max-width: 900px; }
.hero-content p { color: var(--grey); font-size: 1.4rem; margin-top: 1rem; }

.bkg-gradient { background: linear-gradient(135deg, var(--white) 0%, var(--lgrey) 100%); }
.bkg-white    { background: var(--white); }
.bkg-grey     { background: var(--lgrey60); }

/* Page-title heroes (home / news / calendar / join us) all use the shared
   .hero + .bkg-gradient grey gradient, exactly as in KofC-dev. The legacy tree
   carries unused photo rules (.calendar-title/.join-title/.news-title) that its
   markup never applies, so no photo backdrop is used here either. */

/* --- Scroll reveal (only when JS is on) ---------------------------------- */
.js .reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .8s ease-out, transform .8s ease-out;
}
.js .reveal.visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Footer -------------------------------------------------------------- */
#footer {
	background-color: var(--black);
	color: var(--white);
	padding: 70px 8% 20px;
	margin-top: auto;
}

.footer-grid {
	display: grid;
	grid-template-columns: 27% 40% 25%;
	gap: 40px;
	margin-bottom: 50px;
}

.footer-col h4 {
	font-size: 1.2rem;
	margin-bottom: 20px;
	position: relative;
	text-align: left;
}
.footer-col h4::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 0;
	width: 30px;
	height: 3px;
	background-color: var(--yellow);
}

.footer-col li {
	color: var(--yellow);
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0;
}
.footer-col li a { color: var(--yellow); }
.footer-col li a:hover { color: var(--white); }
.footer-col li .material-symbols-outlined { color: var(--yellow); font-size: 1.35rem; }

.footer-vivat { font-weight: 800; font-size: 1.3rem; }

.footer-qr .material-symbols-outlined {
	font-size: 3.2rem;
	color: var(--yellow);
	transition: var(--transition);
}
.footer-qr:hover .material-symbols-outlined { color: var(--white); }

.footer-bottom {
	text-align: center;
	padding-top: 25px;
	border-top: 1px solid var(--yellow);
	color: var(--yellow);
	font-size: .85rem;
}

/* --- Floating actions ----------------------------------------------------
   #topBtn and .joinus-float share the right edge and are stacked vertically so
   they can never overlap once the top button appears on scroll. */
#topBtn {
	display: none;
	position: fixed;
	bottom: calc(30px + 60px + 14px); /* clears the 60px Join Us button below it */
	right: 30px;
	z-index: 999;
	width: 60px;
	height: 60px;
	border: none;
	padding: 0;
	border-radius: 50%; /* width === height, so this is a true circle */
	background-color: var(--blue);
	opacity: .35;
	cursor: pointer;
	transition: opacity .2s ease-out, transform .1s ease-out;
}
/* js/kofc-nav.js toggles this class instead of writing an inline display, so
   the centring below is never overridden. */
#topBtn.top-btn--visible {
	display: grid;
	place-items: center;
}
#topBtn .material-symbols-outlined {
	color: var(--white);
	font-size: 50px;
	line-height: 1;
}
#topBtn:hover { opacity: 1; }
#topBtn:active { transform: scale(.98); }

/* KofC-dev carry-over: the chevron bobs a few pixels up and down while the
   button is hovered (legacy `#topBtn i:hover { animation: toTop ... }`). */
#topBtn:hover .material-symbols-outlined,
#topBtn:focus-visible .material-symbols-outlined {
	animation: toTop 1s infinite ease;
}
@keyframes toTop {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-3px); }
}
/* Placed after the hover rule on purpose: equal specificity means the later
   declaration must win for reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
	#topBtn:hover .material-symbols-outlined,
	#topBtn:focus-visible .material-symbols-outlined { animation: none; }
}

.joinus-float {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--yellow);
	color: var(--black);
	border-radius: 50px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, .2);
	z-index: 998;
	transition: var(--transition);
}
.joinus-float .material-symbols-outlined { font-size: 32px; }
.joinus-float:hover {
	background-color: var(--dyellow);
	color: var(--white);
	transform: scale(1.1) translateY(-5px);
	box-shadow: 0 8px 25px rgba(227, 200, 132, .5);
}

/* --- Layout helper ------------------------------------------------------- */
main { 
	flex: 1 0 auto;
	margin-top: 70px;
}

.container {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 1rem;
}

/* --- Integration: events calendar inside the KofC chrome ----------------- */
.calendar-shell {
	padding: 2rem 8% 3rem;
	background: var(--white);
}

.calendar-shell .filter-controls { margin-bottom: 1.5rem; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1080px) {
	.navbar { padding: 1rem 5%; }

	.nav-links {
		display: none;
		position: absolute;
		top: -100vh;
		left: 0;
		width: 100%;
		height: calc(100vh - var(--nav-height));
		background-color: var(--blue90);
		font-size: 2rem;
		padding: 2rem;
		border-top: 5px solid var(--yellow);
		flex-direction: column;
	}
	.nav-links li { padding-bottom: 45px; }

	.nav-links.nav-open {
		display: flex;
		top: var(--nav-height);
	}

	.hamburger { display: block; }
	.hamburger.ham-active .bar:nth-child(2) { opacity: 0; }
	.hamburger.ham-active .bar:nth-child(1) { transform: translateY(13px) rotate(45deg); }
	.hamburger.ham-active .bar:nth-child(3) { transform: translateY(-13px) rotate(-45deg); }

	.hero {
		flex-direction: column;
		text-align: center;
		padding-top: calc(var(--nav-height) + 90px);
	}

	.calendar-shell { padding: 1.5rem 5% 2rem; }

	#topBtn {
		width: 50px;
		height: 50px;
		bottom: calc(20px + 50px + 12px); /* above the 50px Join Us button */
		right: 20px;
	}
	#topBtn .material-symbols-outlined { font-size: 30px; }
	.joinus-float { width: 50px; height: 50px; bottom: 20px; right: 20px; }
	.joinus-float .material-symbols-outlined { font-size: 26px; }
}

@media (max-width: 700px) {
	.calendar-shell .events-list { column-count: 1; }
}
