/* Indenant Broker - Estilos personalizados */

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

/* Estilos para el Modal de Filtros Avanzados - Tema "White Glassmorphism" */
.modal-backdrop {
    background-color: rgba(249, 250, 251, 0.5); /* bg-gray-50/50 */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    max-width: 928px; /* Tamaño base igual al de la searchbar */
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 1rem; /* 16px - igual que filter-card */
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-backdrop.expanded {
    max-width: 1200px; /* Tamaño expandido igual al de la searchbar */
    animation: smooth-expand 0.5s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

.modal-container {
    background-color: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(229, 231, 235, 0.5); /* border-gray-200/50 */
    border-radius: var(--border-radius-large);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 56rem; /* 896px */
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    color: var(--color-text-dark);
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.125rem; /* 18px */
    font-weight: 700;
}

.modal-close-button {
    color: var(--color-text-gray);
    transition: color 0.3s, transform 0.3s;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close-button:hover {
    color: var(--color-text-dark);
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    padding: 1.5rem; /* 24px */
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.75rem; /* 28px */
}

@media (min-width: 768px) {
    .modal-body {
        padding: 2rem; /* 32px */
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.modal-label {
    display: block;
    font-size: 0.75rem; /* 12px */
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 0.75rem; /* 12px */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.counter-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    padding: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border-light);
}

.counter-button {
    color: var(--color-text-gray);
    background-color: var(--color-bg-light-hover);
    border-radius: 50%;
    width: 2.25rem; /* 36px */
    height: 2.25rem; /* 36px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem; /* 16px */
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.counter-button:hover {
    border-color: var(--color-border-light);
    color: var(--color-text-dark);
    transform: scale(1.05);
}

.keyword-input {
    width: 100%;
    background-color: #fff;
    border: 1px solid var(--color-border-light);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    color: var(--color-text-dark);
    transition: all 0.2s ease;
    font-weight: 500;
}

.keyword-input::placeholder {
    color: var(--color-text-gray);
}

.keyword-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.amenity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.amenity-chip {
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--color-border-light);
}

.amenity-chip.inactive {
    background-color: #fff;
    color: var(--color-text-dark);
}

.amenity-chip.inactive:hover {
    background-color: var(--color-bg-light-hover);
    border-color: #d1d5db; /* gray-300 */
    transform: translateY(-2px);
}

.amenity-chip.active {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 15px -3px rgba(234, 88, 12, 0.3);
    transform: translateY(-2px);
    background: linear-gradient(to right, #f97316, #ea580c);
}

.amenity-chip.active i {
    color: #fff;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border-light);
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    flex-shrink: 0;
    border-bottom-left-radius: var(--border-radius-large);
    border-bottom-right-radius: var(--border-radius-large);
}

.clear-button {
    font-weight: 600;
    color: var(--color-text-gray);
    transition: color 0.2s, text-decoration 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

.clear-button:hover {
    color: var(--color-text-dark);
    text-decoration: underline;
}

.apply-filters-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 20px -5px rgba(234, 88, 12, 0.4);
    transform: scale(1);
    transition: all 0.3s ease;
    background-image: linear-gradient(to right, #fb923c, #f97316, #ea580c);
    background-size: 200% auto;
    border: none;
    cursor: pointer;
}

.apply-filters-button:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.5);
    background-position: right center;
}

.menu-item.active .menu-connection {
    display: block;
}

.menu-item.active .menu-item-button {
    color: #FF5733;
}

/* Estilos para el carrusel */
.carousel-slide {
    transition: transform 0.5s ease-in-out;
}

/* Estilos para las pestañas de formulario */
.tab-active {
    font-weight: 600;
    color: #FF5733;
    background-color: rgba(255, 255, 255, 0.9);
}

.tab-active .indicator {
    display: block;
}

.tab-inactive {
    font-weight: 500;
    color: #4A4A4A;
    background-color: rgba(255, 255, 255, 0.3);
}

.tab-inactive .indicator {
    display: none;
}

/* Efectos de hover mejorados */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* Bubble Animation Keyframes */
@keyframes bubble-in-kf {
  0% {
    opacity: 0;
    transform: translateY(-20px) scaleY(0.3) scaleX(0.8);
    transform-origin: top center;
    border-radius: 50px 50px 12px 12px;
  }
  60% {
    opacity: 0.8;
    transform: translateY(5px) scaleY(1.1) scaleX(1.02);
    transform-origin: top center;
    border-radius: 20px 20px 12px 12px;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1) scaleX(1);
    transform-origin: top center;
    border-radius: 0 0 12px 12px;
  }
}

@keyframes bubble-out-kf {
  0% {
    opacity: 1;
    transform: translateY(0) scaleY(1) scaleX(1);
    transform-origin: top center;
    border-radius: 0 0 12px 12px;
  }
  100% {
    opacity: 0;
    transform: translateY(-20px) scaleY(0.3) scaleX(0.8);
    transform-origin: top center;
    border-radius: 50px 50px 12px 12px;
  }
}

/* Alpine.js Transition Classes for Bubble Effect */
.bubble-enter {
  animation: bubble-in-kf 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.bubble-leave {
  animation: bubble-out-kf 0.3s ease-in forwards;
}

/* Efectos para las tarjetas de propiedades */
.property-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: #FF5733;
    color: white;
    font-weight: bold;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.property-price {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #FF5733;
    font-weight: bold;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Estilos para el formulario de contacto */
.contact-input {
    transition: border-color 0.3s, box-shadow 0.3s;
}

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

/* Efectos de hover para botones sociales */
.social-button {
    transition: all 0.3s ease;
}

.social-button:hover {
    background-color: #FF5733;
    color: white;
    transform: translateY(-3px);
}

/* Botón de scroll para volver arriba */
.scroll-top-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: #FF5733;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.scroll-top-button.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-button:hover {
    background-color: #E14B2C;
    transform: translateY(-3px);
}

/* Mejoras de accesibilidad para elementos interactivos */
.focus-visible:focus {
    outline: 2px solid #FF5733;
    outline-offset: 2px;
}

/* Navbar Expansion Animation - Ultra Innovative */
.navbar-expanded {
  transform: scaleY(1.2) !important;
  transform-origin: top center !important;
  border-radius: 16px 16px 24px 24px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 
              0 0 0 1px rgba(255, 255, 255, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  background: linear-gradient(135deg, 
              rgba(255, 255, 255, 0.85) 0%, 
              rgba(255, 255, 255, 0.75) 50%, 
              rgba(255, 255, 255, 0.8) 100%) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
}

/* Animación de pulso sutil para el estado expandido */
@keyframes navbar-pulse {
  0%, 100% {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 
                0 0 0 1px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(255, 255, 255, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }
}

.navbar-expanded {
  animation: navbar-pulse 3s ease-in-out infinite;
}

/* Efectos para los elementos del dropdown integrado */
.dropdown-item {
  position: relative;
  overflow: hidden;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
              transparent, 
              rgba(255, 87, 51, 0.1), 
              transparent);
  transition: left 0.5s ease;
}

.dropdown-item:hover::before {
  left: 100%;
}

/* Mejora de los iconos en el dropdown */
.dropdown-item i {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover i {
  transform: translateY(-2px) scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(255, 87, 51, 0.3));
}
