/**
 * TwinsRealEstate - Property Info Components Styles
 * Styles for description, features, specifications, and highlights
 */

/* Property Description Component */
.property-description {
  padding: 0;
  color: var(--property-text);
  line-height: var(--font-body-line-height);
  font-size: var(--font-body);
  font-family: var(--font-family-body, 'Poppins', sans-serif);
}

.property-description p {
  margin-bottom: 1rem;
}

/* Property Highlights */
.property-highlights {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--property-border);
}

.highlight-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.highlight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
}

.highlight-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.highlight-list li i {
  color: var(--success-color);
  font-size: 1rem;
}

/* Features Component */
.features-container {
  padding: 0;
  width: 100%;
}

/* Compact mode for many features - Still readable and polished */
.features-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(clamp(65px, 7vw, 85px), 1fr));
  gap: clamp(0.4rem, 1.2vw, 0.6rem);
}

.features-grid--compact .feature-item {
  padding: clamp(0.4rem, 1vw, 0.6rem) clamp(0.3rem, 0.8vw, 0.45rem);
  gap: clamp(0.2rem, 0.6vw, 0.35rem);
  min-height: clamp(60px, 8.5vw, 80px);
}

.features-grid--compact .feature-icon {
  width: clamp(20px, 3vw, 28px);
  height: clamp(20px, 3vw, 28px);
}

.features-grid--compact .feature-icon i {
  font-size: clamp(0.6rem, 1vw, 0.75rem);
}

.features-grid--compact .feature-text {
  font-size: clamp(0.5rem, 0.9vw, 0.65rem);
  line-height: clamp(1.15, 1.25vw, 1.3);
}

/* Features Grid - Smart Responsive Design with Better Proportions */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(70px, 8vw, 90px), 1fr));
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
  padding: clamp(0.75rem, 2vw, 1.25rem) 0;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 0.8vw, 0.4rem);
  padding: clamp(0.5rem, 1.2vw, 0.75rem) clamp(0.35rem, 1vw, 0.5rem);
  background-color: var(--color-background-secondary);
  border-radius: clamp(6px, 1.2vw, 8px);
  border: 1px solid var(--property-border);
  transition: all var(--transition-base) var(--ease-in-out);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  min-height: clamp(65px, 9vw, 85px);
  aspect-ratio: 1;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle background gradient on hover for depth */
.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(var(--accent-color-rgb, 212, 175, 55), 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-base) var(--ease-in-out);
  pointer-events: none;
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-color);
  background-color: var(--color-background);
}

.feature-item:hover::before {
  opacity: 1;
}

.amenity-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-color);
  background-color: var(--color-background);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(24px, 3.5vw, 32px);
  height: clamp(24px, 3.5vw, 32px);
  background: linear-gradient(135deg, rgba(var(--accent-color-rgb, 212, 175, 55), 0.12) 0%, rgba(var(--accent-color-rgb, 212, 175, 55), 0.08) 100%);
  border-radius: clamp(6px, 1vw, 8px);
  flex-shrink: 0;
  margin-bottom: clamp(0.15rem, 0.5vw, 0.3rem);
  transition: all var(--transition-base) var(--ease-in-out);
  position: relative;
  z-index: 1;
}

.feature-item:hover .feature-icon {
  background: linear-gradient(135deg, rgba(var(--accent-color-rgb, 212, 175, 55), 0.2) 0%, rgba(var(--accent-color-rgb, 212, 175, 55), 0.15) 100%);
  transform: scale(1.1);
}

.feature-icon i {
  color: var(--accent-color);
  font-size: clamp(0.65rem, 1.2vw, 0.85rem);
  width: auto;
  text-align: center;
  transition: transform var(--transition-base) var(--ease-in-out);
}

.feature-item:hover .feature-icon i {
  transform: scale(1.15);
}

.feature-text {
  font-weight: var(--font-weight-medium, 500);
  font-size: clamp(0.55rem, 1vw, 0.7rem);
  line-height: clamp(1.2, 1.3vw, 1.35);
  flex: 1;
  min-width: 0;
  color: var(--property-text);
  font-family: var(--font-family-body, 'Poppins', sans-serif);
  text-align: center;
  word-break: break-word;
  position: relative;
  z-index: 1;
  padding: 0 clamp(0.1rem, 0.5vw, 0.2rem);
}

.features-divider {
  height: 1px;
  background-color: var(--property-border);
  margin: var(--space-lg) 0;
}

.features-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.amenities-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.5rem;
  padding: 1rem 0;
}

.amenity-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.375rem 0.25rem;
  background-color: var(--color-background-secondary);
  border-radius: 6px;
  border: 1px solid var(--property-border);
  font-size: 0.65rem;
  font-family: var(--font-family-body, 'Poppins', sans-serif);
  min-height: 60px;
  aspect-ratio: 1.2;
  text-align: center;
  transition: var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.amenity-item i {
  color: var(--accent-color);
  font-size: 0.7rem;
  width: auto;
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 0.125rem;
}

.amenity-item span {
  font-size: 0.65rem;
  line-height: 1.2;
  color: var(--property-text);
  word-break: break-word;
  text-align: center;
}

.no-features {
  padding: 0 1.5rem 1.5rem;
  color: var(--color-text-secondary);
  font-style: italic;
  text-align: center;
  margin: 2rem 0;
}

/* Property specifications component */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1.25rem;
}

/* ========================================================================
   PROPERTY SPECIFICATIONS - RESPONSIVE POSITIONING
   ======================================================================== */

