/*
 * Mary H. Weir Public Library — homepage (templates/front-page.html)
 * Loaded on the front page only. Ported from the prototype's index.html.
 * Brand tokens (--river-navy, --radius-solid, …) come from mhw-theme.css.
 */

/* --- Scoped reset: the prototype zeroed every margin; WordPress doesn't.
       Kept first so the component rules below win at equal weight. --- */
.mhw-home, .mhw-home * { box-sizing: border-box; }
.mhw-home :where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; padding: 0; }
main.mhw-home > * { margin-block-start: 0; }

/* .mhw-sr-only lives in mhw-theme.css (used site-wide). */

/* ============================================================
   Hero
   ============================================================ */
.hero-section {
	background: var(--white);
	padding: 30px 0 80px 0;
	border-bottom: 1px solid var(--slag-gray);
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 44px; }

.hero-banner { margin: 0 0 22px 0; }
.hero-banner img { display: block; width: 100%; height: auto; border-radius: var(--radius-solid); }
@media (min-width: 768px) {
	.hero-banner img { height: 300px; object-fit: cover; object-position: center 35%; }
}

.tagline {
	display: block;
	font-family: var(--font-heading); font-style: italic; font-weight: 600; font-size: 20px;
	color: var(--burnished-dark);
	margin-bottom: 8px;
}
.welcome-title {
	font-family: var(--font-heading); font-size: 44px; font-weight: 700; line-height: 1.2;
	color: var(--river-navy);
	margin-bottom: 20px;
}
.welcome-text { color: var(--text-muted); margin-bottom: 36px; max-width: 640px; }

/* Catalog search box: styles live in mhw-theme.css (also used on Books & More). */

/* --- Hours + Visit Us --- */
.info-panel { display: flex; flex-wrap: wrap; gap: 24px; }
.panel-section {
	flex: 1 1 300px;
	background-color: var(--white);
	border: 1px solid var(--slag-gray);
	border-radius: var(--radius-solid);
	box-shadow: var(--shadow-subtle);
	padding: 24px 28px;
}
.panel-section h2 {
	font-family: var(--font-heading); font-size: 20px; line-height: 1.6;
	color: var(--river-navy);
	margin-bottom: 12px;
}
.hours-list { list-style: none; font-size: 16px; }
.hours-list li { display: flex; gap: 20px; margin-bottom: 6px; }
.hours-list li strong { flex: 0 0 128px; }
.hours-list li.is-closed { color: var(--text-muted); }
.hours-notice {
	font-size: 15px; font-weight: 600; line-height: 1.5;
	color: var(--mill-forest);
	background: rgba(27, 67, 50, 0.07);
	border-left: 3px solid var(--mill-forest);
	padding: 8px 12px; margin: 10px 0 0;
}
.panel-more { font-size: 14px; margin: 12px 0 0; }
.panel-more a { color: var(--river-navy); font-weight: 700; text-decoration: none; }
.panel-more a:hover { color: var(--burnished-dark); text-decoration: underline; }
.address-text { font-size: 16px; color: var(--text-muted); margin-bottom: 12px; }
.action-links a {
	display: inline-flex; align-items: center; gap: 6px;
	margin-right: 16px;
	font-size: 15px; font-weight: 700;
	color: var(--mill-forest); text-decoration: none;
}
.action-links a:hover { text-decoration: underline; color: var(--burnished-dark); }

@media (max-width: 992px) {
	.hero-grid { gap: 40px; }
	.welcome-title { font-size: 36px; }
}
@media (max-width: 560px) {
	/* Let the headline wrap naturally on phones instead of at the fixed line break. */
	.welcome-title br { display: none; }
	.info-panel { flex-direction: column; }
	.panel-section { flex: none; }
	.hours-list li { justify-content: space-between; }
	.hours-list li strong { flex: 0 0 auto; }
}

/* ============================================================
   "How can we help you today?" action cards
   ============================================================ */
.action-grid-section { max-width: 1200px; margin: 0 auto; padding: 40px 24px 12px 24px; }
.action-grid-title {
	font-family: var(--font-heading); font-size: 24px; font-weight: 800; line-height: 1.6;
	color: var(--river-navy);
	margin-bottom: 24px; padding-bottom: 8px;
	border-bottom: 2px solid var(--slag-gray);
}
.action-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.action-card {
	display: flex; flex-direction: column; gap: 8px;
	background: var(--white);
	border: 1px solid var(--slag-gray);
	border-radius: var(--radius-solid);
	padding: 24px;
	box-shadow: var(--shadow-subtle);
	text-decoration: none; color: inherit;
	transition: transform 0.2s ease, border-color 0.2s ease;
}
.action-card:hover { transform: translateY(-2px); border-color: var(--river-navy); color: inherit; }
.action-card h3 {
	display: flex; align-items: center; gap: 8px;
	font-family: var(--font-heading); font-size: 18px; font-weight: 700; line-height: 1.6;
	color: var(--river-navy);
}
.action-card h3 svg { flex: none; color: var(--mill-forest); }
.action-card p { font-size: 14px; color: var(--text-muted); line-height: 1.4; }
@media (min-width: 600px) { .action-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .action-grid { grid-template-columns: repeat(4, 1fr); } }

/* ============================================================
   News & Announcements + Upcoming Events
   ============================================================ */
