/* =============================================================
   SaReGaMaLu custom modules — Song DNA / Related Songs / Mood Discovery
   Loaded via wp_enqueue_style() in functions.php.
   ============================================================= */

/* ---- Ticker placement ------------------------------------------------
   #ticker and #masthead are sibling flex children of #page (flex-direction:
   column). Reordering visually with `order` instead of moving markup keeps
   the theme's own ticker template untouched — safest way to move it above
   the header/logo, matching the site's intended top-of-page layout. */
#page > #ticker {
	order: -1;
}

#page > #masthead {
	order: 0;
}

/* ---- Ticker: full-width orange bar, compact 30px, contained scroll ----
   Rebuilt as one coherent chain instead of patches, after tracing the
   actual failure: #ticker is display:flex, and every wrapper down to
   .col-xs-12 is a flex/block child that defaults to shrinking to its own
   content width unless told otherwise — so the whole chain collapsed to
   ~215px (the label's width) the moment .ticker-slider-box was taken out
   of flow. Each level below now gets an explicit width:100% so it
   actually fills the one above it, all the way down to
   .bloghash-card-items — which is the one level where the label
   (in-flow, content-width) and the scrolling news (position:absolute,
   sized by left/right against this fixed-width parent, not by its own
   100000px content) sit side by side. */
#ticker,
#ticker .bloghash-ticker,
#ticker .bloghash-ticker-container,
#ticker .bloghash-flex-row,
#ticker .col-xs-12,
#ticker .bloghash-card-items,
#ticker .ticker-slider-box,
#ticker .ticker-slider-wrap,
#ticker .js-marquee-wrapper,
#ticker .js-marquee,
#ticker .ticker-item,
#ticker .ticker-slide-item,
#ticker .ticker-slider-backgrounds,
#ticker .slide-inner,
#ticker .slide-inner h6 {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

#ticker .bloghash-ticker,
#ticker .bloghash-ticker-container,
#ticker .bloghash-flex-row,
#ticker .col-xs-12 {
	display: block !important;
	width: 100% !important;
	height: 30px !important;
	overflow: hidden !important;
	background-color: #ff5100 !important;
}

#ticker {
	display: block !important;
	height: 30px !important;
	overflow: hidden !important;
}

#ticker .bloghash-card-items {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	height: 30px !important;
	overflow: hidden !important;
}

#ticker .widget-title {
	position: relative !important;
	display: inline-flex !important;
	align-items: center !important;
	height: 30px !important;
	padding: 0 12px !important;
	white-space: nowrap !important;
	background-color: #ff5100 !important;
}

#ticker .bloghash-card-items .widget-title {
	min-height: 0 !important;
}

#ticker .bloghash-ticker-container {
	margin: 0 auto !important;
}

#ticker .ticker-slider-box {
	position: absolute !important;
	top: 0 !important;
	left: 220px !important;
	right: 0 !important;
	display: flex !important;
	align-items: center !important;
	height: 30px !important;
	min-height: 30px !important;
	max-height: 30px !important;
	overflow: hidden !important;
	background-color: #ff5100 !important;
}

#ticker .ticker-item,
#ticker .ticker-slide-item,
#ticker .ticker-slider-backgrounds,
#ticker .slide-inner {
	display: flex !important;
	align-items: center !important;
	height: 30px !important;
	min-height: 30px !important;
	max-height: 30px !important;
	overflow: hidden !important;
}

#ticker .ticker-slide-item .slide-inner h6,
#ticker .ticker-slide-item .slide-inner h6 a {
	color: #fff !important;
}

#ticker .ticker-slide-item .slide-inner h6 a:hover {
	color: #1f1147 !important;
}

/* The marquee plugin sets its own inline animation-duration per instance,
   scaled to track width — originally ~537s for a 100000px track (roughly
   186px/s). Our first override (90s) was actually faster than that
   default. This sets it well past the theme's own baseline for a
   genuinely slow, easy-to-read scroll. */
#ticker .js-marquee-wrapper {
	animation-duration: 600s !important;
}

#ticker .ticker-slider-backgrounds img {
	width: 20px !important;
	height: 20px !important;
	margin-right: 8px !important;
	border-radius: 4px !important;
	object-fit: cover !important;
}

#ticker .slide-inner h6 {
	font-size: 13px !important;
	line-height: 1 !important;
	white-space: nowrap !important;
}

/* ---- Song DNA -------------------------------------------------- */
.sgm-song-dna {
	margin: 32px 0 44px;
	padding: 28px 24px 32px;
	background: linear-gradient(135deg, #1f1147, #3a1d6e);
	border-radius: 16px;
	color: #fff;
	box-shadow: 0 8px 24px rgba(31, 17, 71, .25);
}

.sgm-song-dna__title {
	margin: 0 0 20px;
	color: #ffd166;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.sgm-song-dna__row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.sgm-song-dna__label {
	flex: 0 0 110px;
	font-size: 16px;
	font-weight: 600;
}

.sgm-song-dna__track {
	flex: 1;
	height: 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .15);
	overflow: hidden;
}

.sgm-song-dna__fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #ff6fb0, #ffd166);
}

.sgm-song-dna__val {
	flex: 0 0 32px;
	text-align: right;
	color: #ffd166;
	font-size: 16px;
	font-weight: 700;
}

.sgm-song-dna__best {
	margin: 20px 0 0;
	padding: 16px 0 4px;
	border-top: 1px solid rgba(255, 255, 255, .15);
	font-size: 16px;
}

