/**
 * CS Viagens & Eventos
 * CSS específico da página de Destinos
 */

/* ===================================
   HERO SECTION
   =================================== */
.destinos-hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (min-width: 640px) {
    .destinos-hero {
        height: 500px;
    }
}

.destinos-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.destinos-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
}

.destinos-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 1rem;
    max-width: 56rem;
}

.destinos-hero-content h1 {
    font-size: 2.25rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

@media (min-width: 640px) {
    .destinos-hero-content h1 {
        font-size: 3.75rem;
    }
}

.destinos-hero-content p {
    font-size: 1.125rem;
    color: rgba(241, 245, 249, 0.9);
    max-width: 42rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .destinos-hero-content p {
        font-size: 1.25rem;
    }
}

/* ===================================
   SEARCH BAR
   =================================== */
.destinos-search {
    position: relative;
    margin-top: -2.5rem;
    z-index: 20;
    padding: 0 1rem;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

.destinos-search-box {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid #e2e8f0;
}

.dark .destinos-search-box {
    background: #1e293b;
    border-color: #334155;
}

@media (min-width: 640px) {
    .destinos-search-box {
        flex-direction: row;
        padding: 1rem;
    }
}

.destinos-search-input-wrapper {
    flex: 1;
    position: relative;
}

.destinos-search-input-wrapper .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Ocultar ícone quando o input está focado ou tem valor */
.destinos-search-input:focus + .search-icon,
.destinos-search-input:not(:placeholder-shown) + .search-icon {
    opacity: 0;
}

.destinos-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

/* Quando focado ou preenchido, reduzir padding esquerdo */
.destinos-search-input:focus,
.destinos-search-input:not(:placeholder-shown) {
    padding-left: 1rem;
}

.dark .destinos-search-input {
    background: #0f172a;
    color: white;
}

.destinos-search-input:focus {
    border-color: #1142d4;
    box-shadow: 0 0 0 3px rgba(17, 66, 212, 0.1);
}

.destinos-search-input::placeholder {
    color: #94a3b8;
}

.destinos-search-btn {
    background: #1142d4;
    color: white;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.destinos-search-btn:hover {
    background: #0d3bb8;
}

/* ===================================
   FEATURED DESTINATIONS
   =================================== */
.destinos-featured {
    max-width: 80rem;
    margin: 0 auto;
    padding: 4rem 1rem;
}

@media (min-width: 640px) {
    .destinos-featured {
        padding: 4rem 1.5rem;
    }
}

.destinos-featured-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.destinos-featured-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.dark .destinos-featured-header h2 {
    color: white;
}

@media (min-width: 640px) {
    .destinos-featured-header h2 {
        font-size: 1.875rem;
    }
}

.destinos-featured-header p {
    color: #64748b;
    margin-top: 0.25rem;
}

.dark .destinos-featured-header p {
    color: #94a3b8;
}

.destinos-featured-nav {
    display: flex;
    gap: 0.5rem;
}

.destinos-featured-nav button {
    padding: 0.5rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .destinos-featured-nav button {
    border-color: #334155;
    color: #94a3b8;
}

.destinos-featured-nav button:hover {
    background: #f8fafc;
}

.dark .destinos-featured-nav button:hover {
    background: #1e293b;
}

/* Featured Cards Grid */
.destinos-featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

/* Featured Card */
.destinos-featured-card {
    position: relative;
    height: 350px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.dark .destinos-featured-card {
    border-color: #1e293b;
}

.destinos-featured-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.destinos-featured-card:hover .destinos-featured-card-bg {
    transform: scale(1.1);
}

.destinos-featured-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2), transparent);
}

.destinos-featured-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1.5rem;
    width: 100%;
}

.destinos-featured-card .badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
}

.destinos-featured-card .badge-popular {
    background: #1142d4;
    color: white;
}

.destinos-featured-card .badge-trending {
    background: #16a34a;
    color: white;
}

.destinos-featured-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.destinos-featured-card p {
    color: #e2e8f0;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.destinos-featured-card .btn-pacotes {
    display: inline-block;
    background: white;
    color: #1142d4;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.destinos-featured-card .btn-pacotes:hover {
    background: #f1f5f9;
}

/* ===================================
   CATEGORIES / ALL DESTINATIONS
   =================================== */
.destinos-categories {
    background: #f8fafc;
    padding: 4rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.dark .destinos-categories {
    background: rgba(15, 23, 42, 0.5);
    border-color: #1e293b;
}

.destinos-categories-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .destinos-categories-container {
        padding: 0 1.5rem;
    }
}

.destinos-categories-header {
    text-align: center;
    margin-bottom: 3rem;
}

