:root {
    --color-accent: #FF5733;
    --color-accent-dark: #E64A19;
    --color-bg-light: #ffffff;
    --color-bg-light-hover: #f7f7f7;
    --color-text-dark: #1f2937;
    --color-text-gray: #6b7280;
    --color-border-light: #e5e7eb;
    --border-radius-large: 2rem; 
}

.airbnb-search-container {
    background-color: var(--color-bg-light);
    border-radius: var(--border-radius-large);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.05);
    padding: 8px;
    transition: all 0.3s ease-in-out;
}

.search-bar-form {
    width: 100%;
}

.search-bar-expanded {
    display: flex;
    align-items: stretch; /* Estira los hijos para que tengan la misma altura */
    width: 100%;
}

.search-bar-expanded-field {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6px 24px;
    cursor: pointer;
    border-radius: var(--border-radius-large);
    transition: background-color 0.2s ease;
}

.search-bar-expanded-field:hover {
    background-color: var(--color-bg-light-hover);
}

.field-operation {
    flex: 0 1 200px;
}

.field-type {
    flex: 0 1 200px;
}

.field-location {
    flex: 1 1 auto;
}

.search-bar-expanded-field:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 32px;
    background-color: var(--color-border-light);
}

.search-bar-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    text-align: left;
    cursor: pointer;
}

.search-bar-expanded-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--color-text-dark);
    margin-bottom: 2px;
    display: block;
}

.search-bar-expanded-value, .search-bar-expanded-input {
    font-size: 14px;
    color: var(--color-text-gray);
    background: none;
    border: none;
    outline: none;
    width: 100%;
    padding: 0;
}

.search-bar-expanded-input::placeholder {
    color: var(--color-text-gray);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background-color: var(--color-bg-light);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid var(--color-border-light);
    z-index: 50;
    overflow: hidden;
}

.search-dropdown-item {
    padding: 12px 20px;
    font-size: 14px;
    color: var(--color-text-dark);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-dropdown-item:hover {
    background-color: var(--color-bg-light-hover);
}

.search-bar-expanded-controls {
    display: flex;
    align-items: center;
    padding-left: 12px;
}

.filters-button {
    background-color: transparent;
    border: 1px solid var(--color-border-light);
    color: var(--color-text-dark);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: var(--border-radius-large);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-right: 8px;
}

.filters-button:hover {
    background-color: var(--color-bg-light-hover);
    border-color: #d1d5db;
}

.search-submit-button {
    background-color: var(--color-accent);
    color: white;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 87, 51, 0.3);
    transition: all 0.2s ease;
}

.search-submit-button:hover {
    transform: scale(1.05);
    background-color: var(--color-accent-dark);
}

/* Utility to hide scrollbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* --- Estilos para el Modal de Filtros (Tema Blanco) --- */
.modal-content-container {
    background-color: #ffffff;
    border-radius: 1.5rem; /* rounded-2xl */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    color: #1F2937; /* text-gray-800 */
}

.modal-content-container .p-5 {
    border-color: #E5E7EB; /* gray-200 */
}

.modal-content-container h2 {
    color: #111827; /* gray-900 */
}

.modal-content-container .text-gray-300 {
    color: #6B7280; /* gray-500 */
}

.modal-content-container .hover\:text-white:hover {
    color: #111827; /* gray-900 */
}

.modal-content-container .bg-black\/20 {
    background-color: #F9FAFB; /* gray-50 */
    border: 1px solid #F3F4F6; /* gray-100 */
}

.modal-content-container .text-gray-400 {
    color: #6B7280; /* gray-500 */
}

.modal-content-container .font-bold.text-gray-300 {
    color: #374151; /* gray-700 */
}

/* Chips para selección (Ambientes, Baños) - Tema Blanco */
.chip {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    background-color: #F3F4F6; /* gray-100 */
    color: #4B5563; /* gray-600 */
    border: 1px solid #E5E7EB; /* gray-200 */
    transition: all 0.2s ease;
}

.chip:hover {
    background-color: #E5E7EB; /* gray-200 */
}

.chip.active {
    background-color: #111827; /* gray-900 */
    color: white;
    border-color: #111827;
}

