/*
Theme Name: LogiPress AI
Theme URI: https://dailylogistics.com
Author: Daily Logistics
Author URI: https://dailylogistics.com
Description: A fast editorial WordPress theme for logistics publishers, with an optional multi-provider AI assistant for theme and content workflow support.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: logipressai
Tags: blog, news, logistics, editorial, ai, responsive-layout, fast-loading
*/

/* Reset & Variables */
:root {
    --bg-color: #fbfbfd;
    --text-color: #1d1d1f;
    --secondary-text: #6e6e73;
    --brand-color: #000000;
    --brand-dark: #1d1d1f;
    --glossary-color: #333336;
    --accent-color: #27A7FC;
    --border-color: #e5e5ea;
    --surface-color: rgba(251, 251, 253, 0.85);
    --surface-blur: blur(24px);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

html {
    -webkit-text-size-adjust: 100%;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    top: 10px;
    left: 10px;
    z-index: 100000;
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip: auto;
    background: #ffffff;
    color: #102033;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}

/* Layout */
.site-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-container-wide {
    max-width: 1180px;
}

.content-sidebar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
}

.content-sidebar-layout.no-sidebar {
    grid-template-columns: minmax(0, 800px);
    justify-content: center;
}

.content-area {
    min-width: 0;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface-color);
    backdrop-filter: var(--surface-blur);
    -webkit-backdrop-filter: var(--surface-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0;
}

.site-title a {
    color: var(--text-color);
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo a {
    display: inline-flex;
    line-height: 0;
}

.site-logo img {
    max-height: 40px;
    width: auto;
    border-radius: 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-end;
}

.main-navigation a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-color);
    cursor: pointer;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    content: "";
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle-bars {
    position: relative;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
    position: absolute;
    left: 0;
}

.menu-toggle-bars::before {
    top: -6px;
}

.menu-toggle-bars::after {
    top: 6px;
}

.site-header.is-menu-open .menu-toggle-bars {
    background: transparent;
}

.site-header.is-menu-open .menu-toggle-bars::before {
    top: 0;
    transform: rotate(45deg);
}

.site-header.is-menu-open .menu-toggle-bars::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Content */
.site-main {
    padding: 60px 0;
}

.post-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.post-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    line-height: 1.2;
}

.post-title a {
    color: var(--text-color);
}

.post-meta {
    font-size: 13px;
    color: var(--secondary-text);
    margin-bottom: 20px;
}

.post-excerpt {
    color: var(--secondary-text);
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
    color: var(--accent-color);
    transition: opacity 0.2s ease;
}

.read-more:hover {
    color: var(--accent-color);
    opacity: 0.75;
}

/* Single Post */
.single-post-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    line-height: 1.1;
}

.single-post-content {
    font-size: 18px;
    margin-top: 40px;
}

.single-post-content p {
    margin-bottom: 24px;
}

.single-post-content h2, .single-post-content h3 {
    margin-top: 40px;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: 0;
}

.single-post-content iframe,
.single-post-content embed,
.single-post-content object {
    max-width: 100%;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 48px 0 28px;
    font-size: 14px;
    color: var(--secondary-text);
    background: var(--bg-color);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    margin-bottom: 32px;
    text-align: left;
}

