/* Home Page Styles */
.main-content {
  margin-top: 90px; /* updated to 90px as requested */
  min-height: 100vh;
}

/* Filter Section */
.filter-section {
  width: 100%;
  height: 615px;
  background-image: url("../../img/Header.png"); /* Update with actual background image path */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
}

/* Filter Section Title */
.filter-title {
  font-size: 48px;
  font-weight: var(--font-regular);
  color: var(--black);
  text-align: center;
  margin-top: 200px;
  line-height: 1.2;
  max-width: 600px;
  margin-bottom: 40px;
}

/* Filter Text Links */
.filter-links {
  display: flex;
  justify-content: center;
  gap: 150px;
  margin-bottom: 50px;
}

.filter-link {
  font-size: 25px;
  font-weight: var(--font-regular);
  color: var(--black);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-link.active {
  text-decoration: underline;
}

.filter-link:hover {
  text-decoration: underline;
}

/* Wrapper for link + icon */
.filter-link-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.external-link-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  touch-action: manipulation;
  color: var(--black);
}

/* Filter Block */
.filter-block {
  max-width: 1078px;
  width: 100%;
  height: 114px;
  background-color: var(--white);
  border-radius: 30px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Filter Column */
.filter-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 30px;
  position: relative;
}

/* Filter Column Separator */
.filter-col:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background-color: rgba(0, 0, 0, 0.32);
}

/* Filter Column Labels */
.filter-label {
  font-size: 20px;
  font-weight: var(--font-regular);
  color: var(--black);
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* Filter Inputs */
.filter-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--dark-gray);
  cursor: pointer;
  position: relative;
}

.filter-input::placeholder {
  color: var(--dark-gray);
  opacity: 0.7;
}

/* Date Input with Calendar Icon */
.date-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.date-input {
  width: 100%;
  padding-right: 30px;
  cursor: pointer;
}

.calendar-icon {
  position: absolute;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: pointer;
  touch-action: manipulation;
}

/* Calendar Popup Styles */
.calendar-popup {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 300px;
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  padding: 15px;
  margin-top: 5px;
}

.calendar-popup.active {
  display: block;
}

/* Entrada-specific popup styles  
.calendar-popup-entrada {
    Inherits all base calendar-popup styles  
    Add any entrada-specific styling here if needed 
}*/

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

.calendar-nav {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  touch-action: manipulation;
}

.calendar-nav:hover {
  background-color: #f0f0f0;
}

.calendar-month-year {
  font-weight: var(--font-semibold);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  user-select: none;
  touch-action: manipulation;
}

.calendar-month-year:hover {
  background-color: rgba(208, 66, 120, 0.1);
}

/* Month Selector Dropdown */
.calendar-month-selector {
  max-height: 250px;
  overflow-y: auto;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  margin: 8px 0;
}

.month-selector-list {
  display: flex;
  flex-direction: column;
}

.month-option {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: var(--font-regular);
  color: var(--black);
  transition: all 0.2s ease;
  border-radius: 4px;
  margin: 2px 8px;
  touch-action: manipulation;
}

.month-option:hover {
  background-color: rgba(208, 66, 120, 0.1);
}

.month-option.selected {
  background-color: var(--pink);
  color: var(--white);
  font-weight: var(--font-semibold);
}

/* Custom scrollbar for month selector */
.calendar-month-selector::-webkit-scrollbar {
  width: 6px;
}

.calendar-month-selector::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.calendar-month-selector::-webkit-scrollbar-thumb {
  background: var(--pink);
  border-radius: 3px;
}

.calendar-month-selector::-webkit-scrollbar-thumb:hover {
  background: #b8396a;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-day-header {
  text-align: center;
  font-size: 12px;
  font-weight: var(--font-semibold);
  color: var(--dark-gray);
  padding: 8px 4px;
  min-width: 35px;
}

