/**
 * Angling Lines Blog — theme overrides.
 *
 * Loaded last (see functions.php) so it layers cleanly over the parent Crush
 * base styles. Mobile-first. Matches the main anglinglines.com site:
 * Muli font, brand blue #1898D8, navy header/footer.
 */

:root {
	--alb-blue: #1898d8;
	--alb-blue-dark: #1477ab;
	--alb-navy: #0b2538;      /* top bar */
	--alb-navy-footer: #022539;
	--alb-text: #222222;
	--alb-muted: rgba(0, 0, 0, .55);
	--alb-border: #d8d8d8;
	--alb-light: #f2f4f6;
	--alb-max: 1280px;   /* matches .site-content so the header lines up with the page content */
}

/* ---------- Global typography: Muli everywhere (matches main site) ----------
   The parent Crush theme forces its condensed "khand" fonts via element
   selectors (body / a / p / h1-h4 / nav links). We override the same elements
   with !important so the whole blog uses Muli like the main site. */
body,
button, input, select, textarea, optgroup,
h1, h2, h3, h4, h5, h6,
p, a, li, ul, ol, span, strong, em, blockquote, cite, figcaption, label, th, td,
.entry-title, .entry-content, .entry-content *,
.home_title, .section, .widget-title, .widget-area,
.alb-header, .alb-header a, .alb-menu, .alb-menu a, .alb-brand__tag, .alb-login,
#page .site-content {
	font-family: 'Muli', sans-serif !important;
}

/* ...but never touch the FontAwesome icon glyphs (icons + dropdown carets) */
.fa, .fas, .far, .fab,
i[class^="fa-"], i[class*=" fa-"],
.alb-menu .menu-item-has-children > a::after {
	font-family: FontAwesome !important;
}

body {
	color: var(--alb-text);
}

/* Tame the harsh pure-blue link colour inherited from the base theme */
body a {
	color: var(--alb-blue-dark);
}
.entry-content a {
	color: var(--alb-blue-dark);
	text-decoration: none;
}
.entry-content a:hover {
	text-decoration: underline;
}

/* ===========================================================================
   HEADER
   =========================================================================== */
.alb-header {
	font-family: 'Muli', sans-serif;
}

.alb-container {
	max-width: var(--alb-max);
	width: 100%;
	margin: 0 auto;
	padding: 0 16px;   /* mobile: breathing room from the edges */
}
/* Desktop: drop the padding so the header aligns exactly with the page
   content (.site-content is 1280px wide with 0 horizontal padding) */
@media (min-width: 1031px) {
	.alb-container {
		padding-left: 0;
		padding-right: 0;
	}
}

/* --- Top bar --- */
.alb-topbar {
	background: var(--alb-navy);
	color: #fff;
	font-size: 14px;
}
.alb-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 42px;
}
.alb-topbar a {
	color: #fff;
	text-decoration: none;
}
.alb-topbar__contact {
	display: flex;
	align-items: center;
	gap: 22px;
}
.alb-topbar__contact a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 0;
	font-weight: 700;
}
.alb-topbar__contact a:hover,
.alb-topbar__social a:hover {
	color: var(--alb-blue);
}
.alb-topbar__social {
	display: flex;
	align-items: center;
	gap: 16px;
}
.alb-topbar__social a {
	color: #fff;
	font-size: 17px;
	line-height: 1;
}

/* --- Nav bar --- */
.alb-navbar {
	background: #fff;
	border-bottom: 1px solid var(--alb-border);
}
.alb-navbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 74px;
}

/* Brand: logo + "Blog" tag */
.alb-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	flex-shrink: 0;
}
.alb-brand__logo {
	display: block;
	width: 180px;
	height: auto;
}
.alb-brand__tag {
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	color: var(--alb-blue);
	position: relative;
	padding-left: 12px;
}
.alb-brand__tag::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: 26px;
	background: var(--alb-border);
}

/* Nav + menu */
.alb-nav {
	display: flex;
	align-items: center;
	gap: 6px;
}
.alb-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 2px;
}
.alb-nav ul,
.alb-menu,
.alb-menu li,
.alb-menu .sub-menu,
.alb-menu .sub-menu li {
	list-style: none !important;
}
.alb-menu li {
	position: relative;
	margin: 0;
}
.alb-menu li::before,
.alb-menu li::marker {
	content: none !important;
}
.alb-menu a {
	display: block;
	padding: 10px 14px;
	color: var(--alb-text);
	font-size: 15px;
	font-weight: 400;
	text-decoration: none;
	border-radius: 6px;
	white-space: nowrap;
}
.alb-menu > li > a:hover,
.alb-menu .current-menu-item > a,
.alb-menu .current-menu-ancestor > a {
	color: var(--alb-blue);
}
.alb-menu .menu-item-has-children > a::after {
	content: '\f078';
	font-family: FontAwesome;
	font-size: 10px;
	margin-left: 6px;
	vertical-align: middle;
}

