/*
 * =====================================================
 * HOME PAGE STYLESHEET
 * Holiday Home Management System
 * =====================================================
 */

/* ─── Hero Section ───────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/home/home_hero.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Gradient overlay: dark left, lighter right to allow content readability 
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
      rgba(10, 20, 18, 0.55) 100%,
      rgba(10, 20, 18, 0.35) 100%,
      rgba(10, 20, 18, 0.35) 100%);
  z-index: 1;
}*/

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 100px 0 110px;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* Hero Left: Text */
.hero-text {
  color: #ffffff;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 3.5rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.5px;
  line-height: 0.9;
  margin-bottom: 12px;
  display: block;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 650;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.hero-title span {
  font-weight: 650;
  color: var(--color-accent);

}

.hero-description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 36px;
  text-align: left;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero Right: Search Card */
.hero-search-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 16px;
  padding: 36px 32px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.search-card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 24px;
  text-align: center;
}

.search-card-title span {
  color: var(--color-primary);
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-input,
.search-select {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: #f8f9fa;
  border: 1.5px solid #dee2e6;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus,
.search-select:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(0, 107, 99, 0.12);
  background-color: #fff;
}

.search-input::placeholder {
  color: #adb5bd;
}

.search-input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.5;
  cursor: pointer;
}

.search-submit-btn {
  width: 100%;
  padding: 14px;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.4px;
}

.search-submit-btn:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* ─── Hero Login Card ────────────────────────────── */
.hero-login-card {
  padding: 32px 30px 28px;
}

.hlc-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eee;
}

.hlc-logo-full {
  max-width: 100%;
  height: auto;
  display: block;
}

.hlc-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hlc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hlc-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
}

.hlc-req {
  color: #e53e3e;
  margin-left: 2px;
}

.hlc-field input[type="email"],
.hlc-field input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: #f8f9fa;
  border: 1.5px solid #dee2e6;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.hlc-field input:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(0, 107, 99, 0.12);
  background: #fff;
}

.hlc-field input::placeholder {
  color: #adb5bd;
}

.hlc-pw-wrap {
  position: relative;
}

.hlc-pw-wrap input[type="password"],
.hlc-pw-wrap input[type="text"] {
  padding-right: 44px;
}

.hlc-pw-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 0.95rem;
  padding: 4px;
  line-height: 1;
}

.hlc-pw-toggle:hover {
  color: var(--color-primary);
}

.hlc-submit-btn {
  width: 100%;
  padding: 14px;
  background-color: #0F1918;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
  margin-top: 4px;
}

.hlc-submit-btn:hover {
  background-color: #1a2e2c;
  transform: translateY(-1px);
}

.hlc-register-link {
  text-align: center;
  font-size: 0.82rem;
  color: #777;
  margin-top: 16px;
}

.hlc-register-link a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.hlc-register-link a:hover {
  text-decoration: underline;
}

.search-submit-btn:active {
  transform: translateY(0);
}

/* ─── Stats Bar ──────────────────────────────────── */
.stats-bar {
  background: var(--color-primary);
  padding: 20px 0;
  position: relative;
  z-index: 10;
  margin-top: -70px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
}

.stats-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  color: #ffffff;
  text-align: left;
  flex: 1;
  justify-content: center;
  min-width: 200px;
}

.stat-item:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-icon {
  font-size: 1.8rem;
  color: var(--color-accent);
  flex-shrink: 0;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  display: block;
  margin-top: 2px;
}

/* ─── Featured Resorts Section ───────────────────── */
.featured-resorts {
  padding: 80px 0;
  background-color: #f8fafa;
}

.featured-resorts .section-header {
  text-align: center;
  margin-bottom: 52px;
}

.featured-resorts .section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 10px;
}

.featured-resorts .section-header p {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 540px;
  margin: 0 auto;
}

/* Resort Cards Grid */
.resorts-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.resort-card {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.resort-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 69, 64, 0.15);
}

/* Card Image Wrapper */
.resort-card-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.resort-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.resort-card:hover .resort-card-img {
  transform: scale(1.06);
}

.resort-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background-color: var(--color-accent);
  color: #1a1a1a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.resort-card-wishlist {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #aaa;
  transition: color 0.2s, background-color 0.2s;
}

.resort-card-wishlist:hover,
.resort-card-wishlist.active {
  color: #e74c3c;
  background: rgba(255, 255, 255, 1);
}

