/**
 * Single Best/Top/Alternatives — Editorial Layout Styles
 * Covers: 70/30 two-column layout, sticky sidebar, editorial heading,
 *         premium grid section, intro accordion, disclosure text.
 */

/* =========================================================
   SECTION SPACING
   ========================================================= */

.editorial-heading-section,
.premium-grid-section,
.main-editorial-layout,
.editorial-share-section,
.editorial-reviews-section {
    padding: 40px 0;
}

@media (max-width: 768px) {

    .editorial-heading-section,
    .premium-grid-section,
    .main-editorial-layout,
    .editorial-share-section,
    .editorial-reviews-section {
        padding: 20px 0 !important;
    }
}

.premium-grid-section {
    background: color-mix(in srgb, var(--bg-color) 97%, var(--primary) 3%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .premium-grid-section {
    background: color-mix(in srgb, var(--bg-color) 96%, #6366f1 4%);
}

/* =========================================================
   EDITORIAL HEADING (centered, above premium grid)
   ========================================================= */

.editorial-heading-wrap {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 32px;
}

.editorial-heading-title {
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 10px;
    line-height: 1.3;
}

.editorial-heading-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

/* =========================================================
   DISCLOSURE TEXT (once, below premium grid)
   ========================================================= */

.premium-grid-disclosure {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 24px;
    padding: 8px 16px;
    opacity: 0.8;
}

/* =========================================================
   70 / 30 EDITORIAL TWO-COLUMN LAYOUT
   ========================================================= */

.editorial-two-col {
    display: grid;
    grid-template-columns: 70fr 30fr;
    gap: 36px;
    align-items: stretch;
    /* Stretch columns to full height so sticky has room to move */
}

/* LEFT — main content column */
.editorial-main-col {
    min-width: 0;
    /* prevent overflow in grid */
}

/* RIGHT — sticky sidebar */
.editorial-sidebar-col {
    min-width: 0;
    /* Removed align-self: start so the column stretches to full height of the row */
}

.editorial-sticky-sidebar {
    position: sticky;
    top: 100px;
    z-index: 10;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--primary-rgb), 0.25) transparent;
}

.editorial-sticky-sidebar::-webkit-scrollbar {
    width: 4px;
}

.editorial-sticky-sidebar::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.25);
    border-radius: 4px;
}

/* =========================================================
   INTRO BLOCK (open by default)
   ========================================================= */

.best-intro-block {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
}

.best-intro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    flex-wrap: wrap;
}

.best-update-line {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
}

.best-intro-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.best-intro-toggle:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
    color: var(--primary);
}

.best-intro-arrow {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.best-intro-toggle[aria-expanded="false"] .best-intro-arrow {
    transform: rotate(-90deg);
}

.best-intro-content {
    padding: 24px;
    color: var(--text-secondary, var(--text-muted));
    font-size: 1rem;
    line-height: 1.7;
}

/* Introduction Heading Overrides to match Site Standard */
.best-intro-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, var(--text-color));
    margin: 32px 0 16px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 12px;
}

.best-intro-content h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.best-intro-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.best-intro-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 0 10px;
}

.best-intro-content[hidden] {
    display: none;
}

/* =========================================================
   RANKED EDITORIAL LIST (inside 70% col)
   ========================================================= */

.ranked-editorial-list {
    margin-top: 8px;
}

/* =========================================================
   MOBILE — Stack everything
   ========================================================= */



/* =========================================================
   SIDEBAR — Force 2-col 6-row grid (2 × 6 = 12 tools)
   ========================================================= */

.editorial-sticky-sidebar .featured-tools-grid,
.editorial-sidebar-col .featured-tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(6, auto) !important;
    gap: 10px !important;
}

.editorial-sidebar-col .archive-featured-tools-section {
    padding: 0;
    margin-top: 0;
}

.editorial-sidebar-col .featured-header-badge-area {
    margin-bottom: 16px;
}

/* =========================================================
   RANKED CARD — Bigger right-col pricing badge + visit button (desktop)
   ========================================================= */

@media (min-width: 769px) {
    .rlc-row-2-right {
        min-width: 175px;
        max-width: 205px;
    }

    .rlc-pricing-badge {
        padding: 9px 16px;
        font-size: 0.9rem;
        font-weight: 700;
        border-radius: 10px;
    }

    .rlc-visit-btn {
        padding: 13px 18px;
        font-size: 0.95rem;
        font-weight: 700;
    }
}

/* =========================================================
   PRICING BADGE — badge-deals (Deals / Lifetime Deals)
   ========================================================= */

.badge-deals {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .badge-deals {
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.2);
}

/* =========================================================
   SECTION BORDERS — professional dividers
   ========================================================= */

/* Ranked list top divider */
.ranked-editorial-list {
    border-top: 2px solid var(--border-color);
    padding-top: 24px;
}

/* Key Takeaways — bordered card treatment with premium tint */
.best-faq-section.best-faq-kt {
    background: color-mix(in srgb, var(--card-bg) 96%, var(--primary) 4%);
    /* Subtle primary tint */
    border: 1.5px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.best-faq-section.best-faq-kt .faq-section-title {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

/* End FAQ — top divider */
.best-faq-section.best-faq-end {
    border-top: 2px solid var(--border-color);
    padding-top: 28px;
}

/* FAQ item row separators */
.best-faq-item {
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: background 0.2s ease;
}

.best-faq-item:last-child {
    border-bottom: none;
}

.best-faq-item:hover {
    background: rgba(var(--primary-rgb), 0.02);
}

/* Editorial layout top border */
.editorial-two-col {
    border-top: 1px solid var(--border-color);
    padding-top: 28px;
}

/* line-clamp standard compatibility */
.hbta-hero-title,
.hbta-hero-desc,
.prc-tagline {
    line-clamp: 2;
}

/* =========================================================
   RESPONSIVE OVERRIDES (Consolidated at end)
   ========================================================= */

@media (max-width: 1024px) {
    .editorial-two-col {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .editorial-sticky-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {

    .editorial-heading-title {
        font-size: 1.15rem !important;
    }

    .best-intro-header {
        padding: 10px 12px !important;
    }

    .best-intro-content {
        padding: 12px !important;
        font-size: 0.9rem !important;
    }

    /* Key Takeaways Mobile Specifics */
    .best-faq-section.best-faq-kt {
        padding: 16px !important;
        border-radius: 16px !important;
        margin-bottom: 24px !important;
    }

    /* Intro Typography Mobile Reduction */
    .best-intro-content h2 {
        font-size: 1.05rem !important;
        margin: 24px 0 12px !important;
    }

    .best-intro-content h2::before {
        height: 20px !important;
    }

    .best-intro-content h3 {
        font-size: 1rem !important;
        margin: 20px 0 10px !important;
    }

    .best-intro-content h4 {
        font-size: 0.95rem !important;
        margin: 16px 0 8px !important;
    }
}

@media (max-width: 480px) {
    .best-intro-content {
        font-size: 0.85rem !important;
        padding: 10px !important;
    }

    .best-faq-section.best-faq-kt {
        padding: 14px !important;
        margin-bottom: 20px !important;
    }
}