* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Global Styles + Flex Layout for Footer Stickiness */
html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
  display: flex;
  flex-direction: column;
}

/* Make main take up available space */
main {
  flex: 1;
}
/* Header 
header {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid #eee;
}*/

input[type="number"] {
  width: 100px;
  box-sizing: border-box; /* ensures padding doesn't expand width */
}

header nav {
  display: flex;
  gap: 20px;
}

header .nav-link {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

header .nav-link.active {
  color: #007BFF;
}

.nav-btn {
  border: none;
  background: #f0f0f0;
  cursor: pointer;
  font-size: 14px;
}

/* Logo (merged) */
.logo {
  height: 50px;
  margin-right: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo img {
  max-height: 50px;
  height: auto;
}

/* Navbar (new addition) */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background:linear-gradient(#cccccc, #f2f2f2);
  color: #543A14;
}

#minPrecio,
#maxPrecio {
  width: 100px; /* Adjust the value as needed */
  font-size: 12px;
}

#monedaAv {
  padding: 4px 8px;
  border-width: 2px;
  border-style: inset;
  border-color: light-dark(rgb(118, 118, 118), rgb(133, 133, 133));
  background-color: #fff;
}

/*LINKS*/

.phone-link,
.email-link {
  text-decoration: none;
  color: inherit;
}

/* Transparent button with a custom border */
.phone-link-container button {
  background-color: transparent;
  border: 1px solid #543A14;
  color: #543A14;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

/* Hover state: slight transparent gray background */
.phone-link-container button:hover {
  background-color: rgba(128, 128, 128, 0.2);
}

/* Auth Links & Title (new addition) */
.title {
  color: #333333;
  text-align: center;
}

.auth-links a {
  color: white;
  margin-left: 10px;
}

/* Search Section */
.search-section {
  background: #f0f2f5;
  padding: 20px;
}

.search-box {
  max-width: 1200px;
  margin: 0 auto;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

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

.filter-input,
.filter-checkbox {
  padding: 8px;
  font-size: 14px;
}

#map {
  z-index: 0;
  position: relative; /* Or absolute if needed */
  height: 500px; /* or whatever height you want */
}

.btn-search,
.btn-map {
  padding: 10px 20px;
  background: #C14600;
  border: none;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
}

.btn-map {
  background: #D98324;
}

.btn-search:hover {
  background: #993800;
}

.btn-map:hover {
  background: #9a5b19;
}

/* Dropdown (new addition dominates) */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn{
  background-color: #f9f9f9;
  border: 2px solid #543A14;
  color: #543A14;
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  width: 160px;
  text-align: center;
}

.dropdown-btn button:hover {
  background-color: rgba(128, 128, 128, 0.2);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-btn::after {
  content: "▼";
  margin-left: 4px;
}

.dropdown-btn:hover::after {
  content: "▲";
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  z-index: 1;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  padding: 10px 0;
  color: #543A14;
}

.dropdown-content label {
  display: block;
  padding: 8px 10px;
}

.dropdown-content input {
  margin-right: 8px;
}

/* (Optional) Retain original dropdown-filter if needed */
.dropdown-filter {
  position: relative;
  display: inline-block;
}

.secondRowButtons {
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.price-warning {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 3px;
  padding: 5px 10px;
  background: #f44336;
  color: white;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


/* Container & Titles */
.container {
  max-width: 1300px;
  margin: 20px auto;
  padding: 0 20px;
}

.main-title {
  font-size: 24px;
  margin-bottom: 10px;
  text-align: center;
}

/* Property Grid & Cards */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* ← auto-fit instead of auto-fill */
  gap: 20px; /* ← more breathing room */
  justify-content: center; /* ← makes sure the last row is centered */
  padding: 10px; /* ← prevents overflow on small screens */
  box-sizing: border-box;
}

.property-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
  width: 100%; /* 100% inside the grid cell */
  max-width: 280px; /* keeps cards from stretching */
  margin: 0 auto;
  min-height: 300px;
  box-sizing: border-box; /* important to avoid internal padding breaking the width */
  cursor: pointer;
}

.property-card h3 {
  flex-grow: 1;
  margin: 10px 0;
  color: #543A14;
  font-size: 1rem;
  word-break: break-word;
  text-align: left;
}


.property-card h2 {
  color: orange;
}

.property-card p {
  margin-bottom: 8px;
  font-size: 14px;
}

.property-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.card-footer {
  margin-top: auto;
  padding-top: 10px;
}

.card-footer p {
  margin: 4px 0;
}

/* Hero Section (new addition) */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
              url('images/talca.jpeg') center/cover no-repeat;
  padding: 100px 20px;
}

.hero-content {
  background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    margin-left: 18%;
    margin-right: 18%;
    border-radius: 8px;
    border: 10px solid transparent;
}

/* Filters Section (new addition) */
.filters {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.filters select,
.filters input,
.filters button {
  padding: 10px;
  border-radius: 5px;
}

.price {
  display: flex;
  gap: 10px;
}

/* Properties Section (new addition) */
.properties {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  overflow-y: auto;
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  width: 90%;
  max-width: 700px;
  border-radius: 5px;
  position: relative;
}

.close-modal {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}

/* Booking Form in Modal */
#bookingModal form {
  display: flex;
  flex-direction: column;
}

#bookingModal form label {
  margin-top: 10px;
  font-weight: bold;
}