/* Card Body */
.resort-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.resort-card-location {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.resort-card-location i {
  color: var(--color-primary-light);
  font-size: 0.85rem;
}

.resort-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
  line-height: 1.3;
}


.resort-card-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Card amenities */
.resort-card-amenities {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.amenity-item i {
  color: var(--color-primary);
  font-size: 0.85rem;
}

/* Card Footer */
.resort-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  gap: 12px;
}

.resort-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.resort-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--color-accent);
  font-size: 0.82rem;
}

.resort-rating-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.resort-card-price {
  text-align: right;
}

.price-label {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 2px;
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
}

.price-period {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* Card CTA */
.resort-card-cta {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.resort-card-cta .btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.875rem;
}

/* ─── How It Works Section ───────────────────────── */
.how-it-works {
  padding: 80px 0;
  position: relative;
  background-color: #ffffff;
}

.how-it-works-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

/* Connecting line between steps */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 38px;
  left: calc(12.5% + 14px);
  right: calc(12.5% + 14px);
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-icon-wrap {
  width: 76px;
  height: 76px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 8px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease;
}

.step-item:hover .step-icon-wrap {
  transform: scale(1.08);
}

.step-icon-wrap i {
  font-size: 1.6rem;
  color: #ffffff;
}

.step-number {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  background: var(--color-accent);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
}

.step-item h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.step-item p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 0;
  max-width: 200px;
}

/* ─── Testimonials Section ───────────────────────── */
.testimonials {
  padding: 80px 0;
  position: relative;
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url('../images/home/Southern-Province.jpg') center center / cover no-repeat;
  background-attachment: fixed;
}

/* ── Text colour overrides for dark background ── */
.testimonials .section-header h2 {
  color: #ffffff;
}

.testimonials .section-header p {
  color: rgba(255, 255, 255, 0.78);
}

.testimonials .section-divider {
  background: var(--color-accent);
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.testimonial-card:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.testimonials-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.testimonial-user-info h5 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.testimonial-user-info span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
}

.testimonial-stars {
  display: flex;
  gap: 2px;
  color: var(--color-accent);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.testimonial-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  margin-bottom: 0;
  font-style: italic;
}

.quote-icon {
  font-size: 1.8rem;
  color: var(--color-accent);
  opacity: 0.6;
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}

/* ─── CTA Banner Section ─────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  padding: 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.svg') center/cover no-repeat;
  opacity: 0.07;
}

.cta-banner-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

.cta-banner h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
}

.cta-banner p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 32px;
}

.cta-banner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── Page-back to top, responsive tweaks ────────── */

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-search-card {
    max-width: 520px;
    margin: 0 auto;
  }

  .resorts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .steps-grid::before {
    display: none;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .hero-content-wrapper {
    padding: 90px 0 60px;
  }

  .stats-bar {
    margin-top: 0;
    box-shadow: none;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    text-align: justify;
    text-justify: inter-word;
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .resorts-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .steps-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-bar-container {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }

  .stat-item {
    padding: 0;
    border-right: none !important;
    justify-content: center;
    min-width: 0; /* Reset the 200px limit from desktop */
    flex: 1;
  }

  /* Hide the 3rd and 4th stat items on mobile to save space */
  .stat-item:nth-child(n+3) {
    display: none;
  }
}

@media (max-width: 540px) {
  .hero-tagline {
    font-size: 1.85rem;
    margin-bottom: 5px; /* Added more gap between tagline and title */
  }

  .hero-title {
    font-size: 1.85rem;
  }

  /* Force buttons into a tight side-by-side row */
  .hero-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    margin: 0 auto;
  }

  .hero-actions .btn {
    flex: 1; /* Both take exactly 50% */
    padding: 12px 8px; /* Compress padding */
    font-size: 0.85rem; /* Shrink text slightly */
    justify-content: center;
    white-space: nowrap;
  }

  .hero-description {
    display: none;
  }

  .hero-search-card {
    padding: 24px 18px;
  }

  .search-form-row {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner-actions {
    flex-direction: column;
    align-items: stretch;
  }

  /* Center resort cards on small screens */
  .resorts-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .resort-card-cta {
    flex-direction: column;
  }

  .resort-card-cta .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Stats bar: side-by-side with icon above numbers */
  .stats-bar-container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    text-align: center;
  }

  .stat-item {
    width: auto;
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 0;
    border-right: none !important;
    flex-direction: column; /* Stacks the icon over the text */
    gap: 8px;
  }

  /* Section headers centered */
  .section-header {
    text-align: center;
  }
}