/*
Theme Name: RP Speaks Child
Theme URI: https://rpspeaks.com/
Description: Child theme of Astra for RP Speaks. Adds a custom magazine-style homepage that pulls real posts into a lead story, a secondary column, and a "Latest" grid.
Author: RP Speaks
Template: astra
Version: 1.0.0
Text Domain: rpspeaks-child
*/

/* ===========================================================================
   RP Speaks - custom homepage styles
   Every rule below is scoped to .rps-page, so nothing here can affect the
   rest of the site (posts, pages, admin, etc.).
   =========================================================================== */

:root {
	--rps-ink: #131A22;
	--rps-ink-soft: #4B5763;
	--rps-paper: #FBFBF9;
	--rps-line: #E1E3DD;
	--rps-azure: #2952E3;
	--rps-azure-deep: #1D3EB0;
	--rps-amber: #F2A93B;
	--rps-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--rps-sans: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rps-page {
	background: var(--rps-paper);
	color: var(--rps-ink);
	font-family: var(--rps-sans);
	-webkit-font-smoothing: antialiased;
}
.rps-page *,
.rps-page *::before,
.rps-page *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------------------
   Site header + footer injected on every (non-home) page via child hooks.
   Astra's own bare header/footer are hidden in favour of these.
   --------------------------------------------------------------------------- */
#masthead.site-header,
#colophon.site-footer { display: none !important; }

.rps-sitebar { background: var(--rps-paper); font-family: var(--rps-sans); }
.rps-sitebar *,
.rps-sitewide-footer * { box-sizing: border-box; }

.rps-wrap { max-width: 1180px; margin: 0 auto; padding: 0 26px; }
.rps-page a { text-decoration: none; color: inherit; }
.rps-page img { max-width: 100%; }

/* The homepage template is standalone, so keep the body flush behind it. */
body.home { margin: 0; background: #FBFBF9; }

/* Top strip -------------------------------------------------------------- */
.rps-topbar { background: var(--rps-ink); color: #AEB8C2; font-size: 12px; }
.rps-topbar .rps-wrap { display: flex; justify-content: space-between; align-items: center;
	min-height: 32px; gap: 16px; flex-wrap: wrap; }
.rps-topbar .rps-live { color: var(--rps-amber); font-weight: 600; white-space: nowrap; }

/* Masthead ------------------------------------------------------------------ */
.rps-masthead { padding: 26px 0 0; position: relative; z-index: 40; }
.rps-masthead .rps-wrap { display: flex; justify-content: space-between; align-items: center;
	gap: 20px; flex-wrap: wrap; }
.rps-logo { font-family: var(--rps-sans); font-weight: 800; font-size: 23px;
	letter-spacing: -0.01em; margin: 0; line-height: 1; }
.rps-logo em { font-style: normal; color: var(--rps-azure); }
.rps-logo a { display: inline-flex; align-items: center; gap: 11px; }
.rps-logo .rps-logo-file { display: block; height: 42px; width: auto; max-width: 260px; }
.rps-logo .rps-logo-text { white-space: nowrap; }
.rps-nav { display: flex; gap: 26px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.rps-nav li { list-style: none; margin: 0; position: relative; }
.rps-nav a { display: inline-block; color: var(--rps-ink); font-weight: 600; font-size: 14.5px;
	padding-bottom: 4px; border-bottom: 2px solid transparent; }
.rps-nav a:hover,
.rps-nav a.rps-on { border-bottom-color: var(--rps-azure); color: var(--rps-azure-deep); }
.rps-nav .current-menu-item > a,
.rps-nav .current-menu-parent > a,
.rps-nav .current-menu-ancestor > a { border-bottom-color: var(--rps-azure); color: var(--rps-azure-deep); }

/* Astra injects its own mobile toggles into menu items - hide them in our nav */
.rps-nav .dropdown-menu-toggle,
.rps-nav .ast-menu-toggle,
.rps-nav .ast-header-navigation-arrow,
.rps-nav .menu-link > .ast-icon { display: none !important; }
.rps-nav .menu-link { display: inline-flex; align-items: center; }

/* Sub-menu: a "Categories" parent holding the section links, etc. */
.rps-nav .menu-item-has-children > a::after {
	content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg); vertical-align: middle;
}
.rps-nav .sub-menu {
	position: absolute; top: 100%; left: 0; z-index: 60;
	min-width: 190px; margin: 0; padding: 8px 0; list-style: none;
	background: var(--rps-paper); border: 1px solid var(--rps-line); border-radius: 9px;
	box-shadow: 0 14px 34px rgba(19, 26, 34, 0.13);
	opacity: 0; visibility: hidden; transform: translateY(4px);
	transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.rps-nav li:hover > .sub-menu,
.rps-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.rps-nav .sub-menu li { display: block; }
.rps-nav .sub-menu a { display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 7px 16px; font-size: 13.5px; font-weight: 600;
	border-bottom: 0; white-space: nowrap; color: var(--rps-ink); }
.rps-nav .sub-menu a:hover { color: var(--rps-azure-deep); background: rgba(41, 82, 227, 0.07);
	border-bottom: 0; }

/* Level 3+ : fly out to the side instead of downward */
.rps-nav .sub-menu .sub-menu { top: -9px; left: 100%; margin-left: 2px; transform: translateX(4px); }
.rps-nav .sub-menu li:hover > .sub-menu,
.rps-nav .sub-menu li:focus-within > .sub-menu { transform: translateX(0); }
.rps-nav .sub-menu .menu-item-has-children > a::after {
	transform: translateY(-1px) rotate(-45deg); margin-left: 0; flex: none;
}

.rps-rule { border: none; border-top: 1px solid var(--rps-line); margin: 18px 0 0; }

/* Tag pill ---------------------------------------------------------------- */
.rps-tag { display: inline-block; font-size: 12.5px; font-weight: 700;
	color: var(--rps-azure-deep); border: 1.5px solid var(--rps-azure); border-radius: 5px;
	padding: 3px 10px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.02em; }

/* Hero ------------------------------------------------------------------- */
.rps-hero { padding: 40px 0 8px; }
.rps-hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; }

.rps-lead .rps-thumb { width: 100%; height: 360px; object-fit: cover; border-radius: 6px;
	display: block; background: var(--rps-line); }
.rps-lead h1 { font-family: var(--rps-sans); font-weight: 800; font-size: 38px;
	line-height: 1.08; margin: 18px 0 12px; letter-spacing: -0.015em; }
.rps-lead h1 a:hover { color: var(--rps-azure-deep); }
.rps-lead .rps-dek { font-family: var(--rps-serif); font-size: 17px; line-height: 1.6;
	color: var(--rps-ink-soft); max-width: 56ch; margin: 0 0 12px; }
.rps-byline { font-size: 13px; color: var(--rps-ink-soft); font-weight: 500; }
.rps-byline b { color: var(--rps-ink); }

.rps-side { display: flex; flex-direction: column; }
.rps-side-story { padding: 18px 0; border-bottom: 1px solid var(--rps-line); }
.rps-side-story:first-child { padding-top: 0; }
.rps-side-story:last-child { border-bottom: none; }
.rps-side-story .rps-tag { font-size: 11.5px; padding: 2px 8px; margin-bottom: 8px; }
.rps-side-story h2 { font-family: var(--rps-sans); font-weight: 700; font-size: 18.5px;
	line-height: 1.28; margin: 0 0 8px; }
.rps-side-story h2 a:hover { color: var(--rps-azure-deep); }
.rps-side-story p { font-size: 13px; color: var(--rps-ink-soft); line-height: 1.5;
	margin: 0 0 8px; font-family: var(--rps-serif); }

/* Latest --------------------------------------------------------------------- */
.rps-latest { padding: 48px 0 60px; }
.rps-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.rps-section-head .rps-dash { width: 26px; height: 4px; background: var(--rps-azure);
	border-radius: 2px; }
.rps-section-head h3 { font-family: var(--rps-sans); font-weight: 800; font-size: 22px; margin: 0; }

.rps-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.rps-card .rps-thumb { width: 100%; height: 160px; object-fit: cover; border-radius: 6px;
	display: block; margin-bottom: 14px; background: var(--rps-line); }
.rps-card .rps-tag { font-size: 11px; padding: 2px 8px; margin-bottom: 8px; }
.rps-card h4 { font-family: var(--rps-sans); font-weight: 700; font-size: 17px;
	line-height: 1.3; margin: 0 0 8px; }
.rps-card h4 a:hover { color: var(--rps-azure-deep); }
.rps-card p { font-family: var(--rps-serif); font-size: 13.5px; color: var(--rps-ink-soft);
	line-height: 1.5; margin: 0 0 8px; }
.rps-meta { font-size: 12px; color: #8B95A0; font-weight: 500; }

/* Subscribe ------------------------------------------------------------------ */
.rps-sub { background: var(--rps-ink); padding: 44px 0; }
.rps-sub .rps-wrap { display: flex; justify-content: space-between; align-items: center;
	gap: 30px; flex-wrap: wrap; }
.rps-sub h3 { font-family: var(--rps-sans); color: #fff; font-weight: 800; font-size: 23px;
	margin: 0 0 6px; }
.rps-sub p { color: #9AA6B2; font-size: 13.5px; margin: 0; max-width: 38ch; }
.rps-sub form { display: flex; max-width: 100%; }
.rps-sub input { background: #1E2731; border: 1.5px solid #354150; border-right: none;
	padding: 11px 14px; color: #fff; font-family: var(--rps-sans); font-size: 13.5px;
	width: 220px; border-radius: 5px 0 0 5px; }
.rps-sub input::placeholder { color: #6E7A87; }
.rps-sub button { background: var(--rps-azure); border: 1.5px solid var(--rps-azure);
	color: #fff; font-family: var(--rps-sans); font-weight: 700; font-size: 13.5px;
	padding: 0 20px; border-radius: 0 5px 5px 0; cursor: pointer; }
.rps-sub button[disabled] { opacity: 0.6; cursor: default; }
.rps-sub__msg { font-family: var(--rps-sans); font-size: 13px; color: #9AA6B2; margin: 12px 0 0; }
.rps-sub__msg.is-ok { color: #7FE0A8; }
.rps-sub__msg.is-err { color: var(--rps-amber); }

/* Single-item fallbacks (option C: collapse gracefully) --------------------- */
.rps-hero-grid.rps-no-side { grid-template-columns: 1fr; }
.rps-hero-grid.rps-no-side .rps-lead .rps-thumb { height: 420px; }
.rps-latest.rps-hidden { display: none; }

/* Responsive --------------------------------------------------------------- */
/* Site-wide footer ------------------------------------------------------------ */
.rps-sitewide-footer { background: var(--rps-ink); color: #AEB8C2; font-family: var(--rps-sans);
	padding: 48px 0 0; }
.rps-sitewide-footer .rps-wrap { max-width: 1180px; margin: 0 auto; padding: 0 26px; }
.rps-foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
	padding-bottom: 36px; }
.rps-foot-brand .rps-logo { font-size: 21px; font-weight: 800; color: #fff; margin: 0 0 8px;
	font-family: var(--rps-sans); }
.rps-foot-brand .rps-logo em { font-style: normal; color: #6E8BFF; }
.rps-foot-brand p { font-family: var(--rps-serif); font-size: 14px; color: #9AA6B2;
	margin: 0; max-width: 34ch; }
.rps-foot-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
	text-transform: uppercase; color: #6E7A87; margin: 0 0 14px; }
.rps-foot-col ul { list-style: none; margin: 0; padding: 0; }
.rps-foot-col li { margin: 0 0 10px; }
.rps-foot-col a { color: #C4CCD4; font-size: 14px; text-decoration: none; }
.rps-foot-col a:hover { color: #fff; }
.rps-foot-bar { border-top: 1px solid #2A343F; padding: 18px 0 22px; display: flex;
	justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
	font-size: 12.5px; color: #6E7A87; }
.rps-foot-bar a { color: #6E7A87; text-decoration: none; }
.rps-foot-bar a:hover { color: #C4CCD4; }
.rps-foot-social { display: flex; gap: 10px; margin-top: 16px; }
.rps-foot-social a { display: inline-flex; width: 34px; height: 34px; align-items: center;
	justify-content: center; border: 1px solid #2A343F; border-radius: 8px; color: #9AA6B2; }
.rps-foot-social a:hover { color: #fff; border-color: #6E8BFF; }
.rps-foot-social svg { width: 16px; height: 16px; fill: currentColor; }

/* Article share bar (appended inside .entry-content on single posts) */
.rps-share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
	margin: 30px 0 6px; padding-top: 20px; border-top: 1px solid var(--rps-line); }
.rps-share__label { font-family: var(--rps-sans); font-weight: 700; font-size: 11.5px;
	text-transform: uppercase; letter-spacing: 0.07em; color: #8B95A0; margin-right: 4px; }
.rps-share__btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--rps-sans);
	font-size: 12.5px; font-weight: 600; color: var(--rps-ink-soft); background: #fff;
	border: 1px solid var(--rps-line); border-radius: 999px; padding: 6px 13px; cursor: pointer;
	text-decoration: none; line-height: 1; }
.rps-share__btn:hover { color: var(--rps-azure-deep); border-color: var(--rps-azure); }
.rps-share__ico { display: inline-flex; }
.rps-share__ico svg { width: 14px; height: 14px; fill: currentColor; display: block; }
.rps-share__copy.is-copied { color: #1a7f37; border-color: #1a7f37; }

/* "More from RP Speaks" after an article */
.rps-related { display: block; margin: 34px 0 6px; padding-top: 24px;
	border-top: 1px solid var(--rps-line); }
.rps-related__head { font-family: var(--rps-sans); font-weight: 800; font-size: 14px;
	text-transform: uppercase; letter-spacing: 0.05em; color: var(--rps-ink); margin: 0 0 18px;
	display: flex; align-items: center; gap: 9px; }
.rps-related__head::before { content: ""; width: 22px; height: 3px; background: var(--rps-azure);
	border-radius: 2px; flex: none; }
.rps-related__list { display: grid; gap: 16px; }
.rps-related__item { display: grid; grid-template-columns: 100px 1fr; gap: 14px; align-items: start; }
.rps-related__thumb { display: block; }
.rps-related__thumb img,
.rps-related__thumb--empty { width: 100px; height: 70px; object-fit: cover; border-radius: 6px;
	background: var(--rps-line); display: block; }
.rps-related__cat { font-family: var(--rps-sans); font-size: 10.5px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.04em; color: var(--rps-azure-deep); }
.rps-related__item h3 { font-family: var(--rps-sans); font-weight: 700; font-size: 15px;
	line-height: 1.3; margin: 3px 0 5px; }
.rps-related__item h3 a { color: var(--rps-ink); text-decoration: none; }
.rps-related__item h3 a:hover { color: var(--rps-azure-deep); }
.rps-related__date { font-family: var(--rps-sans); font-size: 11.5px; color: #8B95A0; }

@media (max-width: 600px) {
	.rps-related__item { grid-template-columns: 76px 1fr; gap: 12px; }
	.rps-related__thumb img,
	.rps-related__thumb--empty { width: 76px; height: 56px; }
}

/* Branded 404 -------------------------------------------------------------- */
.rps-404 { max-width: 640px; margin: 0 auto; padding: 90px 26px 110px; text-align: center; }
.rps-404 .rps-code { font-family: var(--rps-sans); font-weight: 800; font-size: 64px;
	color: var(--rps-azure); letter-spacing: -0.02em; margin: 0; }
.rps-404 h1 { font-family: var(--rps-sans); font-weight: 800; font-size: 26px; margin: 10px 0 12px; }
.rps-404 p { font-family: var(--rps-serif); font-size: 16px; color: var(--rps-ink-soft);
	line-height: 1.6; margin: 0 0 24px; }
.rps-404 .rps-btn { display: inline-block; background: var(--rps-azure); color: #fff;
	font-family: var(--rps-sans); font-weight: 700; font-size: 14px; text-decoration: none;
	padding: 11px 22px; border-radius: 6px; }
.rps-404 .rps-btn:hover { background: var(--rps-azure-deep); }
.rps-404 form { margin-top: 26px; }
.rps-404 .search-form { display: inline-flex; gap: 8px; align-items: center; justify-content: center;
	flex-wrap: wrap; }
.rps-404 .search-form label { margin: 0; }
.rps-404 input[type="search"] { border: 1.5px solid var(--rps-line); border-radius: 6px;
	padding: 10px 14px; font-size: 14px; font-family: var(--rps-sans); width: 260px; max-width: 70%; }
.rps-404 .search-submit,
.rps-404 .search-form button[type="submit"] { background: var(--rps-azure); border: 1.5px solid var(--rps-azure);
	color: #fff; font-family: var(--rps-sans); font-weight: 700; border-radius: 6px; padding: 10px 18px;
	cursor: pointer; }
.rps-404 .search-submit:hover,
.rps-404 .search-form button[type="submit"]:hover { background: var(--rps-azure-deep); border-color: var(--rps-azure-deep); }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 860px) {
	.rps-hero-grid, .rps-grid3 { grid-template-columns: 1fr; }
	.rps-lead h1 { font-size: 30px; }
	.rps-lead .rps-thumb,
	.rps-hero-grid.rps-no-side .rps-lead .rps-thumb { height: 230px; }
	.rps-sub .rps-wrap { flex-direction: column; align-items: flex-start; }
	.rps-sub input { width: 100%; }
	.rps-sub form { width: 100%; }
	.rps-foot-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
	.rps-foot-brand { grid-column: 1 / -1; }
	.rps-foot-bar { justify-content: flex-start; }

	/* No hover on touch: show every sub-menu level inline, indented under its parent */
	.rps-nav { gap: 12px 20px; }
	.rps-nav li { position: static; }
	.rps-nav .menu-item-has-children { width: 100%; }
	.rps-nav .menu-item-has-children > a::after { display: none; }
	.rps-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none;
		min-width: 0; margin: 0; border: 0; box-shadow: none; background: transparent;
		padding: 4px 0 2px 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
	.rps-nav .sub-menu a { display: inline; padding: 2px 0; white-space: normal; }
	.rps-nav .sub-menu .sub-menu { flex-basis: 100%; padding: 2px 0 2px 14px; }
	.rps-logo .rps-logo-file { height: 34px; }
	.rps-logo .rps-logo-text { font-size: 19px; }
	.rps-logo a { gap: 9px; }
}

/* ===========================================================================
   Article pages - carry the RP Speaks brand into the reading experience.
   Everything is scoped to .ast-single-post so posts change but pages,
   archives and the homepage are untouched.
   =========================================================================== */

.ast-single-post .entry-header,
.ast-single-post .entry-content,
.ast-single-post .post-navigation,
.ast-single-post .ast-single-related-posts,
.ast-single-post .comments-area,
.ast-single-post .comment-respond {
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}

/* Featured image */
.ast-single-post .post-thumb-img-content img {
	display: block;
	width: 100%;
	max-height: 440px;
	object-fit: cover;
	border-radius: 8px;
}

/* Headline */
.ast-single-post .entry-title {
	font-family: var(--rps-sans);
	font-weight: 800;
	font-size: 34px;
	line-height: 1.12;
	letter-spacing: -0.015em;
	color: var(--rps-ink);
	margin: 22px 0 12px;
}

/* Meta row + category pill */
.ast-single-post .entry-meta {
	font-family: var(--rps-sans);
	font-size: 13px;
	color: #8B95A0;
}
.ast-single-post .entry-meta a { color: #8B95A0; text-decoration: none; }
.ast-single-post .entry-meta a:hover { color: var(--rps-ink-soft); }
.ast-single-post .entry-meta .ast-terms-link a {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--rps-azure-deep);
	border: 1.5px solid var(--rps-azure);
	border-radius: 5px;
	padding: 2px 9px;
}
.ast-single-post .entry-meta .ast-terms-link a:hover { color: var(--rps-azure); }

/* Body copy */
.ast-single-post .entry-content {
	font-family: var(--rps-serif);
	font-size: 18px;
	line-height: 1.75;
	color: #23262B;
}
.ast-single-post .entry-content p { margin: 0 0 1.35em; }
.ast-single-post .entry-content > *:first-child { margin-top: 0; }

/* In-article headings */
.ast-single-post .entry-content h2,
.ast-single-post .entry-content h3,
.ast-single-post .entry-content h4 {
	font-family: var(--rps-sans);
	font-weight: 700;
	color: var(--rps-ink);
	letter-spacing: -0.01em;
	line-height: 1.25;
}
.ast-single-post .entry-content h2 { font-size: 24px; margin: 1.8em 0 0.55em; }
.ast-single-post .entry-content h3 { font-size: 20px; margin: 1.6em 0 0.5em; }
.ast-single-post .entry-content h4 { font-size: 17px; margin: 1.5em 0 0.5em; }

/* Links inside the article */
.ast-single-post .entry-content a {
	color: var(--rps-azure-deep);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}
.ast-single-post .entry-content a:hover { color: var(--rps-azure); }

/* Lists */
.ast-single-post .entry-content ul,
.ast-single-post .entry-content ol { margin: 0 0 1.35em; padding-left: 1.3em; }
.ast-single-post .entry-content li { margin: 0 0 0.5em; }

/* Pull quotes */
.ast-single-post .entry-content blockquote {
	margin: 1.7em 0;
	padding: 2px 0 2px 22px;
	border-left: 3px solid var(--rps-azure);
	font-style: normal;
	color: var(--rps-ink-soft);
}
.ast-single-post .entry-content blockquote p { font-size: 20px; line-height: 1.6; margin-bottom: 0.6em; }

/* Images, figures, rules */
.ast-single-post .entry-content img { border-radius: 8px; }
.ast-single-post .entry-content figcaption {
	font-family: var(--rps-sans);
	font-size: 12.5px;
	color: #8B95A0;
	margin-top: 8px;
	text-align: center;
}
.ast-single-post .entry-content hr {
	border: none;
	border-top: 1px solid var(--rps-line);
	margin: 2em 0;
}

/* Post navigation, related posts, comments headings */
.ast-single-post .post-navigation .nav-links a,
.ast-single-post .ast-single-related-posts-title,
.ast-single-post .comments-title,
.ast-single-post .comment-reply-title {
	font-family: var(--rps-sans);
}
.ast-single-post .comments-title,
.ast-single-post .comment-reply-title {
	font-weight: 800;
	color: var(--rps-ink);
}

@media (max-width: 782px) {
	.ast-single-post .entry-title { font-size: 27px; }
	.ast-single-post .entry-content { font-size: 17px; }
	.ast-single-post .entry-content blockquote p { font-size: 18px; }
}
