/* ==========================================================================
   EIRTHUM - BRAND COMPARISON & BENCHMARK INTERLINKING WIDGET
   Aesthetic: Luxurious Botanical Dark Green & Warm Cream Accents
   ========================================================================== */

.ep-brand-compare-section {
    padding: 3.5rem 0 2.5rem;
    background: #fbfaf6;
    position: relative;
    overflow: hidden;
}

.ep-compare-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Master Hero Box */
.ep-compare-card-box {
    background: linear-gradient(135deg, #ffffff 0%, #f7f5ed 50%, #f1eee2 100%);
    border-radius: 24px;
    padding: 2.25rem 2.5rem;
    color: #123321;
    box-shadow: 0 12px 36px rgba(18, 51, 33, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
    border: 1.5px solid #e5dfd0;
    position: relative;
    overflow: hidden;
}

/* Subtle Ambient Glows */
.ep-compare-card-box::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    border-radius: 50%;
}

.ep-compare-card-box::after {
    content: '';
    position: absolute;
    bottom: -90px;
    left: -90px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(24, 138, 83, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    border-radius: 50%;
}

/* Header Section */
.ep-compare-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 2;
}

.ep-compare-header-left {
    max-width: 760px;
}

.ep-compare-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #eef5f0;
    border: 1px solid #cbe0d3;
    color: #188a53;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: 30px;
    margin-bottom: 0.65rem;
}

.ep-compare-live-dot {
    width: 6px;
    height: 6px;
    background: #188a53;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(24, 138, 83, 0.2);
    animation: epPulse 2s infinite ease-in-out;
}

.ep-compare-title {
    font-family: 'Playfair Display', 'Lora', Georgia, serif;
    font-size: 2.1rem;
    font-weight: 700;
    color: #123321;
    line-height: 1.22;
    margin: 0 0 0.5rem;
}

.ep-compare-title span {
    color: #b45309;
    font-style: italic;
    font-weight: 400;
}

.ep-compare-subtitle {
    font-size: 0.95rem;
    color: #4a5d59;
    line-height: 1.5;
    margin: 0;
}

.ep-compare-header-right {
    flex-shrink: 0;
}

.ep-compare-hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #123321;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 4px 16px rgba(18, 51, 33, 0.16);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ep-compare-hub-btn:hover {
    background: #19462e;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(18, 51, 33, 0.22);
    color: #ffffff !important;
}

.ep-compare-hub-btn svg {
    transition: transform 0.2s ease;
}

.ep-compare-hub-btn:hover svg {
    transform: translateX(3px);
}

/* 1-on-1 Brand Comparison Matchup Cards */
.ep-compare-matchups-wrap {
    position: relative;
    z-index: 2;
    margin-bottom: 1.5rem;
}

.ep-matchups-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.ep-matchups-heading {
    font-size: 1.1rem;
    font-weight: 800;
    color: #123321;
    margin: 0;
}

.ep-matchups-sub {
    font-size: 0.82rem;
    color: #556b66;
    margin: 0;
}

/* Desktop Grid: 4 columns */
.ep-matchups-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.ep-matchup-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.15rem 1.1rem;
    border: 1.5px solid #e5dfd0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.025);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.ep-matchup-card:hover {
    transform: translateY(-3px);
    border-color: #188a53;
    box-shadow: 0 10px 22px rgba(24, 138, 83, 0.08);
}

.ep-matchup-brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.ep-matchup-brand-tag {
    font-size: 0.72rem;
    font-weight: 800;
    color: #b45309;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

.ep-matchup-vs {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
}

.ep-matchup-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: #123321;
    margin: 0 0 0.4rem;
    line-height: 1.25;
}

.ep-matchup-summary {
    font-size: 0.78rem;
    color: #556b66;
    line-height: 1.38;
    margin: 0 0 0.85rem;
    flex-grow: 1;
}

.ep-matchup-links-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-top: 1px solid #f0ebe0;
    padding-top: 0.75rem;
}

.ep-matchup-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    color: #188a53 !important;
    text-decoration: none !important;
    padding: 5px 8px;
    border-radius: 6px;
    background: #f5f9f6;
    transition: all 0.2s ease;
}

.ep-matchup-link-item:hover {
    background: #e6f4ea;
    color: #0f633a !important;
    transform: translateX(2px);
}

.ep-matchup-link-item svg {
    flex-shrink: 0;
    opacity: 0.75;
    transition: transform 0.2s ease;
}

