/*
Theme Name:  Independent Publisher Child
Theme URI:   https://www.danielrubinstein.online/
Description: Child theme for Independent Publisher — adds Writings page improvements.
Author:      Daniel Rubinstein
Template:    independent-publisher
Version:     1.0.0
License:     GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: independent-publisher-child
*/

/* ==========================================================================
   1. READING TIME BADGE
   ========================================================================== */

.dr-reading-time {
    display: inline-block;
    font-size: 0.78em;
    color: #888;
    margin-left: 0.4em;
    font-style: normal;
    letter-spacing: 0.02em;
}

/* On archive/blog pages, show reading time in the entry meta line */
.blog .dr-reading-time,
.archive .dr-reading-time {
    display: inline-block;
}

/* ==========================================================================
   2. ARTICLE CARD LAYOUT ON ARCHIVE (blog) PAGE
   Adds a subtle separator between posts and improves excerpt presentation
   ========================================================================== */

/* Give each post card a clear bottom border on archive pages */
.blog article.post,
.archive article.post {
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 2.5em;
    margin-bottom: 2.5em;
}

/* Remove the border from the last post card */
.blog article.post:last-of-type,
.archive article.post:last-of-type {
    border-bottom: none;
}

/* Style the "Read more" / "Continue reading" link as a subtle button */
.blog .more-link,
.archive .more-link {
    display: inline-block;
    margin-top: 0.8em;
    padding: 0.4em 1em;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 0.85em;
    color: #555;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.blog .more-link:hover,
.archive .more-link:hover {
    background: #555;
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   3. CATEGORY FILTER BAR
   Styles the category navigation widget at the top of the blog page
   ========================================================================== */

.dr-category-filter {
    margin: 0 0 2.5em 0;
    padding: 1em 0;
    border-bottom: 1px solid #e8e8e8;
}

.dr-category-filter p {
    margin: 0 0 0.6em 0;
    font-size: 0.82em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dr-category-filter ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

.dr-category-filter ul li {
    margin: 0;
    padding: 0;
}

.dr-category-filter ul li a {
    display: inline-block;
    padding: 0.3em 0.85em;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 0.82em;
    color: #555;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.dr-category-filter ul li a:hover,
.dr-category-filter ul li a.active {
    background: #555;
    color: #fff;
    border-color: #555;
    text-decoration: none;
}

/* ==========================================================================
   4. END-OF-POST CALL TO ACTION BOX
   ========================================================================== */

.dr-post-cta {
    margin: 2.5em 0 1.5em 0;
    padding: 1.4em 1.6em;
    background: #f7f7f7;
    border-left: 3px solid #888;
    border-radius: 2px;
    font-size: 0.95em;
    line-height: 1.6;
    color: #444;
}

.dr-post-cta p {
    margin: 0;
}

.dr-post-cta a {
    color: #333;
    font-weight: bold;
    text-decoration: underline;
}

.dr-post-cta a:hover {
    color: #000;
}

/* ==========================================================================
   5. PREV / NEXT POST NAVIGATION
   ========================================================================== */

.dr-post-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 2em 0 1em 0;
    padding: 1.2em 0;
    border-top: 1px solid #e8e8e8;
    font-size: 0.88em;
    gap: 1em;
}

.dr-post-nav a {
    color: #555;
    text-decoration: none;
    max-width: 46%;
    line-height: 1.4;
}

.dr-post-nav a:hover {
    color: #000;
    text-decoration: underline;
}

.dr-post-nav .dr-prev-post {
    text-align: left;
}

.dr-post-nav .dr-next-post {
    text-align: right;
    margin-left: auto;
}

.dr-post-nav .dr-nav-label {
    display: block;
    font-size: 0.82em;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25em;
}

/* ==========================================================================
   6. HIDE THE GRAVATAR / AVATAR IN THE SITE HEADER
   The theme shows a Gravatar image as the site logo when no custom logo
   has been set. Because no profile photo has been uploaded, this renders
   as a generic grey silhouette. We hide it entirely.
   To replace it with your own photo: go to WordPress Admin → Users →
   Profile and upload a profile picture, then remove this rule.
   ========================================================================== */

.site-logo img.no-grav,
.site-header .site-logo img,
a.site-logo img {
    display: none !important;
}

/* Also hide the wrapping anchor if it becomes empty/collapsed */
a.site-logo:not(:has(img:not([style*="display: none"]))) {
    display: none;
}

/* ==========================================================================
   7. FOOTER — replace default credits
   ========================================================================== */

/* The footer text is replaced via PHP filter; no extra CSS needed here.
   This rule just ensures the footer link colour is consistent. */
.site-footer a {
    color: inherit;
}

/* ==========================================================================
   7. SIDEBAR ON BLOG ARCHIVE
   The sidebar is already rendered by the theme on archive pages.
   These rules improve its appearance when widgets are active.
   ========================================================================== */

#secondary .widget-title {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #888;
    margin-bottom: 0.6em;
}

#secondary .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#secondary .widget ul li {
    padding: 0.2em 0;
    font-size: 0.88em;
    border-bottom: 1px solid #f0f0f0;
}

#secondary .widget ul li:last-child {
    border-bottom: none;
}