.footer-widgets-fallback {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.site-info {
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 22px;
    text-align: left;
}

.site-info span {
    white-space: nowrap;
}

/* Widgets */
.widget-area {
    font-size: 14px;
}

.primary-sidebar {
    position: sticky;
    top: 96px;
}

.widget {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px;
    margin-bottom: 24px;
    padding: 24px;
}

.footer-widget {
    background: transparent;
    border: 0;
    margin-bottom: 0;
    padding: 0;
}

.widget-title {
    color: var(--text-color);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.footer-widget-title {
    font-size: 14px;
    margin-bottom: 10px;
}

.widget ul {
    list-style: none;
}

.widget li {
    border-bottom: 1px solid rgba(210, 210, 215, 0.6);
    padding: 8px 0;
}

.footer-widget li {
    border-bottom: 0;
    padding: 5px 0;
}

.widget li:first-child {
    padding-top: 0;
}

.widget li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

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

.widget p,
.widget .textwidget {
    line-height: 1.6;
}

/* Daily Logistics Front Page */
.home-main {
    padding: 0;
    overflow: hidden;
}

.home-main .site-container {
    max-width: 1180px;
}

.home-hero {
    background: #000000;
    color: #ffffff;
    padding: 80px 0 80px;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 48px;
    align-items: center;
}

.hero-kicker {
    margin-bottom: 12px;
    color: #86868b;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-kicker {
    margin-bottom: 10px;
    color: var(--secondary-text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-title {
    max-width: 760px;
    margin-bottom: 24px;
    color: #f5f5f7;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.hero-subcopy {
    max-width: 680px;
    margin-bottom: 40px;
    color: #a1a1a6;
    font-size: 22px;
    line-height: 1.5;
    font-weight: 400;
}

.hero-ctas,
.home-search-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
    transform: scale(0.98);
}

.btn-primary {
    background: #1d1d1f;
    color: #ffffff;
}

.home-hero .btn-primary {
    background: #ffffff;
    color: #000000;
}

.btn-secondary {
    border-color: rgba(0, 0, 0, 0.2);
    color: #1d1d1f;
    background: transparent;
}

.home-hero .btn-secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.home-hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-accent {
    background: #1d1d1f;
    color: #ffffff;
}

.home-search {
    padding: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.home-search label {
    display: block;
    margin-bottom: 14px;
    color: #f5f5f7;
    font-size: 15px;
    font-weight: 500;
}

.home-search input {
    min-width: 0;
    flex: 1 1 220px;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    font: inherit;
    background: rgba(255, 255, 255, 0.95);
    color: #1d1d1f;
}

.home-search input:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.home-search .btn-primary {
    border-radius: 999px;
}

.home-section {
    padding: 76px 0;
}

.bg-light {
    background: #f5f5f7;
}

.section-heading {
    margin-bottom: 28px;
}

.section-title {
    color: var(--text-color);
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.home-article-grid,
.home-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.home-article-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #dbe4ed;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(15, 35, 55, 0.07);
}

.home-article-media {
    display: block;
    aspect-ratio: 16 / 10;
    background: #d9e8f5;
    overflow: hidden;
}

.home-article-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.home-article-media-fallback {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--brand-dark);
    font-weight: 800;
}

.home-article-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.home-article-meta {
    margin-bottom: 10px;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.home-article-title {
    margin-bottom: 12px;
    font-size: 22px;
    line-height: 1.18;
}

.home-article-title a {
    color: #102033;
}

.home-article-excerpt {
    margin-bottom: 24px;
    color: var(--secondary-text);
    font-size: 15px;
    line-height: 1.5;
}

.home-article-card .read-more {
    margin-top: auto;
    color: var(--accent-color);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.category-block {
    min-height: 190px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.category-block h3 {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.category-block p {
    color: var(--secondary-text);
    font-size: 15px;
    line-height: 1.5;
}

.glossary-spotlight {
    background: #f5f5f7;
    color: var(--text-color);
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.glossary-content,
.newsletter-panel {
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.glossary-content .section-title,
.glossary-content p {
    color: var(--text-color);
}

.glossary-content p,
.newsletter-panel p {
    max-width: 720px;
    margin-top: 12px;
    color: var(--secondary-text);
    font-size: 18px;
}

.newsletter-panel {
    padding: 48px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
}

.homepage-video-panel {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
}

.homepage-video-widget {
    background: transparent;
    border: 0;
    margin: 0;
    padding: 24px;
}

.homepage-video-widget iframe,
.homepage-video-widget embed,
.homepage-video-widget object {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 320px;
    border: 0;
    border-radius: 12px;
}

.home-empty {
    grid-column: 1 / -1;
    padding: 32px;
    background: #f5f5f7;
    border: 1px dashed rgba(0,0,0,0.1);
    border-radius: 16px;
    color: var(--secondary-text);
    font-size: 15px;
}

@media (max-width: 980px) {
    .site-container {
        padding: 0 18px;
    }

    .header-inner {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-navigation {
        display: none;
        width: 100%;
        overflow: visible;
    }

    .site-header.is-menu-open .main-navigation {
        display: block;
    }

    .main-navigation ul {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
        min-width: 0;
        padding-top: 8px;
    }

    .main-navigation a {
        width: 100%;
        min-height: 40px;
        padding: 7px 0;
    }

    .content-sidebar-layout {
        grid-template-columns: 1fr;
        max-width: 800px;
    }

    .primary-sidebar {
        position: static;
    }

    .footer-widgets,
    .footer-widgets-fallback {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-hero-grid,
    .home-article-grid,
    .home-guide-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    html, body {
        font-size: 16px;
    }

    .site-container {
        padding: 0 16px;
    }

    .site-header {
        padding: 11px 0;
    }

    .site-title {
        font-size: 18px;
        letter-spacing: 0;
    }

    .main-navigation a {
        min-height: 34px;
        font-size: 13px;
        white-space: normal;
    }

    .site-main {
        padding: 34px 0;
    }

    .home-main {
        padding: 0;
    }

    .content-sidebar-layout {
        gap: 28px;
    }

    .post-card {
        border-radius: 10px;
        margin-bottom: 22px;
        padding: 16px;
    }

    .post-card:hover {
        transform: none;
    }

    .post-title {
        font-size: 24px;
        letter-spacing: 0;
    }

    .post-meta {
        margin-bottom: 14px;
    }

    .post-excerpt {
        font-size: 15px;
    }

    .single-post-title {
        font-size: 32px;
        letter-spacing: 0;
        line-height: 1.15;
    }

    .single-post-content {
        font-size: 16px;
        margin-top: 26px;
    }

    .single-post-content p {
        margin-bottom: 18px;
    }

    .single-post-content h2 {
        font-size: 24px;
    }

    .single-post-content h3 {
        font-size: 20px;
    }

    .widget {
        padding: 15px;
    }

    .footer-widgets,
    .footer-widgets-fallback {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .site-footer {
        padding: 34px 0 24px;
    }

    .site-info {
        flex-direction: column;
        gap: 8px;
        padding-top: 18px;
    }

    .site-info span {
        white-space: normal;
    }

    .home-hero {
        padding: 48px 0 38px;
    }

    .home-section {
        padding: 42px 0;
    }

    .hero-title {
        font-size: 38px;
        line-height: 1.04;
        letter-spacing: 0;
    }

    .hero-subcopy {
        margin-bottom: 22px;
        font-size: 17px;
    }

    .btn,
    .home-search-row button {
        width: 100%;
    }

    .home-search {
        padding: 18px;
    }

    .home-search-row {
        gap: 10px;
    }

    .home-search input {
        flex-basis: 100%;
        min-height: 46px;
        width: 100%;
    }

    .section-title {
        font-size: 30px;
        line-height: 1.12;
    }

    .home-article-body {
        padding: 16px;
    }

    .home-article-title {
        font-size: 20px;
    }

    .home-article-excerpt {
        font-size: 14px;
    }

    .category-block {
        min-height: 0;
        padding: 18px;
    }

    .category-block h3 {
        font-size: 18px;
    }

    .newsletter-panel {
        padding: 22px;
    }

    .homepage-video-widget {
        padding: 14px;
    }

    .homepage-video-widget iframe,
    .homepage-video-widget embed,
    .homepage-video-widget object {
        min-height: 190px;
    }

    .category-grid,
    .glossary-content,
    .newsletter-panel {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

}

/* AI Agent UI Widget */
.logipress-ai-agent-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--brand-color), var(--brand-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 999999;
    transition: transform 0.3s ease;
}
.logipress-ai-agent-btn:hover {
    transform: scale(1.1);
}
.logipress-ai-agent-btn svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.logipress-ai-agent-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: min(420px, calc(100vw - 40px));
    height: min(620px, calc(100vh - 120px));
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 999999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-sans);
}
.logipress-ai-agent-panel.active {
    display: flex;
    animation: logipressAiSlideUp 0.3s ease forwards;
}
@keyframes logipressAiSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.logipress-ai-panel-header {
    background: rgba(0,0,0,0.05);
    padding: 15px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}
.logipress-ai-panel-content {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}
/* AI Agent Chat Messages */
.logipress-ai-msg {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 85%;
    word-wrap: break-word;
    position: relative;
    font-size: 13px;
    line-height: 1.4;
}
.logipress-ai-user {
    background: var(--brand-color);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}
.logipress-ai-ai {
    background: #f1f3f4;
    color: #3c4043;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}
.logipress-ai-msg pre {
    background: #282c34;
    color: #abb2bf;
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    overflow-x: auto;
    margin: 8px 0;
    max-width: 100%;
}
.logipress-ai-msg.error {
    background: #fce8e6;
    color: #d93025;
    border: 1px solid #f5c2c7;
}
.logipress-ai-panel-footer {
    padding: 10px;
    border-top: 1px solid rgba(0,0,0,0.1);
}
.logipress-ai-agent-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.logipress-ai-agent-action,
.logipress-ai-apply-edit,
.logipress-ai-apply-content {
    border: 0;
    border-radius: 6px;
    background: var(--brand-color);
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    min-height: 36px;
    padding: 8px 10px;
}
.logipress-ai-agent-draft,
.logipress-ai-apply-edit {
    background: var(--glossary-color);
    color: #ffffff;
}
.logipress-ai-apply-content {
    background: var(--brand-dark);
    color: #ffffff;
}
.logipress-ai-agent-clear {
    grid-column: 1 / -1;
    background: #e5e7eb;
    color: #374151;
}
.logipress-ai-agent-content {
    background: var(--brand-dark);
}
.logipress-ai-agent-seo {
    background: var(--glossary-color);
}
.logipress-ai-agent-action:disabled,
.logipress-ai-apply-edit:disabled,
.logipress-ai-apply-content:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}
.logipress-ai-confirm-card {
    border: 1px solid #dbe4ed;
}
.logipress-ai-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}
.logipress-ai-confirm-yes,
.logipress-ai-cancel-action {
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    min-height: 34px;
    padding: 8px 10px;
}
.logipress-ai-confirm-yes {
    background: var(--brand-color);
    color: #ffffff;
}
.logipress-ai-cancel-action {
    background: #e5e7eb;
    color: #374151;
}
.logipress-ai-confirm-yes:disabled,
.logipress-ai-cancel-action:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}
.logipress-ai-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
}
.logipress-ai-input:focus {
    border-color: var(--brand-color);
}

/* Related Articles */
.related-articles-section {
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
}
.related-articles-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: 0;
}
.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.related-article-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.related-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.related-thumbnail {
    display: block;
    aspect-ratio: 16 / 10;
    background: #f5f5f7;
    overflow: hidden;
}
.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}
.related-thumbnail-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
}
.related-article-content {
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.related-article-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 5px;
}
.related-article-title a {
    color: var(--text-color);
}
.related-article-date {
    font-size: 10px;
    color: var(--secondary-text);
    margin-top: auto;
}

@media (max-width: 768px) {
    .related-articles-section {
        margin-top: 36px;
        padding-top: 24px;
    }

    .related-articles-title {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .related-articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .related-article-content {
        padding: 7px;
    }

    .related-article-title {
        font-size: 11px;
        line-height: 1.3;
    }

    .related-article-date {
        font-size: 10px;
    }
}

/* Comments Section */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}
.comments-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 0;
}
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list .comment {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.comment-list .comment:last-child {
    border-bottom: none;
}
.comment-body {
    display: flex;
    gap: 20px;
}
.comment-author .avatar {
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.comment-meta {
    margin-bottom: 10px;
}
.comment-meta b.fn {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}
.comment-metadata a {
    font-size: 12px;
    color: var(--secondary-text);
}
.comment-content {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}
.comment-list .children {
    list-style: none;
    margin: 20px 0 0 60px;
    padding: 0;
}

/* Comment Form */
.modern-comment-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    margin-top: 40px;
}
.comment-reply-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}
.modern-comment-form p {
    margin-bottom: 15px;
}
.modern-comment-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-text);
    margin-bottom: 6px;
}
.modern-comment-form input[type="text"],
.modern-comment-form input[type="email"],
.modern-comment-form input[type="url"],
.modern-comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--text-color);
    background: #fafafa;
    transition: all 0.2s ease;
    outline: none;
}
.modern-comment-form input:focus,
.modern-comment-form textarea:focus {
    background: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}