#bookingModal form input[type="text"],
#bookingModal form input[type="email"],
#bookingModal form input[type="datetime-local"],
#bookingModal form textarea {
  margin-top: 5px;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

#bookingModal form button {
  margin-top: 15px;
  padding: 10px 20px;
  background: #916422;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

#bookingModal form button:hover {
  background: #543A14;
}

/*Advanced Search*/
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

/* Advanced search toggle button styling */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Advanced search toggle button styling */
.hero {
  position: relative;
  /* Ensure your hero image/background covers the section as needed */
}

/* Advanced search toggle button styling */
.advanced-search-toggle {
  
  background-color: #888;
  color: white;
  border: 1px solid #ccc;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin: 10px 45% 0%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.advanced-search-toggle:hover {
  background-color: #555;
}

/* Advanced search fields overlay styles */
.advanced-search-fields {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 15px;
  border-radius: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 90%; /* ← take 90% of the screen width */
  max-width: 1400px; /* ← but don't grow bigger than 1200px */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.advanced-search-fields .form-group {
  flex: 1 1 150px;
  min-width: 120px;
}

.advanced-search-fields .form-group label {
  display: block;
  margin-top: 3px;
  margin-bottom: 3px;
  font-size: 12px;
}

.advanced-search-fields .form-group input,
.advanced-search-fields .form-group select {
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.advanced-search-toggle::after {
  content: "▼";
  margin-left: 5px;
}

.advanced-search-toggle.active::after {
  content: "▲";
}

.advanced-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.advanced-grid > div {
  flex: 1 1 250px; /* Minimum width for each block */
  min-width: 200px;
}


/*PROPERTIES PAGE*/


.title-bg {
  position: relative;
  padding: 20px;
  margin-bottom: 20px;
  z-index: 0;
}

.title-bg::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url('images/talca.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: -1;
}

.property-title {
  text-align: center;
  margin-bottom: 20px;
}

.property-carousel {
  max-width: 800px;
  margin: auto;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 30px;
}

.carousel-img {
  cursor: pointer;
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.2s ease;
}

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

.info-group {
  margin: 25px auto;
  max-width: 800px;
  padding: 10px 20px;
  border-left: 4px solid #1b9849;
  background: #f9f9f9;
  border-radius: 6px;
}

.info-group h2 {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #333;
  border-bottom: 1px solid #ccc;
}

.info-group p {
  font-size: 1em;
  margin: 4px 0;
  color: #333;
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

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

.image-modal .close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.fa-circle-left {
  font-size: 2rem;
}

/*FOOTER*/

.site-footer {
  background-color: #f5f5f5;
  padding: 20px 0;
  margin-top: 40px;
  border-top: 1px solid #ddd;
  font-size: 14px;
}

.footer-content {
  text-align: center;
  color: #555;
}

.footer-link {
  color: #1b9849;
  text-decoration: none;
}

.footer-link i {
  margin-right: 5px;
}

/*SORTING*/

.sort-container {
  position: relative;
  display: inline-block;
}

.sort-button {
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.sort-options {
  position: absolute;
  top: 100%;
  left: auto;
  right: 0;
  width: 220px;
  margin-top: 5px;
  padding: 0;
  list-style: none;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
  display: none;
}

.sort-options li {
  padding: 10px;
  cursor: pointer;
  font-size: 14px;
}

.sort-options li:hover {
  background-color: #f0f0f0;
}

.result-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin: 10px 0;
}

.result-count {
  padding: 13.5px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

  /* Image carousel */
  
/* Normal carousel images (smaller) */
.property-carousel .swiper-slide img {
  max-height: 40vh;
  width: auto;
  height: auto;
  margin: auto;
  display: block;
  object-fit: contain;
}

/* Modal carousel images (bigger) */
#imgModal .swiper-slide img {
  max-height: 100vh;
  max-width: 95vw;
  width: auto;
  height: auto;
  margin: auto;
  display: block;
  object-fit: contain;
}

/* Modal adjustments */
.image-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.image-modal .swiper {
  max-width: 100%;
  max-height: 100%;
}

/* Close button inside modal */
.image-modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

.fancy-hr {
  border: 0;
  height: 2px;
  width: 200px;
  background: linear-gradient(to right, rgba(0,0,0,0), rgba(139, 69, 19, 0.4), rgba(205, 133, 63, 0.4), rgba(0,0,0,0));
  margin: 10px auto 10px auto;
  border-radius: 2px;
}

/*BOOKING*/

.day-group {
  margin-bottom: 20px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 8px;
}

.day-group h3 {
  margin-bottom: 10px;
  color: #333;
}

.btn-slot {
  padding: 8px 12px;
  background: #eee;
  border: 1px solid #ccc;
  cursor: pointer;
  border-radius: 6px;
}

.btn-slot:hover {
  background: #ddd;
}

.btn-slot.selected {
  background: #1b9849 !important;
  color: white !important;
}

/*Copy number*/

.toast {
  display: none;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1b9849;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.toast.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}









