/*
 * Theme Name:  AudioDaily
 * Description: AudioDaily child theme for GeneratePress
 * Template:    generatepress
 * Version:     1.0.0
 * Author:      AudioDaily
 */

/* ==========================================================================
   Global resets / layout
   ========================================================================== */

body {
	margin: 0;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.ad-hero {
	position: relative;
	width: 100%;
	height: 30vh;
	overflow: hidden;
}

/* --- Strip (moving background) --- */

.ad-hero__strip-wrap {
	position: absolute;
	inset: 0;
}

.ad-hero__strip {
	display: flex;
	height: 100%;
	/* width is determined by its children; animation moves it */
	animation: ad-hero-drift 67s linear infinite;
}

@keyframes ad-hero-drift {
	from { transform: translateX( -50% ); }
	to   { transform: translateX( 0 ); }
}

.ad-hero__cover {
	flex: 0 0 auto;
	height: 100%;
	aspect-ratio: 1 / 1;
	display: block;
	text-decoration: none;
}

.ad-hero__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ad-hero__cover--placeholder {
	background: linear-gradient( 135deg, #1a1a1a, #333 );
}

/* --- Overlay (brand + search) --- */

.ad-hero__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 5%;
	background: radial-gradient(
		ellipse 32% 120% at 50% 50%,
		rgba( 0, 0, 0, 0 ) 0%,
		rgba( 0, 0, 0, 0.48 ) 100%
	);
	pointer-events: none;
}

.ad-hero__brand {
	flex: 0 0 auto;
}

.ad-hero__site-name {
	font-size: clamp( 2rem, 5vw, 4rem );
	font-weight: 800;
	color: #fff;
	letter-spacing: -.02em;
	line-height: 1;
	text-shadow: 0 2px 12px rgba( 0, 0, 0, .4 );
}

.ad-hero__search {
	flex: 0 0 auto;
	width: min( 340px, 38vw );
	pointer-events: auto;
}

/* Style the default WP search form */
.ad-hero__search .search-form {
	display: flex;
	gap: 0;
}

.ad-hero__search .search-field {
	flex: 1;
	padding: 10px 14px;
	font-size: 15px;
	border: none;
	border-radius: 3px 0 0 3px;
	background: rgba( 255, 255, 255, 0.92 );
	color: #1a1a1a;
	outline: none;
}

.ad-hero__search .search-field::placeholder {
	color: #888;
}

.ad-hero__search .search-submit {
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	background: #fff;
	color: #1a1a1a;
	border: none;
	border-radius: 0 3px 3px 0;
	cursor: pointer;
	transition: background .2s;
}

.ad-hero__search .search-submit:hover {
	background: #e5e5e5;
}

/* ==========================================================================
   Homepage carousel zone
   ========================================================================== */

.ad-homepage {
	padding: 12px 0 8px;
}

/* ==========================================================================
   Carousel band
   ========================================================================== */

.ad-band {
	margin-bottom: 20px;
}

.ad-band__title {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -.01em;
	color: #1a1a1a;
	margin: 0 0 6px;
	padding-left: 46px; /* indent past the left arrow */
}

.ad-band__scroll {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.ad-band__scroll::-webkit-scrollbar {
	display: none;
}

.ad-band__track {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	width: max-content;
}

/* Fix tile width inside bands */
.ad-band__track .ad-tile {
	flex: 0 0 160px;
	width: 160px;
	scroll-snap-align: start;
}

/* --- Arrow navigation --- */

.ad-band__nav-wrap {
	display: grid;
	grid-template-columns: 36px 1fr 36px;
	align-items: start;
	width: 100%;
}

/* Scroll track in the centre column — overflow stays contained */
.ad-band__nav-wrap .ad-band__scroll {
	width: 100%;
	min-width: 0;
}

.ad-band__arrow {
	height: 160px; /* art area only */
	width: 36px;
	border: none;
	cursor: pointer;
	font-size: 28px;
	line-height: 1;
	color: #fff;
	background: rgba( 0, 0, 0, .45 );
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, opacity .2s;
	padding: 0;
}

.ad-band__arrow:hover {
	background: rgba( 0, 0, 0, .70 );
}

.ad-band__arrow--hidden {
	opacity: 0;
	pointer-events: none;
}

/* ==========================================================================
   Front page — full-width layout
   ========================================================================== */

/* Make homepage and single posts truly full-bleed: remove max-width cap and
   horizontal padding from GP's grid-container so content spans edge-to-edge. */
body.home .grid-container,
body.single-post .grid-container {
	max-width: none !important;
}

body.home .site-content,
body.single-post .site-content {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* GP's flexbox mode sets .site-content { display: flex } which makes our
   custom single-post template children lay out as horizontal columns.
   Override to block so our own internal grids control the layout. */
body.single-post .site-content {
	display: block;
}

/* Hero and single-post banner both provide site identity; suppress the GP header strip. */
body.home .site-header,
body.single-post .site-header {
	display: none;
}

/* ==========================================================================
   Single post — Banner
   ========================================================================== */

.ad-banner {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.ad-banner--shallow { height: 25vh; min-height: 160px; }
.ad-banner--medium  { height: 40vh; min-height: 220px; }
.ad-banner--deep    { height: 60vh; min-height: 300px; }

.ad-banner__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ad-banner--placeholder {
	background: linear-gradient( 135deg, #111, #2a2a2a );
}

/* Overlay — two zones: topbar (site brand) at top, post info at bottom */

.ad-banner__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background: linear-gradient(
		to bottom,
		rgba( 0, 0, 0, .55 ) 0%,
		rgba( 0, 0, 0, .12 ) 35%,
		rgba( 0, 0, 0, .12 ) 65%,
		rgba( 0, 0, 0, .55 ) 100%
	);
}

/* --- Top zone: site identity + search --- */

.ad-banner__topbar {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 14px 24px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
}

.ad-banner__topbar-name {
	font-size: clamp( 1.56rem, 3vw, 2rem );
	font-weight: 700;
	color: rgba( 255, 255, 255, .88 );
	text-decoration: none;
	letter-spacing: .02em;
	line-height: 1.2;
}

.ad-banner__topbar-name:hover {
	color: #fff;
}

.ad-banner__topbar-tagline {
	font-size: clamp( 1.13rem, 1.9vw, 1.35rem );
	font-weight: 400;
	color: rgba( 255, 255, 255, .88 );
	letter-spacing: .03em;
	line-height: 1.2;
	text-align: center;
}

.ad-banner__topbar-search {
	justify-self: end;
	width: min( 260px, 30vw );
}

.ad-banner__topbar-search .search-form {
	display: flex;
	gap: 0;
}

.ad-banner__topbar-search .search-field {
	flex: 1;
	min-width: 0;
	padding: 7px 12px;
	font-size: 13px;
	border: none;
	border-radius: 3px 0 0 3px;
	background: rgba( 255, 255, 255, .88 );
	color: #1a1a1a;
	outline: none;
}

.ad-banner__topbar-search .search-field::placeholder {
	color: #888;
}

.ad-banner__topbar-search .search-submit {
	padding: 7px 12px;
	font-size: 13px;
	font-weight: 600;
	background: #fff;
	color: #1a1a1a;
	border: none;
	border-radius: 0 3px 3px 0;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s;
}

.ad-banner__topbar-search .search-submit:hover {
	background: #e5e5e5;
}

/* --- Bottom zone: post title + excerpt --- */

.ad-banner__overlay-inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px 20px;
}

.ad-banner__title {
	font-size: clamp( 1.6rem, 4vw, 2.8rem );
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.15;
	color: #fff;
	text-shadow: 0 2px 14px rgba( 0, 0, 0, .45 );
	margin: 0 0 10px;
}

.ad-banner__excerpt {
	font-size: clamp( .9rem, 2vw, 1.1rem );
	color: rgba( 255, 255, 255, .88 );
	text-shadow: 0 1px 8px rgba( 0, 0, 0, .5 );
	line-height: 1.5;
	margin: 0;
	max-width: 640px;
}

/* ==========================================================================
   Single post — Rail top (album data + availability side by side)
   ========================================================================== */

.ad-rail-top {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	background: #f7f5ff;
	border-radius: 6px;
	padding: 14px;
	margin-bottom: 16px;
}

.ad-rail-top .ad-album-data,
.ad-rail-top .ad-availability {
	flex: 1;
	min-width: 0;
	padding-bottom: 0;
	margin-bottom: 0;
	border-bottom: none;
}

/* ==========================================================================
   Single post — Album data (right rail, top)
   ========================================================================== */

.ad-album-data {
	padding-bottom: 16px;
	margin-bottom: 16px;
	border-bottom: 1px solid #e8e8e8;
}

.ad-album-data__attribution {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: #666;
	margin: 0 0 6px;
}

.ad-album-data__performers {
	font-size: 15px;
	color: #222;
	margin: 0 0 5px;
	line-height: 1.4;
}

.ad-album-data__meta {
	font-size: 12px;
	color: #999;
	margin: 0;
}

/* ==========================================================================
   Single post — Two-column body
   ========================================================================== */

.ad-single-body {
	padding: 28px 24px 48px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"why-listen  rail"
		"content     rail";
	column-gap: 48px;
	row-gap: 24px;
}

.ad-why-listen-pane { grid-area: why-listen; }
.ad-single-content  { grid-area: content; min-width: 0; }
.ad-single-rail     { grid-area: rail; }

.ad-single-content .entry-content > * {
	max-width: none;
}

/* ==========================================================================
   Single post — Right rail
   ========================================================================== */

/* Rail column stretches to match left column (grid default: align-items stretch).
   This keeps the sticky player active for the full scroll of the review text. */

.ad-rail-sticky {
	/* position: sticky; top: 80px; — re-enable if you want the player to
	   follow the reader as they scroll through the review text. */
}

.ad-rail-promo {
	margin-top: 24px;
	/* Future ad / promo blocks slot in here and flow below the sticky player. */
}

/* ==========================================================================
   Why Listen
   ========================================================================== */

.ad-why-listen {
	display: flow-root; /* contain the floated portrait */
	background: #f7f5ff;
	border-left: 3px solid #5856d6;
	border-radius: 0 4px 4px 0;
	padding: 12px 14px;
	margin-bottom: 14px;
}

.ad-why-listen__portrait-wrap {
	position: relative;
	float: left;
	width: 100px;
	margin: 0 12px 0 0;
}

.ad-why-listen__portrait {
	display: block;
	width: 100%;
	height: auto;
}

.ad-why-listen__portrait-wrap--has-audio::before,
.ad-why-listen__portrait-wrap--has-audio::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid #5856d6;
	opacity: 0;
	animation: why-listen-ripple 3.6s ease-out infinite;
	pointer-events: none;
}

.ad-why-listen__portrait-wrap--has-audio::after {
	animation-delay: 1.8s;
}

@keyframes why-listen-ripple {
	0%   { transform: scale( 1 );   opacity: .22; }
	100% { transform: scale( 1.6 ); opacity: 0; }
}

.ad-why-listen__label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #5856d6;
	margin: 0 0 5px;
}

.ad-why-listen__text {
	font-size: 13px;
	font-style: italic;
	color: #3a3850;
	line-height: 1.55;
	margin: 0;
}

.ad-why-listen audio {
	display: none;
}

.ad-why-listen__portrait-wrap--has-audio {
	cursor: pointer;
}

.ad-why-listen__play-btn {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX( -50% );
	background: rgba( 0, 0, 0, .62 );
	font-size: 16px;
	line-height: 1;
	padding: 6px 14px;
	border-radius: 10px;
	pointer-events: none;
	white-space: nowrap;
}

.ad-why-listen__icon--play { color: #5856d6; }
.ad-why-listen__icon--stop { display: none; color: #e03030; font-size: 20px; }

.ad-why-listen__portrait-wrap--is-playing .ad-why-listen__icon--play { display: none; }
.ad-why-listen__portrait-wrap--is-playing .ad-why-listen__icon--stop { display: inline; }

.ad-why-listen__portrait-wrap--ripple-off::before,
.ad-why-listen__portrait-wrap--ripple-off::after {
	animation: none;
	opacity: 0;
}

/* ==========================================================================
   Apple Music player
   ========================================================================== */

.ad-apple-music {
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	margin: 0 auto 12px;
	max-width: 660px;
}

.ad-apple-music iframe {
	display: block;
	width: 100%;
	border: none;
}

/* ==========================================================================
   Availability (in right rail)
   ========================================================================== */

.ad-availability {
	padding-bottom: 16px;
	margin-bottom: 16px;
	border-bottom: 1px solid #e8e8e8;
}

.ad-availability__header {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #999;
	margin: 0 0 5px;
	padding: 4px 6px;
	border-radius: 4px;
	background: #eef6f2;
}

.ad-availability__row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 5px;
	padding: 5px 6px;
	border-radius: 4px;
}

.ad-availability__row:last-child {
	margin-bottom: 0;
}

.ad-availability__row--atmos { background: #dff0e8; }
.ad-availability__row--hires { background: #cce8db; }
.ad-availability__row--buy   { background: #b8dfcc; }

.ad-availability__format {
	flex: 0 0 110px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.ad-availability__format span {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	line-height: 1.3;
}

/* Dolby Atmos wordmark — scaled to label height, column width shared with all rows */
.ad-availability__format--atmos img {
	display: block;
	height: 14px;
	width: auto;
}

.ad-hires-badge {
	display: inline-flex;
	line-height: 1;
}

.ad-hires-badge__hi,
.ad-hires-badge__res {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .22em;
	padding: 3px 7px;
	text-align: center;
	box-sizing: border-box;
}

.ad-hires-badge__hi {
	background: #fff;
	color: #1a1a1a;
	border: 1.5px solid #1a1a1a;
	font-weight: 900;
	-webkit-text-stroke: 0.4px #1a1a1a;
}

.ad-hires-badge__res {
	background: #1a1a1a;
	color: #fff;
	border: 1.5px solid #1a1a1a;
	border-left: none;
}

/* .ad-availability__format--buy uses the shared 110px column width */

.ad-availability__format--buy img {
	display: block;
	height: 22px;
	width: 22px;
	flex-shrink: 0;
}

.ad-availability__format--buy span {
	font-size: 11px;
	font-weight: 900;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #1a1a1a;
	-webkit-text-stroke: 0.3px #1a1a1a;
}

.ad-availability__links {
	flex: 1;
	font-size: 13px;
	line-height: 1.5;
}

.ad-availability__link {
	color: #222;
	text-decoration: none;
	font-weight: 500;
}

.ad-availability__link:hover {
	color: #000;
	text-decoration: underline;
}

.ad-availability__link + .ad-availability__link::before {
	content: ' | ';
	color: #bbb;
	margin: 0 3px;
	font-weight: 400;
}

.ad-availability__digital-only {
	color: #222;
	font-weight: 500;
}

/* ==========================================================================
   More Like This
   ========================================================================== */

.ad-more-like-this {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 24px 48px;
	border-top: 1px solid #eee;
}

.ad-more-like-this__title {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -.01em;
	color: #1a1a1a;
	margin: 0 0 10px;
}

/* Reuses .ad-band__scroll and .ad-band__track from the front page. */

/* ==========================================================================
   Single post — responsive
   ========================================================================== */

@media ( max-width: 1040px ) {
	.ad-single-body {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		grid-template-areas:
			"why-listen"
			"rail"
			"content";
		gap: 24px;
		padding-bottom: 32px;
	}

	/* Keep players readable on narrow screens. */
	.ad-apple-music {
		border-radius: 8px;
	}
}
