/*
Theme Name: HNT4
Theme URI: https://heartsandtales.com
Author: Cal Evans
Author URI: https://heartsandtales.com
Description: A clean, modern podcast theme using Pico.css (classless mode) and the Classic Editor. Optimized for Blubrry podcast plugin.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hnt4
Tags: blog, podcast, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* === Custom Theme Styles (Pico.css classless loaded separately) === */

:root {
    --podcast-primary: #2271b1;
    --podcast-primary-hover: #135e96;
    --podcast-accent: #72aee6;
}

/* === Layout Structure === */
body > header {
    text-align: center;
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
    background-color: var(--pico-card-background-color);
}

body > header img {
    max-height: 80px;
    width: auto;
    margin: 0 auto;
}

body > header h1 {
    margin-bottom: 0.5rem;
}

body > header h1 a {
    text-decoration: none;
    color: var(--pico-color);
}

body > header p {
    color: var(--pico-muted-color);
    margin: 0;
}

/* Main content with sidebar grid */
body > main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Articles/Posts */
article {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

article:last-of-type {
    border-bottom: none;
}

article header {
    margin-bottom: 1.5rem;
}

article header h1,
article header h2 {
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

article header h2 a {
    text-decoration: none;
    color: var(--pico-color);
}

article header h2 a:hover {
    color: var(--podcast-primary);
}

article header small {
    display: block;
    color: var(--pico-muted-color);
    margin-bottom: 1rem;
}

article header small a {
    color: var(--pico-muted-color);
    text-decoration: none;
}

article header small a:hover {
    color: var(--podcast-primary);
}

article img {
    width: 100%;
    height: auto;
    border-radius: var(--pico-border-radius);
    margin-bottom: 1.5rem;
}

article footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--pico-muted-color);
}

article footer a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
    background-color: var(--pico-secondary-background);
    color: var(--pico-color);
    text-decoration: none;
    border-radius: var(--pico-border-radius);
    font-size: 0.85rem;
}

article footer a:hover {
    background-color: var(--podcast-primary);
    color: white;
}

/* Sidebar */
aside {
    position: sticky;
    top: 2rem;
    align-self: start;
}

aside section {
    margin-bottom: 2rem;
}

aside section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--podcast-primary);
}

aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

aside ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

aside ul li:last-child {
    border-bottom: none;
}

aside ul li a {
    text-decoration: none;
    color: var(--pico-color);
}

aside ul li a:hover {
    color: var(--podcast-primary);
}

/* Footer */
body > footer {
    background-color: var(--pico-card-background-color);
    border-top: 1px solid var(--pico-muted-border-color);
    padding: 2rem 1rem;
    margin-top: 3rem;
    text-align: center;
}

body > footer nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

body > footer nav ul li {
    display: inline;
}

body > footer nav a {
    text-decoration: none;
    color: var(--pico-color);
}

body > footer nav a:hover {
    color: var(--podcast-primary);
}

body > footer small {
    display: block;
    color: var(--pico-muted-color);
}

/* Pagination */
nav[aria-label*="Pagination"],
nav[aria-label*="pagination"] {
    margin: 3rem 0;
    text-align: center;
}

nav[aria-label*="Pagination"] > div,
nav[aria-label*="pagination"] > div {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

nav[aria-label*="Pagination"] a,
nav[aria-label*="Pagination"] span,
nav[aria-label*="pagination"] a,
nav[aria-label*="pagination"] span {
    display: inline-block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: var(--pico-border-radius);
    border: 1px solid var(--pico-muted-border-color);
    background-color: var(--pico-card-background-color);
}

nav[aria-label*="Pagination"] a:hover,
nav[aria-label*="Pagination"] span.current,
nav[aria-label*="pagination"] a:hover,
nav[aria-label*="pagination"] span.current {
    background-color: var(--podcast-primary);
    color: white;
    border-color: var(--podcast-primary);
}

/* Post Navigation */
nav[aria-label*="Post"] {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--pico-muted-border-color);
}

nav[aria-label*="Post"] > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

nav[aria-label*="Post"] > div > div {
    padding: 1rem;
    background-color: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
    border: 1px solid var(--pico-muted-border-color);
}

nav[aria-label*="Post"] > div > div:last-child {
    text-align: right;
}

nav[aria-label*="Post"] span {
    display: block;
}

nav[aria-label*="Post"] .nav-subtitle {
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    margin-bottom: 0.5rem;
}

nav[aria-label*="Post"] .nav-title {
    font-weight: 600;
}

/* Comments */
#comments {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--pico-muted-border-color);
}

#comments ol {
    list-style: none;
    padding: 0;
}

#comments li article {
    padding: 1.5rem;
    background-color: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
    border: 1px solid var(--pico-muted-border-color);
    margin-bottom: 2rem;
}

#comments li article footer {
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

#comments li article footer a {
    color: var(--pico-muted-color);
    text-decoration: none;
}

/* Comment Form */
#respond {
    margin-top: 2rem;
}

/* Page Headers */
header.page-header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--pico-muted-border-color);
}

header.page-header h1 {
    margin-bottom: 0.5rem;
}

header.page-header div {
    color: var(--pico-muted-color);
}

/* Podcast Player Compatibility */
.powerpress_player,
.blubrry-player {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
    border: 1px solid var(--pico-muted-border-color);
}

/* WordPress Core Utility Classes */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    font-style: italic;
    margin-top: 0.5rem;
}

.sticky {
    border-left: 3px solid var(--podcast-primary);
    padding-left: 1.5rem;
}

.bypostauthor article {
    border-left: 3px solid var(--podcast-primary);
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-wrapper iframe,
.video-wrapper embed,
.video-wrapper object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Table Wrapper */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    body > main {
        grid-template-columns: 1fr;
    }

    aside {
        position: static;
    }

    nav[aria-label*="Post"] > div {
        grid-template-columns: 1fr;
    }

    nav[aria-label*="Post"] > div > div:last-child {
        text-align: left;
    }

    body > footer nav ul {
        flex-direction: column;
        gap: 1rem;
    }
}