.calendar-day {
  text-align: center;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
  min-width: 35px;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.calendar-day:hover {
  background-color: rgba(208, 66, 120, 0.1);
}

.calendar-day.selected {
  background-color: var(--pink);
  color: var(--white);
}

.calendar-day.other-month {
  color: #ccc;
}

.calendar-day.disabled {
  color: #ccc;
  cursor: not-allowed;
  background-color: #f5f5f5;
}

.calendar-day.disabled:hover {
  background-color: #f5f5f5;
}

/* Select Input */
/* Enhanced Select Input Styles */
.select-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Layout */
  width: 100%;
  padding: 8px 35px 8px 12px;

  /* Typography */
  font-size: 16px;
  font-weight: var(--font-regular);
  color: var(--black);
  font-family: var(--font-family-primary);
  /* Background & Border */
  background-color: transparent;
  background-image: url("../../img/Icons/arrow-down.svg");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  border: none;
  border-radius: 8px;
  outline: none;

  /* Interaction */
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Hover Effect */
.select-input:hover {
  background-color: rgba(208, 66, 120, 0.05);
}

/* Focus Effect */
.select-input:focus {
  background-color: rgba(208, 66, 120, 0.08);
  box-shadow: 0 0 0 2px rgba(208, 66, 120, 0.15);
}

/* Active/Selected State */
.select-input:active {
  background-color: rgba(208, 66, 120, 0.1);
}

/* Placeholder/Default Option Styling */
.select-input option {
  padding: 10px;
  background-color: var(--white);
  color: var(--black);
  font-weight: var(--font-regular);
  font-family: var(--font-family-primary);
  font-size: 15px;
}

/* Selected Option Styling */
.select-input option:checked {
  background-color: var(--pink);
  color: var(--white);
  font-style: italic;
}

/* Disabled State */
.select-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f5f5f5;
}

/* Custom scrollbar for dropdown (webkit browsers) */
.select-input::-webkit-scrollbar {
  width: 8px;
}

.select-input::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.select-input::-webkit-scrollbar-thumb {
  background: var(--pink);
  border-radius: 4px;
}

.select-input::-webkit-scrollbar-thumb:hover {
  background: #b8396a;
}
/* Search Button Column */
.filter-button-col {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 30px;
}

/* Search Button */
.search-button {
  width: 158px;
  height: 47px;
  border-radius: 50px;
  border: 1px solid var(--pink);
  background-color: transparent;
  color: var(--pink);
  font-size: 19px;
  font-weight: var(--font-regular);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.search-button:hover {
  background-color: var(--pink);
  color: var(--white);
}

/* Places Section: "¿Dónde Quieres Vivir?" */
.places-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px; /* vertical spacing for the section */
  box-sizing: border-box;
}

/* Title */
.places-title {
  font-size: 36px;
  font-weight: var(--font-regular);
  color: var(--black);
  text-align: center;
  margin-bottom: 30px;
}

/* Gallery container: fixed width and centered */
.places-gallery {
  width: 902px; /* as requested */
  display: grid;
  grid-template-columns: 195px 492px 195px;
  grid-auto-rows: 195px;
  gap: 10px; /* horizontal + vertical gap */
  margin: 0 auto;
  align-items: stretch;
}

/* Generic place item */
.place-item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* small and large size helpers (grid places already set) */
.place-small {
  /* occupies one grid cell 195x195 */
}
.place-large {
  /* occupies one grid cell 492x195 */
}

/* overlay to darken image and show text */
.place-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.25s ease;
  pointer-events: none;
}

/* place name */
.place-name {
  /* center horizontally & vertically inside the item */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;

  color: #fff;
  font-size: 30px;
  font-weight: 500; /* medium */
  line-height: 1;
  z-index: 2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
}

/* hover effect */
.place-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}
.place-item:hover::before {
  background: rgba(0, 0, 0, 0.35);
}

/* Actions: see all button */
.places-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.see-all-button {
  width: 158px;
  height: 47px;
  border-radius: 50px;
  border: 1px solid var(--pink);
  background-color: var(--bg-body-page);
  color: var(--pink);
  font-size: 16px;
  font-weight: var(--font-regular);
  cursor: pointer;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.see-all-button:hover {
  background-color: var(--pink);
  color: var(--white);
}

/* Flats Section */
.flats-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 60px;
  box-sizing: border-box;
}

/* Header: title and button container (moved from inline styles) */
.flats-header {
  width: 902px; /* same content width as gallery */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 0;
}

/* Flats list container (moved from inline styles) */
.flats-list {
  /* width: 902px;  align with header and gallery */
  margin: 24px auto 36px;
  display: flex;
  gap: 53px;
  justify-content: center;
  box-sizing: border-box;
}