.destinos-categories-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.dark .destinos-categories-header h2 {
    color: white;
}

/* Filter Tabs */
.destinos-filter-tabs {
    display: flex;
    justify-content: center;
}

.destinos-filter-tabs-inner {
    display: inline-flex;
    padding: 0.25rem;
    background: #e2e8f0;
    border-radius: 0.75rem;
}

.dark .destinos-filter-tabs-inner {
    background: #1e293b;
}

.destinos-filter-tab {
    padding: 0.625rem 2rem;
    border-radius: 0.5rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: #64748b;
}

.dark .destinos-filter-tab {
    color: #94a3b8;
}

.destinos-filter-tab:hover {
    color: #334155;
}

.dark .destinos-filter-tab:hover {
    color: #e2e8f0;
}

.destinos-filter-tab.active {
    background: white;
    color: #1142d4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .destinos-filter-tab.active {
    background: #1142d4;
    color: white;
}

/* Filter by State */
.destinos-filter-estados {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.destinos-filter-estado {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #cbd5e1;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.dark .destinos-filter-estado {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

.destinos-filter-estado:hover,
.destinos-filter-estado.active {
    background: #1142d4;
    border-color: #1142d4;
    color: white;
}

/* Destinations Grid */
.destinos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

@media (min-width: 1024px) {
    .destinos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Dynamic column variations */
    .destinos-grid.destinos-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .destinos-grid.destinos-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .destinos-grid.destinos-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Layout variations */
.destinos-grid.destinos-layout-list {
    grid-template-columns: 1fr;
}

.destinos-grid.destinos-layout-list .destino-card {
    display: flex;
    flex-direction: row;
}

.destinos-grid.destinos-layout-list .destino-card-img {
    width: 16rem;
    min-width: 16rem;
    height: auto;
}

.destinos-grid.destinos-layout-list .destino-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 639px) {
    .destinos-grid.destinos-layout-list .destino-card {
        flex-direction: column;
    }
    
    .destinos-grid.destinos-layout-list .destino-card-img {
        width: 100%;
        height: 12rem;
    }
}

/* Destination Card */
.destino-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
}

.dark .destino-card {
    background: #1e293b;
    border-color: #334155;
}

.destino-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.destino-card-img {
    height: 12rem;
    overflow: hidden;
}

.destino-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.destino-card-body {
    padding: 1.25rem;
}

.destino-card-body h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.dark .destino-card-body h4 {
    color: white;
}

.destino-card-body .destino-estado {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dark .destino-card-body .destino-estado {
    color: #94a3b8;
}

.destino-card-body .destino-descricao {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .destino-card-body .destino-descricao {
    color: #94a3b8;
}

.destino-card-body .destino-pacotes {
    font-size: 0.75rem;
    color: #1142d4;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.destino-card .btn-ver-pacotes {
    display: block;
    width: 100%;
    padding: 0.625rem;
    background: rgba(17, 66, 212, 0.1);
    color: #1142d4;
    font-weight: 700;
    border-radius: 0.5rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.destino-card .btn-ver-pacotes:hover {
    background: #1142d4;
    color: white;
}

/* Load More */
.destinos-load-more {
    margin-top: 3rem;
    text-align: center;
}

.destinos-load-more button {
    padding: 0.75rem 2rem;
    border: 2px solid #1142d4;
    color: #1142d4;
    font-weight: 700;
    border-radius: 0.5rem;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.destinos-load-more button:hover {
    background: #1142d4;
    color: white;
}

/* No Results */
.destinos-no-results {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.destinos-no-results .material-symbols-outlined {
    font-size: 4rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.destinos-no-results h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.dark .destinos-no-results h3 {
    color: #e2e8f0;
}

.destinos-no-results p {
    color: #64748b;
}

.dark .destinos-no-results p {
    color: #94a3b8;
}

/* ===================================
   ANIMATIONS
   =================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }

/* ===================================
   MAPA INTERATIVO
   =================================== */
.destinos-mapa {
    padding: 4rem 1rem;
    background: #f8fafc;
}

.dark .destinos-mapa {
    background: #0f172a;
}

.destinos-mapa-container {
    max-width: 80rem;
    margin: 0 auto;
    text-align: center;
}

.destinos-mapa-container h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.dark .destinos-mapa-container h2 {
    color: white;
}

.destinos-mapa-container > p {
    color: #64748b;
    margin-bottom: 2rem;
}

.dark .destinos-mapa-container > p {
    color: #94a3b8;
}

.destinos-map {
    width: 100%;
    height: 450px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.dark .destinos-map {
    border-color: #334155;
}

@media (min-width: 640px) {
    .destinos-map {
        height: 500px;
    }
}
