/*
Theme Name: Disney MP3s
Theme URI: https://disneymp3.com/
Author: 16-Bit World
Description: A three-skinned theme for the Disney MP3s attraction-audio archive. One shared template structure with After Dark, Main Street, and Tomorrowland skins that rotate automatically by time of day and day of week (lockable via the Customizer).
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: disneymp3
*/

/* ============================================================
   SHARED LAYOUT — skin-agnostic structure.
   Colors, fonts, and decoration live in css/skin-*.css,
   which set the --dm-* custom properties on body.skin-*.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--dm-bg);
	color: var(--dm-text);
	font-family: var(--dm-font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--dm-accent); text-decoration: none; }
a:hover { color: var(--dm-accent-2); }

h1, h2, h3, h4 { font-family: var(--dm-font-display); line-height: 1.2; margin: 0 0 .5em; }

.dm-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Sticky header ---------- */
.dm-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--dm-header-bg);
	border-bottom: var(--dm-header-border);
	backdrop-filter: blur(8px);
}
.dm-header-inner {
	display: flex;
	align-items: center;
	gap: 18px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 12px 20px;
}
.dm-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.dm-brand .custom-logo { max-height: 44px; width: auto; }
.dm-site-title {
	font-family: var(--dm-font-display);
	font-size: 1.5rem;
	margin: 0;
	letter-spacing: .02em;
}
.dm-site-title a { color: var(--dm-text); }
.dm-tagline { font-size: .75rem; color: var(--dm-text-muted); margin: 0; }

.dm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.dm-nav a {
	display: block;
	padding: 10px 14px;
	color: var(--dm-text);
	font-weight: 600;
	border-radius: var(--dm-radius);
}
.dm-nav a:hover { background: var(--dm-nav-hover-bg); color: var(--dm-accent); }

/* Sounds of the World dropdown */
.dm-has-dropdown { position: relative; }
.dm-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 240px;
	background: var(--dm-card-bg);
	border: var(--dm-card-border);
	border-radius: var(--dm-radius);
	box-shadow: var(--dm-shadow);
	padding: 8px;
	display: none;
	z-index: 200;
}
.dm-has-dropdown:hover > .dm-dropdown,
.dm-has-dropdown:focus-within > .dm-dropdown,
.dm-has-dropdown.dm-open > .dm-dropdown { display: block; }
.dm-dropdown li { list-style: none; }
.dm-dropdown a { padding: 8px 12px; font-weight: 500; font-size: .95rem; }
.dm-dropdown .dm-sub { padding-left: 12px; }
.dm-dropdown .dm-sub a { font-size: .88rem; color: var(--dm-text-muted); }
.dm-caret { font-size: .7em; margin-left: 4px; }

/* Search toggle */
.dm-search-toggle {
	background: none;
	border: var(--dm-card-border);
	color: var(--dm-text);
	border-radius: var(--dm-radius);
	padding: 8px 12px;
	cursor: pointer;
	font-size: 1rem;
}
.dm-search-toggle:hover { border-color: var(--dm-accent); color: var(--dm-accent); }
.dm-search-bar { display: none; padding: 12px 0; border-top: var(--dm-card-border); }
.dm-search-bar.dm-open { display: block; }
.dm-search-bar form { display: flex; gap: 8px; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.dm-search-bar input[type="search"] {
	flex: 1;
	padding: 10px 14px;
	border: var(--dm-card-border);
	border-radius: var(--dm-radius);
	background: var(--dm-card-bg);
	color: var(--dm-text);
	font-size: 1rem;
}
.dm-search-bar button {
	padding: 10px 20px;
	background: var(--dm-accent);
	color: var(--dm-btn-text);
	border: none;
	border-radius: var(--dm-radius);
	font-weight: 700;
	cursor: pointer;
}

/* Mobile nav */
.dm-menu-toggle { display: none; background: none; border: var(--dm-card-border); color: var(--dm-text); border-radius: var(--dm-radius); padding: 8px 12px; font-size: 1.1rem; cursor: pointer; }

/* ---------- Hero ---------- */
.dm-hero {
	padding: 56px 0 40px;
	background: var(--dm-hero-bg);
	border-bottom: var(--dm-card-border);
	text-align: center;
	position: relative;
	overflow: hidden;
}
.dm-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: .3em; }
.dm-hero p { color: var(--dm-text-muted); max-width: 640px; margin: 0 auto 1.5em; font-size: 1.1rem; }
.dm-hero-featured { max-width: 720px; margin: 0 auto; text-align: left; }
.dm-eyebrow {
	display: inline-block;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--dm-accent);
	margin-bottom: 12px;
}

/* ---------- Cards ---------- */
.dm-section { padding: 44px 0; }
.dm-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.dm-section-head h2 { font-size: 1.7rem; margin: 0; }
.dm-section-head a { font-weight: 600; font-size: .95rem; }

