/* ========================================
   BRAITEC PROPERTY LISTINGS - COMPLETE CSS
   Desktop + Mobile Responsive
   ======================================== */

/* Ensure all parent containers support sticky positioning */
body,
.page-content,
#property-list,
.propiedades-main-container {
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    height: auto !important;
    position: relative;
}

/* Strengthen the sticky positioning */
.propiedades-right-panel {
    flex: 1;
    position: sticky !important;
    top: 100px !important;
    height: fit-content;
    min-width: 0;
    align-self: flex-start;
    z-index: 10;
}

body {
  font-family: system-ui, sans-serif;
  background: white;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.search-bar {
  display: flex;
  justify-content: space-between;
  gap: 0px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  align-items: center;
  flex-wrap: wrap;
}

.search-field {
  position: relative;
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  background: transparent;
  border-radius: 16px;
  padding: 8px 12px;
}

.search-field select:focus,
.search-field input:focus {
  outline: none;
  border: 1px solid #BA930C;
  box-shadow: 0 0 0 2px rgba(186, 147, 12, 0.3);
}

.search-field select,
.search-field input {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid white;
  border-radius: 6px;
  background-color: transparent;
  color: white;
  width: 280px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px 16px;
}

.search-button {
  padding: 0.75rem 3.5rem;
  background-color: black;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-right: 50px;
}

.full-width {
  flex: 2 1 300px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: black;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px;
  overflow: hidden;
}

.navbarindex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  background-color: transparent;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1000;
  height: 80px;
  overflow: hidden;  
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
}

.logo img {
  height: 250px;
  width: auto;
  display: block;
  max-height: 100%;
  margin-top: 15px;
  padding-left: 100px;
}

.logo-index img {
  height: 250px;
  width: auto;
  display: block;
  max-height: 100%;
  padding-left: 113px;
  margin-top: 46px;
}

.hamburger {
  display: none;
  margin-left: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 10rem;
  font: roboto;
  padding-right: 100px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 50;
  font-size: 14px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #BA930C;
}

.nav-links-index {
  list-style: none;
  display: flex;
  gap: 10rem;
  font: roboto;
  padding-right: 164px;
  margin-top: 14px;
  margin-right: -12px;
}

.nav-links-index a {
  color: white;
  text-decoration: none;
  font-weight: 50;
  font-size: 14px;
  transition: color 0.3s ease;
}

.nav-links-index a:hover {
  color: #BA930C;
}

 .hamburger,
  .menu-toggle { display:none; }

  /* Your existing desktop layouts can stay in main.css.
     If needed, ensure both ULs are inline-row on desktop: */
  .nav-links-index,
  .nav-links {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: flex;
    gap: 10rem;        /* match your desktop spacing */
    background: none;
    padding: 0;
    
  }

  .nav-links-index {
    margin-top: 32px !important;
    margin-right: 12px !important;
  }


h1 {
  text-align: center;
  margin-top: 32px;
}

/* Property List Container */
#property-list {
  background-color: #f7f7f7;
  padding-top: 10px;
  max-width: 1800px;
  margin: 0 auto;
  display: block;
}

#property-container {
  display: block;
  padding: 40px 20px 80px 40px;
}

/* Main Property Layout */
.propiedades-main-container {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  max-width: 1800px;
  margin: 0 auto;
  padding: 20px;
}

.propiedades-left-panel {
  flex: 0 0 55%;
  min-width: 0;
}

.propiedades-right-panel {
  flex: 1;
  position: sticky !important; 
  top: 100px;
  height: fit-content;
  min-width: 0;
  align-self: flex-start;
}

/* Property Cards */
.property-card {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 250px;
  margin: 20px auto 20px 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.property-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.property-card.selected {
  border-left: 4px solid #BA930C;
  background: #f8f9fa;
}

.property-card.selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid #BA930C;
  border-radius: inherit;
  pointer-events: none;
}

