/*
Theme Name:   GeneratePress OTB Child
Theme URI:    https://onthebright.com
Description:  GeneratePress child theme for Onthebright: Bimber-style cards, ad styling, tracking hooks.
Author:       Onthebright
Template:     generatepress
Version:      1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain:  generatepress-otb
*/

:root {
	--otb-ink: #111;
	--otb-muted: #6b7280;
	--otb-bg: #f4f5f7;
	--otb-card: #fff;
	--otb-accent: #e8912d;   /* from the logo */
	--otb-blue: #35506b;     /* from the logo */
	--otb-radius: 12px;
	--otb-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

body, button, input, select, textarea { font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
body { background: var(--otb-bg); color: var(--otb-ink); }
h1, h2, h3, h4 { font-family: "IBM Plex Sans", system-ui, sans-serif; font-weight: 700; letter-spacing: -.01em; }

/* ---------- ad styling (ported from Bimber Additional CSS) ---------- */
.advert_slug { text-align: center; color: #aaa; display: block; font-size: 12px; }
.otb-footer-ad { display: block; width: 100%; max-width: 970px; margin: 30px auto; text-align: center; }
.sidebar-sticky-ad { position: sticky; top: 90px; width: 300px; max-width: 100%; }
.site-main > .code-block { width: 100%; clear: both; }
.sidebar .widget { background: transparent; padding: 0; }

/* ---------- header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .04);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.inside-header { display: flex; align-items: center; gap: 32px; padding-top: 6px; padding-bottom: 6px; }
.site-logo img, .header-image { max-height: 64px; width: auto; }
/* Logo is the brand: keep the site title for SEO/screen readers, hide it visually. */
.main-title, .site-description {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.main-navigation { background: transparent; margin-left: auto; }
.main-navigation .main-nav ul li a { font-weight: 700; font-size: 16px; color: var(--otb-ink); }
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a { color: var(--otb-accent); background: transparent; }
.main-navigation ul ul { box-shadow: 0 10px 30px rgba(0, 0, 0, .12); border-radius: 0 0 var(--otb-radius) var(--otb-radius); overflow: hidden; }
.otb-search a { display: flex; align-items: center; }

/* ---------- layout ---------- */
.separate-containers .site-main { margin: 20px 0; }
.sidebar .widget-area, .is-right-sidebar { width: 300px; }
.is-right-sidebar { padding-left: 24px; }

/* ---------- cards (home / archives / search) ---------- */
.blog .site-main > article,
.archive .site-main > article,
.search .site-main > article { margin: 0 0 16px; }

.blog .inside-article,
.archive .inside-article,
.search .inside-article {
	display: flex; flex-direction: row; align-items: stretch; gap: 0; padding: 0;
	background: var(--otb-card); border-radius: var(--otb-radius); box-shadow: var(--otb-shadow);
	overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.blog .inside-article:hover,
.archive .inside-article:hover,
.search .inside-article:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 24, 40, .12); }

.blog .post-image, .archive .post-image, .search .post-image { order: -1; flex: 0 0 265px; margin: 0; }
.blog .post-image a, .archive .post-image a, .search .post-image a { display: block; height: 100%; }
.blog .post-image img, .archive .post-image img, .search .post-image img {
	width: 100%; height: 100%; min-height: 185px; object-fit: cover; display: block; border-radius: 0;
}
.blog .entry-header, .archive .entry-header, .search .entry-header {
	flex: 1; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center;
}
.blog .entry-title, .archive .entry-title, .search .entry-title { font-size: 21px; line-height: 1.25; margin: 4px 0 12px; }
.blog .entry-title a, .archive .entry-title a, .search .entry-title a { color: var(--otb-ink); text-decoration: none; }
.blog .entry-title a:hover, .archive .entry-title a:hover, .search .entry-title a:hover { color: var(--otb-blue); }
.blog .entry-summary, .archive .entry-summary, .search .entry-summary,
.blog .entry-meta, .archive .entry-meta, .search .entry-meta,
.blog .read-more-container, .archive .read-more-container, .search .read-more-container,
.blog footer.entry-meta, .archive footer.entry-meta { display: none; }

.otb-cat {
	align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--otb-accent);
}
.otb-by { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--otb-muted); }
.otb-by a { color: var(--otb-ink); text-decoration: none; }
.otb-avatar { border-radius: 50%; width: 30px; height: 30px; }

/* Hero card: first post and every 8th — full-width image with overlaid title (like Bimber's tile) */
.blog .site-main > article:nth-of-type(8n+1) .inside-article,
.archive .site-main > article:first-of-type .inside-article { position: relative; display: block; min-height: 420px; }
.blog .site-main > article:nth-of-type(8n+1) .post-image,
.archive .site-main > article:first-of-type .post-image { position: absolute; inset: 0; }
.blog .site-main > article:nth-of-type(8n+1) .post-image img,
.archive .site-main > article:first-of-type .post-image img { min-height: 420px; }
.blog .site-main > article:nth-of-type(8n+1) .post-image::after,
.archive .site-main > article:first-of-type .post-image::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .15) 55%, transparent 100%);
}
.blog .site-main > article:nth-of-type(8n+1) .entry-header,
.archive .site-main > article:first-of-type .entry-header {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 32px; color: #fff;
}
.blog .site-main > article:nth-of-type(8n+1) .entry-title,
.archive .site-main > article:first-of-type .entry-title { font-size: 34px; }
.blog .site-main > article:nth-of-type(8n+1) .entry-title a,
.archive .site-main > article:first-of-type .entry-title a,
.blog .site-main > article:nth-of-type(8n+1) .otb-by,
.blog .site-main > article:nth-of-type(8n+1) .otb-by a,
.archive .site-main > article:first-of-type .otb-by,
.archive .site-main > article:first-of-type .otb-by a { color: #fff; }

/* ---------- single posts ---------- */
.single .inside-article { border-radius: var(--otb-radius); box-shadow: var(--otb-shadow); }
.single .entry-title { font-size: 40px; line-height: 1.15; }
.single .featured-image img, .single .post-image img { border-radius: var(--otb-radius); }

/* ---------- footer ---------- */
.site-footer { background: #fff; }
.site-info { color: var(--otb-muted); font-size: 14px; }
.otb-footer-nav { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.otb-footer-nav a { color: var(--otb-muted); text-decoration: none; }
.otb-footer-nav a:hover { color: var(--otb-ink); }

/* ---------- mobile ---------- */
@media (max-width: 768px) {
	.inside-header { gap: 12px; }
	.blog .inside-article, .archive .inside-article, .search .inside-article { flex-direction: column; }
	.blog .post-image, .archive .post-image, .search .post-image { flex: none; }
	.blog .post-image img, .archive .post-image img, .search .post-image img { min-height: 0; aspect-ratio: 16 / 9; }
	.blog .site-main > article:nth-of-type(8n+1) .inside-article,
	.archive .site-main > article:first-of-type .inside-article { min-height: 320px; }
	.blog .site-main > article:nth-of-type(8n+1) .entry-title,
	.archive .site-main > article:first-of-type .entry-title { font-size: 24px; }
	.sidebar-sticky-ad { position: static; }
	.single .entry-title { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
	.blog .inside-article, .archive .inside-article, .search .inside-article { transition: none; }
}