.ep-matchup-link-item:hover svg {
    opacity: 1;
    transform: translateX(2px);
}

/* Mobile Dots Carousel Indicator */
.ep-compare-dots-mobile {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.ep-compare-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d5cebf;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ep-compare-dot.active {
    width: 24px;
    border-radius: 10px;
    background: #188a53;
}

/* Bottom Quick SEO Pill Hub */
.ep-compare-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 1.25rem;
    border-top: 1px dashed #dcd5c6;
    position: relative;
    z-index: 2;
}

.ep-compare-pills-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ep-compare-pill-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #556b66;
    margin-right: 4px;
}

.ep-compare-pills-flow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ep-compare-nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #123321 !important;
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid #dcd5c6;
    padding: 4px 12px;
    border-radius: 50px;
    transition: all 0.2s ease;
    text-align: center;
}

.ep-compare-nav-pill:hover {
    background: #123321;
    color: #ffffff !important;
    border-color: #123321;
}

.ep-compare-view-all {
    font-size: 0.82rem;
    font-weight: 800;
    color: #b45309 !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ep-compare-view-all:hover {
    color: #92400e !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
    .ep-compare-card-box {
        padding: 2rem 1.5rem;
    }

    .ep-compare-title {
        font-size: 1.9rem;
    }

    .ep-matchups-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: Compact space-saving height, 1-card scroll snap, and 2-per-row capsules */
@media (max-width: 768px) {
    .ep-brand-compare-section {
        padding: 1.75rem 0 1.25rem;
    }

    .ep-compare-card-box {
        padding: 1.25rem 1rem;
        border-radius: 16px;
    }

    .ep-compare-badge {
        font-size: 0.68rem;
        padding: 4px 10px;
        margin-bottom: 0.4rem;
    }

    .ep-compare-title {
        font-size: 1.35rem;
        margin-bottom: 0.35rem;
    }

    .ep-compare-subtitle {
        font-size: 0.82rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .ep-compare-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 1rem;
    }

    .ep-compare-hub-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 16px;
        font-size: 0.82rem;
    }

    .ep-compare-matchups-wrap {
        margin-bottom: 0.85rem;
    }

    .ep-matchups-heading-row {
        margin-bottom: 0.5rem;
        gap: 4px;
    }

    .ep-matchups-heading {
        font-size: 0.95rem;
    }

    .ep-matchups-sub {
        font-size: 0.74rem;
    }

    /* 1 card per slide horizontally */
    .ep-matchups-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        margin: 0;
        padding: 2px 0;
        scrollbar-width: none;
    }

    .ep-matchups-grid::-webkit-scrollbar {
        display: none;
    }

    .ep-matchup-card {
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 100%;
        padding: 0.9rem 0.95rem;
        border-radius: 12px;
        scroll-snap-align: start;
        box-sizing: border-box;
    }

    .ep-matchup-title {
        font-size: 0.96rem;
        margin-bottom: 0.25rem;
    }

    .ep-matchup-summary {
        font-size: 0.74rem;
        line-height: 1.35;
        margin-bottom: 0.6rem;
    }

    .ep-matchup-links-list {
        padding-top: 0.5rem;
        gap: 4px;
    }

    .ep-matchup-link-item {
        font-size: 0.72rem;
        padding: 4px 7px;
    }

    /* Mobile slide dots */
    .ep-compare-dots-mobile {
        display: flex;
        margin-top: 10px;
        gap: 6px;
    }

    .ep-compare-dot {
        width: 6px;
        height: 6px;
    }

    .ep-compare-dot.active {
        width: 18px;
    }

    /* Compact 2-per-row capsules for Related Guides on mobile */
    .ep-compare-bottom-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 0.85rem;
    }

    .ep-compare-pills-wrap {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        width: 100%;
    }

    .ep-compare-pill-label {
        font-size: 0.74rem;
        margin-right: 0;
    }

    .ep-compare-pills-flow {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }

    .ep-compare-nav-pill {
        font-size: 0.72rem;
        padding: 5px 8px;
        border-radius: 50px;
        flex: 1 1 calc(50% - 6px);
        max-width: calc(50% - 6px);
        box-sizing: border-box;
        text-align: center;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ep-compare-view-all {
        justify-content: center;
        width: 100%;
        padding-top: 2px;
        font-size: 0.78rem;
        text-align: center;
    }
}
