/*
Theme Name: Twentytwentyfive_child
Template: twentytwentyfive
Description: Twenty Dirty-Five Child Theme
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.1
Text Domain: twentytwentyfive_child
*/

/* 1. Link styling */
a {
    text-decoration-thickness: 1px;
    text-underline-offset: .1em;
}

/* 2. Fix the Font Weights (Bold/Medium) in the Editor */
.editor-styles-wrapper .has-font-weight-bold, 
.editor-styles-wrapper strong, 
.editor-styles-wrapper b {
    font-weight: 700 !important;
}

.editor-styles-wrapper .has-font-weight-medium {
    font-weight: 500 !important;
}

/* ============================================================
   3. PERFORMANCE & MOBILE OPTIMIZATION
   ============================================================ */

/* Fix for "Unsized Images" - prevents the page from jumping */
.wp-block-post-featured-image img {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    object-fit: cover;
    background-color: #f7f7f7;
    display: block;
}

/* Mobile-specific adjustments for narrow screens */
@media (max-width: 600px) {
    .wp-block-post-featured-image {
        margin-bottom: 15px;
    }
    .wp-block-post-featured-image img {
        max-height: 250px;
    }
}

/* ============================================================
   4. SITE LAYOUT & WIDGET CUSTOMIZATIONS
   ============================================================ */

/* Shrink long site title on small phones */
@media (max-width: 480px) {
    .wp-block-site-title {
        font-size: clamp(1.2rem, 5vw, 1.8rem) !important;
        white-space: nowrap;
    }
}

/* Global image rule for all devices (fixes mobile spill-over) */
.entry-content img, 
.wp-block-image img {
    max-width: 100% !important;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Desktop-specific rule (limits to 790px target) */
@media screen and (min-width: 790px) {
    .entry-content img, 
    .wp-block-image img {
        max-width: 790px !important;
    }
}

/* Add a line between popular post items, excluding the last one */
.wpp-list li:not(:last-child) {
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

/* Accessibility: Hide labels visually */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}