/* ---- Related Songs ----------------------------------------------- */
.sgm-related-songs {
	margin: 32px 0 44px;
	padding: 24px;
	background: #141033;
	border-radius: 16px;
}

.sgm-related-songs__title {
	margin: 0 0 16px;
	color: #ffd166;
	font-size: 20px;
	font-weight: 700;
}

.sgm-related-songs__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 16px;
}

.sgm-related-songs__card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: #fff;
	text-decoration: none;
}

.sgm-related-songs__thumb img {
	display: block;
	width: 100%;
	height: 120px;
	border-radius: 10px;
	object-fit: cover;
}

.sgm-related-songs__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.sgm-related-songs__card:hover .sgm-related-songs__name {
	color: #ffd166;
}

/* ---- Homepage sections (shared spacing rhythm) ---------------------- */
.sgm-mood-discovery,
.sgm-sotd,
.sgm-forgotten-gems {
	box-sizing: border-box;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto 32px;
	box-shadow: 0 8px 24px rgba(31, 17, 71, .25);
}

/* ---- Mood Discovery ------------------------------------------------ */
.sgm-mood-discovery {
	padding: 24px;
	background: linear-gradient(135deg, #1f1147, #3a1d6e);
	border-radius: 16px;
}

.sgm-mood-discovery__title {
	margin: 0 0 18px;
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	text-align: center;
}

.sgm-mood-discovery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 14px;
}

.sgm-mood-discovery__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 16px 8px;
	background: rgba(255, 255, 255, .08);
	border-radius: 12px;
	text-decoration: none;
	transition: background .15s ease;
}

.sgm-mood-discovery__card:hover {
	background: rgba(255, 209, 102, .18);
}

.sgm-mood-discovery__icon {
	font-size: 28px;
}

.sgm-mood-discovery__label {
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

/* ---- Song of the Day ------------------------------------------------ */
.sgm-sotd {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 24px;
	background: linear-gradient(135deg, #1f1147, #3a1d6e);
	border-radius: 16px;
}

.sgm-sotd__media {
	flex: 0 0 200px;
	display: block;
}

.sgm-sotd__media img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 12px;
	object-fit: cover;
}

.sgm-sotd__body {
	flex: 1;
	min-width: 0;
	color: #fff;
}

.sgm-sotd__eyebrow {
	display: inline-block;
	margin-bottom: 8px;
	color: #ffd166;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

/* Sidebar placement: narrower column, so stack instead of side-by-side. */
#secondary .sgm-sotd {
	flex-direction: column;
	align-items: stretch;
	max-width: 100%;
	margin: 0 0 24px;
}

#secondary .sgm-sotd__media {
	flex: none;
}

#secondary .sgm-sotd__title {
	font-size: 18px;
}

.sgm-sotd__title {
	margin: 0 0 12px;
	font-size: 24px;
	font-weight: 700;
}

.sgm-sotd__title a {
	color: #fff;
	text-decoration: none;
}

.sgm-sotd__title a:hover {
	color: #ffd166;
}

.sgm-sotd__note {
	margin: 0 0 16px;
	font-size: 15px;
	opacity: .85;
}

.sgm-sotd__cta {
	display: inline-block;
	padding: 10px 20px;
	background: #ffd166;
	border-radius: 999px;
	color: #1f1147;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.sgm-sotd__cta:hover {
	background: #fff;
}

@media (max-width: 640px) {
	.sgm-sotd {
		flex-direction: column;
		align-items: stretch;
	}

	.sgm-sotd__media {
		flex: none;
	}
}

/* ---- Forgotten Gems -------------------------------------------------- */
.sgm-forgotten-gems {
	padding: 24px;
	background: linear-gradient(135deg, #3a1d6e, #1f1147);
	border-radius: 16px;
}

.sgm-forgotten-gems__title {
	margin: 0 0 8px;
	color: #fff;
	font-size: 22px;
	font-weight: 700;
}

.sgm-forgotten-gems__intro {
	margin: 0 0 18px;
	color: rgba(255, 255, 255, .75);
	font-size: 14px;
}

.sgm-forgotten-gems__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 16px;
}

.sgm-forgotten-gems__card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: #fff;
	text-decoration: none;
}

.sgm-forgotten-gems__thumb img {
	display: block;
	width: 100%;
	height: 120px;
	border-radius: 10px;
	object-fit: cover;
}

.sgm-forgotten-gems__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.sgm-forgotten-gems__card:hover .sgm-forgotten-gems__name {
	color: #ffd166;
}

/* ---- Song Meaning / Translation --------------------------------------- */
.sgm-song-meaning {
	margin: 32px 0 44px;
	padding: 24px 28px;
	background: #141033;
	border-radius: 16px;
	color: #fff;
	box-shadow: 0 8px 24px rgba(31, 17, 71, .25);
}

.sgm-song-meaning__title {
	margin: 0 0 20px;
	color: #ffd166;
	font-size: 20px;
	font-weight: 700;
}

.sgm-song-meaning__block {
	margin-bottom: 20px;
}

.sgm-song-meaning__block:last-child {
	margin-bottom: 0;
}

.sgm-song-meaning__heading {
	margin: 0 0 8px;
	color: #fff;
	opacity: .85;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.sgm-song-meaning__text {
	margin: 0;
	color: rgba(255, 255, 255, .9);
	font-size: 15px;
	line-height: 1.6;
}

.sgm-song-meaning__translit {
	font-style: italic;
}

.sgm-song-meaning__words {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sgm-song-meaning__words li {
	font-size: 14px;
	line-height: 1.5;
}
