﻿.explore-layout {
    display: flex;
    min-height: calc(100vh - 64px);
    background: #f8f9fa;
}

#sidebarMenu {
    width: 200px;
    min-width: 200px;
    background: #fff;
    border-right: 1px solid #e9ecef;
    padding: 1.25rem 0;
    overflow-y: auto;
    max-height: calc(100vh - 64px);
    position: sticky;
    top: 64px;
    align-self: flex-start;
    flex-shrink: 0;
}

.sidebar-section {
    padding: 0 1rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 8px;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, color .15s;
}

    .sidebar-nav .nav-link:hover {
        background: #f1f3f5;
        color: #212529;
    }

    .sidebar-nav .nav-link.active {
        background: #e8f5e9;
        color: #1a9e5c;
    }

    .sidebar-nav .nav-link svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
    }

.sidebar-divider {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 0.75rem 1rem;
}

.tag-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #6c757d;
}

.tag-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 4px;
    cursor: pointer;
    border-radius: 6px;
    transition: background .12s;
}

    .tag-group-header:hover {
        background: #f8f9fa;
    }

.tag-group-header-label {
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #495057;
}

.tag-group-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}

.dot-region {
    background: #339af0;
}

.dot-country {
    background: #20c997;
}

.dot-landscape {
    background: #7950f2;
}

.dot-place {
    background: #f06595;
}

.dot-other {
    background: #adb5bd;
}

[data-group*="region"] .tag-group-toggle {
    background: #339af0;
}

[data-group*="country"] .tag-group-toggle {
    background: #20c997;
}

[data-group*="landscape"] .tag-group-toggle {
    background: #7950f2;
}

[data-group*="place"] .tag-group-toggle {
    background: #f06595;
}

[data-group*="other"] .tag-group-toggle {
    background: #adb5bd;
}

.tag-group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    transition: background .15s;
}

    .tag-group-toggle.expanded,
    .tag-group-toggle.collapsed {
        color: #fff;
    }

.tag-group-body {
    overflow: hidden;
    max-height: 1000px;
    transition: max-height .25s ease;
}

    .tag-group-body.collapsed {
        max-height: 0;
    }

.tag-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 5px 12px 5px 20px;
    background: transparent;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    color: #495057;
    cursor: pointer;
    text-align: left;
    transition: background .12s, color .12s;
}

    .tag-pill:hover {
        background: #f1f3f5;
        color: #212529;
    }

    .tag-pill.active {
        background: #e8f5e9;
        color: #1a9e5c;
        font-weight: 500;
    }

    .tag-pill .tag-count {
        margin-left: auto;
        font-size: 11px;
        color: #adb5bd;
        background: #f1f3f5;
        padding: 1px 7px;
        border-radius: 10px;
    }

    .tag-pill.active .tag-count {
        background: #d3f9d8;
        color: #1a9e5c;
    }

.tag-sort-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 2px 6px;
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
    transition: background .12s, color .12s;
}

    .tag-sort-btn:hover {
        background: #f1f3f5;
    }

    .tag-sort-btn.active {
        background: #e8f5e9;
        border-color: #1a9e5c;
        color: #1a9e5c;
    }

.explore-main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 1.75rem;
}

.explore-content-inner {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.page-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 1.25rem;
}

    .page-heading h2 {
        font-size: 22px;
        font-weight: 700;
        color: #212529;
        margin: 0;
    }

.page-subtitle {
    font-size: 14px;
    color: #adb5bd;
}

.explore-toolbar {
    margin-bottom: 1.25rem;
}

#tourSearch {
    width: 220px !important;
    padding: 7px 10px 7px 32px !important;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #212529;
    transition: border-color .15s, box-shadow .15s;
}

    #tourSearch:focus {
        outline: none;
        border-color: #1a9e5c;
        box-shadow: 0 0 0 3px rgba(26,158,92,.1);
    }

#tourCount {
    font-size: 13px;
    color: #adb5bd;
    white-space: nowrap;
}

.mode-tabs {
    display: flex;
    gap: 4px;
    background: #f1f3f5;
    border-radius: 10px;
    padding: 3px;
}

.mode-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
    white-space: nowrap;
}

    .mode-tab svg {
        width: 14px;
        height: 14px;
        stroke: currentColor;
        fill: none;
    }

    .mode-tab:hover {
        background: #fff;
        color: #212529;
    }

    .mode-tab.active {
        background: #fff;
        color: #1a9e5c;
        box-shadow: 0 1px 3px rgba(0,0,0,.08);
    }

.sort-select {
    font-size: 13px;
    padding: 5px 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    color: #495057;
    cursor: pointer;
}

    .sort-select:focus {
        outline: none;
        border-color: #1a9e5c;
    }

.btn-search {
    padding: 7px 14px;
    background: #1a9e5c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
    flex-shrink: 0;
}

    .btn-search:hover {
        background: #157a47;
    }

.exploreGrid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(252px, 1fr) );
    gap: 16px;
    align-items: start;
}

.tour-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
    display: flex;
    flex-direction: column;
}

    .tour-card:hover {
        transform: translateY(-4px);
        border-color: #b2f2d0;
        box-shadow: 0 8px 24px rgba(26,158,92,.10);
    }

#mainPanel .card.equal-card,
#mainPanel .card.tour-card {
    background-color: #eef4fb !important;
}

#mainPanel .card-body {
    min-height: 80px !important;
}


