/* Reset and basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Open Sans', sans-serif;
  width: 100%;
  height: 100%;
}

/* Navbar */
.navbar {
  width: 100%;
  background-color: rgba(255, 255, 255, 0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px; /* Reduced padding */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.navbar .logo img {
  height: 40px; /* Reduced logo size */
  border-radius: 12px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 15px; /* Reduced gap */
}

.nav-links a,
.nav-links .dropdown span {
  font-size: 14px; /* Reduced font size */
  color: black;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links .dropdown span:hover {
  color: #ccc;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  min-width: 100px; /* Reduced width */
  padding: 5px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 1001;
}

.dropdown-content a {
  display: block;
  padding: 6px 12px; /* Reduced padding */
  font-size: 13px; /* Reduced font size */
  color: black;
  text-decoration: none;
  transition: background-color 0.3s ease;
  overflow-wrap: break-word; /* Ensure long text wraps */
}

.dropdown-content a:hover {
  background-color: #f2f2f2;
}

/* Carousel */
.carousel-container {
  width: 100%;
  max-width: 100%;
  height: 200px; /* Reduced height */
  margin: 20px auto; /* Reduced margin */
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  z-index: 1;
}

/* Slides wrapper (flex + transition) */
.carousel-container .slides {
  display: flex;
  transition: transform 0.7s ease;
  height: 100%;
  width: 100%;
}

/* Each slide is full-width and full-height */
.carousel-container .slide {
  flex: 0 0 100%;
  height: 100%;
  width: 100%;
}

/* Img covers the box, cropping as necessary */
.carousel-container .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Nav buttons */
.carousel-container .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  font-size: 20px; /* Reduced font size */
  width: 30px; /* Reduced size */
  height: 30px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 2;
  outline: none;
}
.carousel-container .nav.prev { left: 10px; }
.carousel-container .nav.next { right: 10px; }

/* Caption overlaid at bottom */
.carousel-container .caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.6);
  color: #000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px; /* Reduced padding */
  z-index: 2;
}
.carousel-container .caption .info p {
  margin: 2px 0;
  font-size: 14px; /* Reduced font size */
  line-height: 1.3;
  color: #000000;
  overflow-wrap: break-word; /* Wrap long text */
}
.carousel-container .caption .print-btn {
  background: #d60000;
  border: none;
  color: #fff;
  padding: 6px 12px; /* Reduced padding */
  cursor: pointer;
  border-radius: 4px;
  font-weight: bold;
  font-size: 14px; /* Reduced font size */
  transition: all 0.3s ease;
  position: relative;
  padding-left: 30px;
  overflow-wrap: break-word; /* Wrap long text */
}
.carousel-container .caption .print-btn:hover {
  background: #b50000;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.carousel-container .caption .print-btn::before {
  content: '\f02f';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px; /* Adjusted for mobile */
}

/* Property Info Section */
.property-info-section {
  padding: 20px 10px; /* Adjusted padding to match carousel margins */
  background-color: rgba(255, 255, 255, 0.801);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  margin: 0 10px; /* Match carousel's left/right margin */
  width: 100%; /* Ensure full width alignment with carousel */
}

.property-info-container {
  width: 100%; /* Ensure full width alignment with carousel */
  flex-direction: column; /* Explicitly stack children vertically */
}

.property-details {
  background: transparent;
  padding: 15px;
  border: 7px solid #d60000;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 100%; /* Match carousel width */
  min-width: 0;
  overflow-wrap: break-word; /* Wrap long text */
  order: 1; /* Ensure it appears first */
}

.property-details h1 {
  font-family: 'Playfair Display', serif;
  font-size: 24px; /* Reduced font size */
  margin-bottom: 8px;
  overflow-wrap: break-word; /* Wrap long text */
}

.property-details h3.status {
  font-size: 16px; /* Reduced font size */
  margin-bottom: 8px;
  overflow-wrap: break-word; /* Wrap long text */
}

.property-details .price {
  font-size: 20px; /* Reduced font size */
  margin-bottom: 12px;
  overflow-wrap: break-word; /* Wrap long text */
}

