/*
 * Theme Name: Gridmode Pro Child
 * Description: A child theme for Gridmode Pro.
 * Author: Your Name
 * Template: gridmode-pro
 * Version: 1.0.0
*/

/* ==============================================
   Defence News CPT Specific Styles
   ============================================== */

/* General Article Container */
.single-defence_news .site-main article {
    background-color: #ffffff; /* White background for the content area */
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 30px; /* More padding for spacious feel */
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow */
}

/* Entry Header (Title and Meta) */
.single-defence_news .entry-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
}

/* Title */
.single-defence_news .entry-title {
    font-size: 2.2em; /* Larger, more prominent title */
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333333; /* Darker text for good contrast */
    font-weight: 700; /* Bolder */
}

/* Entry Meta (Date, Source, Categories) */
.single-defence_news .entry-meta {
    font-size: 15px !important;
    color: #181515;
    margin-top: 15px;
    line-height: 1.5;
}

.single-defence_news .entry-meta span {
    display: inline-block;
    margin-right: 15px;
}

.single-defence_news .entry-meta a {
    color: #0073aa; /* WordPress blue for links */
    text-decoration: none;
    transition: color 0.2s ease;
}

.single-defence_news .entry-meta a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Featured Image */
.single-defence_news .post-thumbnail {
    margin: 25px 0;
    text-align: center; /* Center the image */
}

.single-defence_news .post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 5px; /* Slightly rounded corners for images */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Entry Content (Full Article Preview / Excerpt) */
.single-defence_news .entry-content {
    font-size: 1.1em;
    line-height: 1.7;
    color: #444444;
    margin-bottom: 30px;
}

.single-defence_news .entry-content p {
    margin-bottom: 1em;
}

