/**
 * Elysian Retreat - Homepage Styles
 */

/* ===== Hero Section ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  background-color: var(--color-secondary-dark);
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--color-white);
  max-width: 800px;
  padding: 0 var(--spacing-lg);
  z-index: 1;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: var(--spacing-md);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
  animation-delay: 0.2s;
}

.hero-title {
  font-size: 4rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-lg);
  color: var(--color-white);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
  animation-delay: 0.4s;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
  animation-delay: 0.6s;
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
  animation-delay: 0.8s;
}

.hero-scroll {
  position: absolute;
  bottom: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-white);
  opacity: 0;
  animation: fadeIn 1s forwards;
  animation-delay: 1.2s;
  z-index: 1;
}

.hero-scroll-text {
  font-size: 0.875rem;
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-scroll-icon {
  animation: bounce 2s infinite;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* ===== Booking Bar ===== */
.booking-bar {
  position: relative;
  margin-top: -80px;
  margin-bottom: var(--spacing-xxl);
  z-index: 10;
}

.booking-form {
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-lg);
}

.booking-form-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.booking-form .form-group {
  margin-bottom: 0;
}

.booking-form .btn {
  align-self: flex-end;
}

/* ===== About Section ===== */
.home-about {
  margin-bottom: var(--spacing-xxl);
}

.home-about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.about-content {
  padding-right: var(--spacing-lg);
}

.about-text p {
  margin-bottom: var(--spacing-md);
}

.about-signature {
  margin-top: var(--spacing-lg);
  display: flex;
  align-items: center;
}

.signature-image {
  width: 150px;
  margin-right: var(--spacing-md);
}

.signature-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

.signature-title {
  color: var(--color-text-light);
  font-size: 0.875rem;
}

.about-image {
  position: relative;
}

.about-image-main {
  width: 100%;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
}

.about-image-accent {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  border: 5px solid var(--color-white);
}

/* ===== Rooms Section ===== */
.home-rooms {
  padding: var(--spacing-xxl) 0;
  background-color: var(--color-off-white);
  margin-bottom: var(--spacing-xxl);
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.view-all-rooms {
  text-align: center;
}

/* ===== Features Section ===== */
.home-features {
  margin-bottom: var(--spacing-xxl);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-xl);
}

.feature-card {
  text-align: center;
}

.feature-icon {
  width: 80px;
  height: 80px;
  background-color: var(--color-off-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  color: var(--color-primary);
  transition: background-color var(--transition-medium), color var(--transition-medium);
}

.feature-card:hover .feature-icon {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

.feature-description {
  color: var(--color-text-light);
  font-size: 0.875rem;
}

/* ===== Experience Section ===== */
.home-experience {
  position: relative;
  padding: var(--spacing-xxl) 0;
  margin-bottom: var(--spacing-xxl);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}

.home-experience::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.experience-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.experience-title {
  font-size: 2.5rem;
  color: var(--color-white);
  margin-bottom: var(--spacing-md);
}

.experience-description {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xl);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.experience-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-lg);
  text-align: center;
  backdrop-filter: blur(5px);
  transition: transform var(--transition-medium);
}

.experience-item:hover {
  transform: translateY(-5px);
}

.experience-item-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  color: var(--color-primary);
}

.experience-item-title {
  font-size: 1.25rem;
  color: var(--color-white);
  margin-bottom: var(--spacing-sm);
}

.experience-item-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Testimonials Section ===== */
.home-testimonials {
  margin-bottom: var(--spacing-xxl);
}

.testimonial-large {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.testimonial-image {
  height: 100%;
  min-height: 400px;
  position: relative;
}

.testimonial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-content {
  padding: var(--spacing-xl);
}

.testimonial-quote {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.testimonial-quote::before {
  content: '"';
  font-family: Georgia, serif;
  font-size: 5rem;
  color: var(--color-primary);
  position: absolute;
  top: -40px;
  left: -20px;
  opacity: 0.2;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.author-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: var(--spacing-md);
}

.author-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-xs);
}

.author-title {
  color: var(--color-text-light);
  font-size: 0.875rem;
}

/* ===== Gallery Section ===== */
.home-gallery {
  margin-bottom: var(--spacing-xxl);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 200px);
  gap: var(--spacing-md);
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  cursor: pointer;
}

.gallery-item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item:nth-child(4) {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity var(--transition-medium);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--spacing-md);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  color: var(--color-white);
  font-weight: 500;
}

.gallery-link {
  text-align: center;
  margin-top: var(--spacing-lg);
}

/* Target the gallery overlay specifically for the pool gallery item */
.gallery-item[data-category="pool"] {
  width: auto; /* Let the grid control the width */
  grid-column: span 2; /* Make it span 2 columns */
}

.gallery-item[data-category="pool"] .gallery-overlay {
  /* Customize the flex properties */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center vertically instead of flex-end */
  align-items: center; /* Center horizontally */
  text-align: center;
  padding: var(--spacing-lg);
  /* Optional: add a different background gradient or opacity */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
  width: 100%; /* This ensures it covers the full width of its parent */
}

/* Style the text elements within the pool overlay */
.gallery-item[data-category="pool"] .gallery-category {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
   width: 100%; 
}

.gallery-item[data-category="pool"] .gallery-title {
  font-size: 1.5rem;
  font-weight: bold;
   width: 100%; 
}

