/*
Theme Name: B2BTimes B2B Insights
Theme URI: https://ai.studio/build
Author: Google AI Studio
Author URI: https://ai.studio/build
Description: A high-performance, polished, premium B2B editorial & consulting theme. Built-in B2B Service Enquiry forms, custom inbox management, styled columns, and modern Tailwind markup.
Version: 1.0.0
License: GNU GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: b2btimes
Tags: block-styles, custom-menu, featured-images, translation-ready, two-columns, premium-editorial
*/

/* Reset margins and establish box sizing */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    background-color: #f8fafc; /* bg-slate-50 */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

/* 
 * Push the sticky navigation bar down precisely when the WordPress Admin Bar is rendered.
 * This prevents the WP Admin Bar from blocking/overlaying the top B2B logo or menu options in normal and mobile viewports.
 */
body.admin-bar header {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar header {
        top: 46px !important;
    }
}

/* Ensure images have natural block margins with tailwind aspect ratios */
img {
    max-width: 100%;
    height: auto;
}

/* Keep blog card images crisp and vivid — no browser subpixel blur */
.b2b-blog-card img,
article img {
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    transform: translateZ(0);
}

/* Prevent scale-zoom from blurring thumbnails on hover */
.b2b-blog-card .overflow-hidden img {
    filter: none !important;
    opacity: 1 !important;
}

/* Stop parent animation opacity leaking into card images */
.b2b-blog-card {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Fallback transitions for microinteractions */
.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* ==========================================================================
   B2BTimes Branding & Theme Pure CSS Fallbacks
   ========================================================================== */

/* Logo branding layout */
.b2b-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.b2b-logo-icon-box {
    background: linear-gradient(135deg, #090d12 0%, #1e293b 100%) !important;
    background-color: #0f172a !important;
    color: #10b981 !important;
    padding: 8px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15) !important;
    margin-right: 12px !important;
}

.b2b-logo-text-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    line-height: normal !important;
}

.b2b-logo-title {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-weight: 900 !important;
    font-size: 24px !important;
    letter-spacing: -0.05em !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.b2b-logo-title .b2b-part {
    color: #10b981 !important; /* Vivid Emerald green */
}

.b2b-logo-title .times-part {
    color: #0f172a !important; /* Dark slate */
    font-weight: 800 !important;
}

/* Dark mode override for times part in footer */
.b2b-logo-dark .b2b-logo-title .times-part {
    color: #ffffff !important;
}

.b2b-logo-subtitle {
    font-family: monospace, Courier, monospace !important;
    font-size: 8px !important;
    font-weights: 700 !important;
    letter-spacing: 0.25em !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    margin-top: 4px !important;
    line-height: 1 !important;
}

/* Premium Footer Dark Theme Definition */
.b2b-site-footer {
    background-color: #090d12 !important; /* Dark background matches WordPress and React custom builds */
    color: #cbd5e1 !important;
    border-top: 1px solid #1e293b !important;
    padding-top: 64px !important;
    padding-bottom: 48px !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

.b2b-site-footer a {
    color: #94a3b8 !important;
    text-decoration: none !important;
    transition: color 150ms ease !important;
}

.b2b-site-footer a:hover {
    color: #10b981 !important; /* High-contrast hover color */
}

.b2b-site-footer h3 {
    color: #f1f5f9 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    margin-bottom: 16px !important;
}

.b2b-site-footer p {
    color: #94a3b8 !important;
    font-size: 13px !important;
    line-height: 1.625 !important;
}

.b2b-site-footer ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.b2b-site-footer li {
    margin-bottom: 10px !important;
}


/* ================================================================
   ARTICLE PROSE — replaces Tailwind Typography plugin
   Targets .prose class used in single.php article content area
   ================================================================ */

.prose {
    color: #1e293b;
    font-size: 17px;
    line-height: 1.85;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ── Headings ─────────────────────────────────────────────── */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: #0f172a;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-top: 2em;
    margin-bottom: 0.6em;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.prose h2 {
    font-size: 1.65rem;
    padding-bottom: 0.4em;
    border-bottom: 2px solid #10b981;
    margin-top: 2.4em;
}

.prose h3 {
    font-size: 1.3rem;
    color: #0f172a;
}

.prose h4 {
    font-size: 1.1rem;
    color: #334155;
    font-weight: 700;
}

.prose h5,
.prose h6 {
    font-size: 1rem;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Paragraphs ───────────────────────────────────────────── */
.prose p {
    margin-top: 0;
    margin-bottom: 1.4em;
    color: #334155;
    font-size: 16.5px;
    line-height: 1.85;
}

.prose p:last-child {
    margin-bottom: 0;
}

/* ── Links ────────────────────────────────────────────────── */
.prose a {
    color: #059669;
    text-decoration: underline;
    text-decoration-color: #a7f3d0;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.prose a:hover {
    color: #047857;
    text-decoration-color: #10b981;
}

/* ── Bold & Italic ────────────────────────────────────────── */
.prose strong,
.prose b {
    font-weight: 700;
    color: #0f172a;
}

.prose em,
.prose i {
    font-style: italic;
    color: #475569;
}

/* ── Blockquotes ──────────────────────────────────────────── */
.prose blockquote {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
    margin: 2em 0;
    padding: 1.2em 1.5em;
    border-radius: 0 12px 12px 0;
    color: #166534;
    font-style: italic;
    font-size: 1.05em;
    line-height: 1.7;
}

.prose blockquote p {
    color: #166534;
    margin-bottom: 0;
}

.prose blockquote cite {
    display: block;
    margin-top: 0.6em;
    font-size: 0.85em;
    font-style: normal;
    font-weight: 600;
    color: #15803d;
    opacity: 0.8;
}

/* ── Lists ────────────────────────────────────────────────── */
.prose ul,
.prose ol {
    margin: 1.2em 0 1.6em 0;
    padding-left: 1.8em;
    color: #334155;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5em;
    line-height: 1.75;
    font-size: 16px;
}

.prose li::marker {
    color: #10b981;
    font-weight: 700;
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin: 0.4em 0 0.4em 1.2em;
}

/* ── Tables ───────────────────────────────────────────────── */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 14.5px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.prose thead {
    background: #0f172a;
    color: #fff;
}

.prose th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
    color: #10b981;
}

.prose td {
    padding: 11px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    line-height: 1.5;
}

.prose tbody tr:nth-child(even) {
    background: #f8fafc;
}

.prose tbody tr:hover {
    background: #f0fdf4;
}

/* ── Code ─────────────────────────────────────────────────── */
.prose code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.875em;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.prose pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.4em 1.6em;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.8em 0;
    font-size: 14px;
    line-height: 1.7;
    border: 1px solid #1e293b;
}

.prose pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
}

/* ── Images ───────────────────────────────────────────────── */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em auto;
    display: block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.prose figure {
    margin: 2em 0;
    text-align: center;
}

.prose figcaption {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    margin-top: 0.6em;
    font-style: italic;
}

/* ── Horizontal Rule ──────────────────────────────────────── */
.prose hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2.5em 0;
}