/* Read Full Article Link */
.single-defence_news .read-more-link {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

.single-defence_news .read-more-link a {
    display: inline-block;
    background-color: #28a745; /* Green button for external link */
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.single-defence_news .read-more-link a:hover {
    background-color: #218838;
    transform: translateY(-2px); /* Slight lift on hover */
}

/* Admin Commentary Section */
.single-defence_news .admin-commentary {
    background-color: #f9f9f9; /* Light grey background */
    border-left: 5px solid #0073aa; /* Blue left border */
    padding: 20px;
    margin: 30px 0;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.single-defence_news .admin-commentary h3 {
    margin-top: 0;
    color: #333333;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.single-defence_news .admin-commentary p {
    font-size: 1em;
    line-height: 1.6;
    color: #555555;
}


/* Download Brief Button */
.single-defence_news .download-brief {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 30px;
}

.single-defence_news .download-brief a.download-button {
    display: inline-block;
    background-color: #007bff; /* Blue button for download */
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.single-defence_news .download-brief a.download-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}


/* Entry Footer (Tags, Social Sharing, Related News) */
.single-defence_news .entry-footer {
    border-top: 1px solid #eeeeee;
    padding-top: 25px;
    margin-top: 30px;
}

/* Post Tags (Keywords) */
.single-defence_news .post-tags {
    margin-bottom: 25px;
    font-size: 0.95em;
    color: #666666;
}

.single-defence_news .post-tags span {
    font-weight: bold;
    margin-right: 5px;
}

.single-defence_news .post-tags a {
    display: inline-block;
    background-color: #f0f0f0;
    color: #555555;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    margin-right: 5px;
    margin-bottom: 5px;
    transition: background-color 0.2s ease;
}

.single-defence_news .post-tags a:hover {
    background-color: #e0e0e0;
    color: #333333;
}

/* Social Sharing Buttons */
.single-defence_news .social-sharing {
    margin-bottom: 25px;
}

.single-defence_news .social-sharing h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #333333;
}

.single-defence_news .social-sharing ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Arrange buttons horizontally */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 10px; /* Space between buttons */
}

.single-defence_news .social-sharing li {
    margin: 0; /* Override default list margin */
}

.single-defence_news .social-sharing li a {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 90px; /* Ensure buttons have minimum width */
    text-align: center;
}

/* Specific Social Button Colors (add more as needed) */
.single-defence_news .social-sharing li a[title*="Facebook"] { background-color: #3b5998; }
.single-defence_news .social-sharing li a[title*="Facebook"]:hover { background-color: #2d4373; transform: translateY(-1px); }

.single-defence_news .social-sharing li a[title*="LinkedIn"] { background-color: #007bb5; }
.single-defence_news .social-sharing li a[title*="LinkedIn"]:hover { background-color: #005983; transform: translateY(-1px); }

.single-defence_news .social-sharing li a[title*="X (Twitter)"] { background-color: #1da1f2; } /* Twitter blue */
.single-defence_news .social-sharing li a[title*="X (Twitter)"]:hover { background-color: #0c85d0; transform: translateY(-1px); }

.single-defence_news .social-sharing li a[title*="WhatsApp"] { background-color: #25d366; }
.single-defence_news .social-sharing li a[title*="WhatsApp"]:hover { background-color: #1da851; transform: translateY(-1px); }


/* Related News Section */
.single-defence_news .related-news {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px dashed #e0e0e0; /* Dashed line for separation */
}

.single-defence_news .related-news h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
    color: #333333;
}

.single-defence_news .related-news ul {
    list-style: disc; /* Bullet points */
    margin-left: 20px;
    padding: 0;
}

.single-defence_news .related-news li {
    margin-bottom: 8px;
}

.single-defence_news .related-news li a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.single-defence_news .related-news li a:hover {
    text-decoration: underline;
    color: #005177;
}

/* Basic Responsiveness (adjust as needed based on parent theme) */
@media (max-width: 768px) {
    .single-defence_news .site-main article {
        padding: 20px;
    }
    .single-defence_news .entry-title {
        font-size: 1.8em;
    }
    .single-defence_news .entry-content {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .single-defence_news .social-sharing ul {
        flex-direction: column; /* Stack buttons vertically on very small screens */
    }
    .single-defence_news .social-sharing li a {
        width: 100%; /* Full width buttons */
        box-sizing: border-box; /* Include padding/border in width */
    }
}

/* ============================================================
   DMI — Single Defence News — Layout & Component Styles
   Add to: /wp-content/themes/gridmode-pro-child/news-single.css
   Enqueue in functions.php alongside your other child theme styles
   ============================================================ */

/* ── Reset / base ─────────────────────────────────────────── */
.dmi-news-page *,
.dmi-news-page *::before,
.dmi-news-page *::after {
    box-sizing: border-box;
}

/* ── Page wrapper ─────────────────────────────────────────── */
.dmi-news-page {
    background: #9AA0A6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Top bar ──────────────────────────────────────────────── */
.dmi-top-bar {
    background: #0D1B2A;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dmi-top-bar__brand {
    color: #E8A020;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
}
.dmi-top-bar__breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.dmi-top-bar__breadcrumb a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
}
.dmi-top-bar__breadcrumb a:hover { color: #fff; }
.dmi-top-bar__sep {
    color: rgba(255,255,255,0.3);
    font-size: 10px;
}

/* ── Two-column layout ────────────────────────────────────── */
.dmi-news-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 16px;
    padding: 16px 16px 40px;
    max-width: 960px;
    margin: 0 auto;
}

@media (max-width: 760px) {
    .dmi-news-layout {
        grid-template-columns: 1fr;
    }
    .dmi-news-rail {
        order: -1; /* on mobile, show share first below top bar, then article */
    }
}

/* ── Article card ─────────────────────────────────────────── */
.dmi-article-card {
    background: #fff;
    border: 0.5px solid #D8E0E8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

/* Hero image */
.dmi-article-hero img.dmi-article-hero__img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.dmi-article-hero--placeholder {
    width: 100%;
    height: 200px;
    background: #1a2e45;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dmi-article-hero__placeholder-label {
    font-size: 12px;
    color: rgba(255,255,255,0.25);
}

/* Article body */
.dmi-article-body {
    padding: 20px;
}

/* Meta row */
.dmi-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.dmi-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #F0F4F8;
    border: 0.5px solid #D8E0E8;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    color: #5A6A7A;
    text-decoration: none;
}
.dmi-meta-tag svg { flex-shrink: 0; }
.dmi-meta-tag a { color: inherit; text-decoration: none; }
.dmi-meta-tag--source {
    color: #185FA5;
    background: #E6F1FB;
    border-color: #85B7EB;
}
.dmi-meta-tag--source a { color: #185FA5; }
.dmi-meta-tag--category {
    color: #B07B14;
    background: #FFF8EC;
    border-color: #F0C97A;
}
.dmi-meta-tag--category a { color: #B07B14; }

/* Title */
.dmi-article-title {
    font-size: 22px;
    font-weight: 500;
    color: #0D1B2A;
    line-height: 1.3;
    margin: 0 0 18px;
}

/* Section label */
.dmi-section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #5A6A7A;
    margin-bottom: 12px;
}
.dmi-section-label::after {
    content: '';
    flex: 1;
    height: 0.5px;
    background: #D8E0E8;
}
.dmi-section-label svg { flex-shrink: 0; }

/* Summary text */
.dmi-summary-text {
    font-size: 14px;
    color: #3D4F61;
    line-height: 1.8;
    margin-bottom: 20px;
}
.dmi-summary-text p { margin: 0 0 12px; }
.dmi-summary-text p:last-child { margin-bottom: 0; }

/* Read CTA */
.dmi-read-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #0D1B2A;
    color: #fff;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    width: 100%;
    margin-bottom: 20px;
    transition: background 0.15s;
}
.dmi-read-cta:hover { background: #1a2e45; color: #fff; }
.dmi-read-cta__source {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
}
.dmi-read-cta svg { flex-shrink: 0; }

/* Download brief button */
.dmi-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0.5px solid #D8E0E8;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #3D4F61;
    text-decoration: none;
    margin-bottom: 20px;
    transition: background 0.15s;
}
.dmi-download-btn:hover { background: #F0F4F8; color: #0D1B2A; }

/* Divider */
.dmi-divider {
    height: 0.5px;
    background: #D8E0E8;
    margin: 20px 0;
}

/* ── Commentary card ──────────────────────────────────────── */
.dmi-commentary-card {
    background: #fff;
    border: 0.5px solid #D8E0E8;
    border-left: 3px solid #0D1B2A;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
}
.dmi-editor-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.dmi-editor-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0D1B2A;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #E8A020;
}
.dmi-editor-info p {
    font-size: 13px;
    font-weight: 500;
    color: #0D1B2A;
    margin: 0 0 2px;
}
.dmi-editor-info span {
    font-size: 11px;
    color: #5A6A7A;
}
.dmi-commentary-text {
    font-size: 14px;
    color: #3D4F61;
    line-height: 1.8;
    font-style: italic;
}
.dmi-commentary-text p { margin: 0 0 10px; }
.dmi-commentary-text p:last-child { margin-bottom: 0; }

/* ── Comments wrapper ─────────────────────────────────────── */
.dmi-comments-wrapper {
    background: #fff;
    border: 0.5px solid #D8E0E8;
    border-radius: 12px;
    padding: 18px 20px;
}
/* Override WP default comment styles */
.dmi-comments-wrapper #respond { margin: 0; }
.dmi-comments-wrapper .comment-reply-title {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #5A6A7A;
    border-bottom: 0.5px solid #D8E0E8;
    padding-bottom: 10px;
    margin-bottom: 14px;
}
.dmi-comments-wrapper .comment-notes,
.dmi-comments-wrapper .logged-in-as {
    font-size: 12px;
    color: #5A6A7A;
    margin-bottom: 12px;
}
.dmi-comments-wrapper .comment-form-comment label,
.dmi-comments-wrapper .comment-form-author label,
.dmi-comments-wrapper .comment-form-email label {
    font-size: 12px;
    color: #5A6A7A;
    display: block;
    margin-bottom: 4px;
}
.dmi-comments-wrapper textarea,
.dmi-comments-wrapper input[type="text"],
.dmi-comments-wrapper input[type="email"] {
    width: 100%;
    border: 0.5px solid #C0CBD6;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    color: #0D1B2A;
    background: #F0F4F8;
    transition: border-color 0.15s;
}
.dmi-comments-wrapper textarea:focus,
.dmi-comments-wrapper input[type="text"]:focus,
.dmi-comments-wrapper input[type="email"]:focus {
    outline: none;
    border-color: #0D1B2A;
    background: #fff;
}
.dmi-comments-wrapper textarea { min-height: 90px; resize: vertical; }
.dmi-comments-wrapper .form-submit { margin: 12px 0 0; }
.dmi-comments-wrapper .submit {
    background: #E8A020;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.dmi-comments-wrapper .submit:hover { background: #c88c18; }

/* Existing comments list */
.dmi-comments-wrapper .comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.dmi-comments-wrapper .comment-list .comment {
    padding: 12px 0;
    border-bottom: 0.5px solid #D8E0E8;
}
.dmi-comments-wrapper .comment-list .comment:last-child { border-bottom: none; }
.dmi-comments-wrapper .comment-author .fn {
    font-size: 13px;
    font-weight: 500;
    color: #0D1B2A;
}
.dmi-comments-wrapper .comment-metadata {
    font-size: 11px;
    color: #5A6A7A;
    margin-bottom: 6px;
}
.dmi-comments-wrapper .comment-body p {
    font-size: 13px;
    color: #3D4F61;
    line-height: 1.6;
    margin: 0;
}

/* ── Right rail ───────────────────────────────────────────── */
.dmi-news-rail {}

.dmi-rail-card {
    background: #fff;
    border: 0.5px solid #D8E0E8;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.dmi-rail-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #5A6A7A;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 0.5px solid #D8E0E8;
}

/* Share grid */
.dmi-share-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.dmi-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 0.5px solid #D8E0E8;
    background: #F0F4F8;
    color: #5A6A7A;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.15s;
}
.dmi-share-btn:hover { background: #E4EAF0; color: #0D1B2A; }
.dmi-share-btn svg { flex-shrink: 0; }
.dmi-share-btn--linkedin {
    color: #0A66C2;
    background: #E6F1FB;
    border-color: #B5D4F4;
}
.dmi-share-btn--linkedin:hover { background: #d0e6f7; }
.dmi-share-btn--whatsapp {
    color: #1A7339;
    background: #E8F4ED;
    border-color: #7EC8A0;
}
.dmi-share-btn--whatsapp:hover { background: #d4eddc; }

/* Related items */
.dmi-related-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 0;
    border-bottom: 0.5px solid #D8E0E8;
    text-decoration: none;
}
.dmi-related-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.dmi-related-item:hover .dmi-related-title { color: #E8A020; }
.dmi-related-tag {
    font-size: 10px;
    font-weight: 500;
    color: #B07B14;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.dmi-related-title {
    font-size: 13px;
    font-weight: 500;
    color: #0D1B2A;
    line-height: 1.4;
    transition: color 0.15s;
}
.dmi-related-date {
    font-size: 11px;
    color: #5A6A7A;
}

/* Tags */
.dmi-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dmi-tag-pill {
    padding: 4px 10px;
    background: #F0F4F8;
    border: 0.5px solid #D8E0E8;
    border-radius: 99px;
    font-size: 11px;
    color: #5A6A7A;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}
.dmi-tag-pill:hover {
    border-color: #E8A020;
    color: #B07B14;
}