/* ============================================================
   Kapaasi Premium Stays — Main Stylesheet
   ============================================================ */

:root {
  --brand-green:   #4a4750;   /* was deep green — now charcoal-grey (primary) */
  --brand-gold:    #d6577f;   /* was gold — now rose pink (accent) */
  --brand-light:   #f6eef1;   /* pale pink-grey */
  --brand-cream:   #faf8f9;   /* warm off-white */
  --brand-dark:    #2c2a2e;   /* deep charcoal */
  --text-muted:    #6b7280;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow:        0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.14);
  --transition:    0.25s ease;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--brand-cream);
  color: #1f2937;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-font {
  font-family: 'Playfair Display', Georgia, serif;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; display: block; }

/* ── Utility ── */
.text-gold  { color: var(--brand-gold) !important; }
.bg-green   { background: var(--brand-green) !important; }
.bg-cream   { background: var(--brand-cream) !important; }

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kps-toast {
  min-width: 260px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: #fff;
  border-left: 4px solid var(--brand-green);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: slideUp 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.kps-toast.error   { border-left-color: #dc2626; }
.kps-toast.success { border-left-color: #16a34a; }
.kps-toast.warning { border-left-color: var(--brand-gold); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Spinner ── */
.kps-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--brand-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-block {
  padding: 48px 0;
  text-align: center;
  color: var(--text-muted);
}

/* ── Navbar ── */
.kps-nav {
  background: var(--brand-green);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.kps-nav .navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-gold) !important;
  letter-spacing: 0.5px;
  padding: 14px 0;
}

.kps-nav .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.4px;
  padding: 8px 12px !important;
  border-radius: 6px;
  transition: all var(--transition);
  position: relative;
}

.kps-nav .nav-link:hover,
.kps-nav .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,0.12);
}

.kps-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--brand-gold);
  border-radius: 2px;
}

.kps-nav .navbar-toggler {
  border-color: rgba(255,255,255,0.4);
}

.kps-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── Hero ── */
.kps-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--brand-green) url('/static/images/hero-bg.jpg') center/cover no-repeat;
  color: #fff;
  overflow: hidden;
}

.kps-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(13,31,26,0.72) 0%, rgba(74, 71, 80,0.55) 100%);
  z-index: 1;
}

.kps-hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 20px;
}

.kps-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.kps-hero p {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto 28px;
}

/* ── Page Header (smaller than hero) ── */
.kps-page-header {
  background: var(--brand-green) url('/static/images/hero-bg.jpg') center/cover no-repeat;
  position: relative;
  padding: 72px 20px 56px;
  text-align: center;
  color: #fff;
}

.kps-page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13,31,26,0.68);
}

.kps-page-header > * { position: relative; z-index: 1; }

.kps-page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 8px;
}

.kps-page-header p { opacity: 0.88; font-size: 1.05rem; }

/* ── Section Label ── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: 8px;
}

/* ── Property Cards ── */
.property-card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.property-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 230px;
}

.property-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.property-card:hover .card-img-wrap img {
  transform: scale(1.06);
}

.property-card .card-body {
  padding: 1.25rem;
}

