/* ===== CARDS SHORTCODE ===== */
body.cards-fullwidth-active {
    margin: 0 !important;
    padding: 0 !important;
}

body.cards-fullwidth-active #main,
body.cards-fullwidth-active .site-main,
body.cards-fullwidth-active #primary {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

body.cards-fullwidth-active .site-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

.experiencias-cards-container {
    width: 100vw;
    max-width: none;
    margin: 0;
    margin-left: calc(-50vw + 50%);
    padding: 20px;
    background: #f5f5f5;
}

.cards-filters-top {
    background: #007b99;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: white;
}

.filters-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.limpar-filtros {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 14px;
    align-self: end;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.limpar-filtros:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

/* Filtros Ativos - Cards */
.active-filters-cards {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.active-filters-label {
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 1;
}

.btn-clear-all-cards {
    background: #ef4444;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.btn-clear-all-cards:hover {
    background: #dc2626;
}

.btn-clear-all-cards i {
    margin: 0;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #374151;
}

.filter-badge i {
    font-size: 14px;
}

.filter-badge .remove-filter {
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
}

.filter-badge .remove-filter:hover {
    color: #ef4444;
}

/* Campo de busca - Cards */
.search-input-wrapper-cards {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 12px;
    height: 38px;
}

.search-input-wrapper-cards i {
    color: #666;
    font-size: 16px;
}

.search-input-wrapper-cards input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: #333;
    min-width: 200px;
    height: 100%;
}

.btn-clear-search-cards {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.btn-clear-search-cards:hover {
    color: #ef4444;
}

.cards-main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.cards-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
}

.cards-sidebar h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.categories-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.category-accordion-item {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid var(--category-color, #ccc);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    position: relative;
}

.category-item .category-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: filter 0.3s ease;
    flex-shrink: 0;
}

.category-item .category-name {
    flex: 1;
}

.category-clear-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.1);
    color: #666;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.category-clear-btn:hover {
    background: rgba(0,0,0,0.2);
    color: #333;
}

.category-item:has(input:checked) .category-clear-btn {
    display: flex;
}

.category-item:hover {
    background: var(--category-color, #f0f0f0);
    color: white;
}

.category-item:hover .category-icon {
    filter: brightness(0) invert(1);
}

.category-item:focus {
    outline: none !important;
    background: white !important;
    color: #333 !important;
}

.category-item:focus .category-icon {
    filter: none !important;
}

.category-item input[type="checkbox"] {
    display: none;
}

.category-item:has(input:checked) {
    background: var(--category-color, #007cba);
    color: white;
}

.category-item:has(input:checked) .category-icon {
    filter: brightness(0) invert(1);
}

.category-item:has(input:checked):focus {
    background: var(--category-color, #007cba) !important;
    color: white !important;
}

.category-item:has(input:checked):focus .category-icon {
    filter: brightness(0) invert(1) !important;
}

/* Accordion de tags */
.category-tags-accordion {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: #f9f9f9;
    border: 2px solid var(--category-color, #ccc);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -8px;
    padding-top: 16px;
}

.category-tags-accordion.show {
    display: flex;
}

.tag-accordion-button {
    padding: 8px 12px;
    border: 2px solid var(--category-color, #007b99);
    border-radius: 20px;
    background: white;
    color: #555;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
    word-wrap: break-word;
    white-space: normal;
}

.tag-accordion-button:hover {
    background: #f5f5f5 !important;
    color: #555 !important;
    box-shadow: none !important;
}

.tag-accordion-button:focus {
    outline: none !important;
    box-shadow: none !important;
    background: white !important;
    color: #555 !important;
}

.tag-accordion-button.active {
    background: var(--category-color, #007b99);
    color: white;
}

.tag-accordion-button.active:hover {
    background: var(--category-color, #007b99) !important;
    color: white !important;
}

.tag-accordion-button.active:focus {
    background: var(--category-color, #007b99) !important;
    color: white !important;
}

.cards-content {
    flex: 1;
    min-width: 0;
}

.results-info {
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.results-count {
    font-size: 16px;
    color: #666;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.card-item-link:hover .card-item {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 50002;
}

.card-image {
    display: none; /* Imagem agora é background */
}

.card-item.no-image {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 20px 20px 20px;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.90) 80%);
    color: white;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 5px;
}

.card-location {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 500;
}

.card-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    background-color: #969696;
    font-weight: 600;
}

.card-tag-more {
    background-color: #666 !important;
    color: #fff !important;
    font-weight: 700;
    cursor: default;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
}

.no-results p {
    font-size: 16px;
    color: #666;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination-btn,
.pagination-number {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-btn:hover,
.pagination-number:hover {
    background: #007b99;
    color: white;
    border-color: #007b99;
}

.pagination-number.active {
    background: #007b99;
    color: white;
    border-color: #007b99;
}

/* Loading */
.cards-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007b99;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile */
.filters-toggle-mobile,
.categories-toggle-mobile {
    display: none;
}

@media (max-width: 768px) {
    .experiencias-cards-container {
        padding: 15px;
        margin-left: 0;
        width: 100%;
    }

    .cards-content {
        width: 100%;
    }
    
    .cards-main-layout {
        flex-direction: column;
        gap: 0px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card-item {
        height: 300px;
        width: 100%;
    }
    
    .cards-sidebar {
        width: 100%;
        position: static;
        background: #007b99;
        padding: 10px;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .cards-filters-top {
        background: #007b99;
        padding: 10px;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .filters-toggle-mobile,
    .categories-toggle-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        background: transparent;
        border: none;
        color: white;
        padding: 0;
        cursor: pointer;
        font-size: 16px;
        font-weight: 600;
    }
    
    .categories-toggle-mobile {
        justify-content: flex-start;
    }
    
    .categories-toggle-mobile .toggle-icon {
        margin-left: auto;
    }
    
    .toggle-icon {
        transition: transform 0.3s ease;
    }
    
    .toggle-icon.rotated {
        transform: rotate(180deg);
    }
    
    .filters-row {
        display: none;
        flex-direction: column;
        gap: 15px;
        margin-top: 15px;
    }
    
    .filters-row.show {
        display: flex;
    }
    
    .categories-title-desktop {
        display: none;
    }
    
    .categories-list {
        display: none;
        margin-top: 10px;
    }
    
    .categories-list.show {
        display: grid;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .active-filters-cards {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .active-filters-label {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .active-filters-list {
        width: 100%;
        order: 2;
    }
    
    .btn-clear-all-cards {
        order: 3;
        margin-top: 8px;
    }
}
