/* ==========================================================================
   GLASSMORPHISM STYLES - Inmobiliaria Imperium
   ========================================================================== */

/* Variables CSS para consistencia */
:root {
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-bg-hover: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  --glass-backdrop: blur(8px);
  --glass-backdrop-strong: blur(12px);
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --dark-gradient: linear-gradient(135deg, #434343 0%, #000000 100%);
}

/* GLASS CONTAINER BASE */
.glass-container {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-container:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

/* GLASS CARD PARA PROPIEDADES */
.glass-property-card {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  padding: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* ESTILOS PARA PÁGINAS DE DETALLES */
.listing-details-wrapper {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  min-height: 100vh;
}

.listing-details-wrapper .listing-content h1,
.listing-details-wrapper .listing-content h2,
.listing-details-wrapper .listing-content h3,
.listing-details-wrapper .listing-content h4,
.listing-details-wrapper .listing-content h5,
.listing-details-wrapper .listing-content h6 {
  color: #D8BF82 !important;
  margin-bottom: 1rem;
  font-weight: 600;
}

.listing-details-wrapper .listing-content p {
  color: rgba(255, 255, 255, 0.9) !important;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.listing-details-wrapper .listing-content ul,
.listing-details-wrapper .listing-content ol {
  color: rgba(255, 255, 255, 0.9) !important;
  margin-left: 1.5rem;
}

.listing-details-wrapper .listing-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.listing-details-wrapper .listing-content strong,
.listing-details-wrapper .listing-content b {
  color: #D8BF82 !important;
}

.listing-details-wrapper .listing-content blockquote {
  background: rgba(216, 191, 130, 0.1);
  border-left: 4px solid #D8BF82;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9) !important;
}

.glass-property-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glass-property-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px 0 rgba(31, 38, 135, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-property-card:hover::before {
  opacity: 1;
}

/* GLASS BANNER/HERO SECTION */
.glass-banner {
  position: relative;
  overflow: hidden;
}

.glass-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 50%, 
    rgba(0, 0, 0, 0.1) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.glass-search-form {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  padding: 30px;
  position: relative;
  z-index: 10;
}

/* GLASS BUTTONS */
.glass-btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  color: white;
  padding: 12px 24px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-btn::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;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  color: white;
  text-decoration: none;
}

.glass-btn:hover::before {
  left: 100%;
}

/* GLASS PRICE TAG */
.glass-price {
  background: var(--primary-gradient);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 8px 16px;
  color: white;
  font-weight: 700;
  font-size: 18px;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.glass-price::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glass-price:hover::before {
  opacity: 1;
}

/* GLASS BADGE */
.glass-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 6px 12px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 5;
}

.glass-badge.sale {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.glass-badge.rent {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* GLASS OVERLAY PARA IMÁGENES */
.glass-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 20px;
  border-radius: 0 0 24px 24px;
}

/* GLASS CARD BODY */
.glass-card-body {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 0 0 24px 24px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* GLASS ICONS CONTAINER */
.glass-icons {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 15px;
  padding: 15px;
  margin: 15px 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white !important;
  font-weight: 700 !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
}

.glass-icon i {
  font-size: 18px;
  color: white !important;
  opacity: 1 !important;
}

.glass-icon span {
  color: white !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
}

/* GLASS AUTHOR INFO */
.glass-author {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-author img {
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* GLASS SECTION HEADERS */
.glass-section-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  margin-bottom: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.glass-section-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

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

.glass-section-header h2,
.glass-section-header h5 {
  position: relative;
  z-index: 2;
}

/* LISTINGGRID SPECIFIC IMPROVEMENTS */
.glass-property-card .listing-thumbnail {
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  position: relative;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.glass-property-card .listing-thumbnail img {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.glass-property-card:hover .listing-thumbnail img {
  transform: scale(1.05);
}

/* ASEGURAR QUE LAS IMÁGENES NO TENGAN BLUR */
.glass-property-card .listing-thumbnail,
.glass-property-card .listing-thumbnail * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.glass-property-card .listing-thumbnail img {
  isolation: isolate;
  z-index: 1;
}

/* ENHANCED GRID LAYOUT */
.listing-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

/* STAGGERED ANIMATION FOR GRID */
.glass-property-card.glass-float {
  opacity: 0;
  animation: slideInUp 0.6s ease-out forwards;
}

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

/* ENHANCED HOVER EFFECTS FOR LISTINGS */
.glass-property-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.glass-property-card:hover .glass-author img {
  transform: scale(1.15);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ENHANCED BADGE POSITIONS */
.glass-property-card .listing-badges {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* IMPROVED PAGINATION GLASS EFFECT */
.pagination-content .MuiPagination-root {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  display: inline-flex;
  margin: 20px auto;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 992px) {
  .listing-grid-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
  }
  
  .glass-property-card {
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .glass-property-card {
    border-radius: 20px;
  }
  
  .glass-search-form {
    padding: 20px;
    border-radius: 15px;
  }
  
  .glass-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .glass-card-body {
    padding: 20px;
  }
  
  .listing-grid-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .glass-property-card {
    margin-bottom: 15px;
  }
}

/* FLOATING ANIMATION */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.glass-float {
  animation: float 6s ease-in-out infinite;
}

/* PULSE ANIMATION */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.glass-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* GLASS TEXT IMPROVEMENTS */
.glass-card-body h5,
.glass-card-body p {
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.glass-card-body h5 {
  margin-bottom: 2px !important;
}

.glass-author p,
.glass-author span {
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.glass-author p a {
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.glass-card-body .listing-title,
.glass-card-body .listing-title a {
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  margin-bottom: 2px !important;
}

.glass-card-body .listing-text {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Estilos específicos para sobreescribir estilos inline */
.listing-body .listing-title {
  margin: 15px 0 2px 0 !important;
}

.listing-body .listing-text {
  margin: 2px 0 15px 0 !important;
}

/* Selectores más específicos para asegurar que se apliquen */
.glass-card-body h5.listing-title,
.listing-body h5.listing-title {
  margin: 15px 0 2px 0 !important;
}

.glass-card-body p.listing-text,
.listing-body p.listing-text {
  margin: 2px 0 15px 0 !important;
}

/* ICONOS DE AMENIDADES - FORZAR BLANCO */
.glass-icons .acr-listing-icon,
.glass-icons .acr-listing-icon *,
.glass-icons .glass-icon,
.glass-icons .glass-icon * {
  color: white !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
}

.glass-icons i {
  color: white !important;
  opacity: 1 !important;
}

.acr-listing-icon-value {
  color: white !important;
  font-weight: 700 !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
}

/* BOTÓN DE BÚSQUEDA PERSONALIZADO */
.search-btn-custom {
  width: 100%;
  background: linear-gradient(135deg, #D8BF82 0%, #B8956F 100%);
  border: 1px solid rgba(216, 191, 130, 0.5);
  border-radius: 16px;
  padding: 15px 25px;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.search-btn-custom:hover {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 50%, rgba(51, 65, 85, 0.7) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.5) !important;
  color: #FFFFFF !important;
  text-decoration: none !important;
}

.search-btn-custom:focus,
.search-btn-custom:active,
.search-btn-custom:visited {
  color: #FFFFFF !important;
  text-decoration: none !important;
}

/* BOTONES DE CATEGORÍAS PERSONALIZADOS */
.category-btn-custom {
  background: linear-gradient(135deg, #D8BF82 0%, #B8956F 100%);
  border: 1px solid rgba(216, 191, 130, 0.5);
  border-radius: 16px;
  padding: 15px 25px;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  cursor: pointer;
}

.category-btn-custom:hover {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 50%, rgba(51, 65, 85, 0.7) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.5) !important;
  color: #FFFFFF !important;
  text-decoration: none !important;
}

.category-btn-custom:focus,
.category-btn-custom:active,
.category-btn-custom:visited {
  color: #FFFFFF !important;
  text-decoration: none !important;
}

/* BOTÓN DE PLAY DE VIDEO PERSONALIZADO */
.video-play-btn-custom {
  background: linear-gradient(135deg, #D8BF82 0%, #B8956F 100%);
  border: 2px solid rgba(216, 191, 130, 0.5);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.video-play-btn-custom:hover {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 50%, rgba(51, 65, 85, 0.7) 100%) !important;
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.5) !important;
  color: #FFFFFF !important;
  text-decoration: none !important;
}

.video-play-btn-custom:focus,
.video-play-btn-custom:active,
.video-play-btn-custom:visited {
  color: #FFFFFF !important;
  text-decoration: none !important;
}