.modern-comment-form .submit-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.modern-comment-form .submit-btn:hover {
    background: #005bb5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

@media (max-width: 640px) {
    .logipress-ai-agent-btn {
        right: 14px;
        bottom: 14px;
        width: 52px;
        height: 52px;
    }

    .logipress-ai-agent-btn svg {
        width: 28px;
        height: 28px;
    }

    .logipress-ai-agent-panel {
        right: 10px;
        bottom: 76px;
        width: calc(100vw - 20px);
        height: min(560px, calc(100vh - 96px));
        border-radius: 10px;
    }

    .logipress-ai-panel-header,
    .logipress-ai-panel-content,
    .logipress-ai-panel-footer {
        padding: 12px;
    }

    .logipress-ai-msg {
        max-width: 92%;
        padding: 9px 11px;
        font-size: 12px;
    }

    .logipress-ai-agent-actions {
        grid-template-columns: 1fr;
    }

    .comments-area {
        margin-top: 40px;
        padding-top: 28px;
    }

    .comments-title {
        font-size: 20px;
    }

    .comment-body {
        display: block;
    }

    .comment-author .avatar {
        margin-bottom: 10px;
    }

    .comment-list .children {
        margin-left: 18px;
    }

    .modern-comment-form {
        border-radius: 10px;
        padding: 18px;
    }
}

@media (max-width: 390px) {
    .site-container {
        padding: 0 14px;
    }

    .home-hero {
        padding: 40px 0 32px;
    }

    .hero-title {
        font-size: 34px;
    }

    .btn {
        min-height: 42px;
        padding: 10px 14px;
        font-size: 14px;
    }

    .home-article-body,
    .newsletter-panel,
    .home-search {
        padding: 14px;
    }

    .related-articles-grid {
        gap: 7px;
    }

    .related-article-content {
        padding: 6px;
    }

    .related-article-title {
        font-size: 10.5px;
    }

    .related-article-date {
        font-size: 9.5px;
    }

    .logipress-ai-agent-panel {
        right: 8px;
        bottom: 72px;
        width: calc(100vw - 16px);
        height: min(540px, calc(100vh - 88px));
    }
}