/* =========================================
   Tour preview panel
   ========================================= */

.preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

    .preview-overlay.visible {
        opacity: 1;
        pointer-events: all;
    }

.preview-panel {
    background: #fff;
    border-radius: 14px;
    border: 0.5px solid #e9ecef;
    width: 100%;
    max-width: 520px;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform .2s ease;
    margin-top: 48px;
}

.preview-overlay.visible .preview-panel {
    transform: translateY(0);
}

.preview-hero {
    position: relative;
    height: 190px;
    background: #e9ecef;
    overflow: hidden;
}

    .preview-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        margin-top: 3px;
    }

.preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.45);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    line-height: 1;
}

.preview-dist-pill {
    position: absolute;
    bottom: 10px;
    left: 12px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
}

.preview-body {
    padding: 16px 18px;
}

.preview-title {
    font-size: 17px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 3px;
}

.preview-location {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 10px;
}

.preview-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    line-height: 1.6;
}

.preview-badge-tag {
    background: #f1f3f5;
    color: #495057;
}

.preview-desc {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.preview-stat {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
}

.preview-stat-val {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
}

.preview-stat-lbl {
    font-size: 11px;
    color: #6c757d;
    margin-top: 1px;
}

.preview-start-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    white-space: nowrap;
    align-self: center;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.preview-btn-mode {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 11px;
    border-radius: 20px;
    border: 1.5px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
}

    .preview-btn-mode:hover {
        transform: translateY(-1px);
    }

    .preview-btn-mode.mode-tour {
        background: #bbdefb;
        color: #1565c0;
        border-color: #90caf9;
    }

    .preview-btn-mode.mode-run {
        background: #c8e6c9;
        color: #1b5e20;
        border-color: #a5d6a7;
    }

    .preview-btn-mode.mode-cycle {
        background: #bfe1d7;
        color: #f57f17;
        border-color: #fff176;
    }

    .preview-btn-mode.mode-breathe {
        background: #f3f3d4;
        color: #29910d;
        border-color: #ce93d8;
    }

    .preview-btn-mode.mode-tour:hover {
        background: #90caf9;
    }

    .preview-btn-mode.mode-run:hover {
        background: #a5d6a7;
    }

    .preview-btn-mode.mode-cycle:hover {
        background: #fff176;
    }

    .preview-btn-mode.mode-breathe:hover {
        background: #ce93d8;
    }

    .preview-btn-mode.is-selected {
        box-shadow: 0 0 0 2px currentColor;
        transform: translateY(-1px);
    }

    .preview-btn-mode.unsupported {
        background: #f1f3f5;
        color: #868e96;
        border-color: #dee2e6;
    }

        .preview-btn-mode.unsupported:hover {
            background: #e9ecef;
            color: #495057;
            transform: none;
        }


/* =========================================
   Tour time row
   ========================================= */

.preview-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.preview-time-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0;
}

.preview-time-select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #495057;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

    .preview-time-select:focus {
        outline: none;
        border-color: #1a9e5c;
        box-shadow: 0 0 0 3px rgba(26,158,92,.1);
    }

.preview-time-hint {
    font-size: 11px;
    color: #adb5bd;
    white-space: nowrap;
}


/* =========================================
   Preview footer
   ========================================= */

.preview-footer-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 2px;
}

.preview-btn-start {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    border-radius: 8px;
    background: #1a9e5c;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
}

    .preview-btn-start:hover {
        background: #157a47;
        color: #fff;
    }

    .preview-btn-start.is-disabled {
        background: #dee2e6;
        color: #868e96;
        pointer-events: none;
    }

.preview-btn-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}

    .preview-btn-details:hover {
        border-color: #1a9e5c;
        color: #1a9e5c;
        background: #e8f5e9;
    }

.preview-btn-fav {
    width: 42px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, color .15s;
    flex-shrink: 0;
    font-size: 17px;
}

    .preview-btn-fav:hover,
    .preview-btn-fav.active {
        background: #fff0f0;
        color: #e74c3c;
        border-color: #e74c3c;
    }

#searchHint {
    display: none;
    font-size: 12px;
    color: #f59f00;
    margin-top: 4px;
}


/* =========================================
   Mobile
   ========================================= */

@media (max-width:767px) {

    #sidebarMenu {
        display: none !important;
    }

    .explore-main {
        padding: 1rem;
    }
}


@media (max-width:960px) {

    .preview-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .preview-panel {
        border-radius: 20px 20px 20px 20px;
        margin-top: 5px;
        margin-bottom: 5px;
        max-height: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .preview-hero {
        height: 150px;
        flex-shrink: 0;
    }

    .preview-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
        padding: 12px 16px;
    }

    .preview-desc,
    .preview-stats {
        display: none !important;
    }

    .preview-time-row {
        padding: 7px 10px;
        margin-bottom: 10px;
    }

    .preview-time-hint {
        display: none;
    }

    .preview-btn-details {
        padding: 0 12px;
        font-size: 12px;
    }
}


/* =========================================
   Favorite
   ========================================= */

.st-fav-btn {
    padding: 7px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    color: #868e96;
    cursor: pointer;
    transition: color .15s, background .15s;
    display: inline-flex;
    align-items: center;
}

    .st-fav-btn:hover {
        background: #f8f9fa;
        color: #e03131;
    }

    .st-fav-btn.favorited {
        color: #e03131;
    }

        .st-fav-btn.favorited svg {
            fill: #e03131;
        }