/* Desktop dropdowns */
.alb-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	background: #fff;
	border: 1px solid var(--alb-border);
	border-radius: 8px;
	box-shadow: 0 10px 26px rgba(0, 0, 0, .09);
	display: none;
	z-index: 200;
}
.alb-menu li:hover > .sub-menu {
	display: block;
}
.alb-menu .sub-menu a {
	padding: 8px 18px;
	font-weight: 400;
	border-radius: 0;
}
.alb-menu .sub-menu a:hover {
	color: var(--alb-blue);
	background: var(--alb-light);
}

/* Login button (outline, brand blue — matches main site) */
.alb-login {
	display: inline-block;
	margin-left: 10px;
	padding: 9px 18px;
	border: 1px solid var(--alb-blue);
	border-radius: 16px;
	color: var(--alb-blue);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}
.alb-login:hover {
	background: var(--alb-blue);
	color: #fff;
}

/* Hamburger (hidden on desktop) */
.alb-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--alb-border);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
}
.alb-nav-toggle__bar {
	display: block;
	width: 22px;
	height: 2px;
	margin: 0 auto;
	background: var(--alb-text);
	transition: transform .2s ease, opacity .2s ease;
}
.alb-nav-toggle.is-active .alb-nav-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.alb-nav-toggle.is-active .alb-nav-toggle__bar:nth-child(2) {
	opacity: 0;
}
.alb-nav-toggle.is-active .alb-nav-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile header (<= 1030px) ---------- */
@media (max-width: 1030px) {
	.alb-navbar__inner {
		flex-wrap: wrap;
		min-height: 64px;
	}
	.alb-brand__logo {
		width: 150px;
	}
	.alb-brand__tag {
		font-size: 20px;
	}
	.alb-nav-toggle {
		display: flex;
	}
	.alb-nav {
		display: none;
		flex-basis: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding-bottom: 10px;
	}
	.alb-nav.is-open {
		display: flex;
		/* Contrasting panel, broken out to the full viewport width so it
		   spans edge-to-edge regardless of the container padding */
		background: var(--alb-light);
		box-shadow: inset 0 8px 12px -10px rgba(0, 0, 0, .3);
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 46vw);
		flex-shrink: 0;
		padding: 6px 16px 16px;
	}
	.alb-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
	}
	.alb-menu a {
		padding: 14px 6px;
		border-bottom: 1px solid #dbe0e5;   /* visible divider on the grey panel */
		border-radius: 0;
		font-size: 16px;
	}
	.alb-menu .menu-item-has-children > a::after {
		float: right;
	}
	/* Sub-menus become static, revealed on tap */
	.alb-menu .sub-menu {
		position: static;
		display: none;
		border: 0;
		box-shadow: none;
		border-radius: 0;
		padding: 0 0 6px 14px;
		min-width: 0;
	}
	.alb-menu li:hover > .sub-menu {
		display: none;   /* no hover open on touch */
	}
	.alb-menu li.is-expanded > .sub-menu {
		display: block;
	}
	.alb-login {
		margin: 12px 6px 4px;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.alb-topbar__email {
		display: none;   /* keep the top bar tidy on phones */
	}
	.alb-topbar {
		font-size: 13px;
	}
	.alb-topbar__contact {
		gap: 14px;
	}
}

/* ===========================================================================
   RE-BRAND accents from the old green (#4cae50) to brand blue
   =========================================================================== */
#comments input[type=submit] {
	background: var(--alb-blue);
}
#comments input[type=submit]:hover {
	background: var(--alb-blue-dark);
}
#page .site-content .site-main .category-more a,
#page .site-content .widget-area .main .sidebar-videos p:last-child a {
	color: var(--alb-blue);
}
.single-post .page_content nav .col-12 .nav-next .meta-nav-btm,
.single-post .page_content nav .col-12 .nav-previous .meta-nav-btm {
	color: var(--alb-blue);
}
.single-post .page_content nav .col-12:hover {
	border-color: var(--alb-blue);
}
#page .site-content .widget-area .main .widget_category_list ul li:before {
	background-color: var(--alb-blue);
}

/* ===========================================================================
   FOOTER GAP FIX — the cookies-for-comments plugin injects a 1x1 tracking
   pixel (alt="css.php"). The parent theme's `img{height:auto!important}` rule
   overrides its height="1", so it renders as a tall stray box that pushes the
   footer down ("footer floating in the air"). Take it out of flow entirely so
   it has zero layout impact — it still loads, so the plugin keeps working.
   =========================================================================== */