.property-image-container {
  width: 40%;
  height: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.property-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.property-info {
  width: 100%;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.property-title {
  font-size: 17px;
  font-weight: bold;
  margin: 0 0 5px;
}

.property-location {
  font-size: 13px;
  color: #777;
  margin: 0 0 8px;
}

.property-description {
  font-size: 12px;
  color: #555;
  margin-bottom: 10px;
}

.property-details {
  display: flex;
  gap: 15px;
  font-size: 13px;
  margin-bottom: 8px;
}

.property-price {
  font-size: 17px;
  color: #BA930C;
  font-weight: 500;
}

.property-btn-black {
  display: inline-block;
  background-color: #000;
  color: #fff;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: regular;
  border-radius: 4px;
  margin-top: auto;
  margin-right: 5px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  font-size: 13px;
  align-self: flex-start;
  margin-bottom: 25px;
}

.property-btn-black:hover {
  background-color: #333;
}

.property-card img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 10px;
}

.property-card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

/* Property Preview Card */
.property-preview-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
  max-height: 650px;
}

.property-preview-card.active {
  opacity: 1;
  transform: translateY(20px);
}

.property-preview-card.loading {
  opacity: 0.7;
}

.preview-map-container {
  height: 320px;
  background: #f5f5f5;
  position: relative;
}

.preview-map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #666;
  font-size: 14px;
}

.preview-content {
  padding: 30px;
}

.preview-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #333;
  line-height: 1.3;
}

.preview-address {
  color: #666;
  font-size: 16px;
  margin: 0 0 16px 0;
}

.preview-description {
  color: #777;
  font-size: 16px;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.preview-details {
  display: flex;
  gap: 30px;
  margin: 0 0 20px 0;
}

.preview-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #555;
}

.preview-detail-item strong {
  color: #333;
  font-size: 18px;
}

.preview-price {
  font-size: 24px;
  font-weight: 700;
  color: #BA930C;
  margin: 0 0 20px 0;
}

.preview-btn {
  background: #000;
  color: white;
  padding: 16px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 17px;
  display: inline-block;
  transition: background 0.2s ease;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.preview-btn:hover {
  background: #333;
}

.preview-placeholder {
  text-align: center;
  padding: 120px 30px;
  color: #666;
}

.preview-placeholder-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.3;
}

.preview-placeholder p {
  font-size: 16px;
  line-height: 1.4;
}

/* Loading Animation */
.preview-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #2c5aa0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

.property-details-main {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
  width: 100%;
}

.property-details-container {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 60px;
  margin-bottom: 40px;
  align-items: start;
}

.property-details-left {
  min-width: 0;
}

.property-details-title {
  font-size: 24px;
  font-weight: bold;
  margin: 0 0 8px 0;
  color: #333;
  text-transform: uppercase;
  text-align: left;
}

.property-details-subtitle {
  font-size: 16px;
  color: #666;
  margin: 0 0 24px 0;
}

.property-description {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 24px;
}

.description-toggle {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  text-decoration: underline;
  font-size: 14px;
  padding: 0;
  margin-top: 8px;
}

.amenities-section {
  margin-bottom: 30px;
}

.amenities-section h3 {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 12px 0;
  color: #333;
}

.amenities-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.amenities-list li {
  font-size: 14px;
  color: #555;
  position: relative;
  padding-left: 8px;
}

.amenities-list li:before {
  content: '•';
  position: absolute;
  left: 0;
  color: #333;
}

.property-details-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.price-contact-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border: 1px solid #eee;
  height: fit-content;
}