/* Chips para Amenities - Tema Blanco */
.amenity-chip {
    display: flex;
    align-items: center;
    text-align: left;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    background-color: #F9FAFB; /* gray-50 */
    color: #374151; /* gray-700 */
    border: 1px solid #F3F4F6; /* gray-100 */
    transition: all 0.2s ease;
}

.amenity-chip:hover {
    background-color: #F3F4F6; /* gray-100 */
    border-color: #E5E7EB; /* gray-200 */
}

/* Definición problemática eliminada - usar la definición correcta más abajo */

/* Keyword Input - Tema Blanco */
.modal-content-container input[type="text"] {
    background-color: #F9FAFB; /* gray-50 */
    border: 1px solid #E5E7EB; /* gray-200 */
    color: #111827; /* gray-900 */
}

.modal-content-container input[type="text"]::placeholder {
    color: #9CA3AF; /* gray-400 */
}

.modal-content-container input[type="text"]:focus {
    border-color: #FF5733;
    box-shadow: 0 0 0 2px rgba(255, 87, 51, 0.2);
}

/* Modal Footer - Tema Blanco */
.modal-content-container .bg-black\/20.border-t {
    background-color: #F9FAFB; /* gray-50 */
    border-color: #E5E7EB; /* gray-200 */
}

.modal-content-container .font-bold.text-gray-300.hover\:text-white:hover {
    color: #111827; /* gray-900 */
}

/* ===== ADVANCED MODAL GLASSMORPHISM STYLES ===== */

/* Modal Container */
.advanced-modal-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 
                0 0 0 1px rgba(255, 255, 255, 0.2);
    max-width: 850px;
    width: 100%;
    max-height: 75vh;
    overflow: hidden;
    position: relative;
    margin-top: 40px;
}

/* Modal Header */
.advanced-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 87, 51, 0.1);
    background: linear-gradient(135deg, rgba(255, 87, 51, 0.05) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.advanced-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.advanced-modal-close {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #6b7280;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 18px;
    z-index: 10;
}

.advanced-modal-close:hover {
    background: linear-gradient(135deg, #FF5733 0%, #E64A19 50%, #FF8C42 100%);
    color: white;
    border-color: #FF5733;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 87, 51, 0.3);
}

/* Modal Body */
.advanced-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    max-height: calc(75vh - 100px);
}

/* NUEVO DISEÑO COMPACTO */
.compact-filters-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.filter-row:first-child {
    margin-bottom: 12px;
}

/* Anchos específicos para cada sección */
.filter-section:nth-child(1) { /* Ambientes y Baños */
    flex: 1.2;
    min-width: 180px;
}

.filter-section:nth-child(2) { /* Amoblado */
    flex: 0.8;
    min-width: 120px;
}

.filter-section:nth-child(3) { /* Superficie */
    flex: 1;
    min-width: 140px;
}

.filter-section:nth-child(4) { /* Precio */
    flex: 1.2;
    min-width: 160px;
}

.filter-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    min-height: 70px;
}

.filter-section:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.filter-label {
    font-size: 11px;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Selectores numéricos inline */
.inline-selectors {
    display: flex;
    gap: 12px;
}

.compact-numeric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.compact-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}

.compact-label i {
    font-size: 10px;
    margin-right: 4px;
}

.numeric-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 4px;
}

.compact-btn {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 1px solid rgba(255, 87, 51, 0.3);
    background: rgba(255, 255, 255, 0.9);
    color: #FF5733;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-btn:hover {
    background: #FF5733;
    color: white;
    transform: scale(1.05);
}

.compact-display {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    color: #1f2937;
    font-size: 11px;
}

/* Botones compactos */
.compact-buttons {
    display: flex;
    gap: 4px;
}

