/*
Theme Name: bigair
Theme URI: https://www.bigair.net
Author: arist
Description: Theme for bigair.net in the style of the OpenSnow Daily Snow layout. White header and footer, deep-blue (#2B3D51) text, card-style posts with a sidebar. Public account registration is disabled.
Version: 1.1.3
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bigair
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* ---------- Fonts ----------
   OpenSnow uses Intel's "Clear Sans" (Apache 2.0). Drop the woff2 files into
   /fonts to use it; otherwise the system font stack below takes over. */
@font-face { font-family: "Clear Sans"; font-weight: 300; font-display: swap; src: url("fonts/ClearSans-Light.woff2") format("woff2"); }
@font-face { font-family: "Clear Sans"; font-weight: 400; font-display: swap; src: url("fonts/ClearSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Clear Sans"; font-weight: 500; font-display: swap; src: url("fonts/ClearSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "Clear Sans"; font-weight: 700; font-display: swap; src: url("fonts/ClearSans-Bold.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
	--ds-navy: #2b3d51;        /* the OpenSnow "brand" deep blue */
	--ds-navy-soft: #4a5c70;
	--ds-blue: #3395dd;        /* buttons + links */
	--ds-blue-dark: #2479b8;
	--ds-bg: #f6f6f6;          /* page background between header & footer */
	--ds-surface: #ffffff;
	--ds-text: #000000;
	--ds-muted: #6c757c;
	--ds-border: rgba(108, 117, 124, 0.11);
	--ds-border-strong: #e9ecef;
	--ds-chip: #f8f9fa;
	--ds-radius: 10px;
	--ds-radius-sm: 8px;
	--ds-max: 1140px;
	--ds-font: "Clear Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--ds-bg);
	color: var(--ds-text);
	font-family: var(--ds-font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--ds-blue); text-decoration: none; }
a:hover, a:focus { color: var(--ds-blue-dark); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { color: var(--ds-navy); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--ds-surface); clip: auto !important; clip-path: none; color: var(--ds-navy);
	display: block; height: auto; left: 8px; top: 8px; padding: 12px 16px; width: auto; z-index: 100000;
}
.ds-container { max-width: var(--ds-max); margin: 0 auto; padding: 0 16px; }

/* ---------- Buttons ---------- */
.ds-btn, .wp-block-button__link, button, input[type="submit"] {
	display: inline-block;
	background: var(--ds-blue);
	color: #fff;
	border: 0;
	border-radius: var(--ds-radius-sm);
	padding: 6px 12px;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	transition: transform .08s ease, background .15s ease;
}
.ds-btn:hover, .wp-block-button__link:hover, button:hover, input[type="submit"]:hover { background: var(--ds-blue-dark); color: #fff; text-decoration: none; }
.ds-btn:active, button:active { transform: scale(.97); }
.ds-btn--choice {
	background: var(--ds-chip);
	color: var(--ds-text);
	border: 1px solid var(--ds-border-strong);
	font-size: 16px;
	text-align: center;
}
.ds-btn--choice:hover { background: #eef0f2; color: var(--ds-text); }

/* ---------- Header (white, navy text) ---------- */
.site-header {
	background: var(--ds-surface);
	border-bottom: 1px solid var(--ds-border-strong);
	position: sticky; top: 0; z-index: 50;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	min-height: 64px;
}
.site-branding { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.site-branding .custom-logo { height: 40px; max-height: 40px; width: auto; display: block; }
.footer-brand .custom-logo { height: 32px; width: auto; display: block; }

/* Header search (pill, like OpenSnow's) */
.header-search {
	position: relative; flex: 1 1 auto; max-width: 380px; min-width: 0; margin: 0 auto;
}
.header-search__icon {
	position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
	color: var(--ds-navy-soft); pointer-events: none;
}
.header-search__input {
	width: 100%; height: 38px; padding: 0 14px 0 36px;
	font: inherit; font-size: 15px; color: var(--ds-navy);
	background: #f1f3f5; border: 1px solid transparent; border-radius: 999px;
	-webkit-appearance: none; appearance: none;
	transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.header-search__input::placeholder { color: var(--ds-navy-soft); opacity: .8; }
.header-search__input:hover { background: #e9ecef; }
.header-search__input:focus {
	outline: none; background: var(--ds-surface); border-color: var(--ds-blue);
	box-shadow: 0 0 0 3px rgba(51, 149, 221, .18);
}
.header-search__input::-webkit-search-cancel-button { cursor: pointer; }
@media (max-width: 600px) {
	.site-header__inner { gap: 10px; }
	.site-branding .custom-logo { height: 30px; }
	.header-search__input { height: 34px; font-size: 16px; } /* 16px stops iOS zoom-on-focus */
}
.site-title {
	margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; text-transform: uppercase; line-height: 1;
}
.site-title a { color: var(--ds-navy); }
.site-title a:hover { text-decoration: none; }

.main-navigation { display: flex; align-items: center; gap: 8px; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-navigation li { position: relative; }
.main-navigation a {
	display: block; padding: 8px; font-size: 14px; color: var(--ds-navy-soft);
}
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--ds-navy); text-decoration: none; }
.main-navigation .sub-menu {
	display: none; position: absolute; right: 0; top: 100%; min-width: 180px; flex-direction: column; align-items: stretch;
	background: var(--ds-surface); border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-sm); padding: 6px 0;
	box-shadow: 0 6px 20px rgba(43,61,81,.08);
}
.main-navigation li:hover > .sub-menu, .main-navigation li:focus-within > .sub-menu { display: flex; }
.main-navigation .sub-menu a { padding: 8px 14px; }

.menu-toggle {
	display: none; background: transparent; color: var(--ds-navy); padding: 8px; font-size: 14px;
	border: 1px solid var(--ds-border-strong);
}
.menu-toggle:hover { background: var(--ds-chip); color: var(--ds-navy); }

@media (max-width: 900px) {
	.menu-toggle { display: inline-block; }
	.main-navigation { position: static; }
	.main-navigation .menu-wrap {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--ds-surface); border-bottom: 1px solid var(--ds-border-strong); padding: 8px 16px 16px;
	}
	.main-navigation.is-open .menu-wrap { display: block; }
	.main-navigation ul { flex-direction: column; align-items: stretch; }
	.main-navigation .sub-menu { display: flex; position: static; border: 0; box-shadow: none; padding-left: 12px; }
}

/* ---------- Page heading ---------- */
.page-heading { padding: 48px 0 20px; }
.page-title { font-size: 2.6rem; font-weight: 600; margin: 0; }
.page-subtitle { color: var(--ds-muted); margin: 6px 0 0; }
@media (max-width: 600px) { .page-heading { padding: 28px 0 14px; } .page-title { font-size: 2rem; } }

/* ---------- Layout ---------- */
.site-content { padding-bottom: 56px; }
.ds-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.ds-layout--full { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 960px) { .ds-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Cards ---------- */
.ds-card {
	background: var(--ds-surface);
	border: 1px solid var(--ds-border);
	border-radius: var(--ds-radius);
	padding: 10px;
	margin-bottom: 24px;
	overflow: hidden;
}
.ds-card__pad { padding: 0 0 6px; }

/* ---------- Post ---------- */
.entry-author { display: flex; align-items: center; gap: 8px; }
.entry-author img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; display: block; }
.entry-author__name { display: block; font-size: 16px; }
.entry-author__name a { color: var(--ds-text); }
.entry-author__meta { display: block; font-size: 14px; color: var(--ds-muted); line-height: 1.35; }

.entry-title {
	font-size: 24px; font-weight: 600; margin: 12px 0; padding-top: 12px;
	border-top: 1px solid var(--ds-border-strong);
}
.entry-title a { color: var(--ds-navy); }
.entry-title a:hover { color: var(--ds-navy); text-decoration: underline; }

.entry-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 6px; }
.entry-actions .ds-btn { width: 100%; }

.entry-thumbnail { display: block; margin: 12px -10px; }
.entry-thumbnail img { display: block; width: 100%; }

.entry-content, .entry-summary { font-size: 1.1rem; font-weight: 300; line-height: 1.6; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3 {
	font-size: 20px; font-weight: 500; margin: 24px 0 16px; padding-bottom: 4px;
	border-bottom: 1px solid var(--ds-border-strong);
}
.entry-content h2 + h3 { margin-top: 0; }
.entry-content h3 { font-size: 17px; font-weight: 600; margin: 18px 0 10px; padding-bottom: 0; border-bottom: 0; }
.entry-content h4 { font-size: 18px; font-weight: 500; margin: 20px 0 10px; }
.entry-content strong, .entry-content b { font-weight: 600; }
.entry-content blockquote {
	margin: 20px 0; padding: 10px 16px; border-left: 4px solid var(--ds-navy); background: var(--ds-chip); border-radius: 0 6px 6px 0;
}
.entry-content figure { margin: 20px 0; }
.entry-content figcaption, .wp-caption-text { color: var(--ds-muted); font-size: 14px; text-align: center; margin-top: 6px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--ds-border-strong); padding: 8px; text-align: left; }
.entry-content th { color: var(--ds-navy); font-weight: 600; }
/* ---------- Weather image pages ----------
   Group blocks with class "weather-grid" (grid layout) holding Image blocks
   that link out to the source. Grid rules are repeated here so the layout
   holds even if core layout styles aren't printed. */
.entry-content .weather-subnav { font-size: 14px; color: var(--ds-muted); margin-bottom: 16px; }
.entry-content .weather-subnav a { color: var(--ds-navy); }
.entry-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.entry-content .wp-block-button__link { font-weight: 400; }
.entry-content .weather-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
	gap: 20px;
	margin: 0 0 8px;
}
.entry-content .weather-grid--narrow { grid-template-columns: repeat(auto-fill, minmax(min(9rem, 100%), 1fr)); gap: 12px; }
.entry-content .weather-grid--wide { grid-template-columns: minmax(0, 1fr); }
.entry-content .weather-grid--five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.entry-content .weather-grid--five figcaption { font-size: 13px; }
.entry-content .weather-grid > * { margin: 0; }
.entry-content .weather-grid .wp-block-image {
	display: flex; flex-direction: column-reverse; /* title above the image */
	margin: 0;
}
.entry-content .weather-grid .wp-block-image > a { display: block; }
.entry-content .weather-grid .wp-block-image img {
	display: block; width: 100%; height: auto;
	border: 1px solid var(--ds-border-strong); border-radius: 6px;
	background: var(--ds-chip);
	transition: opacity .15s ease, box-shadow .15s ease;
}
.entry-content .weather-grid .wp-block-image > a:hover img { opacity: .92; box-shadow: 0 4px 14px rgba(43, 61, 81, .14); }
.entry-content .weather-grid figcaption {
	margin: 0 0 6px; text-align: left;
	font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--ds-navy);
}
.entry-content .weather-grid figcaption a { color: var(--ds-blue); }

.alignleft { float: left; margin: 0 16px 12px 0; }
.alignright { float: right; margin: 0 0 12px 16px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.entry-footer { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--ds-border-strong); font-size: 14px; color: var(--ds-muted); }
.entry-footer a { color: var(--ds-navy-soft); }
.read-more { font-weight: 500; }

/* Author bio box on single posts */
.author-box { display: flex; gap: 14px; align-items: flex-start; }
.author-box img { width: 72px; height: 72px; border-radius: 8px; }
.author-box h3 { font-size: 18px; margin-bottom: 4px; }
.author-box p { margin: 0; font-weight: 300; }

/* Pagination */
.pagination, .post-navigation { margin: 8px 0 24px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; }
.pagination .nav-links { justify-content: center; }
.page-numbers, .post-navigation a {
	display: inline-block; padding: 6px 12px; border-radius: var(--ds-radius-sm);
	background: var(--ds-surface); border: 1px solid var(--ds-border-strong); color: var(--ds-navy);
}
.page-numbers.current { background: var(--ds-navy); color: #fff; border-color: var(--ds-navy); }
.page-numbers:hover, .post-navigation a:hover { text-decoration: none; background: var(--ds-chip); }

/* ---------- Sidebar ---------- */
.widget-area .widget { margin-bottom: 32px; }
.widget-title, .widget-area .wp-block-heading { font-size: 20px; font-weight: 600; margin: 0 0 12px; color: var(--ds-navy); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.widget li + li { border-top: 1px solid var(--ds-border-strong); }
.widget li a { font-weight: 500; }
.widget .post-date { color: var(--ds-muted); font-size: 13px; white-space: nowrap; }
.widget select, .widget input[type="search"], .search-form input[type="search"] {
	width: 100%; padding: 8px 10px; font: inherit; border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-sm); background: var(--ds-surface);
}
.search-form { display: flex; gap: 6px; }

/* "Nearby forecasts"-style list: add class "ds-forecast-list" to a List block */
.ds-forecast-list li { justify-content: space-between; }
.ds-forecast-list li strong, .ds-forecast-list li b { font-size: 20px; font-weight: 700; color: var(--ds-text); }

/* ---------- Comments ---------- */
.comments-area h2 { font-size: 20px; font-weight: 500; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 12px 0; border-top: 1px solid var(--ds-border-strong); }
.comment-author img { border-radius: 6px; vertical-align: middle; margin-right: 8px; }
.comment-meta { font-size: 13px; color: var(--ds-muted); }
.comment-form label { display: block; font-size: 14px; color: var(--ds-navy); margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 8px 10px; font: inherit; border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-sm);
}

/* ---------- Footer (white, navy text) ---------- */
.site-footer {
	background: var(--ds-surface);
	color: var(--ds-navy);
	border-top: 1px solid var(--ds-border-strong);
	padding: 32px 0;
}
.footer-brand { margin-bottom: 24px; }
.footer-brand .site-title { font-size: 22px; }
.footer-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.footer-columns .widget-title { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.footer-columns ul, .footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-columns li { display: block; padding: 3px 0; border: 0 !important; }
.site-footer a { color: var(--ds-navy); font-size: 13px; }
.site-footer a:hover { color: var(--ds-blue); }
.footer-menu { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-info {
	margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--ds-border-strong);
	font-size: 13px; color: var(--ds-navy-soft);
}
