#primary.front-page {
	padding: 0;
}

/* 배너만 .container 밖으로 나가 화면 전체를 쓰므로, 본문에는 좌우 여백을 따로 준다 */
.front-page > .container {
	padding: 0 2rem;
}

/* 미사시간과 본당 일정을 나란히 둔다. 원본 사이트도 같은 배치였다. */
.hero-section {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 1.25rem;
	margin-bottom: 3.5rem;
}

.hero-section .time-table {
	flex: 1 1 30rem;
	min-width: 0;
	margin-bottom: 0;
}

.home-calendar {
	flex: 1 1 20rem;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 1.5rem 1.25rem;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	background: #fafafa;
}

.home-calendar-title {
	margin: 0 0 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #111;
	font-size: 1.1rem;
	font-weight: 700;
	color: #111;
}

.home-calendar-frame {
	flex: 1 1 auto;
	overflow: hidden;
	min-height: 22rem;
	border: 1px solid #e8e8e4;
	border-radius: 8px;
	background: #fff;
}

.home-calendar-frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 22rem;
	border: 0;
}

/* ---------------------------- 미사시간 안내 ---------------------------- */
.time-table {
	margin-bottom: 2.5rem;
}

.timeline-block {
	height: 100%;
	padding: 1.5rem 1.25rem;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	background: #fafafa;
}

.timeline-block > h2 {
	margin: 0 0 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #111;
	font-size: 1.1rem;
	font-weight: 700;
}

.mass-schedule {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 1.5rem 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* 미사 시간표는 항목이 많아 두 칸을 차지 */
.mass-schedule > li:nth-child(-n + 2) {
	grid-row: span 2;
}

.mass-schedule h3 {
	margin: 0 0 0.5rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: #111;
}

.mass-schedule h3::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 12px;
	margin-right: 0.5rem;
	border-radius: 2px;
	background: #111;
	vertical-align: -1px;
}

.mass-schedule p {
	display: flex;
	gap: 0.6rem;
	margin: 0 0 0.4rem;
	font-size: 0.85rem;
	line-height: 1.55;
	color: #444;
}

.mass-schedule p:last-child {
	margin-bottom: 0;
}

.mass-schedule > li > p {
	padding-left: 0.9rem;
	color: #555;
}

.days-tx {
	flex: 0 0 3.5em;
	font-weight: 600;
	color: #111;
}

@media (max-width: 640px) {
	.mass-schedule {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.mass-schedule > li:nth-child(-n + 2) {
		grid-row: auto;
	}
}

.home-banner {
	margin-bottom: 2rem;
}

.home-banner-swiper {
	width: 100%;
	/* 높이를 예전(16/6)의 70% 로 낮췄다 — 6 × 0.7 = 4.2 */
	aspect-ratio: 16 / 4.2;
	overflow: hidden;
}

@media (max-width: 640px) {
	.home-banner-swiper {
		/* 좁은 화면도 같은 비율로 — 9 × 0.7 = 6.3 */
		aspect-ratio: 16 / 6.3;
	}
}

.home-banner-swiper .swiper-slide {
	position: relative;
}

.home-banner-swiper .swiper-slide a {
	display: block;
	width: 100%;
	height: 100%;
}

.home-banner-swiper img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.home-banner-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 1.5rem 2rem;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
	color: #fff;
}

.home-banner-caption h2 {
	margin: 0 0 0.25rem;
	font-size: 1.4rem;
	color: #fff;
	border: none;
}

.home-banner-caption p {
	margin: 0;
	font-size: 0.95rem;
	opacity: 0.9;
}

.home-banner-swiper .swiper-button-prev,
.home-banner-swiper .swiper-button-next {
	color: #fff;
}

/* 좁은 화면에서는 넘김 표가 사진을 많이 가린다. Swiper 는 이 변수로 크기를
   정하므로 값만 줄이면 화살표와 눌리는 자리가 함께 작아진다. */
@media (max-width: 640px) {
	.home-banner-swiper {
		--swiper-navigation-size: 22px;
	}

	.home-banner-swiper .swiper-button-prev,
	.home-banner-swiper .swiper-button-next {
		width: 30px;
		height: 30px;
	}

	.home-banner-swiper .swiper-button-prev {
		left: 4px;
	}

	.home-banner-swiper .swiper-button-next {
		right: 4px;
	}
}

.home-banner-swiper .swiper-pagination-bullet-active {
	background: #fff;
}

.hero {
	text-align: center;
	padding: 2rem 0 3rem;
}

.hero h1 {
	margin: 0 0 0.5rem;
	font-size: 2rem;
}

.hero p {
	margin: 0;
	color: #555;
}

/* ------------------------------ 홈 섹션 ------------------------------ */
.home-section {
	margin-bottom: 3.5rem;
}

.home-section:last-child {
	margin-bottom: 0;
}

.home-board-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
	padding-bottom: 0.7rem;
	border-bottom: 2px solid #111;
}

.home-board-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	color: #111;
	letter-spacing: -0.01em;
}

