:root {
  --primary: #1a9cb7;
  --primary-light: #b4e4ee;
  --secondary: #f9a826;
  --sand: #f5e6ca;
  --accent: #f25c54;
  --dark: #2d4654;
  --light: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --rounded: 12px;
  --rounded-lg: 20px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', 'Arial', sans-serif;
}

/* Add sand background texture */
body {
  background-image: url('../images/sand3.webp');

  background-size: cover;
  color: var(--dark);
  line-height: 1.7;
  font-size: 16px;
}

/* Modern Typography */
h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

p {
  margin-bottom: 1.5rem;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Gentle wave animation for tagline */
@keyframes gentleWave {
  0% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
  100% { transform: translateY(0); }
}

/* Modern Header */
header {
  position: relative;
  background: linear-gradient(to right, rgba(45, 70, 84, 0.65), rgba(26, 156, 183, 0.57)), 
              url('../images/sunset2.webp') center/cover no-repeat;
  height: 85vh;
  min-height: 550px;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--white);
  padding: 1rem;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

header h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
  max-width: 800px;
}

.tagline {
  font-size: 1.6rem;
  margin-bottom: 2.5rem;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
  max-width: 700px;
  font-weight: 300;
  opacity: 0.95;
  animation: gentleWave 6s ease-in-out infinite;
}

.book-btn {
  background-color: var(--secondary);
  color: var(--white);
  padding: 14px 32px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.book-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.book-btn:active {
  transform: translateY(1px);
}

/* Modern Section Styling */
section {
  margin-bottom: 6rem;
  position: relative;
}

section h2 {
  color: var(--primary);
  margin-bottom: 2rem;
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--secondary);
  border-radius: 2px;
}

section h3 {
  color: var(--dark);
  margin: 2rem 0 1rem;
  font-size: 1.8rem;
}

section h4 {
  color: var(--primary);
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
}