/* Header: title and button */
.flats-title {
  font-size: 24px;
  font-weight: 500; /* medium */
  color: var(--black);
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0;
}

.flats-title-pre {
  font-weight: 500;
  color: var(--black);
}

.flats-title-high {
  color: var(--pink);
  font-weight: var(--font-semibold);
}

/* See more button */
.flats-more-button {
  width: 256px;
  height: 55px;
  border-radius: 50px;
  border: 1px solid var(--pink);
  background: var(--bg-body-page);
  color: var(--pink);
  font-size: 19px;
  font-weight: var(--font-regular);
  cursor: pointer;
  text-transform: uppercase;
}

.flats-more-button:hover {
  background: var(--pink);
  color: var(--white);
}

/* Hide bottom button by default (desktop) */
.flats-more-button-bottom {
  display: none;
}

/* Details link wrapper */
.details-link {
  text-decoration: none;
  color: inherit;
}

/* Flat cards container handled inline in markup; card styles below */
.flat-card {
  width: 377px;
  height: 316px;
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

/* Thumb image */
.flat-thumb {
  width: 100%;
  height: 225px;
  background-size: cover;
  background-position: center;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  position: relative;
  transition: background-image 0.3s ease;
}

/* Flat Thumb Navigation Arrows */
.flat-thumb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.flat-thumb-nav:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
}

.flat-thumb-nav svg {
  color: var(--black);
}

.flat-thumb-nav-prev {
  left: 10px;
}

.flat-thumb-nav-next {
  right: 10px;
}

/* Show arrows on flat-thumb hover */
.flat-thumb:hover .flat-thumb-nav {
  opacity: 1;
  visibility: visible;
}

/* Disabled state */
.flat-thumb-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.flat-thumb-nav:disabled:hover {
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
}

/* Info area */
.flat-info {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--dark-gray);
  text-align: left;
  flex: 1;
}

/* Flat Lines */
.flat-line {
  display: flex;
  align-items: center;
}

/* First Line: Owner and Price */
.flat-header {
  justify-content: space-between;
  align-items: center;
}

.flat-owner-section {
  display: flex;
  align-items: center;
  gap: 6px;
}

.owner-icon {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}

.flat-owner {
  font-size: 14px;
  font-weight: var(--font-regular);
  color: #3F3F3F;
}

.flat-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.price-value {
  color: var(--pink);
  font-weight: var(--font-semibold);
  font-size: 24px;
}

.price-unit {
  font-size: 11px;
  font-weight: var(--font-regular);
  color: #3F3F3F;
}

/* Second Line: Description */
.flat-description {
  font-size: 10px;
  font-weight: var(--font-medium);
  color: #3F3F3F;
  line-height: 1.3;
  display: block;
}

/* Third Line: Zone and Pricing Details */
.flat-footer {
  justify-content: space-between;
  align-items: center;
}

.flat-zone {
  display: flex;
  align-items: center;
  gap: 4px;
}

.zone-label {
  font-size: 13px;
  font-weight: var(--font-bold);
  color: #3F3F3F;
}

.zone-value {
  font-size: 13px;
  font-weight: var(--font-regular);
  color: #3F3F3F;
}

.pricing-details {
  display: flex;
  align-items: center;
  gap: 4px;
}

.info-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  filter: saturate(0) brightness(0.85);
}

.pricing-text {
  font-size: 10px;
  font-weight: var(--font-regular);
  color: #606060;
}

/* Map Section (placeholder for Google Maps API) */
.map-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
}
.map-container {
  width: 100%;
  height: 360px;
  background: linear-gradient(
    180deg,
    #cfffff 0%,
    #d6f5fd 100%
  ); /* placeholder look */
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

/* How It Works Section */
.how-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 100px;
  box-sizing: border-box;
}

/* Section title */
.how-title {
  font-size: 36px;
  font-weight: var(--font-semibold);
  color: var(--black);
  text-align: center;
  margin-bottom: 36px;
}

/* Grid: fixed width 991px centered, 3 equal columns */
.how-grid {
  width: 991px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
}

