/* FlesherNET global refinements (loaded on every front-end page). */

/* ---------- Profile pictures: always a true circle/square crop, never squished ---------- */
img.avatar:not(#wpadminbar img) { object-fit: cover; aspect-ratio: 1 / 1; height: auto !important; flex-shrink: 0; }
/* The WordPress admin bar sizes its own avatars; keep them as WordPress intends */
#wpadminbar #wp-admin-bar-my-account.with-avatar > a img.avatar { width: 16px !important; height: 16px !important; }
#wpadminbar #wp-admin-bar-user-info img.avatar { width: 64px !important; height: 64px !important; }

/* ---------- Background: crisp vector tile that fills any screen (incl. ultrawide 4K) ---------- */
body {
	background-color: #1b1a1a !important;
	background-image: radial-gradient(ellipse 120% 70% at 50% 0%, rgba(141, 0, 0, .14), transparent 65%), url('images/bg/bg-default.svg') !important;
	background-repeat: no-repeat, repeat !important;
	background-size: 100% 100%, 960px 828px !important;
	background-position: top center, top center !important;
	background-attachment: fixed !important;
}
html body.holiday-christmas {
	background-color: #0d2219 !important;
	background-image: radial-gradient(ellipse 120% 70% at 50% 0%, rgba(196, 30, 58, .16), transparent 65%), url('images/bg/bg-christmas.svg') !important;
}
html body.holiday-newyear {
	background-color: #0d0e26 !important;
	background-image: radial-gradient(ellipse 120% 70% at 50% 0%, rgba(201, 162, 39, .14), transparent 65%), url('images/bg/bg-newyear.svg') !important;
}
html body.holiday-halloween {
	background-color: #140c1c !important;
	background-image: radial-gradient(ellipse 120% 70% at 50% 0%, rgba(211, 84, 0, .16), transparent 65%), url('images/bg/bg-halloween.svg') !important;
}
html body.holiday-patriotic {
	background-color: #0a1730 !important;
	background-image: radial-gradient(ellipse 120% 70% at 50% 0%, rgba(198, 40, 40, .16), transparent 65%), url('images/bg/bg-patriotic.svg') !important;
}
/* Phones: fixed backgrounds are janky on iOS; let it scroll there */
@media (max-width: 760px) { body { background-attachment: scroll !important; } }

/* ---------- Homepage ---------- */
/* Embedded videos (e.g. the Inspiration widget) fit their box */
.widget iframe, .textwidget iframe, .sidebar iframe {
	display: block; width: 100% !important; max-width: 100%; height: auto !important; aspect-ratio: 16 / 9; border: 0; border-radius: 6px;
}
/* Latest Articles: same white panel as the other boxes; cards separated by a soft border */
.fn-articles-panel { background: #fff !important; }
.fn-articles-panel .post-card {
	border: 1px solid var(--fn-line, #e4e0dc) !important;
	box-shadow: 0 2px 12px rgba(39, 29, 25, .06) !important;
	transition: box-shadow .15s ease, transform .15s ease;
}
.fn-articles-panel .post-card:hover { box-shadow: 0 8px 24px rgba(39, 29, 25, .12) !important; transform: translateY(-2px); }

/* Holiday logos carry decorations above and below the word, so they sit a little taller */
.site-header .site-logo.is-holiday { width: 350px; height: auto; max-height: none; max-width: 100%; }
@media (max-width: 1180px) { .site-header .site-logo.is-holiday { width: 310px; } }
@media (max-width: 760px) { .site-header .site-logo.is-holiday { width: calc(100% - 48px); max-width: 300px; } }

/* Blog page title banners: same look as the community and forum banners */
.fn-page-banner {
	position: relative; overflow: hidden; margin: 0 0 26px; padding: 26px 30px; border-radius: var(--fn-radius, 10px);
	background:
		radial-gradient(120% 170% at 95% 0%, rgba(141, 0, 0, .85) 0%, transparent 55%),
		repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 14px),
		linear-gradient(120deg, #1f1e1e, #363030 60%, #452424);
	box-shadow: 0 6px 22px rgba(30, 20, 20, .18); color: #fff;
}
.fn-page-banner > div { position: relative; z-index: 1; max-width: 640px; }
.fn-page-banner .fn-kicker { display: block; font-size: 10px; font-weight: 700; letter-spacing: .16em; color: #f0a9a9; }
.fn-page-banner h1 { color: #fff; font-size: 34px; line-height: 1.2; margin: 6px 0 6px; letter-spacing: -.02em; }
.fn-page-banner-desc, .fn-page-banner-desc p { color: #d6cbc9; font-size: 13.5px; line-height: 1.6; margin: 0; }
.fn-page-banner-icon { position: absolute; right: 26px; bottom: -22px; font-size: 118px !important; line-height: 1; color: rgba(255, 255, 255, .07); pointer-events: none; }
@media (max-width: 760px) {
	.fn-page-banner { padding: 20px; }
	.fn-page-banner h1 { font-size: 26px; }
	.fn-page-banner-icon { font-size: 84px !important; right: 14px; bottom: -14px; }
}

/* ---------- Project pages: gallery card, build log timeline ---------- */
.fn-proj-card { background: #fff; border: 1px solid var(--fn-line, #e4e0dc); border-top: 4px solid var(--main-accent, #8d0000); border-radius: var(--fn-radius, 10px); box-shadow: var(--fn-shadow, 0 1px 3px rgba(0,0,0,.06)); padding: 22px 24px 24px; margin: 0 0 30px; }
.fn-proj-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.fn-proj-card-head h3 { margin: 0 !important; font-size: 20px; letter-spacing: -.02em; }
.fn-proj-card-head h3 i { color: var(--main-accent, #8d0000); margin-right: 8px; font-size: .9em; }
.fn-proj-count { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #656464; background: #f3efed; border-radius: 999px; padding: 5px 11px; }
.fn-proj-btn { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; padding: 11px 18px; border: 1px solid var(--fn-line, #e4e0dc); border-radius: 8px; background: #faf8f7; color: #2b2a2a !important; font-size: 13px; font-weight: 700; text-decoration: none !important; transition: background .2s, border-color .2s, color .2s; }
.fn-proj-btn i { color: var(--main-accent, #8d0000); transition: color .2s; }
.fn-proj-btn:hover { background: var(--main-accent, #8d0000); border-color: var(--main-accent, #8d0000); color: #fff !important; }
.fn-proj-btn:hover i { color: #fff; }

/* Photo tiles (shared by the project card and the gallery page) */
a.fn-ph { position: relative; display: block; overflow: hidden; border-radius: 8px; background: #2b2a2a; cursor: zoom-in; }
a.fn-ph[hidden] { display: none; }
a.fn-ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, opacity .3s; }
a.fn-ph::after { content: "\f065"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(24, 23, 23, .7); color: #fff; font-size: 12px; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
a.fn-ph:hover img, a.fn-ph:focus-visible img { transform: scale(1.06); }
a.fn-ph:hover::after, a.fn-ph:focus-visible::after { opacity: 1; transform: none; }
a.fn-ph:focus-visible { outline: 3px solid var(--main-accent, #8d0000); outline-offset: 2px; }
.fn-ph-more-label { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(24, 23, 23, .62); color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
a.fn-ph:has(.fn-ph-more-label)::after { display: none; }

/* Project page mosaic: one lead photo and four smaller ones */
.fn-proj-mosaic { display: grid; gap: 8px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, 150px); }
.fn-proj-mosaic > a.fn-ph:first-child { grid-row: 1 / span 2; }
.fn-proj-mosaic-1 { grid-template-columns: 1fr; grid-template-rows: 320px; }
.fn-proj-mosaic-2 { grid-template-columns: 2fr 1fr; grid-template-rows: 300px; }
.fn-proj-mosaic-2 > a.fn-ph:first-child { grid-row: auto; }
.fn-proj-mosaic-3 { grid-template-columns: 2fr 1fr; }
.fn-proj-mosaic-4 { grid-template-columns: 2fr 1fr 1fr; }
.fn-proj-mosaic-4 > a.fn-ph:nth-child(4) { grid-column: 2 / span 2; }

/* Build log timeline */
.fn-timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.fn-timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--main-accent, #8d0000), #e4e0dc); border-radius: 2px; }
.fn-tl-item { position: relative; margin: 0 0 16px; padding: 0; }
.fn-tl-item:last-child { margin-bottom: 0; }
.fn-tl-dot { position: absolute; left: -26px; top: 18px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--main-accent, #8d0000); box-sizing: border-box; box-shadow: 0 0 0 4px #fff; }
.fn-tl-card { display: flex; gap: 0; overflow: hidden; border: 1px solid var(--fn-line, #e4e0dc); border-radius: 9px; background: #faf8f7; transition: box-shadow .2s, transform .2s, border-color .2s; }
.fn-tl-card:hover { background: #fff; border-color: #d8cfcb; box-shadow: 0 8px 22px rgba(30, 20, 20, .1); transform: translateY(-2px); }
.fn-tl-thumb { flex: 0 0 190px; display: block; overflow: hidden; background: #2b2a2a; }
.fn-tl-thumb img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; display: block; transition: transform .45s ease; }
.fn-tl-card:hover .fn-tl-thumb img { transform: scale(1.05); }
.fn-tl-body { padding: 16px 20px 18px; min-width: 0; }
.fn-tl-date { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--main-accent, #8d0000); }
.fn-tl-body h4 { margin: 6px 0 6px; font-size: 17px; line-height: 1.35; }
.fn-tl-body h4 a { color: #2b2a2a; text-decoration: none; }
.fn-tl-body h4 a:hover { color: var(--main-accent, #8d0000); }
.fn-tl-body p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.7; color: #656464; }
.fn-tl-empty { color: #656464; font-style: italic; margin: 0; }

/* Gallery page */
.fn-gallery-page { padding-top: 32px; padding-bottom: 60px; }
.fn-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fn-photo-grid > a.fn-ph { aspect-ratio: 4 / 3; box-shadow: 0 2px 8px rgba(30, 20, 20, .12); }
.fn-gallery-back { text-align: center; margin-top: 34px; }

/* Full-screen photo viewer */
html.fn-lb-lock { overflow: hidden; }
.fn-lb { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; background: rgba(12, 11, 11, .95); }
.fn-lb.is-open { display: flex; }
.fn-lb-stage { margin: 0; max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); display: flex; flex-direction: column; align-items: center; }
.fn-lb-stage img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); transition: opacity .2s; }
.fn-lb.is-loading .fn-lb-stage img { opacity: .35; }
.fn-lb-cap { color: #d4d4d4; font-size: 13px; margin-top: 12px; text-align: center; }
.fn-lb-cap:empty { display: none; }
.fn-lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
.fn-lb-count { color: #d4d4d4; font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.fn-lb button { background: rgba(255, 255, 255, .08) !important; border: 1px solid rgba(255, 255, 255, .15) !important; color: #fff !important; border-radius: 50% !important; width: 46px; height: 46px; padding: 0 !important; display: grid; place-items: center; font-size: 17px; cursor: pointer; box-shadow: none !important; transition: background .2s; }
.fn-lb button:hover { background: var(--main-accent, #8d0000) !important; border-color: var(--main-accent, #8d0000) !important; }
.fn-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.fn-lb-prev { left: 22px; }
.fn-lb-next { right: 22px; }
.fn-lb.is-single .fn-lb-nav, .fn-lb.is-single .fn-lb-count { display: none; }

@media (max-width: 760px) {
	.fn-proj-card { padding: 18px 16px 20px; }
	.fn-proj-mosaic, .fn-proj-mosaic-3, .fn-proj-mosaic-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 200px repeat(2, 110px); }
	.fn-proj-mosaic > a.fn-ph:first-child { grid-column: 1 / -1; grid-row: auto; }
	.fn-proj-mosaic-4 > a.fn-ph:nth-child(4) { grid-column: auto; }
	.fn-proj-mosaic-2 { grid-template-rows: 200px 110px; }
	.fn-tl-card { flex-direction: column; }
	.fn-tl-thumb { flex: none; height: 170px; }
	.fn-timeline { padding-left: 22px; }
	.fn-tl-dot { left: -22px; }
	.fn-photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.fn-lb-stage { max-width: 100vw; }
	.fn-lb-stage img { border-radius: 0; }
	.fn-lb-nav { top: auto; bottom: 18px; transform: none; }
	.fn-lb-prev { left: calc(50% - 60px); }
	.fn-lb-next { right: calc(50% - 60px); }
}