/* Fade-in effect for sections as you scroll */
.about, .rv-section, .guest-access {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.about.visible, .rv-section.visible, .guest-access.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modern About Section */
.about {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(2px);
  padding: 3.5rem;
  border-radius: var(--rounded-lg);
  box-shadow: var(--shadow);
  margin-top: -60px;
  position: relative;
  z-index: 2;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-image {
  flex: 1;
  min-width: 300px;
  height: 400px;
  background: url('../images/house-front.webp') center/cover no-repeat;
  border-radius: var(--rounded);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.about-image:hover {
  transform: scale(1.02);
}

/* Modern Features */
.features {
  display: flex;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  gap: 1.5rem; /* Consistent spacing between all features */
}

.feature {
  display: flex;
  align-items: center;
  width: calc(50% - 0.75rem); /* Equal width for all features */
  transition: var(--transition);
  padding: 0.5rem;
  border-radius: var(--rounded);
  box-sizing: border-box; /* Ensure padding is included in width calculation */
}

.feature:hover {
  background-color: var(--primary-light);
  transform: translateX(5px);
}

.feature span {
  min-width: 0; /* Allow text to shrink if needed */
  flex: 1; /* Let text take available space */
  white-space: normal; /* Allow text to wrap */
  word-break: normal; /* Normal word breaking behavior */
}

.feature-icon {
  width: 40px;
  height: 40px;
  min-width: 40px; /* Prevent icon from shrinking */
  background-color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0; /* Prevent icon from shrinking */
}

/* RV Section */
.rv-section {
  background-color: rgba(248, 249, 250, 0.92);
  backdrop-filter: blur(2px);
  padding: 3rem;
  border-radius: var(--rounded-lg);
  margin-top: 4rem;
  box-shadow: var(--shadow);
  position: relative;
}

.rv-section::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  background-color: var(--primary-light);
  border-radius: 50%;
  opacity: 0.3;
  z-index: 0;
}

.rv-content {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.rv-image {
  flex: 1;
  min-width: 300px;
  height: 350px;
  background: url('../images/rv-parking.webp') center/cover no-repeat;
  border-radius: var(--rounded);
  box-shadow: var(--shadow);
  transition: var(--transition);
  order: 2;
  overflow: hidden;
}

.rv-image:hover {
  transform: scale(1.02);
}

.rv-text {
  flex: 1;
  min-width: 300px;
  order: 1;
}

.rv-features {
  list-style-type: none;
  margin: 1.8rem 0;
  padding-left: 0.5rem;
}

.rv-features li {
  margin-bottom: 1rem;
  position: relative;
  padding-left: 2rem;
  transition: var(--transition);
}

.rv-features li:hover {
  transform: translateX(5px);
}

.rv-features li:before {
  content: "•";
  color: var(--secondary);
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -3px;
}

/* Guest Access Section */
.guest-access {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(2px);
  padding: 3rem;
  border-radius: var(--rounded-lg);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.guest-access::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 120px;
  height: 120px;
  background-color: var(--primary-light);
  border-radius: 50%;
  opacity: 0.2;
}

.outdoor-features {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2.5rem;
}

.outdoor-feature {
  flex: 1;
  min-width: 250px;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.5rem 1.5rem 1.5rem 3.5rem; /* Increased left padding to make room for the line */
  background-color: var(--light);
  border-radius: var(--rounded);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative; /* Added position relative for the line positioning */
}

.outdoor-feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

/* Add this new rule for the decorative line */
.outdoor-feature:before {
  content: "";
  position: absolute;
  left: 1.5rem; /* Position from the left padding */
  top: 2rem; /* Align with heading */
  width: 1.5rem;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

/* Make the line stretch on hover for a nice effect */
.outdoor-feature:hover:before {
  width: 2rem;
  background-color: var(--secondary);
}

.outdoor-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  flex-shrink: 0;
}

/* Modern Gallery with aspect ratio handling */
.gallery {
  margin-top: 4rem;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(2px);
  padding: 3rem;
  border-radius: var(--rounded-lg);
  box-shadow: var(--shadow);
}

.gallery h2 {
  color: var(--primary);
  margin-bottom: 2.5rem;
  font-size: 2.5rem;
  text-align: center;
}

.gallery h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Masonry-style gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 250px;
  grid-auto-flow: dense;
  gap: 1rem;
}

/* General gallery item styles */
.gallery-item {
  border-radius: var(--rounded);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

/* Make portrait images span 2 rows */
.gallery-item.portrait {
  grid-row: span 2;
}

/* Let some landscape images span 2 columns for visual interest */
.gallery-item:nth-child(8n+1) {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 70%, rgba(26, 156, 183, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none; /* Add this line */
}

.gallery-item:hover::before {
  opacity: 1;
}

/* CTA Section */
.cta {
  background: linear-gradient(to right, rgba(45, 70, 84, 0.85), rgba(26, 156, 183, 0.7)), 
              url('/api/placeholder/1200/400') center/cover no-repeat;
  color: var(--white);
  text-align: center;
  padding: 4rem 2rem;
  border-radius: var(--rounded-lg);
  margin-top: 4rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.cta::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background-color: var(--secondary);
  border-radius: 50%;
  opacity: 0.1;
}

.cta h2 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

.cta h2::after {
  background-color: var(--white);
  left: 50%;
  transform: translateX(-50%);
}

.cta p {
  margin-bottom: 2.5rem;
  font-size: 1.3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.cta .book-btn {
  background-color: var(--secondary);
  padding: 16px 36px;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Modern Footer */
footer {
  background-color: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 4rem;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
}

footer p {
  margin-bottom: 1rem;
  opacity: 0.8;
}

footer a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

footer a:hover {
  color: var(--secondary);
}

/* Medium screens */
@media (max-width: 992px) {
  header h1 {
    font-size: 3.5rem;
  }
  
  .container {
    padding: 1.5rem;
  }
  
  .about, .rv-section, .guest-access {
    padding: 2.5rem;
  }

  section h2 {
    font-size: 2.2rem;
  }
	
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: 200px;
  }
}

/* Small screens */
@media (max-width: 768px) {
  header {
    height: 70vh;
    min-height: 450px;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
  }
  
  header h1 {
    font-size: 2.8rem;
  }
  
  .tagline {
    font-size: 1.3rem;
  }
  
  .about {
    padding: 2rem;
    margin-top: -40px;
  }
  
  .about h2, section h2 {
    font-size: 2rem;
  }
  
  .about-content {
    flex-direction: column;
  }
  
  .about-image {
    width: 100%;
    height: 300px;
    min-height: 300px; /* Ensure minimum height */
    margin-top: 1.5rem;
    flex: none; /* Remove flex behavior on mobile */
    display: block; /* Ensure it's treated as a block element */
  }
  
  .about-text {
    width: 100%;
  }
  
  .feature {
    width: 100%;
  }
  
  .rv-image {
    order: 1;
    height: 300px;
    width: 100%;
  }
  
  .rv-text {
    order: 2;
  }
  
  .outdoor-feature {
    min-width: 100%;
  }
  
  .cta h2 {
    font-size: 2rem;
  }
  
  .cta p {
    font-size: 1.1rem;
  }
	.gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
    gap: 0.75rem;
  }
	
	.gallery-item.portrait {
    grid-row: span 2;
  }
  
  .gallery-item:nth-child(8n+1) {
    grid-column: auto; /* Remove the span 2 columns on mobile */
  }
  
  .gallery {
    padding: 2rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  header {
    height: 60vh;
    min-height: 400px;
  }
  
  header h1 {
    font-size: 2.2rem;
  }
  
  .tagline {
    font-size: 1.1rem;
  }
  
  .book-btn {
    padding: 12px 24px;
    font-size: 1rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  .about, .rv-section, .guest-access {
    padding: 1.5rem;
  }
  
  .about {
    margin-top: -30px;
  }
  
  section h2 {
    font-size: 1.8rem;
  }
  
  section h3 {
    font-size: 1.5rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 140px;
    gap: 0.5rem;
  }
  
  /* Fix for portrait images */
  .gallery-item.portrait {
    grid-row: span 2;
  }
  
  /* Fix for landscape images that were spanning */
  .gallery-item:nth-child(8n+1) {
    grid-column: auto;
  }
  
  /* Ensure only special items span wider */
  .gallery-item:nth-child(6n+1) {
    grid-column: span 2;
  }
  
  /* Ensure grid items have proper height */
  .gallery-item {
    height: auto; /* Let the grid control height */
    min-height: 0; /* Remove any min-height */
    max-height: none; /* Remove any max-height */
  }
  
  /* Fix for images inside items */
  .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .outdoor-icon {
    font-size: 2rem;
  }

  .about-image {
    height: 250px;
    min-height: 250px;
  }
}
/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: white;
  text-align: center;
  padding: 10px;
  width: 100%;
  font-size: 1rem;
}

.close-lightbox {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: 0.3s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.3);
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev {
  left: 0;
}

.prev:hover, .next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Make gallery images show pointer cursor to indicate they're clickable */
.gallery-item {
  cursor: pointer;
}

/* Animation for lightbox opening */
@keyframes fadeIn {
  from {opacity: 0}
  to {opacity: 1}
}

.fadeIn {
  animation: fadeIn 0.5s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .prev, .next {
    padding: 8px;
    font-size: 18px;
  }
  
  .close-lightbox {
    top: -30px;
    font-size: 28px;
  }
}
/* Optimize header background for better performance */
@media (max-width: 768px) {
  header {
    background-attachment: scroll !important; /* Use scroll instead of fixed on mobile */
  }
}

/* Add will-change hints for animations to help browser optimize */
.about, .rv-section, .guest-access, .location {
  will-change: opacity, transform;
}

/* Add contain property to help browser optimize repaints */
.gallery-item img {
  contain: content;
  will-change: transform; /* Hint for lightbox animations */
}

/* Add containment for the lightbox */
.lightbox-content {
  will-change: opacity;
}

/* Optimize animations to use transform instead of opacity if possible */
.about, .rv-section, .guest-access, .location {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.about.visible, .rv-section.visible, .guest-access.visible, .location.visible {
  opacity: 1;
  transform: translateY(0);
}