.property-details .description {
  font-size: 14px; /* Reduced font size */
  margin-bottom: 15px;
  color: #555;
  overflow-wrap: break-word; /* Wrap long text */
}

.property-details h3 {
  margin-top: 15px;
  font-size: 16px; /* Reduced font size */
  margin-bottom: 8px;
  overflow-wrap: break-word; /* Wrap long text */
}

.property-details ul {
  list-style: disc inside;
  margin-bottom: 15px;
}

.property-details ul li {
  margin-bottom: 5px;
  overflow-wrap: break-word; /* Wrap long text */
}

.map-button {
  display: inline-block;
  background: #d60000;
  color: #fff;
  padding: 6px 12px; /* Reduced padding */
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 28px;
  font-size: 14px; /* Reduced font size */
  overflow-wrap: break-word; /* Wrap long text */
}

.map-button:hover {
  background: #b50000;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.map-button::before {
  content: '\f3c5';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.map-container {
  margin-top: 10px; /* Reduced margin */
  width: 100%; /* Match carousel width */
}

.map-container iframe {
  width: 100%; /* Ensure iframe matches container width */
  height: 200px; /* Adjusted for mobile */
}

/* Expert Card (Get More Info Section) */
.expert-card {
  width: 100%; /* Match carousel width */
  align-self: flex-start;
  background-color: rgba(255, 255, 255, 0.801);
  backdrop-filter: blur(10px);
  color: #333;
  padding: 15px; /* Reduced padding */
  border-radius: 20px;
  text-align: center;
  border: 7px solid #d60000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  background-image: linear-gradient(to bottom, rgba(214, 0, 0, 0.1), rgba(255, 255, 255, 0.801));
  min-width: 0;
  overflow-wrap: break-word; /* Wrap long text */
  order: 2; /* Ensure it appears after property-details */
}

.expert-card h3 {
  font-size: 24px; /* Reduced font size */
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
  overflow-wrap: break-word; /* Wrap long text */
}

.expert-card .agent-profile {
  width: 80px; /* Reduced size */
  height: 80px;
  border-radius: 50%;
  margin: 8px auto;
  display: block;
}

.expert-card p.description {
  font-size: 14px; /* Reduced font size */
  line-height: 1.4;
  color: #555;
  margin-bottom: 15px;
  overflow-wrap: break-word; /* Wrap long text */
}

.expert-info h4 {
  font-size: 20px; /* Reduced font size */
  margin-bottom: 5px;
  overflow-wrap: break-word; /* Wrap long text */
}

.expert-info .title {
  font-size: 16px; /* Reduced font size */
  margin-bottom: 5px;
  color: #555;
  overflow-wrap: break-word; /* Wrap long text */
}

.expert-info .location {
  font-size: 12px; /* Reduced font size */
  margin-bottom: 8px;
  color: #555;
  overflow-wrap: break-word; /* Wrap long text */
}

.expert-contact {
  margin: 0;
  padding: 0;
}

.expert-contact p {
  margin-bottom: 8px; /* Reduced margin */
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-wrap: break-word; /* Wrap long text */
}

.expert-contact p:last-child {
  margin-bottom: 0;
}

.expert-contact a {
  color: #555;
  margin-left: 6px; /* Reduced margin */
  text-decoration: none;
  transition: color 0.3s ease;
  overflow-wrap: break-word; /* Wrap long text */
}

.expert-contact a:hover {
  color: #d60000;
}

/* Print Media */
@media print {
  body { background: #fff; }
  .navbar, .carousel-btn, .print-flyout-btn, .expert-card { display: none !important; }
  .carousel-slide.active img { max-width: 100%; }
}

/* Adjust carousel positioning */
.carousel-container {
  margin-top: 80px; /* Reduced for mobile */
  position: relative;
  z-index: 0;
}

/* Ensure buttons float above the carousel */
.carousel-container .nav {
  z-index: 10;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .property-info-container {
    flex-direction: column; /* Ensure vertical stacking */
  }
  .property-details {
    order: 1; /* First in stack */
  }
  .expert-card {
    order: 2; /* Second in stack, below property-details */
  }
}