/* ==========================================================================
   ABCom Blog Hub — Senior UI/UX Editorial Design System
   Crafted with high typographic hierarchy, precise grid alignment,
   and uncompromised image aspect ratio preservation.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Canvas & Foundation
   -------------------------------------------------------------------------- */
body:has(#abcom-blogs-editorial):before,
body.abcom-blogs-page:before {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    background: none !important;
    content: none !important;
}

body:has(#abcom-blogs-editorial),
body.abcom-blogs-page {
    background-color: #f8fafc !important;
    color: #1e293b;
    font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#abcom-blogs-editorial {
    padding: 48px 0 80px;
    background: #f8fafc;
    min-height: 85vh;
}

#abcom-blogs-editorial .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* --------------------------------------------------------------------------
   2. Editorial Header
   -------------------------------------------------------------------------- */
.editorial-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 40px;
}

.editorial-kicker {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 12px;
}

.editorial-header h1 {
    font-size: clamp(32px, 3.6vw, 46px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #090d16;
    margin: 0 0 14px;
}

.editorial-header p {
    font-size: 17px;
    line-height: 1.6;
    color: #64748b;
    margin: 0;
}

/* --------------------------------------------------------------------------
   3. Featured Story Card (Cinema-Ratio Showcase)
   -------------------------------------------------------------------------- */
.featured-story-wrap {
    margin-bottom: 48px;
}

.featured-story-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.featured-story-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.1);
    border-color: #cbd5e1;
}

.featured-story-body {
    padding: 44px 40px 44px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 16px;
}

.featured-tag:before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
}

.featured-title {
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: #090d16;
    margin: 0 0 16px;
}

.featured-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.featured-title a:hover {
    color: #2563eb;
}

.featured-summary {
    font-size: 15px;
    line-height: 1.65;
    color: #475569;
    margin: 0 0 24px;
}

.featured-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 28px;
    font-weight: 500;
}

.featured-meta-row strong {
    color: #0f172a;
    font-weight: 700;
}

.featured-meta-sep {
    color: #cbd5e1;
}

.featured-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #090d16;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none !important;
    align-self: flex-start;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(9, 13, 22, 0.15);
}

.featured-action-btn:hover {
    background: #2563eb;
    transform: translateX(3px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.featured-action-btn svg {
    transition: transform 0.2s ease;
}

.featured-action-btn:hover svg {
    transform: translateX(2px);
}

/* Featured Media Container — EXACT ASPECT RATIO PRESERVATION */
.featured-story-media {
    background: #f8fafc;
    border-left: 1px solid #f1f5f9;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.featured-story-media a {
    display: block;
    width: 100%;
    line-height: 0;
}

.featured-story-media img {
    width: 100% !important;
    height: auto !important;
    max-height: 380px !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    background: #ffffff;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-story-card:hover .featured-story-media img {
    transform: scale(1.015);
}

/* --------------------------------------------------------------------------
   4. Segmented Controls Toolbar (Tabs + Search)
   -------------------------------------------------------------------------- */
.editorial-toolbar {
    margin-bottom: 36px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
}

/* Segmented Category Tabs */
.editorial-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.editorial-tab {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    user-select: none;
    position: relative;
}

.editorial-tab:hover {
    color: #090d16;
    background: #f1f5f9;
}

.editorial-tab.active {
    color: #090d16;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    font-weight: 700;
}

/* Minimalist Search Box */
.editorial-search-wrap {
    position: relative;
    width: 100%;
    max-width: 290px;
}

.editorial-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
}

.editorial-search-input {
    width: 100%;
    padding: 9px 34px 9px 36px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    color: #090d16;
    background: #ffffff;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.editorial-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.editorial-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    display: none;
    padding: 0;
    line-height: 1;
}

.editorial-search-clear:hover {
    color: #090d16;
}

/* --------------------------------------------------------------------------
   5. Section Subheader & Metrics
   -------------------------------------------------------------------------- */
.editorial-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.editorial-grid-header h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #090d16;
    margin: 0;
}

.editorial-count-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. 3-Column Editorial Grid (Precision Cards)
   -------------------------------------------------------------------------- */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 24px;
}

.editorial-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.editorial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px -4px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

/* Card Image Box — 100% UNCOMPROMISED ASPECT RATIO */
.editorial-card-media {
    position: relative;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
    line-height: 0;
}

.editorial-card-media a {
    display: block;
    width: 100%;
    line-height: 0;
    background: #ffffff;
}

.editorial-card-media img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    display: block !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    border: 0 !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-card:hover .editorial-card-media img {
    transform: scale(1.018);
}

/* Card Body & Editorial Typography */
.editorial-card-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.editorial-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.editorial-card-category {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2563eb;
}

.editorial-card-time {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.editorial-card-title {
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.42;
    letter-spacing: -0.015em;
    color: #090d16;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 46px;
}

.editorial-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.editorial-card-title a:hover {
    color: #2563eb;
}

.editorial-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: #64748b;
}

.editorial-card-date {
    font-weight: 500;
}

.editorial-read-link {
    color: #090d16;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease, gap 0.15s ease;
}

.editorial-read-link:hover {
    color: #2563eb;
    gap: 7px;
}

.editorial-read-link svg {
    transition: transform 0.15s ease;
}

.editorial-read-link:hover svg {
    transform: translateX(2px);
}

/* --------------------------------------------------------------------------
   7. Progressive Loading & Empty States
   -------------------------------------------------------------------------- */
.editorial-pagination-bar {
    text-align: center;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.editorial-load-btn {
    background: #090d16;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 13px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(9, 13, 22, 0.12);
}

.editorial-load-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.editorial-progress-text {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.editorial-empty-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    display: none;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
}

.editorial-empty-notice h3 {
    font-size: 19px;
    font-weight: 700;
    color: #090d16;
    margin: 0 0 6px;
}

.editorial-empty-notice p {
    color: #64748b;
    font-size: 14px;
    margin: 0 0 16px;
}

.editorial-reset-link {
    display: inline-block;
    color: #2563eb;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   8. Responsive Behavior
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .featured-story-card {
        grid-template-columns: 1fr;
    }

    .featured-story-body {
        padding: 32px 28px;
    }

    .featured-story-media {
        border-left: 0;
        border-top: 1px solid #f1f5f9;
        min-height: auto;
        padding: 20px;
    }

    .editorial-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .editorial-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .editorial-search-wrap {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    #abcom-blogs-editorial {
        padding: 32px 0 60px;
    }

    .editorial-header h1 {
        font-size: 28px;
    }

    .editorial-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .editorial-nav-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .editorial-tab {
        white-space: nowrap;
        font-size: 13px;
        padding: 6px 12px;
    }

    .featured-title {
        font-size: 20px;
    }

    .featured-story-body {
        padding: 22px 18px;
    }
}
