/*
Theme Name: SGhomehunter Blog
Theme URI: https://sghomehunter.com/blog
Description: Child theme of Twenty Twenty-Five styled to match sghomehunter.com — dark mode, blue/cyan accents, Inter typography.
Author: SGhomehunter
Author URI: https://sghomehunter.com
Template: twentytwentyfive
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: sghomehunter-blog
*/

/* Inter font loaded via theme.json — fine-tuning only below. */

html { scroll-behavior: smooth; }

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Glow effect on primary buttons to match the React site's neon aesthetic. */
.wp-block-button.is-style-glow .wp-block-button__link {
	box-shadow: 0 0 0 1px rgba(0, 128, 255, 0.4), 0 0 24px rgba(0, 128, 255, 0.35);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.wp-block-button.is-style-glow .wp-block-button__link:hover {
	box-shadow: 0 0 0 1px rgba(0, 191, 255, 0.6), 0 0 32px rgba(0, 191, 255, 0.55);
	transform: translateY(-1px);
}

/* Subtle radial gradient on the site background to match the hero feel. */
body.wp-site-blocks,
body {
	background-image:
		radial-gradient(ellipse 80% 50% at 50% -10%, rgba(20, 48, 82, 0.6), transparent 60%),
		radial-gradient(ellipse 60% 40% at 90% 10%, rgba(0, 128, 255, 0.12), transparent 60%);
	background-attachment: fixed;
}

/* Glass card surface for post lists / featured posts. */
.is-style-glass {
	background: rgba(15, 26, 41, 0.55);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(31, 52, 77, 0.8);
	border-radius: 12px;
}

/* Link underlines: keep readable but understated. */
.entry-content a:not(.wp-element-button) {
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

/* ---------- Post cards (listing grid) ---------- */
.sghh-card {
	position: relative;
	transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.sghh-card .wp-block-post-title {
	flex-grow: 0;
}

.sghh-card .wp-block-post-excerpt {
	flex-grow: 1;
}

.sghh-card:hover {
	border-color: var(--wp--preset--color--primary) !important;
	transform: translateY(-2px);
	box-shadow: 0 8px 32px -8px rgba(0, 128, 255, 0.35);
}

.sghh-card:hover .wp-block-post-title a {
	color: var(--wp--preset--color--accent);
}

.sghh-card .wp-block-post-title a {
	text-decoration: none;
}

/* Stretched overlay so the whole card surface routes to the post.
   We use a sibling ::before on the .sghh-card itself (not the title link)
   to avoid swallowing clicks on the real <a> children. The actual links
   inside the card sit above it via position:relative + z-index. */
.sghh-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	cursor: pointer;
}

/* JS-free fallback: clicking the title link uses the same href as the overlay.
   We hook JS below for the surrounding card area. */

.sghh-card > * {
	position: relative;
	z-index: 2;
}

.sghh-card a {
	position: relative;
	z-index: 2;
}

.sghh-card-arrow {
	transition: transform 0.2s ease;
	margin: 0 !important;
	text-decoration: none;
}

.sghh-card:hover .sghh-card-arrow {
	transform: translateX(4px);
}

/* ---------- Featured hero card ---------- */
.sghh-featured {
	position: relative;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sghh-featured::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	cursor: pointer;
}

.sghh-featured > * {
	position: relative;
	z-index: 2;
}

.sghh-featured a {
	position: relative;
	z-index: 2;
}

.sghh-featured:hover {
	box-shadow: 0 12px 48px -12px rgba(0, 128, 255, 0.45);
}

.sghh-featured .wp-block-post-title a {
	text-decoration: none;
	transition: color 0.15s ease;
}

.sghh-featured:hover .wp-block-post-title a {
	color: var(--wp--preset--color--accent);
}

.sghh-featured-arrow {
	transition: transform 0.2s ease;
	margin: 0 !important;
	text-decoration: none;
}

.sghh-featured:hover .sghh-featured-arrow {
	transform: translateX(4px);
}

/* Grid layout: equal-height cards. */
.wp-block-post-template.is-layout-grid {
	align-items: stretch;
}
.wp-block-post-template.is-layout-grid > li {
	display: flex;
}
.wp-block-post-template.is-layout-grid > li > .wp-block-group {
	width: 100%;
}

/* Mute the category chip on featured */
.sghh-featured-badge .wp-block-post-terms a {
	color: inherit;
	text-decoration: none;
}
