/*
Theme Name: BitcoinsNews Dark
Theme URI: https://bitcoinsnews.com
Description: Child theme for Astra — premium dark crypto news design
Author: BitcoinsNews
Template: astra
Version: 2.0.7
Text Domain: bitcoinsnews-dark
*/

/* ===== CSS Variables ===== */
:root {
    --bg-dark: #0F172A;
    --bg-card: #1E293B;
    --bg-header: #0a0f1a;
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    --brand-orange: #F7931A;
    --brand-orange-hover: #D97706;
    --border-color: #334155;
}

/* ===== GLOBAL ===== */
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 17px;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    color: #FFFFFF;
    font-weight: 700;
}

a { color: var(--brand-orange); }
a:hover { color: var(--brand-orange-hover); }

/* ===== HEADER ===== */
.main-header-bar,
.ast-header-sticked .main-header-bar,
#masthead,
.ast-main-header-wrap,
.ast-mobile-header-wrap,
.site-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
}

/* Navigation menu items — Space Grotesk premium look */
.main-header-menu a,
.ast-header-break-point .main-header-menu a,
.ast-builder-menu .main-header-menu .menu-item > a,
.ast-builder-menu .main-header-menu .menu-item > .menu-link,
.ast-header-sticked .main-header-menu .menu-item > a,
.ast-header-sticked .main-header-menu .menu-item > .menu-link,
.ast-desktop .main-header-menu .menu-item > a,
.ast-desktop .main-header-menu .menu-item > .menu-link,
.ast-header-sticked .ast-builder-menu .main-header-menu .menu-item > a,
.ast-header-sticked .ast-builder-menu .main-header-menu .menu-item > .menu-link,
.site-header .main-header-menu a,
.ast-builder-menu-1 .menu-item > .menu-link {
    color: var(--text-main);
    font-family: "Space Grotesk", sans-serif !important;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.main-header-menu a:hover,
.main-header-menu .current-menu-item > a,
.ast-builder-menu .main-header-menu .menu-item:hover > a,
.ast-header-sticked .main-header-menu .menu-item:hover > a,
.ast-header-sticked .main-header-menu .current-menu-item > a {
    color: var(--brand-orange);
}

.site-title a { color: #ffffff; }
.site-title a:hover { color: var(--brand-orange); }

.ast-mobile-menu-buttons-minimal .menu-toggle {
    color: var(--text-main);
    background: transparent;
    border: none;
}

.ast-header-break-point .main-navigation ul .sub-menu {
    background: var(--bg-header);
}

/* ===== SINGLE POST ===== */
.single-post .entry-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
}

.single-post .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.single-post .entry-content p {
    color: var(--text-main);
}

/* ===== POST META ===== */
.entry-meta,
.ast-post-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entry-meta .cat-links a {
    background: rgba(247,147,26,0.1);
    color: var(--brand-orange);
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
}

/* ===== SIDEBAR ===== */
.widget-area .widget {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

/* Header widgets — no card styling around logo */
.site-header .widget-area .widget {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
}

/* Footer widgets — no border, no card bg (clean on dark footer) */
.site-footer .widget-area .widget,
#colophon .widget-area .widget {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
}

/* Footer logo — no border on images */
.site-footer img,
#colophon img {
    border: none !important;
    box-shadow: none !important;
}

/* Footer UAG image blocks — no border */
.site-footer .wp-block-uagb-image__figure,
#colophon .wp-block-uagb-image__figure,
.site-footer .wp-block-image,
#colophon .wp-block-image {
    border: none !important;
    outline: none !important;
}

.widget-area .widget a {
    color: var(--text-main);
}

.widget-area .widget a:hover {
    color: var(--brand-orange);
}

.widget-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--brand-orange);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    color: #ffffff;
}

/* ===== CATEGORY PILLS ===== */
.widget_categories ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.widget_categories ul li { margin: 0; }

