/*
Theme Name:  AP Drudge
Theme URI:   https://andyparrishshow.com
Author:      Andy Parrish
Author URI:  https://andyparrishshow.com
Description: The iconic, high-density news aggregator layout — rebuilt for the modern web. The AP Drudge-Style Theme delivers the raw, hyper-engaging aesthetic of classic news hubs, powered by a fully customizable WordPress backend. Built with native Elementor compatibility, flexible widget zones, and a deeply integrated settings panel. Drag-and-drop your homepage, assign categories to columns on the fly, control hero images, typography, and link behavior — all without touching code. Optimized for PHP 8.3, lightning-fast performance, and a flawless mobile experience.
Version:     1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ap-drudge
Tags:        news, blog, custom-menu, featured-images, threaded-comments, translation-ready, right-sidebar, left-sidebar, two-columns, three-columns, grid-layout, custom-colors, custom-logo, editor-style, full-width-template, post-formats
*/

*, *::before, *::after { box-sizing: border-box; }

/* Reset only structural elements — NOT p, blockquote, li which need margins */
body, h1, h2, h3, h4, h5, h6,
figure, figcaption, form, fieldset, legend,
ul, ol, dl, dd, menu,
pre, address {
    margin: 0;
    padding: 0;
}

html, body {
    background: #fff;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

a              { color: #000; text-decoration: none; }
a:hover        { color: #cc0000; text-decoration: underline; }
a:visited      { color: #000; }

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

/* ── Elementor Posts widget — strip all card junk ── */
.elementor-posts--skin-classic .elementor-post,
.elementor-posts--skin-cards   .elementor-post {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 5px;
}
.elementor-post__thumbnail__link { display: none; }
.elementor-post__excerpt         { display: none; }
.elementor-post__read-more       { display: none; }
.elementor-post-info             { display: none; }

.elementor-post__title {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    margin: 0;
}
.elementor-post__title a,
.elementor-post__title a:visited { color: #000; }
.elementor-post__title a:hover   { color: #cc0000; }

/* ── Elementor heading links ── */
.elementor-widget-heading a,
.elementor-widget-heading a:visited { color: #000; }
.elementor-widget-heading a:hover   { color: #cc0000; }

/* ── Drudge layout helpers ── */
.drudge-col-border-right { border-right: 1px solid #ccc; }
.drudge-col-border-left  { border-left:  1px solid #ccc; }

.drudge-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #666;
    border-bottom: 1px solid #ccc;
    padding-bottom: 3px;
    margin-bottom: 8px;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 1px 5px;
    margin-right: 4px;
    color: #fff;
    border-radius: 2px;
    vertical-align: middle;
}
.badge-breaking  { background: #cc0000; animation: blink .85s step-start infinite; }
.badge-exclusive { background: #b59400; }
.badge-video     { background: #8b0000; }
.badge-audio     { background: #1a3a6b; }
.badge-opinion   { background: #2d5a1b; }
@keyframes blink { 50% { opacity: 0; } }

/* ── Header ── */
.ap-topnav {
    background: #000;
    text-align: center;
    padding: 3px 0;
}
.ap-topnav a {
    color: #ccc;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin: 0 10px;
    text-decoration: none;
}
.ap-topnav a:hover { color: #fff; }

.ap-header {
    text-align: center;
    padding: 10px 0 8px;
    border-bottom: 3px double #000;
}
.ap-site-name {
    font-family: Arial Black, Arial, sans-serif;
    font-weight: 900;
    font-size: clamp(28px, 5vw, 54px);
    text-transform: uppercase;
    color: #000;
    line-height: 1;
    display: block;
    text-decoration: none;
}
.ap-site-name:hover  { color: #000; text-decoration: none; }
.ap-site-tagline {
    font-size: 11px;
    color: #666;
    letter-spacing: .1em;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}
.ap-site-date {
    font-size: 11px;
    color: #666;
    display: block;
    margin-top: 2px;
}

/* ── Footer ── */
.ap-footer {
    background: #000;
    color: #888;
    text-align: center;
    padding: 8px;
    font-size: 10px;
    letter-spacing: .1em;
}
.ap-footer a { color: #888; }
.ap-footer a:hover { color: #fff; text-decoration: none; }

/* ── Single post ── */
.ap-single {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

.ap-single-inner {
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    padding: 0 24px;
}

.ap-single h1 {
    font-family: "Arial Black", Arial, sans-serif;
    font-size: clamp(20px, 3vw, 28px);
    text-transform: uppercase;
    line-height: 1.15;
    font-weight: 900;
    color: #000;
    margin: 20px 0 12px;
}

.ap-single .ap-meta {
    font-size: 12px;
    color: #666;
    border-top: 2px solid #000;
    border-bottom: 1px solid #ddd;
    padding: 8px 0;
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.ap-single .ap-meta a {
    color: #666 !important;
}
.ap-single .ap-meta a:hover {
    color: #cc0000 !important;
}
.ap-meta-byline {
    font-weight: 700;
    color: #000 !important;
}
.ap-meta-sep {
    color: #ccc;
}

.ap-single img.featured {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 20px;
    border: 1px solid #ddd;
}

/* ── Article body — the important bit ── */
.ap-content {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.75;
    color: #1a1a1a;
}

/* Paragraph spacing */
.ap-content p {
    margin: 0 0 1.4em;
    display: block;
}
.ap-content p:last-child {
    margin-bottom: 0;
}

/* Handle bare line breaks */
.ap-content br {
    display: block;
    content: '';
    margin-top: 0.8em;
}

/* Headings inside content */
.ap-content h2 {
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    margin: 1.8em 0 .6em;
    color: #000;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}
.ap-content h3 {
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 1.4em 0 .5em;
    color: #333;
}

/* Blockquotes */
.ap-content blockquote {
    border-left: 3px solid #cc0000;
    margin: 1.4em 0;
    padding: 4px 16px;
    color: #444;
    font-style: italic;
}

/* Images inside content */
.ap-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em auto;
    border: 1px solid #ddd;
}

/* Lists */
.ap-content ul,
.ap-content ol {
    margin: .8em 0 1em 1.4em;
    padding: 0;
}
.ap-content li {
    margin-bottom: .4em;
}

/* Links inside content — readable but not screaming blue */
.ap-content a {
    color: #000 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}
.ap-content a:hover {
    color: #cc0000 !important;
}

/* Source attribution line at bottom */
.ap-source-line {
    margin-top: 28px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    font-size: 12px;
    color: #888;
    font-family: Arial, sans-serif;
}
.ap-source-line a {
    color: #888 !important;
    text-decoration: underline !important;
}
.ap-source-line a:hover {
    color: #cc0000 !important;
}

/* Related posts nav */
.ap-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 2px solid #000;
    font-family: Arial, sans-serif;
    font-size: 12px;
}
.ap-post-nav a {
    color: #000 !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ap-post-nav a:hover { color: #cc0000 !important; }

@media (max-width: 600px) {
    .ap-single { padding: 12px 12px 40px; }
    .ap-single-inner { padding: 0 4px; border: none; }
    .ap-content { font-size: 16px; }
    .ap-post-nav { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════
   AP DRUDGE v1.1 — 3-COLUMN GRID
   ═══════════════════════════════════════════════════════ */

/* ── Grid container ── */
.apd-grid {
    display: grid;
    margin: 0 auto;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-top: 2px solid #000;
    align-items: start;
}

/* ── Columns ── */
.apd-col {
    padding: 8px 10px 14px;
    min-width: 0; /* prevent overflow */
}
.apd-col-center { text-align: center; }

/* ── Section label ── */
.apd-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4px;
    margin-bottom: 8px;
    line-height: 1.3;
}
.apd-sublabel {
    display: block;
    font-size: 9px;
    letter-spacing: .1em;
    margin-top: 2px;
    opacity: .7;
}

/* ── Story links ── */
.apd-link {
    display: block;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    color: #000;
    text-decoration: none;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px dotted #e0e0e0;
    word-break: break-word;
}
.apd-link:last-of-type { border-bottom: none; }
.apd-link:hover { color: #cc0000 !important; text-decoration: underline; }
.apd-link:visited { color: #000; }

/* ── Thumbnail inside side link ── */
.apd-col-thumb {
    display: block;
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    margin-bottom: 4px;
    border: 1px solid #ddd;
}

/* ── Top headline ── */
.apd-top-headline-wrap { margin-bottom: 10px; }

.apd-top-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    margin: 0 auto 8px;
    border: 1px solid #ddd;
}

.apd-main-headline {
    display: block;
    font-family: "Arial Black", Arial, sans-serif;
    font-weight: 900;
    font-size: 26px;
    line-height: 1.15;
    text-transform: uppercase;
    color: #cc0000;
    text-decoration: none;
    margin-bottom: 8px;
    word-break: break-word;
}
.apd-main-headline:hover {
    color: #990000 !important;
    text-decoration: none;
}

.apd-center-rule {
    border: none;
    border-top: 2px solid #000;
    margin: 10px 0;
}

/* ── Center secondary links ── */
.apd-center-link {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 1px dotted #ccc;
    word-break: break-word;
}
.apd-center-link:last-of-type { border-bottom: none; }
.apd-center-link:hover { color: #cc0000 !important; text-decoration: underline; }

.apd-center-img {
    display: block;
    width: 100%;
    max-width: 440px;
    height: auto;
    object-fit: cover;
    margin: 0 auto 6px;
    border: 1px solid #ddd;
}

/* ── Badges ── */
.apd-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 1px 5px 2px;
    border-radius: 2px;
    color: #fff;
    margin-right: 3px;
    vertical-align: middle;
    line-height: 1.4;
}
.apd-badge-row {
    margin-bottom: 4px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Widget slots inside columns ── */
.apd-widget-slot {
    margin: 10px 0;
    font-size: 12px;
}
.apd-widget-slot .ap-widget-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #666;
    border-bottom: 1px solid #ddd;
    padding-bottom: 3px;
    margin-bottom: 6px;
}

/* ── Below grid ── */
.apd-below-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 auto;
    border-top: 2px solid #000;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}
.apd-below-col {
    padding: 10px 12px;
    border-right: 1px solid #ccc;
    font-size: 12px;
}
.apd-below-col:last-child { border-right: none; }

.apd-below-banner {
    margin: 0 auto;
    padding: 10px 12px;
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    text-align: center;
    font-size: 12px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .apd-grid {
        grid-template-columns: 1fr !important;
        border-left: none;
        border-right: none;
    }
    .apd-col {
        border-right: none !important;
        border-bottom: 1px solid #ccc;
        padding: 12px 14px;
    }
    .apd-col-center { order: -1; text-align: left; }
    .apd-below-grid { grid-template-columns: 1fr; border-left: none; border-right: none; }
    .apd-below-col  { border-right: none; border-bottom: 1px solid #ddd; }
}