/* Column */
.how-col {
  background: transparent;
  text-align: center;
  padding: 0 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Icon */
.how-icon {
  /*
  width: 87px;
  height: 87px;*/
  object-fit: contain;
  margin-bottom: 18px;
  touch-action: manipulation;
}

/* Step title */
.how-step-title {
  font-size: 30px;
  font-weight: var(--font-medium);
  color: var(--black);
  max-width: 212px;
  margin: 0 0 12px;
  line-height: 1.1;
}

/* Step description (pink, regular 14, max width 277) */
.how-step-desc {
  color: var(--pink);
  font-size: 14px;
  font-weight: var(--font-regular);
  max-width: 277px;
  margin: 0;
  line-height: 1.4;
}

/* Vertical separators between columns: 137px centered */
.how-col:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -20px; /* adjusts position between columns (half of gap) */
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 137px;
  background-color: rgb(0, 0, 0);
}

/* Doubts Section */
.doubts-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 20px 60px;
  box-sizing: border-box;
}

.doubts-container {
  width: 1114px;
  height: 267px;
  background: rgba(250, 250, 250, 1);
  border-radius: 50px;
  display: flex;
  align-items: center;
  padding: 0 60px;
  box-sizing: border-box;
  box-shadow: 6px 6px 30px -1px rgba(0, 0, 0, 0.25);
}

.doubts-content {
  flex: 1;
  padding-right: 40px;
}

.doubts-title {
  font-size: 36px;
  font-weight: var(--font-semibold);
  color: var(--black);
  margin: 0 0 30px 0;
  line-height: 1.1;
}

.doubts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.doubts-item {
  font-size: 20px;
  font-weight: var(--font-medium);
  color: var(--black);
  margin-bottom: 15px;
  line-height: 1.4;
  position: relative;
  padding-left: 20px;
}

.doubts-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--black);
  font-weight: bold;
}

.doubts-item:last-child {
  margin-bottom: 0;
}

.doubts-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.whatsapp-button {
  width: 218px;
  height: 55px;
  border-radius: 50px;
  border: none;
  background-color: var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.whatsapp-button:hover {
  background-color: #b8396a;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(208, 66, 120, 0.3);
}

/**/.whatsapp-icon {
  width: 114.77px;
  height: 26.68px;
  touch-action: manipulation;

}

.contact-button {
  width: 218px;
  height: 55px;
  border-radius: 50px;
  border: 1px solid var(--pink);
  background-color: rgba(250, 250, 250, 1);
  color: var(--pink);
  font-size: 20px;
  font-weight: var(--font-medium);
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.contact-button:hover {
  background-color: var(--pink);
  color: var(--white);
}

/* FAQ Section */
.faq-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 20px 60px;
  box-sizing: border-box;
}

.faq-container {
  width: 1144px;
  min-height: 441px;
  background: #fafafa;
  border-radius: 50px;
  display: flex;
  align-items: flex-start;
  padding: 60px;
  padding-bottom: 35px;
  box-sizing: border-box;
  box-shadow: 6px 6px 30px -1px rgba(0, 0, 0, 0.25);
}

.faq-left {
  width: 300px;
  margin-right: 60px;
}

.faq-title {
  font-size: 64px;
  font-weight: var(--font-regular);
  color: var(--black);
  margin: 0 0 15px 0;
  line-height: 1;
}

.faq-subtitle {
  font-size: 20px;
  font-weight: var(--font-light);
  color: var(--pink);
  margin: 0;
  line-height: 1.2;
}

.faq-right {
  flex: 1;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid #b4b4b4;
  padding: 20px 0;
}

.faq-item:first-child {
  /* First FAQ item is open by default */
}

.faq-item:first-child .faq-answer {
  max-height: none; /* Allow content to show by default */
  margin-top: 15px;
}

.faq-item:first-child.faq-item--open .faq-answer {
  /* Ensure proper styling when programmatically opened */
  margin-top: 15px;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.faq-question:hover {
  opacity: 0.7;
}

.faq-question-text {
  font-size: 16px;
  font-weight: var(--font-semibold);
  color: var(--black);
  line-height: 1.4;
  margin-right: 20px;
}

.faq-arrow {
  flex-shrink: 0;
  color: var(--black);
  transition: transform 0.3s ease;
}

.faq-item.faq-item--open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 0;
}

.faq-item--open .faq-answer {
  margin-top: 15px;
}

.faq-answer p {
  font-size: 16px;
  font-weight: var(--font-light);
  color: var(--pink);
  margin: 0;
  line-height: 1.5;
}
