/* ================================================
   PORTADA INMOBILIARIA - DISEÑO MODERNO MINIMALISTA
   ================================================ */

.aim-portada {
  width: 100%;
}

.aim-container {
  max-width: 1200px;
  margin: 0 auto;
}

.aim-container h2 {
  margin-bottom: 73px;
  color: #222;
}

/* ===== ESTADÍSTICAS API - HORIZONTAL ===== */

.aim-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.aim-stat-card {
  background: #fff;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.aim-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.aim-stat-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aim-icon-orange {
  background: linear-gradient(135deg, #f16901 0%, #ff8534 100%);
  color: #fff;
}

.aim-icon-dark {
  background: linear-gradient(135deg, #222 0%, #444 100%);
  color: #fff;
}

.aim-stat-icon svg {
  width: 28px;
  height: 28px;
}

.aim-stat-number {
  font-size: 48px;
  font-weight: 700;
  color: #222;
  margin-bottom: 12px;
  line-height: 1;
}

.aim-stat-number::after {
  content: "+";
  color: #f16901;
  margin-left: 2px;
}

.aim-stat-label {
  color: #666;
  line-height: 1.5;
  font-weight: 400;
}

/* ===== BADGES Y RANKING ===== */
.aim-badges-section {
  padding: 60px 0;
  background: #fff;
}

.aim-badges-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 85px;
}

.aim-badge {
  background: #fff;
  border-radius: 0px;
  padding: 28px 75px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.aim-badge:hover {
  background: #fff;
  border-color: #f16901;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(241, 105, 1, 0.1);
}

.aim-badge-emoji {
  font-size: 42px;
  line-height: 1;
}

.aim-badge-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aim-badge-text strong {
  /* font-size: 37px; */
  color: #f16901;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.aim-badge-text span {
  color: #666;
  line-height: 1.4;
}

.aim-ranking-wrapper {
  text-align: center;
}

.aim-ranking-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: #222;
  color: #fff !important;
  text-decoration: none;
  font-weight: 100;
  border-radius: 0px;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.aim-ranking-btn:hover {
  background: #f16901;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(241, 105, 1, 0.25);
}

.aim-ranking-btn svg {
  transition: transform 0.3s ease;
}

.aim-ranking-btn:hover svg {
  transform: translateX(4px);
}

/* ===== RESEÑAS GOOGLE ===== */
.aim-reviews-section {
  padding: 60px 0;
  text-align: center;
}

.aim-reviews-box {
  background: #fff;
  border-radius: 0px;
  padding: 60px 40px;
  text-align: center;
  /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);*/
  background: #fff;
  border-radius: 0px;
  padding: 12px 0;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
}

.aim-reviews-number {
  font-size: 88px;
  font-weight: 800;
  background: linear-gradient(135deg, #f16901 0%, #ff8534 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.aim-reviews-number::before {
  content: "+";
}

.aim-reviews-text {
  font-size: 33px;
  color: #222;
  font-weight: 500;
  margin: 0;
}

/* ===== VIDEOS TESTIMONIOS ===== */
.aim-videos-section {
  /*padding: 80px 0 100px;*/
}

.aim-videos-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: #222;
  margin: 0 0 50px;
  letter-spacing: 0.5px;
}

.aim-slider-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.aim-videos-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  flex: 1;
}

.aim-video-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 9/16;
  cursor: pointer;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.aim-video-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aim-video-item:hover {
  transform: scale(1.03);
}

.aim-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: #f16901;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(241, 105, 1, 0.4);
}

.aim-play-btn::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #f16901;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.aim-play-btn:hover {
  background: #d55a00;
  transform: translate(-50%, -50%) scale(1.15);
}
.aim-video-item:hover .aim-play-btn {
  background: rgba(241, 105, 1, 0.95);
  transform: translate(-50%, -50%) scale(1.1);
}

.aim-arrow {
  background: #fff;
  border: 2px solid #222;
  color: #222;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.aim-arrow:hover {
  background: #222;
  color: #fff;
  transform: scale(1.08);
}

