/* ==========================================================================
   FOTO — News styles (News Center page + home "Latest News" on mobile).
   Kept in its own file so edits to main.css don't overwrite it.
   Loaded after main.css (see inc/news-style.php).
   ========================================================================== */

/* ---------- News Center page (/news/) ---------- */
body.blog .wrap.page-body { padding-top: 40px; padding-bottom: 64px; }

.ncard__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ncard__tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(242, 101, 34, .1); color: var(--orange); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.ncard--lead { grid-column: 1 / -1; }
.ncard--lead .ncard__img { position: relative; }
.ncard--lead .ncard__img img { position: absolute; inset: 0; }

.news-sec__label { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 18px 0 -4px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.news-sec__label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (min-width: 900px) {
	.news-grid .ncard--lead { flex-direction: row; min-height: 340px; }
	.news-grid .ncard--lead .ncard__img { flex: 0 0 50%; aspect-ratio: auto; min-height: 0; }
	.news-grid .ncard--lead .ncard__body { padding: 40px 44px; justify-content: center; gap: 12px; }
	.news-grid .ncard--lead .ncard__title { font-size: 28px; line-height: 1.25; }
	.news-grid .ncard--lead .ncard__text { font-size: 16px; line-height: 1.7; max-width: 520px; }
	.news-grid .ncard--lead .ncard__more { margin-top: 14px; padding: 11px 20px; border: 1px solid var(--orange); border-radius: 999px; align-self: flex-start; transition: background .2s, color .2s; }
	.news-grid .ncard--lead .ncard__more:hover { background: var(--orange); color: #fff; }
}

/* ---------- Home "Latest News" — horizontal slider ----------
   Desktop 3 per view, tablet 2, mobile 1 (+ peek of next). Native swipe via scroll-snap. */
.home-news .sec__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.nslider__ctrl { display: flex; align-items: center; gap: 10px; }
.nslider__ctrl .link { margin-right: 6px; }
.nslider__btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy); cursor: pointer; transition: background .2s, color .2s, border-color .2s, opacity .2s; }
.nslider__btn:hover:not(:disabled) { background: var(--orange); border-color: var(--orange); color: #fff; }
.nslider__btn:disabled { opacity: .35; cursor: default; }
.home-news.is-static .nslider__btn, .home-news.is-static .nslider__dots { display: none; }

.nslider { position: relative; }
.nslider__track {
	--gap: 24px; --per: 3;
	display: flex; gap: var(--gap);
	overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; /* no scroll-behavior: smooth here — the snap on page load then becomes a smooth scroll and Chrome stops measuring LCP (PageSpeed NO_LCP). Arrows/dots ask for smooth in news-slider.js instead. */
	-webkit-overflow-scrolling: touch; scrollbar-width: none;
	padding: 4px 2px 10px; margin: -4px -2px -10px;
}
.nslider__track::-webkit-scrollbar { display: none; }
.nslider__track:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: var(--radius-lg); }
.nslider__track.is-drag { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.nslider__track.is-drag a { pointer-events: none; }
.nslider__item { flex: 0 0 calc((100% - var(--gap) * (var(--per) - 1)) / var(--per)); min-width: 0; scroll-snap-align: start; }
.nslider__item .ncard__img { aspect-ratio: 16 / 10; }
.nslider__item .ncard__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nslider__item .ncard__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.nslider__dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.nslider__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: #c9d1dc; cursor: pointer; transition: width .25s, background .25s; }
.nslider__dots button.is-active { width: 24px; background: var(--orange); }

@media (max-width: 899px) { .nslider__track { --per: 2; --gap: 18px; } }
@media (max-width: 599px) {
	.nslider__track { --gap: 14px; }
	.nslider__item { flex-basis: 82%; }
	.nslider__btn { display: none; }
	.home-news .sec__head { margin-bottom: 18px; }
	.nslider__item .ncard__body { padding: 14px 16px 16px; gap: 6px; }
	.nslider__item .ncard__title { font-size: 16px; }
	.nslider__item .ncard__text { font-size: 13.5px; -webkit-line-clamp: 2; }
	.nslider__item.ncard:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .nslider__track { scroll-behavior: auto; } }