.price-section {
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.price-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.price-amount {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.maintenance-fee {
  font-size: 14px;
  color: #666;
  margin-top: 8px;
}

.contact-form {
  margin-top: 20px;
}

.contact-form h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.form-group {
  margin-bottom: 15px;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #25D366;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.1);
}

.form-control::placeholder {
  color: #999;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 12px;
}

.btn-submit:hover {
  background-color: #333;
}

.btn-credit {
  width: 100%;
  padding: 12px;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-credit:hover {
  background-color: #333;
}

.btn-whatsapp {
  width: 100%;
  background-color: #25D366;
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  margin-top: 10px;
}

.btn-whatsapp:hover {
  background-color: #128C7E;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp i {
  font-size: 18px;
}

.form-control.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

.error-message {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.details-grid {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 32px;
  margin-top: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.details-grid h3 {
  font-size: 22px;
  font-weight: bold;
  margin: 0 0 24px 0;
  color: #333;
}

.details-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px 32px;
}

.detail-item {
  font-size: 15px;
  color: #555;
  padding: 8px 0;
}

.detail-item strong {
  color: #333;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.map-section {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 32px;
  margin-top: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.map-section h3 {
  font-size: 22px;
  font-weight: bold;
  margin: 0 0 24px 0;
  color: #333;
}

.map-container {
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
  background: #f5f5f5;
}

.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #666;
  font-size: 16px;
}

.map-address {
  padding: 16px 0;
  border-top: 1px solid #e9ecef;
}

.map-address p {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: #555;
}

.map-address p:last-child {
  margin-bottom: 0;
}

/* Pagination */
#pagination {
  display: flex;
  justify-content: left;
  margin: 30px 40px 40px;
  gap: 8px;
  flex-wrap: wrap;
}

#pagination button {
  padding: 6px 12px;
  background-color: #f1f1f1;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  color: #333;
  transition: background-color 0.2s ease;
}

#pagination button:hover:not(:disabled) {
  background-color: #ddd;
}

#pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#pagination .active-page {
  background-color: #BA930C;
  color: white;
}

.page-content {
  padding: 20px 0;
}

.pagination {
  margin-top: 2rem;
  display: flex;
  gap: 10px;
}

.pagination-link {
  padding: 5px 10px;
  border: 1px solid #ccc;
  text-decoration: none;
  color: #333;
}

.pagination-link.active {
  background-color: black;
  color: white;
  font-weight: bold;
}

/* Filters */
.propiedades-filters {
  max-width: 1800px;
  margin: 20px auto 30px auto;
  padding: 20px 50px 20px 50px;
  background: #f7f7f7;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border-radius: 12px;
}

.propiedades-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.propiedades-form label {
  font-weight: bold;
  margin-right: 10px;
}

.propiedades-form input,
.propiedades-form select {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: white;
  color: black;
  flex: 0 1 155px;
  max-width: 170px;
  min-width: 180px;
}

.propiedades-form input::placeholder {
  color: black;
  opacity: 1;
}

.propiedades-form input::-webkit-input-placeholder {
  color: black;
}

.propiedades-form input:-moz-placeholder {
  color: black;
  opacity: 1;
}

.propiedades-form input::-moz-placeholder {
  color: black;
  opacity: 1;
}

.propiedades-form input:-ms-input-placeholder {
  color: black;
}

.search-field input::placeholder {
  color: white;
  opacity: 1;
}

.search-field input::-webkit-input-placeholder {
  color: white;
}

.search-field input:-moz-placeholder {
  color: white;
  opacity: 1;
}

.search-field input::-moz-placeholder {
  color: white;
  opacity: 1;
}

.search-field input:-ms-input-placeholder {
  color: white;
}

.apply-btn {
  padding: 0.75rem 1.5rem;
  background-color: black;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.clear-btn {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: black;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.propiedades-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="12" viewBox="0 0 24 24" width="12" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 30px;
}

.propiedades-header-bar {
  max-width: 1800px;
  margin: 20px auto 10px auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
}

.propiedades-count-sort {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
}

.propiedades-title-group {
  flex-grow: 1;
}

.propiedades-page-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 6px;
}

.propiedades-subcount {
  margin: 0;
  font-size: 15px;
  color: #555;
}

.propiedades-sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.custom-multiselect {
  position: relative;
  width: 100%;
  max-width: 180px;
}

.multiselect-trigger {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="12" viewBox="0 0 24 24" width="12" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding: 11px;
  cursor: pointer;
  font-size: 14px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: Arial, Helvetica, sans-serif;
}

.multiselect-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  background-color: white;
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.multiselect-options label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.custom-multiselect.open .multiselect-options {
  display: block;
}

.bottomfilters {
  display: flex;
  justify-content: space-between;
  gap: 858px;
  padding-left: 75px;
}

.orderfilterwrapper {
  flex: 1;
  min-width: 215px;
}

.orderfilterwrapper select {
  width: 100%;
  max-width: 300px;
}