.widget_categories ul li a {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
    display: inline-block;
}

.widget_categories ul li a:hover {
    background: var(--brand-orange);
    color: #fff;
    border-color: var(--brand-orange);
}

/* ===== RECENT POSTS WIDGET ===== */
.widget_recent_entries ul { list-style: none; padding: 0; }
.widget_recent_entries ul li { padding: 0.75rem 0; border-bottom: 1px solid var(--border-color); }
.widget_recent_entries ul li:last-child { border-bottom: none; }
.widget_recent_entries ul li a { color: var(--text-main); font-weight: 500; }
.widget_recent_entries ul li a:hover { color: var(--brand-orange); }
.widget_recent_entries .post-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

/* ===== BLOCKQUOTES ===== */
blockquote {
    border-left: 4px solid var(--brand-orange);
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
    color: var(--text-main);
}

/* ===== CONTENT LINKS ===== */
.entry-content a {
    color: var(--brand-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ===== INPUTS ===== */
input, textarea, select {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 6px;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--brand-orange);
    outline: none;
}

/* ===== BUTTONS ===== */
button, .button, input[type="submit"] {
    background: var(--brand-orange);
    color: #0F172A;
    border: none;
    font-weight: 700;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover, .button:hover, input[type="submit"]:hover {
    background: var(--brand-orange-hover);
}

/* ===== SEARCH ===== */
.search-form .search-field {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 6px;
    padding: 10px 14px;
}

/* ===== FOOTER ===== */
.site-footer,
#colophon {
    background: var(--bg-header);
    color: var(--text-muted);
}

.site-footer *:not(.bn-subscribe-form):not(.bn-subscribe-form *):not(button),
#colophon *:not(.bn-subscribe-form):not(.bn-subscribe-form *):not(button) {
    color: var(--text-muted);
}

.site-footer a,
#colophon a {
    color: var(--text-muted);
}

.site-footer a:hover,
#colophon a:hover {
    color: var(--brand-orange);
}

.site-footer h2,
.site-footer h3,
#colophon h2,
#colophon h3 {
    color: #ffffff;
}

/* ===== POST NAVIGATION ===== */
.nav-links a { color: var(--brand-orange); }
.nav-links a:hover { color: var(--brand-orange-hover); }

/* ===== COMMENTS ===== */
.ast-comment-list .comment {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
}

.comment-respond {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
}

/* ===== FEATURED IMAGE ===== */
.single-post .ast-featured-image-section {
    border-radius: 12px;
    overflow: hidden;
}

/* ===== SUBSCRIBE FORM ===== */
.bn-subscribe-form {
    background: transparent;
    color: var(--text-main);
}

.bn-subscribe-form input[type="email"] {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    box-sizing: border-box;
    width: 100%;
}

.bn-subscribe-form input[type="email"]::placeholder {
    color: var(--text-muted);
}

.bn-subscribe-form button {
    background: var(--brand-orange);
    color: #0F172A;
    border: none;
    border-radius: 6px;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
}

.bn-subscribe-form button:hover {
    background: var(--brand-orange-hover);
}