.dm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 24px;
}
.dm-card {
	background: var(--dm-card-bg);
	border: var(--dm-card-border);
	border-radius: var(--dm-radius);
	overflow: hidden;
	box-shadow: var(--dm-shadow);
	display: flex;
	flex-direction: column;
	transition: transform .18s ease, box-shadow .18s ease;
}
.dm-card:hover { transform: translateY(-3px); }
.dm-card-media { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--dm-media-bg); }
.dm-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.dm-card:hover .dm-card-media img { transform: scale(1.04); }
.dm-card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.dm-card-meta { display: flex; gap: 10px; align-items: center; font-size: .8rem; color: var(--dm-text-muted); }
.dm-park-tag {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--dm-accent);
}
.dm-card-title { font-size: 1.15rem; margin: 0; }
.dm-card-title a { color: var(--dm-text); }
.dm-card-title a:hover { color: var(--dm-accent); }
.dm-card-desc { font-size: .93rem; color: var(--dm-text-muted); margin: 0; flex: 1; }

/* ---------- Audio player ---------- */
.dm-player {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--dm-player-bg);
	border: var(--dm-player-border);
	border-radius: var(--dm-player-radius);
	padding: 10px 14px;
	margin-top: 4px;
}
.dm-play-btn {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: none;
	background: var(--dm-accent);
	color: var(--dm-btn-text);
	font-size: 1rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s ease;
}
.dm-play-btn:hover { transform: scale(1.08); }
.dm-track {
	flex: 1;
	height: 6px;
	background: var(--dm-track-bg);
	border-radius: 3px;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}
.dm-progress {
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 0%;
	background: var(--dm-accent);
	border-radius: 3px;
}
.dm-time { font-size: .78rem; color: var(--dm-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dm-player audio { display: none; }

/* ---------- Browse by Park ---------- */
.dm-parks { padding: 20px 0 48px; }
.dm-park-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
}
.dm-park-tile {
	display: block;
	padding: 26px 16px;
	text-align: center;
	background: var(--dm-card-bg);
	border: var(--dm-card-border);
	border-radius: var(--dm-radius);
	box-shadow: var(--dm-shadow);
	transition: transform .18s ease;
}
.dm-park-tile:hover { transform: translateY(-3px); }
.dm-park-tile .dm-park-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.dm-park-tile h3 { font-size: 1.05rem; margin: 0 0 4px; color: var(--dm-text); }
.dm-park-tile span { font-size: .82rem; color: var(--dm-text-muted); }

/* ---------- Single post ---------- */
.dm-single { max-width: 800px; margin: 0 auto; padding: 40px 20px 56px; }
.dm-single .dm-card-meta { margin-bottom: 10px; }
.dm-single h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.dm-single .dm-featured { margin: 20px 0; border-radius: var(--dm-radius); overflow: hidden; }
.dm-single .dm-player { margin: 20px 0; padding: 14px 18px; }
.dm-entry p { margin: 0 0 1.1em; }
.dm-entry audio, .dm-entry .wp-audio-shortcode { max-width: 100%; }
.dm-post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: var(--dm-card-border); }
.dm-post-nav a { font-weight: 600; max-width: 45%; }

/* ---------- Page ---------- */
.dm-page { max-width: 800px; margin: 0 auto; padding: 40px 20px 56px; }
.dm-page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: .5em; }

/* ---------- Footer ---------- */
.dm-footer {
	border-top: var(--dm-card-border);
	background: var(--dm-footer-bg);
	padding: 40px 0 28px;
	margin-top: 20px;
}
.dm-footer-inner { display: grid; gap: 24px; }
.dm-footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.dm-footer-nav a { color: var(--dm-text-muted); font-size: .92rem; }
.dm-footer-nav a:hover { color: var(--dm-accent); }
.dm-disclaimer { font-size: .85rem; color: var(--dm-text-muted); max-width: 720px; }
.dm-copyright { font-size: .82rem; color: var(--dm-text-muted); }

/* ---------- Pagination / misc ---------- */
.dm-pagination { display: flex; gap: 8px; justify-content: center; margin: 36px 0 8px; }
.dm-pagination .page-numbers {
	padding: 8px 14px;
	border: var(--dm-card-border);
	border-radius: var(--dm-radius);
	color: var(--dm-text);
	background: var(--dm-card-bg);
}
.dm-pagination .page-numbers.current { background: var(--dm-accent); color: var(--dm-btn-text); border-color: var(--dm-accent); }
.dm-nothing { text-align: center; padding: 60px 20px; color: var(--dm-text-muted); }
.dm-archive-head { padding: 36px 0 8px; }
.dm-archive-head h1 { font-size: 2rem; }
.dm-archive-head p { color: var(--dm-text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.dm-menu-toggle { display: block; }
	.dm-nav {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--dm-header-bg);
		border-bottom: var(--dm-card-border);
		padding: 8px 20px 16px;
	}
	.dm-nav.dm-open { display: block; }
	.dm-nav ul { flex-direction: column; align-items: stretch; }
	.dm-dropdown { position: static; box-shadow: none; border: none; border-left: 2px solid var(--dm-accent); border-radius: 0; }
	.dm-header-inner { flex-wrap: wrap; }
	.dm-grid { grid-template-columns: 1fr; }
	.dm-hero { padding: 36px 0 28px; }
	.dm-post-nav { flex-direction: column; }
	.dm-post-nav a { max-width: 100%; }
}
