/*
Theme Name: McLuhan Child3
Theme URI: https://your-website.com
Author: Your Name
Author URI: https://your-website.com
Description: Child theme for McLuhan with PHP 8.2+ compatibility
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.6
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mcluhan-child

Template: mcluhan
*/

/*
 * Theme Styles
 * Add your custom CSS below this line
 */

/*
Theme Name: McLuhan Child
Template: mcluhan
*/


/* ==========================================================================
   2. COLOR PALETTE – SEPIA / OFF-BLACK
   ========================================================================== */
:root {
    --bg-color: #F5F1E8;
    --text-color: #3C3633;
    --heading-color: #2C5F5D;
    --link-color: #2C5F5D;
    --accent-color: #8B7355;
    --footer-bg: #F6E4D1;
}

body { background: var(--bg-color); color: var(--text-color); }
h1, h2, h3, h4, h5, h6, .entry-title, .entry-title a { color: var(--heading-color); }
a { color: var(--link-color); text-decoration: underline; }
a:hover, a:focus { color: var(--text-color); }

/* ==========================================================================
   3. MOBILE – FULL BLEED, NO WASTED SIDE GUTTERS
   ========================================================================== */
@media (max-width: 790px) {
    .site-content, .content-area, .site-main, .entry-content,
    .page .wrap, .post .wrap, .wrap, .container {
        width: 100vw !important;
        max-width: 100vw !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: calc(-50vw + 50%) !important;
        box-sizing: border-box;
    }
    .site-header, .site-footer {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .entry-content img, .wp-block-embed {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        max-width: none !important;
    }
}
@media (max-width: 480px) {
    .wrap, .container { padding-left: 12px !important; padding-right: 12px !important; }
}

/* ==========================================================================
   4. DESKTOP – 70% CONTENT WIDTH (medium/long templates)
   ========================================================================== */
@media (min-width: 992px) {
    .template-medium .site-main,
    .template-long .site-main {
        max-width: 70%;
        margin: 0 auto;
    }
}

/* ==========================================================================
   5. FEATURED IMAGE – BEAUTIFUL HERO (not full-screen)
   ========================================================================== */
.single .featured-image img,
.page .featured-image img {
    width: 100%;
    height: 55vh !important;
    object-fit: cover;
    object-position: center;
}
@media (max-width: 790px) {
    .single .featured-image img,
    .page .featured-image img { height: 45vh !important; }
}
.single .featured-image,
.page .featured-image {
    position: relative;
    margin-bottom: 3rem;
}
.single .featured-image::before,
.page .featured-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1;
}
.single .entry-header,
.page .entry-header {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 2;
    color: white !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
.single .entry-title,
.page .entry-title {
    font-size: 2.8rem !important;
    margin: 0;
    color: white !important;
}
.single .entry-meta { color: rgba(255,255,255,0.9) !important; }

/* ==========================================================================
   TITLE & META – MOVE TO TOP (above featured image)
   ========================================================================== */

/* 1. Put title/meta back in normal flow (above image) */
.single .entry-header,
.page .entry-header {
    position: static !important;   /* removes absolute positioning */
    padding: 2rem 0 1rem;
    text-shadow: none !important;
    color: var(--heading-color) !important;
    z-index: auto;
}

.single .entry-title,
.page .entry-title {
    font-size: 2.4rem !important;
    color: var(--heading-color) !important;
    margin: 0 0 0.5rem 0 !important;
}

.single .entry-meta {
    color: #666 !important;
    font-size: 0.95rem;
}

/* 2. Remove the dark overlay (no longer needed) */
.single .featured-image::before,
.page .featured-image::before {
    display: none !important;
}

/* 3. Optional: add a little breathing room after title */
.single .featured-image,
.page .featured-image {
    margin-top: 1rem;
    margin-bottom: 3rem;
}

/* ==========================================================================
   9. BLOG-SPECIFIC ENHANCEMENTS (from your custom-blog.css – cleaned & fixed)
   ========================================================================== */
.entry-content {
    line-height: 1.75;
    font-size: 1.08rem;
}
.entry-content p { margin-bottom: 1.6em; }
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2.2em;
    margin-bottom: 0.9em;
    color: var(--heading-color);
    font-weight: 600;
}

/* Category & Tag pills */
.entry-categories a,
.entry-tags a {
    display: inline-block;
    background: #e8e3d9;
    color: #3C3633;
    padding: 0.35em 0.9em;
    border-radius: 30px;
    font-size: 0.84em;
    text-decoration: none;
    margin: 0 0.4em 0.4em 0;
}
.entry-categories a:hover,
.entry-tags a:hover {
    background: #2C5F5D;
    color: white;
}