img[alt="css.php"],
img[src*="cookies-for-comments/css.php"] {
	position: absolute !important;
	left: 0;
	bottom: 0;
	width: 1px !important;
	height: 1px !important;
	max-height: 1px !important;
	opacity: 0;
	pointer-events: none;
}

/* ===========================================================================
   FOOTER — navy to match main site (widget styling kept from base stylesheet)
   =========================================================================== */
footer#site-footer {
	background-color: var(--alb-navy-footer);
	margin-top: 0;
}

/* Mobile: stack the footer columns full width instead of cramped side columns */
@media (max-width: 1030px) {
	.custom_footer_content .custom_footer_items {
		padding-left: 16px;
		padding-right: 16px;
	}
	.custom_footer_content .custom_footer_items .footer_column_1,
	.custom_footer_content .custom_footer_items .footer_column_2,
	.custom_footer_content .custom_footer_items .footer_column_3,
	.custom_footer_content .custom_footer_items .footer_column_4 {
		width: 100% !important;
		float: none !important;
		padding-right: 0 !important;
		margin-bottom: 10px;
	}
	/* keep the "useful info" links as two tidy columns, now spanning full width */
	.custom_footer_content .custom_footer_items .footer_column_4 .menu-useful_links-container ul li {
		width: 50%;
	}
	/* copyright (and legacy top-bar contact) full width + centered on mobile */
	.custom_header_container .header_items_content .primary_custom_header .primary_header_1,
	.footer_copyrights_content .copyrights_content .copyright_column_1 {
		width: 100% !important;
		float: none !important;
		text-align: center;
	}
}

/* ===========================================================================
   BLOG LISTING THUMBNAILS — the grid cards use a lazyload background-image div
   (.post_featured_image) that has no height in the base theme, so previews
   collapse to nothing. Give them an aspect ratio so the images show.
   =========================================================================== */
.post_featured_image {
	display: block;
	width: 100%;
	aspect-ratio: 421 / 300;   /* matches the registered "list-blog" image size */
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: 6px;
	margin-bottom: 12px;
}

/* ===========================================================================
   POST / SINGLE — readable, responsive typography
   =========================================================================== */
.single article header h1,
.single .entry-title,
h2.wp-block-heading {
	font-family: 'Muli', sans-serif;
	color: #1b2733;
	line-height: 1.22;
}
.single article header h1 {
	font-size: 34px;
}
/* The parent theme sets `article header h1 { overflow: hidden }`, which clips
   descenders (g, y) on the last line. Let them show. */
.entry-title,
.entry-title a,
.site-main article header h1,
.single article header h1 {
	overflow: visible !important;
	text-overflow: clip !important;
}
.entry-content p,
.entry-content li {
	font-size: 17px;
	line-height: 1.65;
	color: var(--alb-text);
}
.entry-content img,
.entry-content iframe,
.wp-block-embed__wrapper iframe {
	max-width: 100%;
	height: auto;
}

/* Post list cards line up sensibly on smaller screens */
@media (max-width: 1030px) {
	.single article header h1 {
		font-size: 27px;
	}
	#content {
		padding: 1.25em 0;
	}
}

/* ===========================================================================
   ARTICLE META, READ-MORE BUTTON, MOBILE TITLE + BREADCRUMB SPACING
   =========================================================================== */

/* (3) Single-post meta line: "Updated on … | N minute read | Written by …" */
.alb-post-meta {
	color: var(--alb-muted);
	font-family: 'Muli', sans-serif;
	font-size: 14px;
	line-height: 1.5;
	margin: 6px 0 20px;
}
.alb-post-meta .alb-meta-sep {
	margin: 0 8px;
	opacity: .45;
}
.alb-post-meta a {
	color: var(--alb-blue-dark);
	text-decoration: none;
}
.alb-post-meta a:hover { text-decoration: underline; }

/* (4) "Read more" button under each listing card */
.alb-readmore {
	display: inline-block;
	margin-top: 14px;
	padding: 8px 18px;
	border: 1px solid var(--alb-blue);
	border-radius: 6px;
	color: var(--alb-blue);
	font-family: 'Muli', sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}
.alb-readmore:hover {
	background: var(--alb-blue);
	color: #fff;
}
.alb-readmore span { margin-left: 4px; }

