/* ============================================================
   TravelGenerator Tours — Comparison Table Styles v2.1
   CRO High-Conversion Editorial Design
   - Elevated Leader Column (★ Most Popular / Best Value)
   - Single Bright CTA Button on Leader, Neutral Outlines on Others
   - Neutral Platform Subtext (Zero Multi-Color Badge Clutter)
   - Hero Preview Images, Social Proof Rating & Verified Inclusions
   - Full Mobile Stacked Cards Layout (<= 768px)
   ============================================================ */

/* ── Container & scroll ────────────────────────────────── */
.tg-cmp-table-container {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 2.5rem 0 2rem !important;
    border-radius: 18px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05) !important;
    scrollbar-width: thin !important;
    scrollbar-color: #cbd5e1 transparent !important;
    font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background: #ffffff !important;
    padding-top: 10px !important; /* Space for elevated leader card */
}
.tg-cmp-table-container::-webkit-scrollbar {
    height: 6px !important;
}
.tg-cmp-table-container::-webkit-scrollbar-track {
    background: transparent !important;
}
.tg-cmp-table-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1 !important;
    border-radius: 10px !important;
}

/* ── Table base ────────────────────────────────────────── */
.tg-cmp-table {
    width: 100% !important;
    min-width: 520px !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    margin: 0 !important;
}

/* ── Header row ────────────────────────────────────────── */
.tg-cmp-table thead tr {
    background: #f8fafc !important;
}
.tg-cmp-table th {
    padding: 1.25rem 1rem !important;
    text-align: center !important;
    vertical-align: top !important;
    border-bottom: 2px solid #e2e8f0 !important;
    font-size: 0.85rem !important;
    color: #334155 !important;
    box-sizing: border-box !important;
}

/* Outer corner styling for the header */
.tg-cmp-table thead th:first-child:not(.tg-bestseller-header) {
    border-top-left-radius: 14px !important;
}
.tg-cmp-table thead th:last-child:not(.tg-bestseller-header) {
    border-top-right-radius: 14px !important;
}

/* ── Tour header cells ─────────────────────────────────── */
.tg-cmp-table .tg-cmp-th-tour {
    padding: 1.25rem 1rem 1.5rem !important;
    position: relative !important;
    vertical-align: top !important;
    border-right: 1px solid #f1f5f9 !important;
}
.tg-cmp-table .tg-cmp-th-tour:last-child {
    border-right: none !important;
}

/* ── Elevated Leader Column Styling (Top Choice) ──────── */
.tg-cmp-table th.tg-bestseller-header {
    background: #ffffff !important;
    border-top: 4px solid #ea580c !important;
    border-left: 2px solid #ea580c !important;
    border-right: 2px solid #ea580c !important;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    position: relative !important;
    z-index: 3 !important;
    box-shadow: 0 -8px 24px rgba(234, 88, 12, 0.08) !important;
}

.tg-cmp-table td.tg-bestseller-col {
    background: #ffffff !important;
    border-left: 2px solid #ea580c !important;
    border-right: 2px solid #ea580c !important;
    position: relative !important;
    z-index: 2 !important;
}

.tg-cmp-table tbody tr:last-child td.tg-bestseller-col {
    border-bottom: 2px solid #ea580c !important;
    border-bottom-left-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
    box-shadow: 0 16px 32px rgba(234, 88, 12, 0.12) !important;
}

/* ── Hero / Preview Image in Header ────────────────────── */
.tg-cmp-img-wrap {
    position: relative !important;
    width: 100% !important;
    height: 130px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    margin-bottom: 0.75rem !important;
    background: #f1f5f9 !important;
}
.tg-cmp-hero-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s ease !important;
}
.tg-cmp-th-tour:hover .tg-cmp-hero-img {
    transform: scale(1.04) !important;
}
.tg-cmp-hero-placeholder {
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1) !important;
}

/* Most Popular Ribbon on image */
.tg-cmp-ribbon-featured {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    background: #ea580c !important;
    color: #ffffff !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
    z-index: 2 !important;
}

/* ── Role Positioning Tag ──────────────────────────────── */
.tg-cmp-role-tag {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: #64748b !important;
    margin-bottom: 0.35rem !important;
    text-align: center !important;
}
.tg-cmp-role-leader {
    color: #ea580c !important;
    font-weight: 800 !important;
}

/* ── Tour Name in Header ───────────────────────────────── */
.tg-cmp-tour-name {
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    color: #0f172a !important;
    margin: 0.3rem 0 0.45rem !important;
    line-height: 1.35 !important;
    text-align: center !important;
    word-break: normal !important;
    white-space: normal !important;
    /* Natural 2-3 lines, no weird truncation */
}

/* ── Social Proof Rating & Reviews ─────────────────────── */
.tg-cmp-social-proof {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    font-size: 0.82rem !important;
    color: #334155 !important;
    margin-bottom: 0.55rem !important;
}
.tg-cmp-star {
    color: #f59e0b !important;
    font-size: 0.95rem !important;
}
.tg-cmp-rating-val {
    font-weight: 700 !important;
    color: #0f172a !important;
}
.tg-cmp-reviews-count {
    color: #64748b !important;
}

/* ── Price Tag ─────────────────────────────────────────── */
.tg-cmp-price-tag {
    margin: 0.35rem 0 0.15rem !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: 5px !important;
    line-height: 1.15 !important;
}
.tg-cmp-price-from {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    text-transform: lowercase !important;
}
.tg-cmp-price-val {
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}
.tg-cmp-price-sub {
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
}