.compact-option {
    flex: 1;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.compact-option:hover {
    background: rgba(255, 87, 51, 0.1);
    border-color: rgba(255, 87, 51, 0.3);
    color: #FF5733;
}

.compact-option.active {
    background: #FF5733;
    border-color: #FF5733;
    color: white;
}

/* Rangos compactos */
.compact-range {
    display: flex;
    align-items: center;
    gap: 5px;
}

.compact-input {
    flex: 1;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(200, 200, 200, 0.6);
    border-radius: 6px;
    font-size: 11px;
    color: #1f2937;
    outline: none;
    transition: all 0.2s ease;
    min-width: 50px;
}

.compact-input:focus {
    border-color: #FF5733;
    box-shadow: 0 0 0 2px rgba(255, 87, 51, 0.1);
}

.range-sep {
    color: #9ca3af;
    font-weight: 600;
    font-size: 12px;
}

/* Moneda ultra compacta */
.compact-currency {
    display: flex;
    gap: 2px;
}

.currency-btn {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(200, 200, 200, 0.6);
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 28px;
    height: 18px;
    line-height: 12px;
}

.currency-btn:hover {
    background: rgba(255, 87, 51, 0.1);
    border-color: rgba(255, 87, 51, 0.4);
    color: #FF5733;
}

.currency-btn.active {
    background: #FF5733;
    border-color: #FF5733;
    color: white;
    font-weight: 800;
}

/* Amenities compactos */
.amenities-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    min-height: 80px;
}

.amenities-section:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.compact-amenities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Columnas más anchas */
    gap: 10px; /* Gap ligeramente aumentado */
    margin-top: 12px;
    padding: 8px;
    max-height: 200px; /* Altura aumentada para más filas */
    overflow-y: auto; /* Solo scroll vertical */
    overflow-x: hidden; /* Sin scroll horizontal */
}

/* Estilos específicos para amenity-chip dentro de compact-amenities */
.compact-amenities .amenity-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px; /* Gap ligeramente aumentado */
    background-color: #f8fafc;
    color: #64748b;
    font-size: 10px; /* Tamaño más legible */
    font-weight: 600;
    padding: 10px 6px; /* Padding más cómodo */
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    min-height: 50px; /* Altura mínima para consistencia */
    white-space: normal; /* Permitir wrap de texto */
    overflow: visible;
    word-wrap: break-word;
}

.compact-amenities .amenity-chip:hover {
    background-color: rgba(255, 87, 51, 0.1);
    border-color: rgba(255, 87, 51, 0.3);
    color: #FF5733;
    transform: translateY(-1px);
}

/* Estilos activos con alta especificidad para compact-amenities */
.compact-amenities .amenity-chip.active,
.compact-amenities .amenity-chip.active:hover,
.compact-amenities .amenity-chip.active:focus,
.compact-amenities button.amenity-chip.active,
.compact-amenities button.amenity-chip.active:hover,
.compact-amenities button.amenity-chip.active:focus {
    background: linear-gradient(135deg, #FF5733, #FF8C42) !important;
    background-color: #FF5733 !important;
    color: white !important;
    border-color: #FF5733 !important;
    box-shadow: 0 2px 8px rgba(255, 87, 51, 0.3) !important;
    transform: translateY(-1px) !important;
}

.compact-amenities .amenity-chip.active i,
.compact-amenities .amenity-chip.active:hover i,
.compact-amenities .amenity-chip.active:focus i,
.compact-amenities button.amenity-chip.active i,
.compact-amenities button.amenity-chip.active:hover i,
.compact-amenities button.amenity-chip.active:focus i {
    color: white !important;
}

.compact-amenities .amenity-chip.active span,
.compact-amenities .amenity-chip.active:hover span,
.compact-amenities .amenity-chip.active:focus span,
.compact-amenities button.amenity-chip.active span,
.compact-amenities button.amenity-chip.active:hover span,
.compact-amenities button.amenity-chip.active:focus span {
    color: white !important;
}

.compact-amenities .amenity-chip i {
    font-size: 10px;
    margin-bottom: 1px;
}

.amenity-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.amenity-tag i {
    font-size: 10px;
}

.amenity-tag:hover {
    background: rgba(255, 87, 51, 0.1);
    border-color: rgba(255, 87, 51, 0.3);
    color: #FF5733;
    transform: translateY(-1px);
}

.amenity-tag.active {
    background: #FF5733;
    border-color: #FF5733;
    color: white;
    transform: translateY(-1px);
}

/* Filter Sections */
.filter-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Dual Containers */
.dual-numeric-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dual-range-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Enhanced Range Grid for Perfect Alignment */
.dual-range-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.range-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.range-column-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 4px;
}