.bn-subscribe-msg { font-size: 13px; margin-top: 8px; }
.bn-subscribe-msg.success { color: #10B981; }
.bn-subscribe-msg.error { color: #EF4444; }

/* ===== LEAD BANNER ===== */
.bn-lead-banner-widget {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
}

.bn-lead-banner-widget img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .single-post .entry-title { font-size: 1.8rem; }
    body { font-size: 16px; }
    .main-header-bar { padding: 8px 0; }
}

@media (max-width: 480px) {
    .single-post .entry-title { font-size: 1.5rem; }
    .widget-area .widget { padding: 1rem; }
}

/* ===== FRONT PAGE: Remove top gap/empty space =====*/
.home .entry-header,
.home .ast-page-builder-template .entry-header {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.home .ast-container {
    padding-top: 0 !important;
}

.home #primary {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.home .uagb-is-root-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.home .entry-content {
    margin-top: 0 !important;
}

/* Front page hero card — kill the massive 320px top padding */
.home .uagb-block-5e5cfb3a .uagb-post__inner-wrap {
    padding-top: 30px !important;
}

/* ===== FRONT PAGE: Must Read Section Dark Background ===== */
.uagb-block-02ad468d,
.uagb-block-02ad468d .uagb-container-inner-blocks-wrap,
.uagb-block-fff37036 {
    background-color: var(--bg-dark) !important;
}

/* ===== FRONT PAGE: UAG Post Grid Card Backgrounds ===== */
.wp-block-uagb-post-grid .uagb-post__inner-wrap,
.wp-block-uagb-post-grid .uagb-post__text {
    background-color: transparent !important;
}

/* ===== FRONT PAGE: Lead Magnet CTA Banner Dark ===== */
.uagb-block-9aaac715 {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

/* ===== CATCH-ALL: Ensure all UAG root containers are dark ===== */
.uagb-is-root-container {
    background-color: var(--bg-dark);
}

/* ===== SINGLE POST: Content Width Adjustment ===== */
/* Use full primary column width — no restrictive max-width */
.single-post .entry-content {
    max-width: none;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Override Astra narrow container for single posts */
@media (min-width: 922px) {
    .single-post.ast-separate-container .ast-article-single .ast-container--narrow {
        max-width: 100% !important;
    }
    .single-post .ast-article-single .post-content .entry-content {
        max-width: none;
    }
}

/* ===== SINGLE POST: Sidebar — equal padding, no outer card ===== */
.single-post .widget-area,
.single-post #secondary {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
}

/* Equal padding on sidebar for desktop */
@media (min-width: 922px) {
    .single-post.ast-separate-container.ast-right-sidebar #secondary {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Widgets have their own card styling — keep equal padding */
.single-post #secondary .widget {
    padding: 1.25rem !important;
}

/* Homepage right sidebar — balanced padding */
.home #secondary .widget {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

/* ===== SINGLE POST: Content area background ===== */
.single-post #primary,
.single-post .ast-container {
    background-color: transparent;
}

/* ===== GLOBAL: Body/page background catch-all ===== */
.site-content,
.ast-page-builder-template .site-content > .ast-container {
    background-color: var(--bg-dark);
}

/* ===== UAG: Post grid image cards in Must Read (background-position style) ===== */
.wp-block-uagb-post-grid .uagb-post__image,
.wp-block-uagb-post-grid .uagb-post__thumbnail {
    background-color: var(--bg-card) !important;
}

/* ===== CONTACT PAGE: Dark theme overrides ===== */
/* Header block (bn-contact-header has inline #1a1a1a / #555) */
.bn-contact-header h1 {
    color: #ffffff !important;
}

.bn-contact-header p {
    color: #E2E8F0 !important;
}

/* WPForms — labels, inputs, submit button */
.wpforms-container .wpforms-field-label {
    color: #E2E8F0 !important;
}

.wpforms-container .wpforms-field-label .wpforms-required-label {
    color: #EF4444 !important;
}

.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="url"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="number"],
.wpforms-container textarea,
.wpforms-container select {
    background-color: #0F172A !important;
    border: 1px solid #334155 !important;
    color: #E2E8F0 !important;
    border-radius: 6px !important;
}

.wpforms-container input::placeholder,
.wpforms-container textarea::placeholder {
    color: #64748B !important;
}

.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus {
    border-color: #F7931A !important;
    outline: none !important;
}

.wpforms-container button[type="submit"],
.wpforms-container .wpforms-submit {
    background-color: #F7931A !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}

.wpforms-container button[type="submit"]:hover,
.wpforms-container .wpforms-submit:hover {
    background-color: #D97706 !important;
}

/* WPForms validation errors */
.wpforms-container .wpforms-error {
    color: #EF4444 !important;
}

/* ===== FIXES: White background overrides ===== */

/* Below-footer bar - force dark */
.site-below-footer-wrap {
    background-color: var(--bg-header) !important;
}
.site-below-footer-wrap,
.site-below-footer-wrap * {
    color: var(--text-muted) !important;
}
.site-below-footer-wrap a {
    color: var(--text-muted) !important;
}
.site-below-footer-wrap a:hover {
    color: var(--brand-orange) !important;
}

/* Comments area - force dark */
.comments-area,
.comments-area .comment-respond,
.comments-area .ast-comment-list li,
.ast-separate-container .comments-area {
    background-color: transparent !important;
    color: var(--text-main);
}
.comment-respond input,
.comment-respond textarea {
    background-color: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

/* Contact page WPForms - force dark inputs */
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="url"],
.wpforms-container input[type="tel"],
.wpforms-container textarea,
.wpforms-container select {
    background-color: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    border-radius: 6px !important;
}
.wpforms-container label,
.wpforms-container .wpforms-field-label {
    color: var(--text-main) !important;
}
.wpforms-container button[type="submit"],
.wpforms-container .wpforms-submit {
    background-color: var(--brand-orange) !important;
    color: #0F172A !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}

/* ===== FIXES: Footer widgets ===== */

/* Primary footer section */
.site-primary-footer-wrap,
.ast-builder-grid-row-container.site-footer-focus-item {
    background-color: var(--bg-header) !important;
}

/* Footer above section (CTA area) */
.site-above-footer-wrap {
    background-color: var(--bg-header) !important;
}

/* Make sure footer widgets are visible with proper colors */
.site-footer .widget-area,
#colophon .widget-area {
    background: transparent;
}

/* Footer widget text readable */
#colophon .widget-area .widget,
.site-footer .widget-area .widget {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 1rem;
    margin-bottom: 0;
}

/* Footer images no border */
.site-footer img,
#colophon img {
    border: none !important;
    box-shadow: none !important;
}

/* ===== FIXES: Category/archive pages ===== */

/* Archive article cards - ensure dark bg */
.ast-separate-container .ast-article-post,
.archive .ast-article-post {
    background-color: transparent !important;
    color: var(--text-main);
}

/* Archive description */
.ast-archive-description {
    background-color: transparent !important;
}

/* Category title */
.ast-archive-title {
    color: #ffffff !important;
}

/* ===== FIXES: Header duplicate logo text ===== */

/* Hide site title text if logo image exists */
.site-header .site-title a:not(:has(img)) {
    display: none;
}

/* ===== FIXES: Single post sidebar layout ===== */

@media (min-width: 922px) {
    /* Full-width flex container */
    .single-post.ast-right-sidebar .site-content .ast-container,
    .ast-right-sidebar .site-content .ast-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        width: 100% !important;
        max-width: 1240px !important;
        box-sizing: border-box !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .single-post.ast-right-sidebar #primary,
    .ast-right-sidebar #primary {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .single-post.ast-right-sidebar #secondary,
    .ast-right-sidebar #secondary {
        flex: 0 0 320px !important;
        width: 320px !important;
        max-width: 320px !important;
        min-width: 280px !important;
        box-sizing: border-box !important;
        padding-left: 1.5rem !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .single-post .ast-article-single {
        max-width: 100% !important;
    }
}


/* ===== FIXES: WPForms aggressive override ===== */
.wpforms-container .wpforms-field input,
.wpforms-container .wpforms-field textarea,
.wpforms-container .wpforms-field select,
.wpforms-field-container input,
.wpforms-field-container textarea {
    background-color: #0F172A !important;
    border: 1px solid #334155 !important;
    color: #E2E8F0 !important;
}
.wpforms-container .wpforms-field input::placeholder,
.wpforms-container .wpforms-field textarea::placeholder {
    color: #64748B !important;
}