/* Author box – matches your sepia palette */
.author-box {
    background: #fdfbf7;
    border-left: 5px solid var(--accent-color);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 0 8px 8px 0;
    overflow: hidden;
}
.author-box .author-avatar { float: left; margin-right: 1.5rem; }
.author-box .author-info { overflow: hidden; }

/* Highlight box */
.highlight-box {
    background: #fff8e1;
    border-left: 5px solid #ffa000;
    padding: 1.6rem;
    margin: 2rem 0;
    border-radius: 0 6px 6px 0;
}

/* Social share */
.social-share {
    margin: 3rem 0;
    padding: 1.2rem 0;
    border-top: 2px solid #e8e3d9;
    text-align: center;
}
.social-share a {
    margin: 0 0.6rem;
    padding: 0.6rem 1.1rem;
    background: #f0ebe1;
    color: #3C3633;
    border-radius: 6px;
    font-size: 0.9em;
    text-decoration: none;
}
.social-share a:hover {
    background: var(--heading-color);
    color: white;
}

/* Mobile tweaks for featured image in posts */
@media (max-width: 790px) {
    .post-thumbnail {
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        width: 100vw !important;
        border-radius: 0;
    }
}
/* ==========================================================================
   6. HIDE UGLY FOOTER (you said you hate it)
   ========================================================================== 
.site-footer { display: none !important; }
*/

/* ==========================================================================
   7. BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background: #333;
    color: #fff;
    border-radius: 50%;
    font-size: 24px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.back-to-top.visible { opacity: 0.8; visibility: visible; }
.back-to-top:hover { opacity: 1; }

/* ==========================================================================
   8. MISC NICE STYLES YOU ALREADY LIKED (kept intact)
   ========================================================================== */
.summary-box { background:#23282d; color:#fff; padding:1.5em; margin:2em 0; border-left:5px solid #0073aa; }
.summary-box h2 { color:#fff; }
#reading-progress-bar { position:fixed; top:0; left:0; height:5px; background:#0073aa; z-index:9999; transition:width .1s; }
.image-gallery-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:15px; margin:1.5rem auto; padding:0 15px; }
.image-gallery-grid img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.image-gallery-grid a:hover img { transform:scale(1.05); }

/* ==========================================================================
   RESTORE CLEAN, MINIMAL FOOTER (you accidentally hid it completely)
   ========================================================================== */
.site-footer {
    display: block !important;
    background: var(--footer-bg, #f8f4eb);
    padding: 2.5rem 1rem;
    text-align: center;
    font-size: 0.95rem;
    color: #666;
    border-top: 1px solid #e8e3d9;
    margin-top: 4rem;
}

.site-footer p {
    margin: 0.5rem 0;
}

.site-footer a {
    color: #F6E4D1;
    text-decoration: none;
    border-bottom: 1px dotted #2C5F5D;
}

.site-footer a:hover {
    color: #000;
    border-bottom-style: solid;
}

/* ===========================================================
   FIX: Reduce spacing around featured image, title, and footer
   McLuhan + TT1 spacing cleanup
=========================================================== */

/* 1. Reduce space ABOVE the post title */
.single .entry-title {
    margin-top: 0.6rem !important;
    margin-bottom: 0.8rem !important;
}

/* 2. Reduce spacing BELOW the featured image */
.single .featured-media,
.single .entry-header figure,
.single .post-thumbnail {
    margin-bottom: 0.8rem !important;
}

/* 3. Remove excessive margin added by core block image wrapper */
.single .wp-block-image {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

/* 4. Reduce spacing between final paragraph and footer */
.single .entry-content > *:last-child {
    margin-bottom: 1.2rem !important;
}

/* 5. Remove large bottom padding McLuhan adds to posts */
.single .post-inner {
    padding-bottom: 0.5rem !important;
}

/* 6. Pull footer closer to content */
.site-footer {
    margin-top: 1.5rem !important;
    padding-top: 1.5rem !important;
}

/* 7. Remove extra blank space caused by Gutenberg block containers */
.single .section-inner {
    padding-bottom: 0 !important;
}

/* 8. Tighten spacing on headings inside posts (again) */
.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4 {
    margin-top: 1.2rem !important;
    margin-bottom: 0.5rem !important;
}

/* ===========================================================
   GLOBAL TYPOGRAPHY REDUCTION — ~90%
   Works on mobile + desktop, minimal impact on layout
=========================================================== */

/* Reduce root font size */
html {
    font-size: 90% !important;
}

/* Reduce heading sizes proportionally */
h1 { font-size: 1.9rem !important; }
h2 { font-size: 1.6rem !important; }
h3 { font-size: 1.35rem !important; }
h4 { font-size: 1.15rem !important; }

/* Mobile-specific fine-tuning */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.45rem !important; }
    h3 { font-size: 1.25rem !important; }
    p, li {
        font-size: 0.95rem !important;
        line-height: 1.45 !important;
    }
}

