:root {
	--red: #b5121b;
	--text: #222;
	--muted: #666;
	--line: #e3e3e3;
	--serif: Georgia, "Times New Roman", serif;
	--sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: #fff;
	color: var(--text);
	font: 17px/1.6 var(--sans);
}

.container {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 1.25rem;
}

a { color: var(--red); }
a:hover { text-decoration: none; }

/* Header */
.site-header { border-top: 8px solid var(--red); }

.header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.brand {
	display: flex;
	align-items: center;
	gap: 1rem;
	color: var(--text);
	text-decoration: none;
}
.brand img { height: 67px; width: auto; }
.brand-name {
	font: 1.5rem/1.2 var(--serif);
	letter-spacing: .02em;
}

.header-link {
	color: var(--text);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .85rem;
}
.header-link:hover, .header-link.active { color: var(--red); }

/* Main navigation */
.main-nav {
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.main-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.75rem;
	list-style: none;
	margin: 0 auto;
}
.main-nav a {
	display: block;
	padding: .8rem 0;
	color: var(--text);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .85rem;
	border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--red); }
.main-nav a.active { color: var(--red); border-bottom-color: var(--red); }

/* Content */
.content {
	padding-top: 2.5rem;
	padding-bottom: 3rem;
}
.page { max-width: 760px; }
h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: normal;
	line-height: 1.25;
}
h1 { font-size: 2.2rem; margin: 0 0 1.5rem; }
h2 { font-size: 1.6rem; margin-top: 2.5rem; }
h3 { font-size: 1.25rem; margin-top: 2rem; }
img { max-width: 100%; height: auto; }
figure { margin: 1.5rem 0; }
figcaption { color: var(--muted); font-size: .9rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th, td { text-align: left; padding: .4rem .75rem .4rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Embedded videos and maps (iframes in page content) */
.video, .map { margin: 1.5rem 0; }
.video iframe, .map iframe { display: block; width: 100%; border: 0; }
.video iframe { aspect-ratio: 16 / 9; height: auto; }
.map iframe { height: 380px; }
.calendar { margin: 1.5rem 0; }
.calendar iframe { display: block; width: 100%; height: 600px; border: 0; }

/* Footer */
.site-footer {
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: .9rem;
}
.footer-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 1.25rem;
	padding-bottom: 1.25rem;
}
.footer-links { display: flex; align-items: center; gap: 1.25rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--red); }
.footer-links .icon { display: inline-flex; }

@media (max-width: 600px) {
	.brand-name { font-size: 1.15rem; }
	.brand img { height: 48px; }
	.main-nav ul { gap: 0 1.1rem; }
}

/* Photo albums: list on "Fotos" */
.albums {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 2rem 1.5rem;
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
}
.albums a { display: block; color: var(--text); text-decoration: none; }
.albums img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.albums a:hover .album-title { color: var(--red); }
.album-title { display: block; margin-top: .6rem; font: 1.15rem/1.3 var(--serif); }
.album-desc { display: block; color: var(--muted); font-size: .9rem; }

/* Photo albums: image grid on an album page (works for whatever markup the editor produces) */
.back { margin: 0 0 .5rem; font-size: .9rem; }
.back a { text-decoration: none; }
.lead { color: var(--muted); margin-top: -.75rem; }
.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: .5rem;
	margin-top: 2rem;
}
.gallery p, .gallery figure, .gallery a { display: contents; }
.gallery br { display: none; }
.gallery img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	cursor: zoom-in;
}
.gallery img:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* Lightbox */
.lightbox {
	border: 0;
	padding: 0;
	background: transparent;
	max-width: 100vw;
	max-height: 100vh;
	overflow: visible;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox figure { margin: 0; }
.lightbox img { display: block; max-width: 90vw; max-height: 82vh; width: auto; height: auto; }
.lightbox figcaption { color: #eee; text-align: center; padding: .6rem 0 0; font-size: .95rem; }
.lightbox button {
	position: fixed;
	background: none;
	border: 0;
	color: #fff;
	font-size: 3rem;
	line-height: 1;
	padding: .5rem 1rem;
	cursor: pointer;
	opacity: .8;
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lightbox-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: .5rem; top: 50%; transform: translateY(-50%); }
.lightbox-close { right: .5rem; top: .5rem; }