.sort-label {
  font-size: 14px;
  font-weight: bold;
}

#sort-by {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.actionbuttons {
  display: flex;
  gap: 10px;
  width: 180px !important; /* Match the max-width of Recámaras input */
  flex-shrink: 0;
}

.actionbuttons .apply-btn,
.actionbuttons .clear-btn {
  flex: 1;
  padding: 0.75rem 0.5rem !important; /* Reduced horizontal padding */
  font-size: 0.8rem !important; /* Slightly smaller font to fit */
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box !important;
  white-space: nowrap;
}

.actionbuttons .apply-btn {
  background-color: black !important;
  color: white !important;
  border: none !important;
}

.actionbuttons .clear-btn {
  background-color: transparent !important;
  color: black !important;
  text-decoration: none !important;
  border: 1px solid #ccc !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}


/* Hero Section */
.herosectionindex {
  height: 100vh;
  background-image: url(assets/image\ 1.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  color: white;
  padding: 0 2rem;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
  text-align: left;
}

.hero-content .highlight {
  color: #BA930C;
}

.hero-search-form {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 8px;
  backdrop-filter: blur(6px);
}

.hero-search-form input[type="text"] {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid white;
  border-radius: 6px;
  background-color: transparent;
  color: white;
  width: 280px;
}

.hero-search-form select {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid white;
  border-radius: 6px;
  background-color: transparent;
  color: white;
  width: 280px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px 16px;
}

.hero-search-form select:focus {
  outline: none;
  border: 1px solid #BA930C;
  box-shadow: 0 0 0 2px rgba(186, 147, 12, 0.3);
}

.hero-search-form button {
  padding: 0.75rem 3.5rem;
  background-color: black;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hero-search-form button:hover {
  background-color: #333;
}

.hero-search-form input[type="text"]:focus {
  outline: none;
  border: 1px solid #BA930C;
  box-shadow: 0 0 0 2px rgba(186, 147, 12, 0.3);
}

.location-cards {
  height: 100vh;
  background-color: white;
}

/* Card Hover Effects */
.location-card,
.property-types div,
.investment-types div {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.location-card img,
.property-types div img,
.investment-types div img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.location-card h3,
.property-types div h3,
.investment-types div h3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
  z-index: 2;
}

/* Hover effects only apply to the hovered card */
.location-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.casas:hover img {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.departamentos:hover img {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.oficinas:hover img {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.terrenos:hover img {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.tecnologia:hover img {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.bienes-raices img {
  object-fit: cover;
  object-position: center;
}

.bienes-raices:hover img {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* Animate text (levitation effect) on hover */
.location-name {
  transform: translate(-50%, -80%);
}

/* Detail Page Styles */
.detalle-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 100px;
}

.detalle-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

.detalle-galeria {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.detalle-thumb {
  width: 120px;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
}

.volver-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 12px;
  background-color: #eee;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  max-width: 140px;
}

.volver-btn:hover {
  background-color: #ddd;
}

.image-gallery {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  flex: 1;
}

.gallery-thumbs img.thumb {
  width: 100%;
  cursor: pointer;
  object-fit: cover;
  height: 120px;
}

.gallery-layout {
  display: flex;
  gap: 10px;
  height: 550px;
  align-items: stretch;
  margin-bottom: 70px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  
}

.main-image {
  width: 550px;
  height: 600px;
  flex-shrink: 0;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.main-image img:hover {
  transform: scale(1.01);
}

.thumbnail-grid {
  width: 670px;
  height: 600px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  flex-shrink: 0;
}

.thumbnail-grid a {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.thumbnail-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.thumbnail-grid img:hover {
  transform: scale(1.03);
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  left: 0; 
  top: 0;
  width: 100%; 
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
}

.close {
  position: absolute;
  top: 30px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -30px;
  padding: 16px;
  color: white;
  font-size: 30px;
  user-select: none;
}

.prev { left: 0; }
.next { right: 0; }

/* --------------------------------
   SOCIAL ICONS FIX
-----------------------------------*/
.social-icons {
  display: flex !important;
  justify-content: center !important;
  gap: 20px !important;
  margin-bottom: 20px !important;
}

.social-icons a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 50px !important;
  height: 50px !important;
  border: 2px solid white !important;
  border-radius: 50% !important;
  transition: all 0.3s ease !important;
  background-color: transparent !important;
  text-decoration: none !important;
  position: relative !important;
}

.social-icons a:hover {
  background-color: white !important;
  transform: translateY(-2px) !important;
}

.social-icons img {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;
  transition: filter 0.3s ease !important;
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  padding: 0 !important;
}

.social-icons a:hover img {
  filter: invert(1) !important;
}

/* Ensure images load properly */
.social-icons a[href*="facebook"] img {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/%3E%3C/svg%3E") !important;
}

.social-icons a[href*="tiktok"] img {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z'/%3E%3C/svg%3E") !important;
}

.social-icons a[href*="instagram"] img {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z'/%3E%3C/svg%3E") !important;
}

/* Fallback for when CDN images don't load properly */
.social-icons a[href*="facebook"]::before {
  content: "f" !important;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: bold !important;
  font-size: 20px !important;
  color: white !important;
  display: none !important;
}

.social-icons a[href*="tiktok"]::before {
  content: "♪" !important;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: bold !important;
  font-size: 18px !important;
  color: white !important;
  display: none !important;
}

.social-icons a[href*="instagram"]::before {
  content: "📷" !important;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 16px !important;
  color: white !important;
  display: none !important;
}

/* Show fallback if images fail to load */
.social-icons img[src=""],
.social-icons img:not([src]) {
  display: none !important;
}

.social-icons a:has(img[src=""]):before,
.social-icons a:has(img:not([src])):before {
  display: flex !important;
}

.property-details-section {
  display: flex;
  gap: 40px;
  margin-top: 30px;
  align-items: flex-start;
}

.property-main-content {
  flex: 2;
}

.property-header {
  margin-bottom: 20px;
}

.property-subtitle {
  font-size: 16px;
  color: #666;
  margin: 0 0 20px 0;
}

.read-more-section {
  margin-top: 20px;
}

.read-more-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.read-more-btn:hover {
  color: #333;
}

.property-price-section {
  flex: 1;
  position: sticky;
  top: 40px;
}

.price-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
}

.share-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
}

/* Featured Locations Section */
.featured-locations {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  margin: 60px auto;
  max-width: 1200px;
  min-height: 60vh;
  flex-wrap: wrap;
}

.location-card {
  position: relative;
  width: 360px;
  height: 420px;
  overflow: hidden;
  cursor: pointer;
}

.location-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.location-card h3,
.location-name {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 32px;
  text-align: center;
  margin: 0;
  font-weight: 500;
}

/* Property Types Section */
.property-types {
  text-align: center;
  padding: 60px 20px;
}

.property-types h2 {
  font-size: 36px;
  margin-bottom: 40px;
}

.property-types > div:last-child {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.property-types a {
  text-decoration: none;
  display: block;
}

.casas,
.departamentos,
.oficinas,
.terrenos {
  position: relative;
  width: 260px;
  height: 320px;
  overflow: hidden;
  cursor: pointer;
}

.casas img,
.departamentos img,
.oficinas img,
.terrenos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.casas h3,
.departamentos h3,
.oficinas h3,
.terrenos h3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 24px;
  text-align: center;
  margin: 0;
  font-weight: 500;
}

/* Investment Types Section */
.investment-types {
  text-align: center;
  padding: 60px 20px;
}

.investment-types h2 {
  font-size: 36px;
  margin-bottom: 40px;
}

.investment-types > div:last-child {
  display: flex;
  justify-content: center;
  gap: 120px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.bienes-raices,
.tecnologia {
  position: relative;
  width: 360px;
  height: 420px;
  overflow: hidden;
  cursor: pointer;
}

.bienes-raices img,
.tecnologia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bienes-raices h3,
.tecnologia h3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 28px;
  text-align: center;
  margin: 0;
  font-weight: 600;
}

/* About Braitec Section */
.about-braitec {
  background-color: black;
  width: 100%;
  padding: 80px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  justify-content: center;
}

.about-braitec > div:first-child {
  flex: 1 1 400px;
  max-width: 500px;
}

.about-braitec > div:first-child > div {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.about-braitec > div:first-child img {
  width: 100%;
  border: 0.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
}

.about-braitec > div:last-child {
  flex: 1 1 400px;
  max-width: 500px;
}

.about-braitec h2 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
  color: white;
}

.about-braitec p {
  font-size: 16px;
  margin-bottom: 16px;
  color: white;
}

.about-braitec p:last-of-type {
  margin-bottom: 24px;
}

.about-braitec a {
  background-color: #BA930C;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
}

/* WhatsApp Button */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.whatsapp-button img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Footer */
footer {
  background-color: #000;
  color: #fff;
  padding: 60px 20px;
  font-size: 14px;
}

footer > div:first-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

footer > div:first-child > div {
  margin-bottom: 20px;
}

footer > div:first-child > div:first-child {
  flex: 1 1 200px;
}

footer > div:first-child > div:not(:first-child) {
  flex: 1 1 150px;
}

footer img {
  height: 100px;
  margin-bottom: 10px;
}

footer p {
  margin: 0;
}

footer h4 {
  margin-bottom: 10px;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer > div:last-child {
  text-align: center;
  padding-top: 30px;
}

.social-icons {
  margin-bottom: 20px;
}

/* ========================================
   MOBILE RESPONSIVENESS - Property Listings
   ======================================== */

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
  display: none;
  width: 100%;
  max-width: 200px;
  padding: 12px 20px;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin: 20px auto;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-filter-toggle:hover {
  background-color: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-filter-toggle.active {
  background-color: #BA930C;
}

.mobile-filter-toggle.active:hover {
  background-color: #a08209;
}

/* --- Buttons on mobile --- */
@media (max-width: 768px) {
  .hamburger,
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    padding: 0; border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.25);
    cursor: pointer; user-select: none;
    z-index: 10001; /* above drawer */
  }

  /* 3 bars for both button types */
  .hamburger > span,
  .menu-toggle .bar {
    display: block; width: 24px; height: 2px; background: #fff;
    border-radius: 1px; transition: transform .2s ease, opacity .2s ease;
  }
  /* stack bars with gap */
  .hamburger { gap: 6px; }
  .menu-toggle .bar + .bar { margin-top: 6px; }

  /* to X animation */
  .hamburger.is-open span:nth-child(1),
  .menu-toggle.is-open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.is-open span:nth-child(2),
  .menu-toggle.is-open .bar:nth-child(2) { opacity: 0; }
  .hamburger.is-open span:nth-child(3),
  .menu-toggle.is-open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* --- MOBILE DRAWER for BOTH ULs (index + inner pages) --- */
@media (max-width: 768px) {
  .nav-links-index,
  .nav-links {
    position: fixed;
    inset: 64px 0 0 0; /* full screen below navbar */
    background: #000;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;

    /* off-canvas hidden state */
    transform: translateX(100%);
    opacity: 0; visibility: hidden; pointer-events: none;

    transition: transform .25s ease, opacity .2s ease, visibility .2s ease;
    z-index: 9999; list-style: none; margin: 0;
  }
  .nav-links-index.open,
  .nav-links.open {
    transform: translateX(0);
    opacity: 1; visibility: visible; pointer-events: auto;
  }

  .nav-links-index li a,
  .nav-links li a {
    color: #fff; text-decoration: none;
    font-size: 16px; padding: 10px 0;
    transition: color .2s ease;
  }
  .nav-links-index li a:hover,
  .nav-links li a:hover,
  .nav-links-index li a.active,
  .nav-links li a.active,
  .nav-links-index li a:focus,
  .nav-links li a:focus { color: #BA930C; }
}

/* --- DESKTOP guard rails (both menus inline) --- */
@media (min-width: 769px) {
  .hamburger, .menu-toggle { display: none; }

  .nav-links-index,
  .nav-links {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    display: flex; background: none; padding: 0; margin: 0;
    /* your gap/spacing can stay in style.css; these are safe defaults */
    gap: 10rem;
    padding-right: 50px;
  }
}