.dynamic-feed-section {
	display: grid; grid-template-columns: 1fr; gap: 36px; align-items: start;
	max-width: 1200px; margin: 0 auto;
	padding: 48px 24px 12px 24px;
}
.feed-heading {
	font-family: var(--font-heading); font-size: 24px; font-weight: 800; line-height: 1.6;
	color: var(--river-navy);
	padding-bottom: 8px;
	border-bottom: 2px solid var(--mill-forest);
}
.news-column { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.announcement-card {
	background: var(--white);
	border: 1px solid var(--slag-gray);
	border-radius: var(--radius-solid);
	padding: 24px;
	box-shadow: var(--shadow-subtle);
}
.announcement-card .card-meta {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
	font-size: 12px; line-height: 1.6; margin: 0;
}
.card-tag-primary, .card-tag-secondary { font-size: 12px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.card-tag-primary { color: var(--mill-forest); }
.card-tag-secondary { color: var(--burnished-dark); }
.announcement-card .card-meta time { color: var(--text-muted); }
.announcement-card h3 {
	font-family: var(--font-heading); font-size: 20px; font-weight: 700; line-height: 1.6;
	color: var(--river-navy);
	margin: 8px 0 12px 0;
}
.announcement-card p { font-size: 15px; color: var(--text-muted); line-height: 1.5; margin: 0 0 16px 0; }
.announcement-card .card-link {
	display: inline-flex; align-items: center; gap: 4px;
	color: var(--river-navy); font-weight: 700; font-size: 14px; text-decoration: none;
}
.announcement-card .card-link:hover { color: var(--burnished-dark); text-decoration: underline; }

.feed-empty { font-size: 15px; color: var(--text-muted); }
.feed-more { font-size: 14px; text-align: right; }
.feed-more a { color: var(--river-navy); font-weight: 700; text-decoration: none; }
.feed-more a:hover { color: var(--burnished-dark); text-decoration: underline; }

.calendar-column {
	display: flex; flex-direction: column; min-width: 0;
	background: var(--white);
	border: 1px solid var(--slag-gray);
	border-radius: var(--radius-solid);
	padding: 16px;
	box-shadow: var(--shadow-subtle);
}
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 0 8px; }
.calendar-title { font-family: var(--font-heading); font-size: 18px; font-weight: 700; line-height: 1.6; color: var(--river-navy); }
.calendar-embed { display: block; width: 100%; height: 360px; border: 0; }

/* Native event list (ported from the prototype) */
.event-list { list-style: none; margin: 0; padding: 0; }
.event-item {
	display: flex; gap: 14px; align-items: flex-start;
	padding: 14px 8px; border-bottom: 1px solid var(--slag-gray);
}
.event-item:last-child { border-bottom: 0; }
.event-date {
	flex: none; width: 52px; padding: 8px 0;
	text-align: center; line-height: 1;
	background: var(--river-navy); color: var(--white);
	border-radius: var(--radius-solid);
}
.event-date .m { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.event-date .d { display: block; font-family: var(--font-heading); font-size: 20px; font-weight: 700; margin-top: 3px; }
.event-info { min-width: 0; }
.event-info h3 {
	font-family: var(--font-heading); font-size: 16px; font-weight: 700; line-height: 1.4;
	color: var(--river-navy);
	margin: 2px 0;
}
.event-info h3 a { color: inherit; text-decoration: none; }
.event-info h3 a:hover { color: var(--burnished-dark); text-decoration: underline; }
.event-info .meta { font-size: 13px; line-height: 1.5; color: var(--text-muted); margin: 0; }
.event-empty { padding: 8px 8px 4px; }
.staff-note { font-size: 13px; padding: 0 8px 12px; }
.calendar-more { margin-top: 12px; text-align: right; }
.calendar-more a { color: var(--river-navy); font-weight: 700; font-size: 14px; text-decoration: none; }
.calendar-more a:hover { color: var(--burnished-dark); text-decoration: underline; }

@media (min-width: 768px) {
	.dynamic-feed-section { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
	/* Lines the events panel up with the first news card, below the heading. */
	.calendar-column { margin-top: 72px; }
}

/* ============================================================
   Digital Resources (rotating Resource cards)
   ============================================================ */
.digital-resources { padding: 48px 24px 60px 24px; }
.section-title {
	font-family: var(--font-heading); font-size: 24px; font-weight: 800; line-height: 1.6;
	color: var(--river-navy);
	margin: 0 0 8px 0; padding-bottom: 8px;
	border-bottom: 2px solid var(--slag-gray);
}
.section-lede { color: var(--text-muted); margin-bottom: 32px; max-width: 600px; }
/* .resource-grid / .resource-card live in mhw-theme.css (also used on content pages). */
.digital-resources .feed-more { margin-top: 20px; }

/* ---------- New on our shelves ([mhw_home_new_arrivals]) ---------- */
.home-new-arrivals { padding: 40px 24px 8px; box-sizing: border-box; }
.home-new-arrivals .mhw-shelf { margin: 0; }
.home-new-arrivals .mhw-shelf-head { align-items: center; }
.home-new-arrivals .mhw-shelf-head .section-title { margin: 0; padding: 0; border: 0; }
.home-new-arrivals .feed-more { margin: 4px 0 0; }
