/* ========================================
   DISCOVERY PAGES - BENETRIP
   Versão: 3.0
   Cores: Laranja #E87722, Azul #00A3E0
   ======================================== */

:root {
    --orange-primary: #E87722;
    --orange-light: #FF9A47;
    --blue-secondary: #00A3E0;
    --green-success: #4CAF50;
    --red-alert: #F44336;
    --gray-dark: #21272A;
    --gray-medium: #666;
    --gray-light: #F5F5F5;
    --white: #FFFFFF;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--gray-light);
    color: var(--gray-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ========================================
   HERO SECTION (com busca de cidade)
   ======================================== */
.discovery-hero {
    background: linear-gradient(135deg, var(--orange-primary) 0%, var(--orange-light) 100%);
    padding: 36px 0 28px;
    color: var(--white);
    text-align: center;
}

.discovery-hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.hero-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.4);
}

.discovery-hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.discovery-hero .hero-subtitle {
    font-size: 13px;
    opacity: 0.9;
    max-width: 400px;
}

/* ---- Busca de cidade no hero ---- */
.hero-city-search {
    width: 100%;
    max-width: 480px;
    margin-top: 8px;
    position: relative;
}

.city-search-box {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 28px;
    padding: 4px 8px 4px 14px;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.city-search-icon {
    flex-shrink: 0;
    color: var(--orange-primary);
}

#city-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: var(--gray-dark);
    padding: 12px 0;
    background: transparent;
    min-width: 0;
}

#city-search-input::placeholder {
    color: #AAA;
    font-size: 13px;
}

.city-search-clear {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #EFEFEF;
    color: var(--gray-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Sugestões de cidade ---- */
.city-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    scrollbar-width: thin;
}

.suggestions-group-label {
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-medium);
    padding: 10px 16px 4px;
}

.city-suggestion-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    font-family: 'Montserrat', sans-serif;
}

.city-suggestion-item:hover {
    background: #FFF3E8;
}

.city-suggestion-item.active {
    background: var(--orange-primary);
    color: var(--white);
}

.city-suggestion-item.active .suggestion-meta {
    color: rgba(255,255,255,0.8);
}

.suggestion-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-dark);
}

.city-suggestion-item:hover .suggestion-name,
.city-suggestion-item.active .suggestion-name {
    color: inherit;
}

.suggestion-meta {
    font-size: 11px;
    color: var(--gray-medium);
    margin-top: 2px;
}

.suggestion-badge-auto {
    color: var(--green-success);
    font-weight: 600;
}

.suggestion-manual {
    border-top: 1px solid #F0F0F0;
}

.suggestion-manual .suggestion-name {
    color: var(--blue-secondary);
}

/* ========================================
   SELETOR DE CIDADE (chips rápidos)
   ======================================== */
.origin-selector {
    background: var(--white);
    padding: 12px 0;
    border-bottom: 1px solid #E8E8E8;
    position: sticky;
    top: 0;
    z-index: 50;
}

.origin-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.origin-chips::-webkit-scrollbar { display: none; }

.origin-chip {
    flex-shrink: 0;
    padding: 6px 14px;
    border: 1.5px solid #E0E0E0;
    border-radius: 24px;
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-medium);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.origin-chip:hover {
    border-color: var(--orange-primary);
    color: var(--orange-primary);
}

.origin-chip.active {
    background: var(--orange-primary);
    border-color: var(--orange-primary);
    color: var(--white);
}

.origin-chip-more {
    border-style: dashed;
    color: var(--orange-primary);
    border-color: var(--orange-primary);
    font-weight: 600;
}

.origin-chip-more:hover {
    background: rgba(232, 119, 34, 0.08);
}

/* ========================================
   BARRA DE CIDADE ATIVA
   ======================================== */
.active-city-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--white);
    border-bottom: 1px solid #EFEFEF;
}

.active-city-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-dark);
}

.active-city-info svg {
    color: var(--orange-primary);
    flex-shrink: 0;
}

.active-city-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.badge-auto {
    background: #E8F5E9;
    color: var(--green-success);
}

.badge-live {
    background: #FFF3E0;
    color: var(--orange-primary);
}

.active-city-source {
    font-size: 10px;
    color: var(--gray-medium);
}

/* ========================================
   TRIPINHA INSIGHT BAR
   ======================================== */