.range-inputs-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.range-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.range-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Enhanced Numeric Selectors - Perfect Alignment */
.numeric-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.numeric-selector:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 87, 51, 0.3);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255, 87, 51, 0.15), 
                0 4px 20px rgba(0, 0, 0, 0.1);
}

.numeric-selector-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #374151;
}

.numeric-selector-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.numeric-btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 87, 51, 0.3);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #FF5733;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.numeric-btn:hover {
    background: linear-gradient(135deg, #FF5733 0%, #E64A19 100%);
    color: white;
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 20px rgba(255, 87, 51, 0.4),
                0 0 0 3px rgba(255, 87, 51, 0.2);
    border-color: transparent;
}

.numeric-btn:active {
    transform: scale(1.05) rotate(2deg);
    transition: all 0.1s ease;
}

.numeric-display {
    min-width: 50px;
    text-align: center;
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

/* Enhanced Furnished Options - Perfect Equal Sizing */
.furnished-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: stretch;
}

.furnished-btn {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-size: 14px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.furnished-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 87, 51, 0.4);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 87, 51, 0.15),
                0 4px 15px rgba(0, 0, 0, 0.1);
    color: #FF5733;
}

.furnished-btn.active {
    background: linear-gradient(135deg, #FF5733 0%, #E64A19 100%);
    color: white;
    border-color: #FF5733;
    box-shadow: 0 6px 20px rgba(255, 87, 51, 0.4),
                0 0 0 2px rgba(255, 87, 51, 0.2);
    transform: translateY(-1px);
}

.furnished-btn.active:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 87, 51, 0.5),
                0 0 0 3px rgba(255, 87, 51, 0.3);
}

/* Range Inputs */
.range-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.range-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.range-input {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.3s ease;
    outline: none;
    font-size: 14px;
}

.range-input:focus {
    border-color: #FF5733;
    box-shadow: 0 0 0 3px rgba(255, 87, 51, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.range-input::placeholder {
    color: #9ca3af;
}

.range-separator {
    font-weight: 600;
    color: #6b7280;
    margin-top: 20px;
}

/* Enhanced Amenities Grid - Perfect 3-Column Symmetric Layout */
.amenities-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px; /* Aumentado de 10px a 14px para mejor espaciado */
    align-items: stretch;
}

.amenity-toggle-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Aumentado de 8px a 10px */
    padding: 14px 12px; /* Aumentado padding para más espacio */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6b7280;
    font-weight: 600;
    font-size: 13px;
    min-height: 52px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.amenity-toggle-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.amenity-toggle-enhanced:hover::before {
    left: 100%;
}

.amenity-toggle-enhanced:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 87, 51, 0.4);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(255, 87, 51, 0.15),
                0 4px 20px rgba(0, 0, 0, 0.1);
    color: #FF5733;
}

.amenity-toggle-enhanced.active {
    background: linear-gradient(135deg, #FF5733 0%, #E64A19 100%);
    border-color: #FF5733;
    color: white;
    box-shadow: 0 8px 25px rgba(255, 87, 51, 0.4),
                0 0 0 2px rgba(255, 87, 51, 0.2);
    transform: translateY(-2px);
}

.amenity-toggle-enhanced.active:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 87, 51, 0.5),
                0 0 0 3px rgba(255, 87, 51, 0.3);
}

.amenity-toggle-enhanced i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    transition: all 0.3s ease;
}

.amenity-toggle-enhanced:hover i {
    transform: scale(1.1);
}

.amenity-toggle-enhanced.active i {
    color: white;
    transform: scale(1.1);
}