/* ── Neutral Platform Subtext (Zero Color Clutter) ────── */
.tg-cmp-platform-sub {
    font-size: 0.74rem !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    margin: 0.2rem 0 0.85rem !important;
    text-align: center !important;
}

/* ── Single CTA Button ─────────────────────────────────── */
.tg-cmp-cta-wrap {
    margin-top: 0.25rem !important;
}
.tg-cmp-btn {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    text-align: center !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

/* Leader CTA button — Sole vibrant accent element */
.tg-cmp-btn-leader {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.92rem !important;
    box-shadow: 0 4px 18px rgba(234, 88, 12, 0.4) !important;
    border: none !important;
}
.tg-cmp-btn-leader:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.5) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Secondary CTA buttons — Calm neutral outline style */
.tg-cmp-btn-secondary {
    background: #f8fafc !important;
    color: #334155 !important;
    border: 1.5px solid #cbd5e1 !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.tg-cmp-btn-secondary:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

/* ── Body Rows ─────────────────────────────────────────── */
.tg-cmp-table tbody tr:nth-child(even) {
    background: #fbfcfe !important;
}
.tg-cmp-table tbody tr:hover {
    background: #f8fafc !important;
}
.tg-cmp-table td {
    padding: 0.9rem 1rem !important;
    text-align: center !important;
    font-size: 0.86rem !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-right: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
    line-height: 1.45 !important;
}
.tg-cmp-table td:last-child {
    border-right: none !important;
}

/* Cell embedded labels (since feature column is removed) */
.tg-cmp-cell-label {
    display: block !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #94a3b8 !important;
    margin-bottom: 5px !important;
}
.tg-cmp-cell-val {
    display: block !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    line-height: 1.4 !important;
}

/* Inclusions list with clean neutral checkmarks */
.tg-cmp-incl-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    align-items: center !important;
    text-align: left !important;
}
.tg-cmp-incl-item {
    font-size: 0.82rem !important;
    color: #1e293b !important;
    line-height: 1.35 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 6px !important;
}
.tg-cmp-check {
    color: #16a34a !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
}

.tg-cmp-cancel-free {
    color: #166534 !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
}
.tg-cmp-cancel-non {
    color: #64748b !important;
    font-size: 0.85rem !important;
}

/* Last row & corner radiuses */
.tg-cmp-table tbody tr:last-child td {
    border-bottom: none !important;
    padding-bottom: 1.25rem !important;
}
.tg-cmp-table tbody tr:last-child td:first-child:not(.tg-bestseller-col) {
    border-bottom-left-radius: 14px !important;
}
.tg-cmp-table tbody tr:last-child td:last-child:not(.tg-bestseller-col) {
    border-bottom-right-radius: 14px !important;
}

/* ── Section heading above table ───────────────────────── */
.tg-cmp-section-heading {
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 0.4rem !important;
    line-height: 1.3 !important;
}
.tg-cmp-section-sub {
    font-size: 0.95rem !important;
    color: #64748b !important;
    margin: 0 0 1.5rem !important;
    line-height: 1.5 !important;
}

/* ============================================================
   MOBILE STACKED CARDS LAYOUT
   Transforms table into 1-column responsive card deck on <= 768px
   ============================================================ */

/* Desktop: hide mobile cards */
@media (min-width: 769px) {
    .tg-cmp-mobile-cards {
        display: none !important;
    }
}

/* Mobile: hide desktop table, show stacked cards */
@media (max-width: 768px) {
    .tg-cmp-table-container {
        display: none !important;
    }

    .tg-cmp-mobile-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        margin: 1.5rem 0 !important;
        font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    }

    .tg-cmp-card {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px !important;
        padding: 1.25rem !important;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05) !important;
        position: relative !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* Leader Card on Mobile */
    .tg-cmp-card-bestseller {
        border: 2px solid #ea580c !important;
        box-shadow: 0 12px 30px rgba(234, 88, 12, 0.15) !important;
    }

    .tg-cmp-card-top {
        margin-bottom: 1rem !important;
        padding-bottom: 0.85rem !important;
        border-bottom: 1px solid #f1f5f9 !important;
        text-align: center !important;
    }

    .tg-cmp-card-title {
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        margin: 0.4rem 0 !important;
        line-height: 1.35 !important;
        text-align: center !important;
    }

    .tg-cmp-card-price-box {
        margin-top: 0.5rem !important;
    }

    .tg-cmp-card-price {
        font-size: 1.65rem !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        display: flex !important;
        align-items: baseline !important;
        justify-content: center !important;
        gap: 6px !important;
    }
    .tg-cmp-card-price-sub {
        font-size: 0.88rem !important;
        font-weight: 500 !important;
        color: #64748b !important;
    }

    .tg-cmp-card-cta-wrap {
        margin-top: 0.75rem !important;
    }
    .tg-cmp-card-btn {
        display: block !important;
        width: 100% !important;
        padding: 13px 18px !important;
        font-size: 0.95rem !important;
        border-radius: 12px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    /* Specs list inside mobile card */
    .tg-cmp-card-specs {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .tg-cmp-spec-item {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 12px !important;
        padding: 0.65rem 0 !important;
        border-bottom: 1px solid #f8fafc !important;
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }
    .tg-cmp-spec-item:last-child {
        border-bottom: none !important;
    }

    .tg-cmp-spec-label {
        color: #64748b !important;
        font-weight: 600 !important;
        flex-shrink: 0 !important;
        max-width: 45% !important;
        text-align: left !important;
    }

    .tg-cmp-spec-value {
        color: #0f172a !important;
        font-weight: 500 !important;
        text-align: right !important;
        flex: 1 !important;
    }
}