.home-board-more {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	flex-shrink: 0;
	font-size: 0.82rem;
	color: #888;
	text-decoration: none;
	transition: color 0.15s ease;
}

.home-board-more:hover {
	color: #111;
}

.home-board-more svg {
	transition: transform 0.15s ease;
}

.home-board-more:hover svg {
	transform: translateX(2px);
}

/* ------------------------------ 본당 소식 ------------------------------ */
/* 공지사항 · 본당 주보 · 사제 게시판을 나란히 둔다. */
/* 게시판 4개를 탭으로 넘겨 본다 */
.home-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid #111;
}

.home-tab {
	position: relative;
	bottom: -2px;
	padding: 0.7rem 1.35rem;
	border: 2px solid transparent;
	border-bottom: 0;
	border-radius: 10px 10px 0 0;
	background: none;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	color: #888;
	cursor: pointer;
}

.home-tab:hover {
	color: #111;
}

.home-tab.is-active {
	border-color: #111;
	background: #fff;
	color: #111;
	font-weight: 700;
}

.home-panel {
	min-width: 0;
}

.home-panel-more {
	margin: 1.25rem 0 0;
	text-align: right;
}

/* 탭 하나가 폭을 다 쓰므로 두 칸으로 나눠 담는다 */
.home-board-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 2.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-board-list li {
	border-top: 1px solid #f0f0ec;
}

.home-board-list li:nth-child(-n + 2) {
	border-top: 0;
}

.home-board-list a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 0;
	color: #333;
	text-decoration: none;
	transition: color 0.15s ease;
}

.home-board-list a:hover {
	color: #111;
}

.home-board-post-title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	/* 제목이 길어도 한 줄로 잘라 목록 높이를 고르게 둔다 */
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.home-board-list a:hover .home-board-post-title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.home-board-date {
	flex-shrink: 0;
	font-size: 0.78rem;
	color: #aaa;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.home-board-empty {
	margin: 0;
	padding: 1.25rem 0;
	font-size: 0.88rem;
	color: #999;
}

/* ------------------------------ 포토앨범 ------------------------------ */
/* 사진이 있는 글이 있을 때만 격자로, 없으면 아래 목록형으로 그린다. */
.home-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1.25rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * 제목에 white-space: nowrap 이 걸려 있어, 이것이 없으면 긴 제목이 열을
 * 밀어내 칸 너비가 서로 달라진다(129px 대 176px 로 어긋났다).
 */
.home-gallery-grid > li {
	min-width: 0;
}

.home-gallery-grid a {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	color: inherit;
	text-decoration: none;
}

.home-gallery-thumb {
	display: block;
	aspect-ratio: 4 / 3;
	border: 1px solid #e8e8e4;
	border-radius: 10px;
	background: #f4f4f1 center / cover no-repeat;
	transition: border-color 0.15s ease;
}

.home-gallery-grid a:hover .home-gallery-thumb {
	border-color: #111;
}

.home-gallery-caption {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.home-gallery-title {
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.45;
	color: #111;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 사진이 아직 없을 때 — 빈 썸네일 대신 제목 목록으로 */
.home-gallery-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-gallery-list li {
	border-top: 1px solid #f0f0ec;
}

.home-gallery-list li:nth-child(-n + 3) {
	border-top: 0;
}

.home-gallery-list a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 0;
	color: #333;
	text-decoration: none;
}

.home-gallery-list .home-gallery-title {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 400;
	font-size: 0.9rem;
	color: #333;
}

.home-gallery-list a:hover .home-gallery-title {
	color: #111;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.home-gallery-list .home-gallery-caption {
	flex: 1 1 auto;
	flex-direction: row;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	min-width: 0;
}

/* ------------------------------ 반응형 ------------------------------ */
@media (max-width: 780px) {
	.home-board-list {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.home-board-list li:nth-child(-n + 2) {
		border-top: 1px solid #f0f0ec;
	}

	.home-board-list li:first-child {
		border-top: 0;
	}

	/* 탭이 많아 줄바꿈되면 가로로 넘겨 본다 */
	.home-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

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

	.home-tab {
		flex-shrink: 0;
		padding: 0.6rem 1rem;
		font-size: 0.9rem;
	}
}

@media (max-width: 900px) {

	.home-gallery-list {
		grid-template-columns: repeat(2, 1fr);
	}

	.home-gallery-list li:nth-child(-n + 3) {
		border-top: 1px solid #f0f0ec;
	}

	.home-gallery-list li:nth-child(-n + 2) {
		border-top: 0;
	}
}

@media (max-width: 640px) {
	.home-section {
		margin-bottom: 2.5rem;
	}

	.home-gallery-list {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.home-gallery-list {
		gap: 0;
	}

	.home-gallery-list li:nth-child(-n + 3),
	.home-gallery-list li:nth-child(-n + 2) {
		border-top: 1px solid #f0f0ec;
	}

	.home-gallery-list li:first-child {
		border-top: 0;
	}

	.home-gallery-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