.amenity-toggle-enhanced span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Legacy amenities grid for backward compatibility */
@keyframes dopamine-pulse {
    0%, 100% {
        transform: scale(1);
        background: linear-gradient(135deg, #FF5733 0%, #E64A19 50%, #FF8C42 100%);
        box-shadow: 0 4px 15px rgba(255, 87, 51, 0.3),
                    0 0 0 2px rgba(255, 87, 51, 0.1);
    }
    25% {
        transform: scale(1.02);
        background: linear-gradient(135deg, #FF8C42 0%, #FF5733 50%, #E64A19 100%);
        box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4),
                    0 0 0 3px rgba(255, 140, 66, 0.2);
    }
    50% {
        transform: scale(1.05);
        background: linear-gradient(135deg, #E64A19 0%, #FF8C42 50%, #FF5733 100%);
        box-shadow: 0 8px 25px rgba(230, 74, 25, 0.5),
                    0 0 0 4px rgba(230, 74, 25, 0.25);
    }
    75% {
        transform: scale(1.02);
        background: linear-gradient(135deg, #FF5733 0%, #E64A19 50%, #FF8C42 100%);
        box-shadow: 0 6px 20px rgba(255, 87, 51, 0.4),
                    0 0 0 3px rgba(255, 87, 51, 0.2);
    }
}

.amenities-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* Aumentado de 8px a 12px para mejor espaciado */
}

.amenity-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px; /* Aumentado de 2px a 3px */
    background-color: #f8fafc;
    color: #64748b;
    font-size: 10px; /* Aumentado de 9px a 10px para mejor legibilidad */
    font-weight: 600;
    padding: 10px 6px; /* Aumentado padding para más espacio interno */
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    text-align: center;
    width: 80px;
    height: 60px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.amenity-chip:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.amenity-chip.active {
    background: linear-gradient(135deg, #FF5733 0%, #E64A19 50%, #FF8C42 100%);
    border-color: #FF5733;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 87, 51, 0.3),
                0 0 0 2px rgba(255, 87, 51, 0.1);
    animation: dopamine-pulse 3s infinite ease-in-out;
}

.amenity-chip.active:hover {
    background: linear-gradient(135deg, #E64A19 0%, #FF8C42 50%, #FF5733 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 87, 51, 0.5),
                0 0 0 4px rgba(255, 87, 51, 0.2);
    animation: dopamine-pulse 1.5s infinite ease-in-out;
}

.amenity-chip i {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 2px;
}

.amenity-chip.active i {
    opacity: 1;
    color: white !important;
}

.amenity-chip.active span {
    color: white !important;
}

.amenity-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
}

/* Modal Footer Styles */
.advanced-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
    gap: 12px;
}

.clear-filters-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.clear-filters-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
}

.apply-filters-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #FF5733 0%, #E64A19 50%, #FF8C42 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(255, 87, 51, 0.3);
    animation: dopamine-pulse 2s infinite ease-in-out;
}