.property-card .card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.availability-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.available   { background: #16a34a; }
.unavailable { background: #dc2626; }

/* ── Buttons ── */
.btn-brand {
  background: var(--brand-green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-brand:hover {
  background: #244d42;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 71, 80,0.28);
}

.btn-gold {
  background: var(--brand-gold);
  color: var(--brand-dark);
  border: none;
  border-radius: var(--radius);
  padding: 10px 24px;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-gold:hover {
  background: #b8923d;
  color: #fff;
}

.btn-outline-brand {
  background: transparent;
  color: var(--brand-green);
  border: 1.5px solid var(--brand-green);
  border-radius: var(--radius);
  padding: 9px 22px;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-outline-brand:hover {
  background: var(--brand-green);
  color: #fff;
}

/* ── Book Now Floating Button ── */
.btn-book-float {
  position: fixed;
  right: 28px;
  bottom: 28px;
  background: #c9a84c;
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 6px 24px rgba(214, 87, 127,0.42);
  z-index: 1100;
  transition: all var(--transition);
  cursor: pointer;
  letter-spacing: 0.3px;
}

.btn-book-float:hover {
  background: #b8923d;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(214, 87, 127,0.52);
}

/* ── WhatsApp Button ── */
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 22px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
}

.btn-whatsapp:hover {
  background: #1da851;
  color: #fff;
  transform: translateY(-1px);
}

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,31,26,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  color: #fff;
  font-size: 2rem;
  opacity: 0;
}

.gallery-item:hover .gallery-overlay {
  background: rgba(13,31,26,0.42);
  opacity: 1;
}

/* ── Lightbox ── */
#kps-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#kps-lightbox.open { display: flex; }

#kps-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
  animation: zoomIn 0.25s ease;
}

#kps-lightbox .lb-close {
  position: absolute;
  top: 20px;
  right: 28px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

#kps-lightbox .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  padding: 12px 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

#kps-lightbox .lb-nav:hover { background: rgba(255,255,255,0.3); }
#kps-lightbox .lb-prev { left: 20px; }
#kps-lightbox .lb-next { right: 20px; }
#kps-lightbox .lb-caption { color: rgba(255,255,255,0.7); margin-top: 10px; font-size: 0.9rem; }

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Booking Modal ── */
.modal-content { border-radius: var(--radius-lg); overflow: hidden; border: none; }

.modal-header-brand {
  background: var(--brand-green);
  color: #fff;
  border-bottom: none;
  padding: 20px 24px;
}

.modal-header-brand .btn-close { filter: invert(1) brightness(2); }

/* Price box */
.price-box {
  background: var(--brand-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.88rem;
}

.price-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed #d1c9b8;
  color: #4b5563;
}

.price-line:last-child { border-bottom: none; }
.price-total { font-weight: 700; font-size: 1rem; color: var(--brand-green); }

/* Steps wizard */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  transition: all 0.25s;
  flex-shrink: 0;
}

.step-dot.active {
  border-color: var(--brand-green);
  background: var(--brand-green);
  color: #fff;
}

.step-dot.done {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.step-line {
  height: 2px;
  width: 48px;
  background: #d1d5db;
  flex-shrink: 0;
}

.step-line.done { background: #16a34a; }

.step-panel { display: none; }
.step-panel.active { display: block; }

/* Success animation */
.booking-success {
  text-align: center;
  padding: 32px 16px;
}

.success-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 2rem;
  color: #16a34a;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── Availability Calendar Indicators ── */
.cal-legend { display: flex; gap: 16px; font-size: 13px; }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.cal-dot.booked    { background: #dc2626; }
.cal-dot.available { background: #16a34a; }

/* Date range picker accent */
input[type="date"]:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(74, 71, 80,0.12);
}

/* ── Staff Cards ── */
.staff-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  text-align: center;
}

.staff-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.staff-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.staff-card-body { padding: 14px; }
.staff-card h5 { font-weight: 600; margin-bottom: 4px; font-size: 1rem; }
.staff-card .role { color: var(--text-muted); font-size: 0.875rem; }

/* ── FAQ ── */
.accordion-button:not(.collapsed) {
  background: var(--brand-light);
  color: var(--brand-green);
}

.accordion-button:focus { box-shadow: 0 0 0 3px rgba(74, 71, 80,0.12); }

/* ── Booking Tracker ── */
.result-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--brand-green);
  position: relative;
  margin-bottom: 14px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending   { background: #fef9c3; color: #854d0e; }
.status-confirmed { background: #dcfce7; color: #14532d; }
.status-cancelled { background: #fee2e2; color: #7f1d1d; }

/* ── Pricing Cards ── */
.pricing-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  text-align: center;
  border: 2px solid transparent;
  transition: all var(--transition);
  height: 100%;
}

.pricing-card:hover { border-color: var(--brand-gold); transform: translateY(-4px); }
.pricing-card.featured { border-color: var(--brand-gold); }

.pricing-card .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-green);
  font-family: 'Playfair Display', serif;
}

/* ── Testimonials ── */
.testimonial-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  height: 100%;
}

.testimonial-card .stars { color: var(--brand-gold); font-size: 1rem; }
.testimonial-card .text { font-style: italic; color: #4b5563; line-height: 1.7; margin: 12px 0; }
.testimonial-card .author { font-weight: 600; font-size: 0.9rem; }
.testimonial-card .date { color: var(--text-muted); font-size: 0.8rem; }

.avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Footer ── */
.kps-footer {
  background: var(--brand-dark);
  color: rgba(255,255,255,0.8);
  padding: 52px 0 28px;
}

.kps-footer h5 {
  color: var(--brand-gold);
  font-family: 'Playfair Display', serif;
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.kps-footer p, .kps-footer a { font-size: 0.9rem; }
.kps-footer a { color: rgba(255,255,255,0.65); transition: color var(--transition); }
.kps-footer a:hover { color: var(--brand-gold); }

.kps-footer .footer-divider {
  border-color: rgba(255,255,255,0.1);
  margin: 32px 0 20px;
}

.kps-footer .social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}

.kps-footer .social-link:hover { background: var(--brand-gold); color: var(--brand-dark); }

.kps-footer .footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

/* ── Confirm Modal (replaces browser confirm()) ── */
#confirm-modal .modal-content { border-radius: var(--radius-lg); }
#confirm-modal .modal-header { border-bottom: none; padding-bottom: 0; }
#confirm-modal .modal-footer { border-top: none; padding-top: 0; }

/* ── Admin ── */
.admin-nav {
  background: var(--brand-green);
  padding: 0 1.5rem;
}

.admin-nav .navbar-brand {
  font-family: 'Playfair Display', serif;
  color: var(--brand-gold) !important;
  font-size: 1.2rem;
  font-weight: 700;
}

.admin-nav .nav-link {
  color: rgba(255,255,255,0.82) !important;
  font-size: 0.875rem;
  font-weight: 500;
}

.admin-nav .nav-link:hover { color: #fff !important; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .kps-hero { min-height: 420px; }
  .kps-nav .nav-link.active::after { display: none; }
}

@media (max-width: 767px) {
  .kps-hero { min-height: 340px; }
  .btn-book-float { right: 16px; bottom: 16px; padding: 12px 22px; font-size: 0.92rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  #kps-lightbox .lb-nav { display: none; }
}

@media (max-width: 480px) {
  .kps-hero h1 { font-size: 1.7rem; }
  .step-line { width: 28px; }
}