/* Desktop (992px+): Specs in Main Content (Hide from Sidebar) */
@media (min-width: 992px) {
  .specs-section-main {
    display: block;
  }
  
  .specs-section-sidebar {
    display: none;
  }
  
  /* Remove nested card styling in main content - parent handles it */
  .specs-section-main .specs-card {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  
  .specs-section-main .property-card {
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }
  
  /* Remove nested card styling - parent .property-section-card handles all styling */
  .specs-section-main .specs-card {
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  
  .specs-section-main .property-card {
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  
  /* CRITICAL: Disable all hover effects on nested cards */
  /* Only the parent .property-section-card should have hover effects */
  .specs-section-main .specs-card:hover,
  .specs-section-main .property-card:hover,
  .specs-section-main .specs-card:focus,
  .specs-section-main .property-card:focus {
    transform: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
    background: transparent !important;
  }
}

/* Tablet & Mobile (<992px): Specs in Sidebar (Hide from Main Content) */
@media (max-width: 991px) {
  .specs-section-main {
    display: none;
  }
  
  .specs-section-sidebar {
    display: block;
  }
}

/* Styling for specs in main content */
.specs-section-main .card-title {
  font-family: var(--font-family-heading, 'Playfair Display', serif);
  font-size: var(--font-heading);
  font-weight: var(--font-weight-bold, 700);
  line-height: var(--font-heading-line-height);
  color: var(--property-text);
  margin: 0 0 var(--space-md) 0;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--property-border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.specs-section-main .card-title i {
  color: var(--property-accent);
  font-size: 1.2em;
}

.specs-section-main .property-price-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--property-border);
  padding: 0 0 var(--space-md) 0;
  margin: 0 0 var(--space-md) 0;
}

.specs-section-main .property-price-header .card-title {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
  flex: 1;
}

.specs-section-main .specs-price {
  text-align: right;
  flex-shrink: 0;
}

.specs-section-main .specs-list {
  margin-top: 0;
}

.specs-section-main .cta-button {
  margin-top: var(--space-lg);
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.2s ease;
}

.spec-item:hover {
  transform: translateY(-2px);
}

.spec-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(var(--primary-color-rgb), 0.1);
  border-radius: 50%;
  color: var(--primary-color);
}

.spec-icon i {
  font-size: 1rem;
}

.spec-content {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.spec-value {
  font-weight: 600;
  color: var(--color-text);
}

/* Responsive Adjustments - Ensure 4+ columns on all screen sizes */
@media (max-width: 992px) {
  .specs-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Responsive Breakpoints - Fluid scaling with smart breakpoints */

/* Large Desktop (1200px+) - Optimal spacing */
@media (min-width: 1200px) {
  .features-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.75rem;
  }
  
  .amenities-list {
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 0.75rem;
  }
}

/* Desktop (992px - 1199px) - Comfortable sizing */
@media (min-width: 992px) and (max-width: 1199px) {
  .features-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.65rem;
  }
  
  .amenities-list {
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 0.65rem;
  }
}

/* Tablet (768px - 991px) - Balanced sizing */
@media (min-width: 768px) and (max-width: 991px) {
  .features-grid,
  .amenities-list {
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 0.6rem;
  }
  
  .features-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.5rem;
  }
}

/* Mobile (576px - 767px) - Compact but readable */
@media (max-width: 767px) {
  .features-grid,
  .amenities-list {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.5rem;
    padding: clamp(0.5rem, 1.5vw, 0.75rem) 0;
  }
  
  .features-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 0.45rem;
  }
  
  .feature-item {
    min-height: clamp(65px, 10vw, 75px);
  }
}

/* Small Mobile (< 576px) - Optimized for small screens */
@media (max-width: 576px) {
  .features-grid,
  .amenities-list {
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 0.45rem;
    padding: clamp(0.5rem, 1.5vw, 0.75rem) 0;
  }
  
  .features-grid--compact {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }
  
  .feature-item {
    min-height: clamp(60px, 12vw, 70px);
  }
  
  /* Ensure text remains readable on very small screens */
  .feature-text {
    font-size: clamp(0.5rem, 1.1vw, 0.65rem);
    line-height: 1.25;
  }
  
  .specs-grid,
  .highlight-list {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* Very Small Mobile (< 375px) - Extra compact */
@media (max-width: 375px) {
  .features-grid,
  .amenities-list {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.4rem;
  }
  
  .features-grid--compact {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }
  
  .feature-item {
    min-height: clamp(58px, 13vw, 68px);
  }
}

/* Dark Mode Styles */
html[data-theme="dark"] .property-description {
  color: var(--color-text-primary);
}

html[data-theme="dark"] .highlight-title,
html[data-theme="dark"] .features-subtitle {
  color: var(--color-text-primary);
}

html[data-theme="dark"] .highlight-list li i {
  color: var(--success-color);
}

html[data-theme="dark"] .property-highlights,
html[data-theme="dark"] .features-divider {
  border-color: var(--color-dark-border);
}

html[data-theme="dark"] .feature-item {
  background-color: var(--color-dark-bg-lighter);
  border-color: var(--color-dark-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .feature-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-color);
}

html[data-theme="dark"] .feature-icon {
  background-color: rgba(var(--accent-color-rgb, 0, 123, 255), 0.2);
}

html[data-theme="dark"] .feature-icon i,
html[data-theme="dark"] .amenity-item i {
  color: var(--accent-color);
}

html[data-theme="dark"] .feature-text,
html[data-theme="dark"] .amenity-item span {
  color: var(--color-text-primary-light);
}

html[data-theme="dark"] .spec-icon {
  background-color: rgba(var(--primary-color-rgb), 0.3);
  color: var(--accent-color);
}

html[data-theme="dark"] .spec-label {
  color: var(--color-dark-text-secondary);
}

html[data-theme="dark"] .spec-value {
  color: var(--color-text-primary);
}

html[data-theme="dark"] .no-features {
  color: var(--color-dark-text-secondary);
}