.tripinha-insight-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #FFF8F0 0%, #FFF3E8 100%);
    border-bottom: 1px solid #F5E0CA;
}

.insight-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--orange-primary);
    flex-shrink: 0;
}

.insight-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-dark);
    line-height: 1.4;
    flex: 1;
}

/* ========================================
   BUSCA INTELIGENTE (filtro de destinos)
   ======================================== */
.filters-section {
    background: var(--white);
    border-bottom: 1px solid #EFEFEF;
}

.smart-search-section {
    padding: 12px 20px 4px;
}

.smart-search-box {
    display: flex;
    align-items: center;
    background: var(--gray-light);
    border: 1.5px solid #E0E0E0;
    border-radius: 28px;
    padding: 4px 6px 4px 16px;
    transition: var(--transition);
    gap: 4px;
}

.smart-search-box:focus-within {
    border-color: var(--blue-secondary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.1);
}

#smart-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: var(--gray-dark);
    background: transparent;
    padding: 8px 0;
    min-width: 0;
}

#smart-search-input::placeholder {
    color: #AAA;
    font-size: 12px;
}

.smart-search-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--blue-secondary);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.smart-search-btn:hover { background: #008cc0; }
.smart-search-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.smart-search-clear {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #E0E0E0;
    color: var(--gray-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smart-search-clear:hover { background: #CCC; }

.search-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.search-feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 12px;
    background: #E8F6FF;
    border-radius: 10px;
    font-size: 12px;
    color: #0077A8;
}

.feedback-icon { font-size: 14px; flex-shrink: 0; }
.feedback-text { flex: 1; }
.feedback-clear {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--blue-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
}
.feedback-clear:hover { text-decoration: underline; }

/* ========================================
   FILTROS COMBINÁVEIS
   ======================================== */
.quick-filters {
    padding: 8px 0 12px;
}

.filter-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 20px;
    scrollbar-width: none;
    align-items: center;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-separator {
    width: 1px;
    height: 18px;
    background: #DDD;
    flex-shrink: 0;
}

.filter-chip {
    flex-shrink: 0;
    padding: 5px 12px;
    border: 1.5px solid #E0E0E0;
    border-radius: 18px;
    background: var(--white);
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-medium);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--blue-secondary);
    color: var(--blue-secondary);
}

.filter-chip.active {
    background: var(--blue-secondary);
    border-color: var(--blue-secondary);
    color: var(--white);
}

.filter-chip[data-tipo="preco"].active {
    background: var(--green-success);
    border-color: var(--green-success);
}

.filter-chip[data-tipo="escopo"].active {
    background: var(--orange-primary);
    border-color: var(--orange-primary);
}

/* ========================================
   STATS BAR
   ======================================== */
.stats-bar {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.stats-bar::-webkit-scrollbar { display: none; }

.stat-card {
    flex-shrink: 0;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 14px 18px;
    min-width: 140px;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 11px;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-dark);
}

.stat-detail {
    font-size: 11px;
    color: var(--gray-medium);
    margin-top: 2px;
}

.stat-variation { font-size: 11px; font-weight: 600; margin-top: 2px; }
.stat-variation.up { color: var(--red-alert); }
.stat-variation.down { color: var(--green-success); }
.stat-variation.stable { color: var(--gray-medium); }

/* ========================================
   GRID DE DESTINOS (CARDS)
   ======================================== */
.destinations-section { padding: 0 20px 24px; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 12px;
    gap: 12px;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-dark);
    flex: 1;
    min-width: 0;
}

.section-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sort-select {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: var(--gray-medium);
    background: var(--white);
    border: 1.5px solid #E0E0E0;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    outline: none;
}

.sort-select:focus { border-color: var(--blue-secondary); }

