/* ==========================================================================
   ESTILOS: LISTAGEM DE ROTEIROS PRONTOS E SUGERIDOS (PORTAL TURÍSTICO)
   Padrão visual alinhado com Destinos, Eventos e Notícias
   ========================================================================== */

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

/* ================================================= */
/* 1. CABEÇALHO DA PÁGINA                           */
/* ================================================= */

.roteiros-header-section {
    margin-bottom: 2rem;
}

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

.roteiros-header-section .page-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.btn-planner-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #0284c7;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1.4rem;
    border-radius: 9999px;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-planner-cta:hover {
    background-color: #0369a1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

/* ================================================= */
/* 2. BARRA DE BUSCA                                */
/* ================================================= */

.roteiros-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;
}

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

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

.roteiros-search-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-roteiro-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-roteiro-input:focus {
    background-color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12) !important;
}

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

.btn-roteiro-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-roteiro-submit:hover {
    background-color: #0369a1;
    transform: translateY(-50%) scale(1.05);
}

/* ================================================= */
/* 3. GRADE E CARD DE ROTEIRO SUGERIDO               */
/* ================================================= */

.roteiros-grid-section {
    width: 100%;
}

.roteiros-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .roteiros-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .roteiros-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Card Individual */
.roteiro-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;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.roteiro-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;
}

/* Container de Imagem */
.roteiro-card-img-container {
    position: relative;
    height: 220px;
    width: 100%;
    overflow: hidden;
    background-color: #f8fafc;
}

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

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

/* Badge de Categoria/Tipo */
.roteiro-card-category-badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    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);
}

/* Ações Rápidas Flutuantes */
.roteiro-floating-actions {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roteiro-quick-btn {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: #334155;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.roteiro-quick-btn:hover {
    background-color: #ffffff;
    color: #0284c7;
    transform: scale(1.08);
}

/* Chips de Meta Flutuantes no fundo da imagem */
.roteiro-img-meta {
    position: absolute;
    bottom: 0.75rem;
    left: 0.85rem;
    right: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.roteiro-meta-chip {
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.roteiro-meta-chip i {
    color: #38bdf8;
}

/* Corpo do Card */
.roteiro-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

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

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

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

/* Descrição do Roteiro no Card */
.roteiro-description-container {
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.roteiro-card-description {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Destaques / Principais Paradas do Roteiro */
.roteiro-highlights-container {
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.roteiro-highlights-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.roteiro-highlights-header i {
    color: #0284c7;
}

.roteiro-highlights-list {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.5;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tags de Categoria */
.roteiro-tags-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.roteiro-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    background-color: #f0f9ff;
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.15);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.roteiro-tag-item.more-count {
    background-color: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

/* Rodapé de Ações do Card */
.roteiro-card-footer {
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.roteiro-footer-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 600;
}

.roteiro-footer-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.roteiro-footer-stat-item i {
    color: #0284c7;
    font-size: 0.9rem;
}

.roteiro-footer-stat-divider {
    color: #cbd5e1;
    font-size: 0.75rem;
}

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

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

/* ================================================= */
/* 4. ESTADO VAZIO (EMPTY STATE)                     */
/* ================================================= */

.roteiros-empty-state {
    background-color: #ffffff;
    border-radius: 1.25rem;
    padding: 3.5rem 1.5rem;
    text-align: center;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin: 2rem 0;
}

.roteiros-empty-icon {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
    display: block;
}

.roteiros-empty-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.roteiros-empty-desc {
    color: #64748b;
    font-size: 0.95rem;
    max-width: 480px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.6;
}

/* ================================================= */
/* 5. PAGINAÇÃO                                      */
/* ================================================= */

.roteiros-pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.roteiros-pagination-wrapper .pagination {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.roteiros-pagination-wrapper .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.roteiros-pagination-wrapper .page-item.active .page-link {
    background-color: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

.roteiros-pagination-wrapper .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #0284c7;
}

.roteiros-pagination-wrapper .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8fafc;
}

/* Tooltip Customizado */
.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;
    pointer-events: none;
}

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

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

    .roteiros-header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

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

    .roteiros-search-row {
        gap: 0.5rem;
    }

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

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

    .btn-planner-cta {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1.2rem;
        font-size: 0.88rem;
    }

    .roteiros-cards-grid {
        gap: 1.25rem !important;
    }

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

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

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

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

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

    .roteiro-card-footer {
        margin-top: 0.75rem !important;
        padding-top: 0.75rem !important;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .roteiro-footer-stats {
        font-size: 0.78rem !important;
    }
}