/* (1)(2) Tighter title line-spacing and smaller breadcrumb on mobile */
@media (max-width: 1030px) {
	/* listing / archive card titles: pull the wrapped lines together */
	.site-content .site-main article .entry-title,
	.site-content .site-main article .entry-title a {
		font-size: 22px !important;
		line-height: 1.2 !important;
	}
	/* breadcrumb: smaller text + tighter lines when it wraps */
	.breadcrumb,
	.breadcrumb a,
	.breadcrumb a p,
	.breadcrumb span {
		font-size: 13px !important;
		line-height: 1.2 !important;
	}
	/* keep the intro/excerpt short on mobile so a card doesn't dominate */
	.site-content .site-main article .entry-content p {
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
		margin-bottom: 0;
	}
}

/* Breadcrumb "Blog" is wrapped in a <p> by get_breadcrumb(); its default
   margins blow out the line spacing. Flatten it so lines sit close. */
.breadcrumb p {
	margin: 0 !important;
	display: inline !important;
}

/* ===========================================================================
   COMMENTS + REPLY FORM — Muli everywhere + consistent article-scale sizing.
   Plugin-generated bits (math captcha, subscribe, privacy note) were still
   rendering in the parent's condensed font, so force Muli across the whole
   #comments / #respond area. Sizes set inline in single.php → !important.
   =========================================================================== */
#comments,
#comments *,
#respond,
#respond * {
	font-family: 'Muli', sans-serif !important;
}

/* "Leave a Reply" heading */
#comments #reply-title,
#respond #reply-title {
	font-size: 24px !important;
	line-height: 1.3 !important;
	margin: 0 0 1rem !important;
	overflow: visible !important;
}

/* "N thoughts on …" heading — normal text size, sentence case, dark (not orange) */
#comments .comments-title,
#comments .comments-title span,
#comments .comments-title a {
	font-size: 17px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	color: var(--alb-text) !important;
	line-height: 1.5 !important;
	letter-spacing: normal !important;
	overflow: visible !important;
}
#comments .comments-title {
	margin: 0 0 1rem !important;
}

/* Comment author + "says" */
#comments .comment-author .fn,
#comments .comment-author cite,
#comments .comment-author b,
#comments .says {
	font-size: 15px !important;
	font-weight: 700 !important;
}

/* Date / meta (old-style .comment-meta.commentmetadata) */
#comments .comment-metadata,
#comments .comment-metadata a,
#comments .comment-meta,
#comments .commentmetadata,
#comments .comment-meta a {
	font-size: 13px !important;
	color: var(--alb-muted) !important;
	font-weight: 400 !important;
}

/* Comment body (old-style markup = bare <p> inside .comment-list) */
#comments .comment-content,
#comments .comment-content p,
#comments .comment-list p {
	font-size: 17px !important;
	line-height: 1.6 !important;
	color: var(--alb-text) !important;
}
#comments .reply a { font-size: 14px !important; }

/* Reply form — field labels one size, helper/plugin text one (smaller) size */
#comments label,
#comments .comment-form label,
#commentform label {
	font-size: 15px !important;
	line-height: 1.4 !important;
	color: #333 !important;
}
#comments .comment-notes,
#comments p.comment-notes,
#comments .math-captcha-form,
#comments .math-captcha-form *,
#comments .subscribe-to-comments,
#comments .subscribe-to-comments *,
#comments p.akismet_comment_form_privacy_notice,
#comments p.akismet_comment_form_privacy_notice a,
#commentform,
#commentform p,
#commentform a {
	font-size: 14px !important;
	line-height: 1.5 !important;
	color: #555 !important;
	font-weight: 400 !important;
}
#comments input[type=text],
#comments input[type=email],
#comments input[type=url],
#comments textarea {
	font-size: 16px !important;
	color: #222 !important;
}

/* "Comments" (Facebook-comments plugin) heading + collapse the gap to the box */
.anglines-fbcommentbox {
	margin: 0 0 .75rem !important;
}
.anglines-fbcommentbox h3 {
	font-size: 22px !important;
	margin: 0 0 .5rem !important;
}
.anglines-fbcommentbox .fb-comments,
.anglines-fbcommentbox .fb-comments span {
	min-height: 0 !important;
}
#comments {
	margin-top: 0 !important;
}
#comments .comments-title {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* ===========================================================================
   CONTENT LISTS + IMAGE CAPTIONS (front-end) — Muli + tidy spacing
   =========================================================================== */
.entry-content ul,
.entry-content ol {
	padding-left: 1.3em;
	margin: 0 0 1.2em;
}
.entry-content li {
	margin-bottom: .5em;
	line-height: 1.6;
}
.entry-content figcaption,
.entry-content .wp-element-caption,
.entry-content .wp-caption-text {
	font-family: 'Muli', sans-serif !important;
	font-size: 14px !important;
	color: #666 !important;
	font-style: normal !important;
	text-align: center;
	margin-top: 6px;
}