/* ── Callout / Notice boxes (if using WP blocks) ──────────── */
.prose .wp-block-pullquote {
    border-top: 4px solid #10b981;
    border-bottom: 4px solid #10b981;
    padding: 1.5em 2em;
    margin: 2em 0;
    font-size: 1.15em;
    font-style: italic;
    color: #0f172a;
    text-align: center;
}

.prose .wp-block-quote {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
    margin: 2em 0;
    padding: 1.2em 1.5em;
    border-radius: 0 12px 12px 0;
}

.prose .wp-block-cover,
.prose .wp-block-image {
    margin: 2em 0;
}

/* ── First paragraph drop cap style ──────────────────────── */
.prose > p:first-of-type {
    font-size: 17.5px;
    color: #1e293b;
    font-weight: 400;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .prose {
        font-size: 15.5px;
    }
    .prose h2 { font-size: 1.35rem; }
    .prose h3 { font-size: 1.15rem; }
    .prose table { font-size: 13px; }
    .prose th, .prose td { padding: 8px 10px; }
}

/* ── b2b-article-content alias — mirrors .prose for extra specificity ── */
.b2b-article-content h2 {
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-top: 2.2em !important;
    margin-bottom: 0.6em !important;
    padding-bottom: 0.4em !important;
    border-bottom: 2px solid #10b981 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.25 !important;
}
.b2b-article-content h3 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-top: 1.8em !important;
    margin-bottom: 0.5em !important;
}
.b2b-article-content h4 {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-top: 1.4em !important;
    margin-bottom: 0.4em !important;
}
.b2b-article-content p {
    margin-bottom: 1.4em !important;
    color: #334155 !important;
    font-size: 16.5px !important;
    line-height: 1.85 !important;
}
.b2b-article-content ul,
.b2b-article-content ol {
    margin: 1em 0 1.5em 0 !important;
    padding-left: 1.8em !important;
}
.b2b-article-content ul { list-style-type: disc !important; }
.b2b-article-content ol { list-style-type: decimal !important; }
.b2b-article-content li {
    margin-bottom: 0.5em !important;
    color: #334155 !important;
    font-size: 16px !important;
    line-height: 1.75 !important;
}
.b2b-article-content li::marker { color: #10b981 !important; font-weight: 700 !important; }
.b2b-article-content blockquote {
    border-left: 4px solid #10b981 !important;
    background: #f0fdf4 !important;
    margin: 2em 0 !important;
    padding: 1.2em 1.5em !important;
    border-radius: 0 12px 12px 0 !important;
    font-style: italic !important;
    color: #166534 !important;
}
.b2b-article-content blockquote p { color: #166534 !important; margin-bottom: 0 !important; }
.b2b-article-content a {
    color: #059669 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}
.b2b-article-content a:hover { color: #047857 !important; }
.b2b-article-content strong, .b2b-article-content b { font-weight: 700 !important; color: #0f172a !important; }
.b2b-article-content em { font-style: italic !important; color: #475569 !important; }
.b2b-article-content hr { border: none !important; border-top: 2px solid #e2e8f0 !important; margin: 2.5em 0 !important; }
.b2b-article-content table { width: 100% !important; border-collapse: collapse !important; margin: 2em 0 !important; font-size: 14.5px !important; }
.b2b-article-content th { background: #0f172a !important; color: #10b981 !important; padding: 10px 14px !important; font-size: 11px !important; text-transform: uppercase !important; letter-spacing: .08em !important; text-align: left !important; }
.b2b-article-content td { padding: 10px 14px !important; border-bottom: 1px solid #f1f5f9 !important; color: #334155 !important; }
.b2b-article-content tbody tr:nth-child(even) { background: #f8fafc !important; }
.b2b-article-content code { background: #f1f5f9 !important; color: #e11d48 !important; padding: 2px 7px !important; border-radius: 5px !important; font-size: 0.875em !important; border: 1px solid #e2e8f0 !important; }
.b2b-article-content pre { background: #0f172a !important; color: #e2e8f0 !important; padding: 1.4em !important; border-radius: 12px !important; overflow-x: auto !important; margin: 1.8em 0 !important; }
.b2b-article-content img { max-width: 100% !important; border-radius: 12px !important; margin: 2em auto !important; display: block !important; }