.apply-filters-btn:hover {
    background: linear-gradient(135deg, #E64A19 0%, #FF8C42 50%, #FF5733 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 87, 51, 0.4);
    animation: dopamine-pulse 1s infinite ease-in-out;
}

.amenity-toggle:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 87, 51, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.amenity-toggle.active {
    background: linear-gradient(135deg, rgba(255, 87, 51, 0.1) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-color: #FF5733;
    color: #FF5733;
    box-shadow: 0 4px 12px rgba(255, 87, 51, 0.2);
}

.amenity-toggle i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.amenity-toggle.active i {
    color: #FF5733;
}

/* Keyword Input */
.keyword-input-container {
    position: relative;
}

.keyword-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

.keyword-input-enhanced {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    font-weight: 500;
    color: #1f2937;
    transition: all 0.3s ease;
    outline: none;
}

.keyword-input-enhanced:focus {
    border-color: #FF5733;
    box-shadow: 0 0 0 3px rgba(255, 87, 51, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.keyword-input-enhanced::placeholder {
    color: #9ca3af;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 87, 51, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 87, 51, 0.05) 100%);
}

/* Enhanced Modal Footer Buttons */
.clear-button {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(107, 114, 128, 0.4);
    border-radius: 12px;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(107, 114, 128, 0.1), transparent);
    transition: left 0.5s ease;
}

.clear-button:hover::before {
    left: 100%;
}

.clear-button:hover {
    background: rgba(107, 114, 128, 0.15);
    border-color: #6b7280;
    color: #374151;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.2);
}

.apply-filters-button {
    padding: 10px 24px;
    background: linear-gradient(135deg, #FF5733 0%, #E64A19 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(255, 87, 51, 0.4);
    position: relative;
    overflow: hidden;
    min-width: 150px;
    justify-content: center;
}

.apply-filters-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.apply-filters-button:hover::before {
    left: 100%;
}

.apply-filters-button:hover {
    background: linear-gradient(135deg, #E64A19 0%, #D84315 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 87, 51, 0.5),
                0 0 0 3px rgba(255, 87, 51, 0.2);
}

.apply-filters-button:active {
    transform: translateY(-1px) scale(1.02);
    transition: all 0.1s ease;
}

.apply-filters-button i {
    transition: all 0.3s ease;
}

.apply-filters-button:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .advanced-modal-container {
        max-width: 95vw;
        margin: 20px;
    }
    
    .advanced-modal-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .advanced-modal-header,
    .advanced-modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .amenities-grid {
        gap: 10px; /* Espaciado ligeramente reducido para móviles */
    }
    
    .amenity-chip {
        padding: 8px 5px; /* Padding reducido para móviles */
        font-size: 9px; /* Tamaño de fuente reducido para móviles */
    }
    
    /* Estilos responsive para compact-amenities en móviles */
    .compact-amenities {
        gap: 8px; /* Gap cómodo para móviles */
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); /* Columnas apropiadas para móvil */
        max-height: 250px; /* Más altura para scroll vertical */
        overflow-x: hidden; /* Sin scroll horizontal */
    }
    
    .compact-amenities .amenity-chip {
        padding: 8px 4px; /* Padding cómodo para móviles */
        font-size: 9px; /* Fuente legible para móviles */
        gap: 2px; /* Gap apropiado entre ícono y texto */
        min-height: 45px; /* Altura mínima para móviles */
    }
    
    .compact-amenities .amenity-chip i {
        font-size: 9px; /* Ícono apropiado para móvil */
    }
    
    .furnished-options {
        grid-template-columns: 1fr;
    }
}

/* 🎨 GLASSMORPHISM DROPDOWNS - FILTROS PREMIUM */
.glassmorphism-dropdowns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.glassmorphism-dropdown-container {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.glassmorphism-dropdown-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.glassmorphism-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 87, 51, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 87, 51, 0.2);
}

.dropdown-icon-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.dropdown-value-arrow {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-value {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 12px;
    color: #9CA3AF;
    transition: transform 0.3s ease;
}

.rotate-180 {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.glassmorphism-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 4px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.dropdown-option:hover {
    background: rgba(255, 87, 51, 0.1);
    color: #FF5733;
}

.dropdown-option.active {
    background: linear-gradient(135deg, rgba(255, 87, 51, 0.15), rgba(255, 140, 66, 0.15));
    color: #FF5733;
    font-weight: 600;
}

.dropdown-section {
    padding: 8px 16px 16px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dropdown-section:last-child {
    border-bottom: none;
}

.dropdown-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.dropdown-exact-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dropdown-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 32px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.dropdown-chip:hover {
    background: rgba(255, 87, 51, 0.1);
    border-color: rgba(255, 87, 51, 0.3);
    color: #FF5733;
    transform: translateY(-1px);
}

.dropdown-chip.active {
    background: linear-gradient(135deg, #FF5733, #FF8C42);
    border-color: #FF5733;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 87, 51, 0.3);
    transform: translateY(-1px);
}

/* Sección de Requisitos */
.requirements-section {
    margin-top: 1.5rem;
}

.compact-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.requirement-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    padding: 12px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    min-width: 70px;
    white-space: nowrap;
}

.requirement-chip:hover {
    background: rgba(255, 87, 51, 0.15);
    border-color: rgba(255, 87, 51, 0.3);
    color: #FF5733;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 51, 0.2);
}

.requirement-chip.active {
    background: linear-gradient(135deg, #FF5733, #FF8C42);
    background-color: #FF5733;
    color: white;
    border-color: #FF5733;
    box-shadow: 0 4px 15px rgba(255, 87, 51, 0.4);
    transform: translateY(-2px);
}

.requirement-chip.active i,
.requirement-chip.active span {
    color: white;
}

.requirement-chip i {
    font-size: 14px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .glassmorphism-dropdowns {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .glassmorphism-dropdown-container {
        min-width: unset;
    }
    
    .glassmorphism-dropdown-trigger {
        padding: 10px 14px;
    }
    
    .dropdown-exact-options {
        justify-content: center;
    }
    
    .compact-requirements {
        justify-content: center;
    }
}