.aim-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.aim-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.aim-dots span.active {
  background: #f16901;
  width: 32px;
  border-radius: 5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .aim-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .aim-videos-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .aim-stats-section {
    padding: 60px 0;
  }

  .aim-stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .aim-stat-card {
    padding: 28px 20px;
  }

  .aim-stat-number {
    font-size: 42px;
  }

  .aim-badges-row {
    grid-template-columns: 1fr;
  }

  .aim-reviews-number {
    font-size: 64px;
  }

  .aim-reviews-text {
    font-size: 18px;
  }

  .aim-videos-title {
    font-size: 26px;
  }

  .aim-videos-container {
    grid-template-columns: 1fr;
  }

  .aim-arrow {
    display: none;
  }

  .aim-slider-wrap {
    gap: 0;
  }
}

/* TESTIMONIOS EN VIDEO */
.aim-video-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.aim-modal {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.aim-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.aim-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.aim-close:hover {
  color: #f16901;
}

#aimVideoPlayer {
  width: 100%;
  max-height: 90vh;
  border-radius: 12px;
}

.aim-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: #f16901;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(241, 105, 1, 0.4);
}

.aim-play-btn:hover {
  background: #d55a00;
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 6px 20px rgba(241, 105, 1, 0.6);
}

/* Arreglo Estrellas de previas a ranking */
@media (max-width: 1050px) {
  .aim-badge {
    display: block;
  }
  .aim-badge-text {
    text-align: center;
  }
}

/* ===== NUEVO CSS IMAGENES INICIO ===== */

.aim-departments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: -1rem;
  margin-bottom: 7rem !important;
}

.aim-department-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.aim-department-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: brightness(0.9) grayscale(0); /* Más oscuro por defecto */
  display: flex;
  align-items: center;
  justify-content: center;
}

.aim-department-card:hover .aim-department-image {
  transform: scale(1.08);
  filter: brightness(0.9) grayscale(0); /* Más claro al hacer hover */
}

.aim-department-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  transition: background 0.4s ease;
}

.aim-department-card:hover .aim-department-overlay {
  background: rgba(0, 0, 0, 0.1); /* Más transparente al hacer hover */
}

.aim-department-title {
  color: #ffffff !important; /* Blanco por defecto */
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1.4;
  margin-bottom: 30px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); /* Sombra más pronunciada */
  transform: translateY(0);
  transition: transform 0.4s ease, color 0.3s ease;
}

.aim-department-card:hover .aim-department-title {
  transform: translateY(-8px);
  color: #ffffff; /* Se mantiene blanco en hover */
}

.aim-department-btn {
  display: inline-block;
  padding: 14px 40px;
  background-color: rgba(255, 255, 255, 0.95);
  color: #2c2c2c;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1.2px;
  transition: all 0.3s ease;
  opacity: 0.9;
  transform: translateY(10px);
  border: none;
}

.aim-department-card:hover .aim-department-btn {
  opacity: 1;
  transform: translateY(0);
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Hover específico del botón */
.aim-department-btn:hover {
  background-color: #f16901 !important;
  color: #ffffff !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .aim-departments-section {
    padding: 40px 0;
  }

  .aim-departments-grid {
    margin: 0 auto;
    margin-top: -11rem;
    margin-bottom: 0rem !important;
  }

  .aim-departments-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 20px;
  }

  .aim-department-title {
    font-size: 20px;
    letter-spacing: 1.2px;
    margin-bottom: 25px;
  }

  .aim-department-btn {
    padding: 12px 32px;
    font-size: 13px;
  }

  .aim-videos-section {
    padding: 20px;
  }

}

@media (max-width: 480px) {
  .aim-departments-section {
    padding: 30px 0;
  }

  .aim-department-title {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .aim-department-btn {
    padding: 10px 28px;
    font-size: 12px;
  }

  .aim-department-overlay {
    padding: 20px;
  }
}