/*
Theme Name: Curlewis
Theme URI: https://curlewis.co.nz
Description: Minimal child theme for GeneratePress - clean, no sidebar, content-focused
Author: David Curlewis
Author URI: https://curlewis.co.nz
Template: generatepress
Version: 1.0.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: curlewis
*/

/* ==========================================================================
   MINIMAL OVERRIDES
   ========================================================================== */

/* Hide sidebar completely */
.sidebar {
    display: none !important;
}

/* Full width content when no sidebar */
.content-area {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Clean up widget areas we don't want */
.widget-area,
.sidebar-widget-area {
    display: none;
}

/* ==========================================================================
   TYPOGRAPHY - Clean and readable
   ========================================================================== */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: #333;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   LAYOUT - Content-focused
   ========================================================================== */

/* Container width */
.site-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* Posts */
.entry-content {
    max-width: 900px;
}

/* Post meta - subtle */
.entry-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   HEADER - Minimal
   ========================================================================== */

.site-header {
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.site-description {
    font-size: 0.9rem;
    color: #666;
}

/* ==========================================================================
   FOOTER - Minimal
   ========================================================================== */

.site-footer {
    padding: 2rem 0;
    border-top: 1px solid #eee;
    font-size: 0.875rem;
    color: #666;
    text-align: center;
}

/* Hide footer widgets if any */
.footer-widgets {
    display: none;
}

/* ==========================================================================
   CODE BLOCKS - Important for a tech blog
   ========================================================================== */

pre, code {
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
    font-size: 0.9rem;
}

pre {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

pre code {
    background: none;
    padding: 0;
}

/* ==========================================================================
   QUOTE BLOCKS
   ========================================================================== */

blockquote,
.wp-block-quote {
    background: #f8f9fa;
    border-left: 4px solid #0066cc;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: #444;
}

blockquote p:last-child,
.wp-block-quote p:last-child {
    margin-bottom: 0;
}

/* Quote citations */
blockquote cite,
.wp-block-quote cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #666;
    font-style: normal;
}

/* ==========================================================================
   IMAGES
   ========================================================================== */

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

.wp-block-image {
    margin: 2rem 0;
}

/* ==========================================================================
   POST LISTINGS - Thumbnail style (GeneratePress overrides)
   ========================================================================== */

/* Featured image in listings - thumbnail float left */
body.blog .inside-article .post-image,
body.home .inside-article .post-image,
body.archive .inside-article .post-image,
body.search .inside-article .post-image {
    float: left !important;
    width: 150px !important;
    height: 150px !important;
    margin: 0 1.5rem 1rem 0 !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
}

body.blog .inside-article .post-image img,
body.home .inside-article .post-image img,
body.archive .inside-article .post-image img,
body.search .inside-article .post-image img {
    width: 150px !important;
    height: 150px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    display: block !important;
}

/* Article container needs clearfix for floated image */
body.blog .inside-article,
body.home .inside-article,
body.archive .inside-article {
    overflow: hidden;
    position: relative;
}

/* Move image down to align with summary text, not title */
body.blog .inside-article .post-image,
body.home .inside-article .post-image,
body.archive .inside-article .post-image {
    margin-top: 0 !important;
}

/* Reduce spacing in header to compact it */
body.blog .inside-article .entry-header,
body.home .inside-article .entry-header,
body.archive .inside-article .entry-header {
    margin-bottom: 0.25rem;
}

body.blog .inside-article .entry-title,
body.home .inside-article .entry-title,
body.archive .inside-article .entry-title {
    margin-top: 0;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

/* Date meta closer to title */
body.blog .inside-article .entry-meta,
body.home .inside-article .entry-meta,
body.archive .inside-article .entry-meta {
    margin-bottom: 0.5rem;
    margin-top: 0;
}

/* Summary starts right after, will flow next to floated image */
body.blog .inside-article .entry-summary,
body.home .inside-article .entry-summary,
body.archive .inside-article .entry-summary {
    margin-top: 0;
}

/* Hide categories, tags, AND author in post listings */
body.blog footer.entry-meta,
body.home footer.entry-meta,
body.archive footer.entry-meta,
body.blog .cat-links,
body.home .cat-links,
body.archive .cat-links,
body.blog .tags-links,
body.home .tags-links,
body.archive .tags-links,
body.blog .entry-meta .byline,
body.home .entry-meta .byline,
body.archive .entry-meta .byline,
body.blog .entry-meta .author,
body.home .entry-meta .author,
body.archive .entry-meta .author {
    display: none !important;
}

/* Keep categories/tags visible on single post pages */
body.single footer.entry-meta,
body.single .cat-links,
body.single .tags-links {
    display: inline-block !important;
}

/* ==========================================================================
   GENERATEPRESS SPECIFIC OVERRIDES
   ========================================================================== */

/* GP container width */
.site-container,
.grid-container {
    max-width: 1100px;
}

/* ==========================================================================
   FEATURED IMAGES - SINGLE POST (hero banner style)
   ========================================================================== */

/* Single post hero - content-width banner slice */
/* GeneratePress uses .featured-image on single posts, not .post-image */
body.single .inside-article .featured-image,
body.single .inside-article .post-image,
body.single .featured-image.page-header-image-single {
    width: 100% !important;
    max-width: 1100px !important;
    height: 250px !important;
    margin: 0 auto 2rem auto !important;
    padding: 0 !important;
    float: none !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

body.single .inside-article .featured-image img,
body.single .inside-article .post-image img,
body.single .featured-image.page-header-image-single img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 6px !important;
}

/* Override GeneratePress grid-container on featured image */
body.single .featured-image.grid-container {
    max-width: 1100px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto 2rem auto !important;
}


/* ==========================================================================
   NAVIGATION - Clean
   ========================================================================== */

.main-navigation {
    font-size: 0.95rem;
}

.main-navigation a {
    color: #333;
}

.main-navigation a:hover {
    color: #0066cc;
}

/* ==========================================================================
   RESPONSIVE / MOBILE STYLES
   ========================================================================== */

/* Tablets and smaller (iPad portrait and below) */
@media (max-width: 768px) {
    /* Reduce font sizes slightly */
    body {
        font-size: 17px;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    
    /* Reduce padding on container */
    .site-content {
        padding: 1.5rem;
    }
    
    /* Smaller thumbnails on tablet */
    body.blog .inside-article .post-image,
    body.home .inside-article .post-image,
    body.archive .inside-article .post-image {
        width: 120px !important;
        height: 120px !important;
        margin-right: 1rem !important;
    }
    
    body.blog .inside-article .post-image img,
    body.home .inside-article .post-image img,
    body.archive .inside-article .post-image img {
        width: 120px !important;
        height: 120px !important;
    }
    
    /* Adjust hero banner height */
    body.single .inside-article .featured-image,
    body.single .inside-article .post-image,
    body.single .featured-image.page-header-image-single {
        height: 200px !important;
    }
    
    body.single .inside-article .featured-image img,
    body.single .inside-article .post-image img,
    body.single .featured-image.page-header-image-single img {
        height: 200px !important;
    }
}

/* Mobile phones */
@media (max-width: 600px) {
    /* Even smaller text on phone */
    body {
        font-size: 16px;
    }
    
    h1 { font-size: 1.6rem; }
    
    /* Tighter padding */
    .site-content {
        padding: 1rem;
    }
    
    /* Stack thumbnail above content on mobile */
    body.blog .inside-article .post-image,
    body.home .inside-article .post-image,
    body.archive .inside-article .post-image {
        float: none !important;
        width: 100% !important;
        height: auto !important;
        max-width: 200px !important;
        margin: 0 0 1rem 0 !important;
    }
    
    body.blog .inside-article .post-image img,
    body.home .inside-article .post-image img,
    body.archive .inside-article .post-image img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
    }
    
    /* Shorter hero on mobile */
    body.single .inside-article .featured-image,
    body.single .inside-article .post-image,
    body.single .featured-image.page-header-image-single {
        height: 150px !important;
    }
    
    body.single .inside-article .featured-image img,
    body.single .inside-article .post-image img,
    body.single .featured-image.page-header-image-single img {
        height: 150px !important;
    }
    
    /* Reduce code block padding */
    pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
}