.section-count {
    font-size: 12px;
    color: var(--gray-medium);
    background: #EFEFEF;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.destinations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* ========================================
   DESTINATION CARD
   ======================================== */
.dest-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.dest-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.dest-card-inner { display: flex; gap: 0; }

.dest-image-wrapper {
    width: 120px;
    min-height: 140px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.dest-image { width: 100%; height: 100%; object-fit: cover; }

.dest-rank {
    position: absolute;
    top: 8px; left: 8px;
    background: var(--orange-primary);
    color: var(--white);
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 12px; font-weight: 700;
}

.dest-badge-international {
    position: absolute;
    bottom: 8px; left: 8px;
    background: var(--blue-secondary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.dest-info {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dest-header { margin-bottom: 8px; }

.dest-name {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-dark);
    line-height: 1.3;
}

.dest-country { font-size: 12px; color: var(--gray-medium); margin-top: 2px; }

.dest-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }

.dest-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #F0F7FF;
    color: var(--blue-secondary);
    font-weight: 500;
}

.dest-footer { display: flex; justify-content: space-between; align-items: flex-end; }

.dest-price-block { display: flex; flex-direction: column; }

.dest-price-label { font-size: 10px; color: var(--gray-medium); text-transform: uppercase; }

.dest-price {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--orange-primary);
    line-height: 1.2;
}

.dest-price-variation { font-size: 10px; font-weight: 600; }
.dest-price-variation.down { color: var(--green-success); }
.dest-price-variation.up { color: var(--red-alert); }

.dest-duration { font-size: 11px; color: var(--gray-medium); text-align: right; }
.dest-duration strong { color: var(--gray-dark); }

/* ========================================
   CTA SECTION
   ======================================== */
.discovery-cta {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    margin: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.discovery-cta .cta-avatar { width: 64px; height: 64px; margin-bottom: 12px; }

.discovery-cta h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.discovery-cta p {
    font-size: 13px;
    color: var(--gray-medium);
    margin-bottom: 16px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    color: var(--white);
    padding: 14px 32px;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 119, 34, 0.4);
}

.cta-button.secondary {
    background: var(--white);
    color: var(--orange-primary);
    border: 2px solid var(--orange-primary);
    margin-top: 10px;
}

/* ========================================
   SHARE FAB + MODAL
   ======================================== */
.share-fab-discovery {
    position: fixed;
    bottom: 20px; right: 20px;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange-primary), var(--blue-secondary));
    color: var(--white);
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: pointer;
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}

.share-fab-discovery:hover { transform: scale(1.1); }

.share-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex; align-items: flex-end; justify-content: center;
}

.share-modal {
    background: var(--white);
    border-radius: 20px 20px 0 0;
    padding: 24px;
    width: 100%; max-width: 480px;
    max-height: 80vh; overflow-y: auto;
}

.share-modal h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: var(--transition);
}

.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.share-btn.whatsapp { background: #25D366; color: white; }
.share-btn.telegram { background: #0088cc; color: white; }
.share-btn.twitter { background: #000; color: white; }
.share-btn.copy { background: #E0E0E0; color: var(--gray-dark); }
.share-btn svg { width: 24px; height: 24px; }

.share-preview {
    background: var(--gray-light);
    border-radius: var(--border-radius-sm);
    padding: 14px;
    font-size: 12px;
    color: var(--gray-dark);
    line-height: 1.6;
    white-space: pre-line;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #E8E8E8;
}

/* ========================================
   LOADING / EMPTY STATE
   ======================================== */
.discovery-loading {
    text-align: center;
    padding: 60px 20px;
}

.discovery-loading .spinner {
    width: 48px; height: 48px;
    border: 4px solid #E0E0E0;
    border-top-color: var(--orange-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.discovery-loading p { font-size: 14px; color: var(--gray-medium); }

.discovery-empty { text-align: center; padding: 60px 20px; }
.discovery-empty img { width: 80px; margin-bottom: 16px; }
.discovery-empty h3 { font-family: 'Poppins', sans-serif; font-size: 18px; margin-bottom: 8px; }
.discovery-empty p { font-size: 13px; color: var(--gray-medium); max-width: 360px; margin: 0 auto; }

/* ========================================
   FOOTER
   ======================================== */
.discovery-footer {
    text-align: center;
    padding: 24px 20px 40px;
    font-size: 12px;
    color: var(--gray-medium);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 640px) {
    .destinations-grid { grid-template-columns: repeat(2, 1fr); }
    .dest-card-inner { flex-direction: column; }
    .dest-image-wrapper { width: 100%; min-height: 160px; max-height: 160px; }
    .discovery-hero h1 { font-size: 26px; }
    .stats-bar { justify-content: center; }
}

@media (min-width: 900px) {
    .destinations-grid { grid-template-columns: repeat(3, 1fr); }
    .discovery-hero h1 { font-size: 30px; }
}
