/*
 Theme Name:   Plot Insider
 Theme URI:    https://plotinsider.com
 Description:  Custom child theme for Plot Insider — a data-driven news, magazine and listing platform covering Real Estate, Climate, and Geography. Built on Blocksy with Greenshift and selective Elementor support.
 Author:       Plot Insider Media
 Author URI:   https://plotinsider.com
 Template:     blocksy
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  plotinsider
 Tags:         magazine, news, listing, real-estate, climate, geography
*/

/* ==========================================================================
   PLOT INSIDER — BRAND STYLE OVERRIDES
   ==========================================================================
   All colors reference Blocksy palette CSS variables for single-source-of-truth.
   Update colors in Customizer > General Options > Colors — not here.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. GLOBAL RESETS & BRAND DEFAULTS
   -------------------------------------------------------------------------- */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Max content width for long-form editorial readability */
.entry-content > *:not(.alignwide):not(.alignfull) {
    max-width: 680px;
}


/* --------------------------------------------------------------------------
   2. TYPOGRAPHY ENHANCEMENTS
   -------------------------------------------------------------------------- */

/* Headings — Garnett with Archivo fallback */
h1, h2, h3, h4, h5, h6,
.entry-title,
.wp-block-heading {
    font-family: var(--theme-font-family-headings, 'Garnett', 'Archivo', sans-serif);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Body text — Inter */
body,
.entry-content,
.wp-block-paragraph,
.wp-block-list {
    font-family: var(--theme-font-family-body, 'Inter', system-ui, sans-serif);
    line-height: 1.65;
}

/* Category/overline labels */
.post-category,
.ct-category,
.pi-overline {
    font-family: 'Archivo', 'Garnett', sans-serif;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* Article meta (date, author, read time) */
.post-meta,
.entry-meta,
.ct-meta {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8rem;
    color: var(--theme-palette-color-5, #8C8C8C);
}

/* Blockquotes / Pull quotes — editorial style */
blockquote,
.wp-block-quote,
.wp-block-pullquote {
    font-family: var(--theme-font-family-headings, 'Garnett', 'Archivo', sans-serif);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.5;
    border-left: 4px solid var(--theme-palette-color-1, #7FB809);
    padding-left: 1.5rem;
    margin: 2rem 0;
}

.wp-block-pullquote {
    border-left: none;
    border-top: 3px solid var(--theme-palette-color-1, #7FB809);
    border-bottom: 3px solid var(--theme-palette-color-1, #7FB809);
    padding: 1.5rem 0;
    text-align: center;
}


/* --------------------------------------------------------------------------
   3. BRAND ACCENT ELEMENTS
   -------------------------------------------------------------------------- */

/* Primary green accent for links */
.entry-content a:not(.wp-block-button__link) {
    color: var(--theme-palette-color-1, #7FB809);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.entry-content a:not(.wp-block-button__link):hover {
    color: var(--theme-palette-color-4, #5A8406);
}

/* Category badge pill */
.pi-category-badge {
    display: inline-block;
    background: var(--theme-palette-color-1, #7FB809);
    color: #fff;
    font-family: 'Archivo', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2em 0.7em;
    border-radius: 3px;
    line-height: 1.6;
}

/* Green top-border accent for cards */
.pi-card-accent {
    border-top: 3px solid var(--theme-palette-color-1, #7FB809);
}

/* Editorial divider */
.pi-divider {
    border: none;
    height: 2px;
    background: var(--theme-palette-color-1, #7FB809);
    width: 60px;
    margin: 1.5rem 0;
}

/* Section headers with green accent bar */
.pi-section-header {
    position: relative;
    padding-left: 16px;
    margin-bottom: 1.5rem;
}

.pi-section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--theme-palette-color-1, #7FB809);
    border-radius: 2px;
}


/* --------------------------------------------------------------------------
   4. ARTICLE / POST STYLES
   -------------------------------------------------------------------------- */

/* Featured image treatment */
.single .wp-post-image,
.single .ct-featured-image img {
    border-radius: 6px;
}

/* Article body paragraph spacing */
.entry-content p {
    margin-bottom: 1.25em;
}

/* Data callout box (for stats/key findings) */
.pi-data-callout {
    background: var(--theme-palette-color-6, #F2F2F2);
    border-left: 4px solid var(--theme-palette-color-1, #7FB809);
    padding: 1.25rem 1.5rem;
    border-radius: 0 6px 6px 0;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.pi-data-callout strong {
    color: var(--theme-palette-color-2, #1A1A1A);
}

/* Key Takeaways box (AEO pattern) */
.pi-key-takeaways {
    background: var(--theme-palette-color-7, #1B2838);
    color: #fff;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.pi-key-takeaways h3,
.pi-key-takeaways h4 {
    color: var(--theme-palette-color-1, #7FB809);
    margin-top: 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pi-key-takeaways ul {
    padding-left: 1.2rem;
    margin: 0;
}

.pi-key-takeaways li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}


/* --------------------------------------------------------------------------
   5. LISTING CPT STYLES
   -------------------------------------------------------------------------- */

/* Listing card grid item */
.pi-listing-card {
    background: #fff;
    border: 1px solid var(--theme-palette-color-5, #E8E8E8);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pi-listing-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.pi-listing-card__image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.pi-listing-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pi-listing-card:hover .pi-listing-card__image img {
    transform: scale(1.04);
}

.pi-listing-card__body {
    padding: 1rem 1.25rem 1.25rem;
}

.pi-listing-card__price {
    font-family: 'Garnett', 'Archivo', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-palette-color-1, #7FB809);
}

.pi-listing-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.35rem 0;
    color: var(--theme-palette-color-2, #1A1A1A);
}

.pi-listing-card__meta {
    font-size: 0.8rem;
    color: var(--theme-palette-color-5, #8C8C8C);
}

/* Listing status badges */
.pi-listing-status {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15em 0.6em;
    border-radius: 3px;
}

.pi-listing-status--available {
    background: var(--theme-palette-color-1, #7FB809);
    color: #fff;
}

.pi-listing-status--sold {
    background: #E63946;
    color: #fff;
}

.pi-listing-status--pending {
    background: #F4A261;
    color: #1A1A1A;
}


/* --------------------------------------------------------------------------
   6. HEADER & NAVIGATION OVERRIDES
   -------------------------------------------------------------------------- */

/* Sticky header subtle shadow */
header[data-sticky="yes"] {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Category nav links — green underline on hover */
.ct-header-nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--theme-palette-color-1, #7FB809);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.ct-header-nav > ul > li > a:hover::after,
.ct-header-nav > ul > li.current-menu-item > a::after {
    transform: scaleX(1);
}


/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */

/* Editorial slate footer */
footer[data-footer] {
    font-family: 'Inter', system-ui, sans-serif;
}

footer[data-footer] a {
    transition: color 0.2s ease;
}

footer[data-footer] a:hover {
    color: var(--theme-palette-color-1, #7FB809) !important;
}


/* --------------------------------------------------------------------------
   8. RESPONSIVE ADJUSTMENTS
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    h1, .entry-title {
        font-size: 1.75rem;
        line-height: 1.15;
    }

    .entry-content > *:not(.alignwide):not(.alignfull) {
        max-width: 100%;
    }

    .pi-key-takeaways {
        padding: 1.25rem 1.25rem;
    }

    .pi-listing-card__body {
        padding: 0.85rem 1rem 1rem;
    }
}

@media (max-width: 480px) {
    blockquote,
    .wp-block-quote {
        font-size: 1.1rem;
        padding-left: 1rem;
    }
}


/* --------------------------------------------------------------------------
   9. PRINT STYLES (for data reports)
   -------------------------------------------------------------------------- */

@media print {
    header[data-header],
    footer[data-footer],
    .ct-sidebar,
    .pi-newsletter-cta {
        display: none !important;
    }

    .entry-content {
        max-width: 100% !important;
        font-size: 11pt;
        line-height: 1.5;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