/* Make the overlay transition more apparent for the pool item */
.gallery-item[data-category="pool"]:hover .gallery-overlay {
  opacity: 1;
   width: 100%; 
}

/* ===== CTA Section ===== */
.home-cta {
  position: relative;
  padding: var(--spacing-xxl) 0;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  text-align: center;
  margin-bottom: var(--spacing-xxl);
}

.home-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.cta-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.cta-title {
  font-size: 3rem;
  color: var(--color-white);
  margin-bottom: var(--spacing-md);
}

.cta-description {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xl);
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
}

/* ===== Blog Section ===== */
.home-blog {
  margin-bottom: var(--spacing-xxl);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
}

.blog-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-medium);
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-image {
  height: 200px;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.blog-content {
  padding: var(--spacing-lg);
}

.blog-date {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-xs);
}

.blog-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

.blog-excerpt {
  color: var(--color-text-light);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-md);
}

.blog-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-primary);
  font-weight: 500;
}

.blog-link svg {
  margin-left: var(--spacing-xs);
  transition: transform var(--transition-fast);
}

.blog-link:hover svg {
  transform: translateX(3px);
}

/* ===== General Section Spacing ===== */
section {
  margin-bottom: var(--spacing-xxl);
  padding: var(--spacing-xl) 0;
}

/* ===== Welcome Section ===== */
.welcome {
  padding: calc(var(--spacing-xxl) + 1rem) 0;
}

.welcome-content {
  padding-right: var(--spacing-xl);
  margin-right: var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== Booking Section ===== */
.booking-section {
  margin-top: var(--spacing-xxl);
  margin-bottom: var(--spacing-xxl);
  padding: var(--spacing-xl) 0;
}

/* ===== Featured Rooms Section ===== */
.featured-rooms {
  padding-top: var(--spacing-xxl);
  padding-bottom: var(--spacing-xxl);
}

/* ===== Amenities Section ===== */
.amenities {
  padding: 5rem 0;
  background-color: var(--color-bg-light);
}

.amenities .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.amenity-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.amenity-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.amenity-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background-color: var(--color-bg-light);
  border-radius: 50%;
  color: var(--color-primary);
}

.amenity-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 1.5;
}

.amenity-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
}

.amenity-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .amenities-grid {
    gap: 1.5rem;
  }
}

@media (max-width: 992px) {
  .amenities-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .amenity-card {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 576px) {
  .amenities {
    padding: 4rem 0;
  }
  
  .amenities-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .amenity-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1.25rem;
  }
  
  .amenity-icon svg {
    width: 35px;
    height: 35px;
  }
  
  .amenity-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
  }
}

/* ===== Testimonials Section ===== */
.testimonials {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xxl);
}

/* ===== Gallery Preview Section ===== */
.gallery-preview {
  padding-top: var(--spacing-xxl);
}

/* Improved Gallery Preview Section - Mobile Responsive Fixes */

/* Remove the previous mobile fixes that made things worse */
@media screen and (max-width: 768px) {
  /* Reset any problematic styles */
  .gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px; /* Reduce the bottom margin */
  }
  
  /* Make all items have consistent height */
  .gallery-item {
    height: auto;
    min-height: 200px;
    margin-bottom: 0; /* Remove any bottom margins */
  }
  
  /* Make all items take full width */
  .gallery-item,
  .gallery-item[data-category="pool"],
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-column: 1;
    width: 100%;
  }
  
  /* Ensure images fill their containers properly */
  .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Fix section footer spacing */
  .section-footer {
    margin-top: 20px; /* Reduce the space between grid and footer */
    text-align: center;
    padding-top: 0; /* Remove additional padding */
  }
  
  /* Add specific adjustment for the button in section-footer */
  .section-footer .btn {
    margin-top: 0;
  }
}

/* Medium screens get 2 columns */
@media screen and (min-width: 769px) and (max-width: 991px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  /* Special items that should span 2 columns */
  .gallery-item[data-category="pool"],
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-column: span 2;
  }
}

/* Additional optimization for medium-sized screens */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }
  
  .gallery-item.large {
    grid-column: span 2;
  }
}

/* ===== Section Footer ===== */
.section-footer {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
}

/* ===== Media Queries ===== */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 3.5rem;
  }
  
  .booking-form-inner {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  .experience-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .home-about .container,
  .testimonial-large {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .about-content {
    padding-right: 0;
    order: 2;
  }
  
  .about-image {
    order: 1;
  }
  
  .about-image-accent {
    bottom: -30px;
    right: -30px;
    width: 150px;
  }
  
  .rooms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonial-image {
    height: 300px;
  }
  
  .welcome .container {
    gap: var(--spacing-xxl);
  }
  
  .welcome-content {
    margin-right: 0;
    padding-right: 0;
  }
  
  .section-footer {
    margin-top: var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .booking-form-inner {
    grid-template-columns: 1fr;
  }
  
  .rooms-grid,
  .features-grid,
  .experience-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-rows: repeat(6, 200px);
  }
  
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-column: span 2;
    grid-row: span 1;
  }
  
  .cta-actions {
    flex-direction: column;
  }
  
  .cta-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 200px);
  }
  
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-column: span 1;
  }
  
  .testimonial-quote {
    font-size: 1.25rem;
  }
  
  .cta-title {
    font-size: 2rem;
  }
  
  .cta-description {
    font-size: 1rem;
  }
}