/* ================================================= */
/*       ESTILOS - PÁGINA DE LISTAGEM DE DESTINOS    */
/* ================================================= */

.destinos-page-container {
    width: 100%;
    max-width: var(--site-max-width, 1400px) !important;
    margin: 0 auto;
    padding-left: var(--site-container-padding, 1.5rem);
    padding-right: var(--site-container-padding, 1.5rem);
    box-sizing: border-box;
}

.page-title-section {
    margin-bottom: 2rem;
}

.page-main-title {
    color: #0f172a;
    font-weight: 800;
    font-size: 2.25rem;
    line-height: 2.5rem;
    overflow-wrap: break-word;
    hyphens: auto;
}

.page-subtitle {
    color: #64748b;
    font-size: 1.1rem;
}

/* ================================================= */
/*     BARRA DE BUSCA E FILTROS DE CATEGORIA         */
/* ================================================= */

.destinos-filter-wrapper {
    background-color: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 1.5rem !important;
    padding: 1.25rem !important;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
}

.search-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.search-input-group {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.search-input-group i.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #0284c7;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 5;
}

.search-destino-input {
    width: 100% !important;
    height: 50px !important;
    padding-left: 3.25rem !important;
    padding-right: 3rem !important;
    font-size: 0.95rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 9999px !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.25s ease !important;
}

.search-destino-input:focus {
    background-color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12) !important;
}

.search-destino-input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400;
}

.btn-search-submit {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    background-color: #0284c7;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.btn-search-submit:hover {
    background-color: #0369a1;
    transform: translateY(-50%) scale(1.05);
}

/* Botão de Alternar Filtros */
.btn-toggle-filtros {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    height: 50px !important;
    padding: 0 1.5rem !important;
    border-radius: 9999px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    border: 1.5px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    color: #334155 !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    flex-shrink: 0 !important;
}

.btn-toggle-filtros:hover,
.btn-toggle-filtros.active {
    background-color: #f0f9ff !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}

.btn-toggle-filtros .filter-badge {
    background-color: #0284c7;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-weight: 700;
}

/* Container de Categorias Colapsável */
.category-collapse-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-pills-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-pill-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    padding: 0.55rem 1.15rem !important;
    border-radius: 9999px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    border: 1.5px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    color: #475569 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.category-pill-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-pill-btn:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.category-pill-btn.active {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25) !important;
}

/* ================================================= */
/*     CARD DE DESTINO (DESIGN VERTICAL REFINADO)    */
/* ================================================= */

.destino-card {
    background-color: #ffffff;
    border-radius: 1.25rem;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
    display: flex;
    flex-direction: column;
}

.destino-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.09), 0 6px 15px -4px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.destino-card-img-container {
    position: relative;
    height: 220px;
    width: 100%;
    overflow: hidden;
    background-color: #f8fafc;
}

.destino-card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.destino-card:hover .destino-card-img-container img {
    transform: scale(1.06);
}

.destino-card-category-badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.destino-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.destino-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    text-align: left !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.destino-card-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.destino-card-title a:hover {
    color: #0284c7;
}

.destino-card-desc {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.destino-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.destino-card-link-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0284c7;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.destino-card-link-primary:hover {
    color: #0369a1;
    text-decoration: none;
    transform: translateX(3px);
}

.destino-card-link-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.destino-card-link-secondary:hover {
    color: #0f172a;
    text-decoration: none;
}

/* Tooltips e Botões de Roteiro/Compartilhar */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 140px;
    background-color: #0f172a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    padding: 6px 10px;
    position: absolute;
    z-index: 20;
    top: 125%;
    right: 0;
    opacity: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    white-space: nowrap;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

/* Paginação */
.destinos-pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

@media (max-width: 640px) {
    .destinos-page-container {
        padding-top: 1.25rem !important;
        padding-bottom: 2.5rem !important;
    }

    .destinos-filter-wrapper {
        border-radius: 1.25rem !important;
        padding: 0.85rem !important;
        margin-bottom: 1.5rem !important;
    }

    .search-bar-row {
        flex-direction: row;
        gap: 0.5rem;
    }

    .search-destino-input {
        height: 44px !important;
        font-size: 0.88rem !important;
        padding-left: 2.75rem !important;
    }

    .search-input-group i.search-icon {
        left: 1rem;
        font-size: 1rem;
    }

    .btn-toggle-filtros {
        padding: 0 1rem !important;
        height: 44px !important;
    }

    .btn-toggle-filtros span.filter-text {
        display: none;
    }

    .destino-card {
        border-radius: 1rem !important;
    }

    .destino-card-img-container {
        height: 190px;
    }

    .destino-card-body {
        padding: 1.15rem 1rem !important;
    }

    .destino-card-title {
        font-size: 1.15rem !important;
        margin-bottom: 0.4rem !important;
    }

    .destino-card-description {
        font-size: 0.88rem !important;
        line-height: 1.5 !important;
    }
}
