/*
 * Theme Name: CozyStay Custom Theme
 * Description: A modern, elegant CSS theme for vacation rental, hospitality, or property showcase websites. 
 * Features a gold-accented palette, responsive card grid, sticky navbar, and testimonial sections, and more.
 *
 * Author: Pijar Sukma A.
 * Company: Absyir Interaktif
 * Email: pijar@absyir.com
 *
 * Version: 0.7.1
 * License: MIT
 * Last updated: 2025-09-17
 */

/* 
 * Sections:
 * 1. Navbar
 * 2. Header
 * 3. Hero Section
 * 4. Meet The Host Section
 * 5. Testimonials Section
 * 6. FAQ Section
 * 7. CTA Section
 * 8. Footer
 */

/*
 * Pages:
 * Global Styles
 * Details Page Styles
 * 404 Page Styles
 */

/*** Global Styles ***/

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
}

/**** Navbar ****/

.navbar {
  background-color: #222;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #e4c35f;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

ul {
  margin: 0;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  color: #ddd;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #e4c35f;
}

.nav-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: #ddd;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #222;
    flex-direction: column;
    width: 200px;
    display: none;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu li {
    margin: 0.75rem 0;
  }
}

/**** Header ****/

header {
  text-align: center;
  padding: 0.5rem 1rem 8rem; /* extra bottom padding */
  background: #222;
  color: #fff;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  position: relative;
  z-index: -1;
}

header h1 {
  font-size: 1.8rem;
  padding: 0.5rem 2rem;
  font-weight: 700;
  color: #fff;
}

header p {
  color: #fff;
  margin-top: -1rem;
}

header h1 span {
  color: #fff;
}

/**** Hero Section ****/

.hero-section {
  max-width: 1100px;
  margin: auto;
  padding: 1rem;
  margin-top: -8rem; /* pull cards up into the header */
  margin-bottom: 4rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


.carousel {
  position: relative;
  display: flex;
  align-items: center;
}

.grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 1rem;
  padding-bottom: 1rem;
  scroll-behavior: smooth;
}

.grid::-webkit-scrollbar {
  display: none;
}

.card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  flex: 0 0 80%; /* default mobile: show ~80% */
  scroll-snap-align: start;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-section {
    padding: 1rem 3rem;
  }

  .card {
    flex: 0 0 calc(50% - 0.5rem); /* 2 full cards */
  }
  .nav {
    display: block !important;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .card {
    flex: 0 0 calc(33.333% - 0.7rem); /* 3 cards */
  }
  .nav {
    display: block !important;
  }
}

/* Nav buttons */
.nav {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 99;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: none; /* hide on mobile */
  padding-bottom: 5px;
}

.prev { left: -20px; }
.next { right: -20px;}

/* Dots */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
}
.carousel-indicators .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
}
.carousel-indicators .dot.active {
  background: #c4a64f;
}



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

.card-content {
  padding: 1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rating {
  font-size: 0.9rem;
  color: #c4a64f;
  margin-bottom: 0.5rem;
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
}

.location {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 0.8rem;
  margin-top: 0.3rem;
}

.icons {
  margin: 8px 0;
  color: #555;
  font-size: 0.8rem;
  margin-top: -0.3rem;
}

.desc {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: auto;
  line-height: 1.4;
}

.price {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 1rem 0;
}

.btn {
  display: inline-block;
  font-weight: 700;
  text-align: center;
  padding: 0.6rem 1.2rem;
  background: #e4c35f;
  color: #000000;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #333;
  color: gold;
}


/**** Meet The Host Section ****/

.meet-host,
.testimonials {
  background-color: #f7f7f7;
  background-image: url("https://www.transparenttextures.com/patterns/white-wall.png");
  background-repeat: repeat;
  background-size: auto;
  padding: 4rem 2rem 0 2rem;
}

.host-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  gap: 40px;
}

@media (max-width: 589px) {
  .host-container {
    gap: 0;
  }
}

.host-photo {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.host-photo img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #e4c35f;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .host-photo {
    justify-content: center;
    margin: 0 auto;
  }
}

.host-info {
  flex: 1;
  min-width: 280px;
}

.host-info h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.host-info p {
  line-height: 1.6;
}

@media (max-width: 560px) {
  .host-info h2 {
    text-align: center;
  }
  .host-info p {
    text-align: center;
  }
  .host-stats {
    justify-content: center;
  }
}

.superhost-badge-img {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #e4c35f;
  color: #2e2e2e;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 6px;
}

.host-stats {
  display: flex;
  gap: 30px;
  margin: 20px 0;
}

.host-stats .stat {
  text-align: center;
}

.host-stats strong {
  display: block;
  font-size: 1.3rem;
  color: #333;
}

.host-stats span {
  font-size: 0.85rem;
  color: #666;
}

.host-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-btn {
  display: inline-block;
  background: #e4c35f;
  color: #333;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

.chat-btn:hover {
  background: #333;
  color: gold;
}

.airbnb-link {
  text-decoration: underline;
  text-underline-offset: 6px; /* increase distance between text and underline */
  background: none;
  border: none;
  color: #2e2e2e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s ease;
  margin-left: 10px;
}

.airbnb-link:hover {
  color: goldenrod;
}

@media (max-width: 550px) {
  .host-buttons {
    justify-content: center; /* center the buttons horizontally */
    gap: 12px; /* keep consistent spacing */
    flex-wrap: wrap; /* allow wrapping on small screens */

  }

  .chat-btn,
  .airbnb-link {
    display: inline-block; /* keep them side by side */
    margin: 0 10px 0 0; /* remove auto margins */
    text-align: center;
  }
}

/**** Testimonials Section ****/

.testimonials {
  padding-bottom: 5rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 2rem;
  color: #222;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.testimonial-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
}

.testimonial-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 5px;
  border: 2px solid gold;
}

.testimonial-name {
  font-weight: 600;
  color: #222;
  margin: 5px 0;
}

.testimonial-country {
  font-size: 0.9rem;
  color: #777;
  margin-top: -5px;
  margin-bottom: 10px;
}

.testimonial-stars {
  font-size: 1.2rem;
  color: gold;
  margin-bottom: 15px;
}

.testimonial-text {
  font-size: 0.95rem;
  color: #444;
  font-style: italic;
  line-height: 1.6;
}

/**** FAQ Section ****/
.faq {
  background: #fff;
  padding: 80px 20px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.faq .section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  font-weight: 700;
  color: #222;
}

.faq-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
  gap: 15px;
  box-sizing: border-box;
}

.faq-item {
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #f7f7f7;
}

.faq-question {
  width: 100%;
  padding: 15px 20px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #2e2e2e;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: rgba(218, 165, 32, 0.1); /* subtle gold hover */
}

.faq-icon {
  font-size: 1.2rem;
  color: gold;
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px; /* adjust based on expected text size */
  padding: 0px 20px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg); /* plus turns into X */
}

/**** CTA Section ****/

.cta {
  background: #2e2e2e;
  color: #fff;
  text-align: center;
  padding: 80px 20px 100px 20px;
}

.cta-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #e4c35f;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.cta-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.whatsapp-btn {
  background: #e4c35f;
  color: #2e2e2e;
  border: 2px solid #e4c35f;
}

.whatsapp-btn:hover {
  background: #2e2e2e;
  color: #e4c35f;
  border: 2px solid #e4c35f;
}

.airbnb-btn {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.airbnb-btn:hover {
  background: #fff;
  color: #2e2e2e;
}

/**** Footer ****/

.footer {
  text-align: center;
  padding: 3rem;
  background: #222;
  color: #fff;
}

.footer-icon {
  color: #fff;
  margin: 0 8px;
  transition: color 0.3s ease;
}

.footer-social a {
  text-decoration: none; /* remove underline */
  color: inherit; /* keep icon color consistent */
}

/*** Details Page Styles ***/

.listing-hero {
  max-width: 1150px;
  margin: -290px auto 0;
  padding: 1em 1.7em;
}

.listingSwiper {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.listingSwiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swiper-pagination-fraction {
  background: rgba(0, 0, 0, 0.5); /* dark background */
  color: #fff; /* white text */
  padding: 0.5em;
  top: 16px;
  left: auto;
  right: 16px;
  text-align: center;
  position: absolute;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1em;
  width: auto;
  height: 18px;
  display: inline-block; /* no full width */
}

@media (max-width: 768px) {
  .swiper-pagination-fraction {
    font-size: 0.8em;
    padding: 0.4em;
    top: 12px;
    right: 12px;
    height: 14px;
  }
}

.listing-overlay {
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.685));
  border-radius: 8px;
  padding: 20px 20px 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: -145px auto 24px; /* push upward over slider */
  position: relative;
  z-index: 10;
  max-width: 100%;
}

.listing-overlay .tags {
  margin-bottom: 0px;
  margin-top: 0px;
}

.listing-overlay .tags .listing-name {
  margin-block-start: 0px !important;
  margin-block-end: 0px !important;
  color: white;
  display: inline-block;
}

.listing-overlay .tag {
  background: #f3f3f3;
  color: #333;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 700;
  margin-right: 10px;
  display: inline-block;
}

.listing-overlay .tag.featured {
  background: #e4c35f;
  color: black;
}

.listing-overlay .title {
  font-size: 1.2em;
  color: white;
  font-weight: bold;
  margin: 0;
}

.listing-overlay .price {
  font-size: 1em;
  font-weight: bold;
  background: #e4c35f;
  color: black;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 6px;
  margin-bottom: 6px;
  margin-left: 6px;
}

.listing-overlay .location {
  font-size: 0.8em;
  color: white;
}

@media (max-width: 768px) {
  .listingSwiper {
    height: 300px; /* shorter height for mobile */
    border-radius: 8px 8px 0 0; /* rounded top corners only */
  }

  .listing-overlay {
    margin: -35px auto 16px; /* no negative margin */
    padding-top: 40px;
    box-shadow: none;
    background: #f5eaaf; /* optional: soft yellow for mobile */
    z-index: -1;
  }

  .listing-overlay .tags {
    margin-bottom: 8px;
  }

  .listing-overlay .tags .listing-name {
    font-size: 1rem;
    color: #333;
  }

  .listing-overlay .title {
    color: #333;
  }

  .listing-overlay .location {
    color: #333;
    margin-left: 3px;
  }

  .listing-overlay .price {
    background: #e4c35f;
    color: #333;
    margin-left: -0;
  }
}

.thumbsSwiper {
  height: 120px;
}

@media (max-width: 768px) {
  .thumbsSwiper {
    height: 60px;
  }
}

.thumbsSwiper .swiper-slide {
  width: 20%;
  height: 100%;
  opacity: 0.6;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.thumbsSwiper .swiper-slide-thumb-active {
  opacity: 1;
  border: 2px solid #e4c35f; /* gold highlight */
}

.thumbsSwiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swiper-button-next,
.swiper-button-prev {
  color: #e4c35f !important;
  transition: color 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  color: #ffffff !important;
}

.details-page-container {
  display: flex;
  line-height: 1.6;
  max-width: 1165px;
  margin: 0 auto 10px;
  width: 100%;
  gap: 20px; /* space between main and sidebar */
  padding-top: 20px;
}

.details-main-content {
  flex: 0 0 765px;
  background: #f9f9f9;
  padding: 0.9em;
}

.details-sidebar {
  flex: 0 0 300px;
  position: sticky;
  top: 60px; /* distance from top of screen */
  align-self: flex-start; /* make sure sticky works in flex */
  background: #ffeaa7;
  padding: 20px;
  border-radius: 8px;
}

@media (max-width: 1200px) {
  .details-page-container {
    flex-direction: column;
    padding: 0.5em 1em;
    box-sizing: border-box;
    gap: 0;
  }

  .details-main-content,
  .details-sidebar {
    flex: 1 1 100%;
  }

  .details-sidebar {
    position: static; /* disable sticky on mobile */
    margin: 0 15px;
    padding: 0 0 20px 0;
  }
}

.meet-host-sidebar .host-container-sidebar {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.meet-host-sidebar .host-info h2 {
  line-height: 1;
}

@media (max-width: 1200px) {
  .details-sidebar {
    width: 100%;
    display: flex;
    background: none;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
  }

  .meet-host-sidebar .host-container-sidebar {
    flex-direction: row;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    gap: 40px;
  }
  .host-stats-sidebar {
    justify-content: left !important;
    display: flex;
    gap: 30px;
    margin: 20px 0;
  }
  .meet-host-sidebar .host-info {
    justify-content: left;
    align-items: left;
    text-align: left;
  }
  .meet-host-sidebar .host-buttons {
    justify-content: left !important
  }
}

@media (max-width: 520px) {
  .details-sidebar {
    box-sizing: border-box;
    margin: 0;
    padding: 1em 0.8em;
    background: #ffeaa7;
  }
  .host-container-sidebar {
    gap: 0 !important;
  }
  .host-stats-sidebar {
    justify-content: center !important;
  }
  .meet-host-sidebar .host-buttons {
    justify-content: center !important;
  }
}

.host-stats-sidebar {
  display: flex;
  gap: 30px;
  margin: 20px 0;
  justify-content: center;
  line-height: 1.2;
}

@media (max-width: 569px) {
  .host-stats-sidebar {
    gap: 17px;
  }
}

.host-stats-sidebar .stat {
  text-align: center;
}

.host-stats-sidebar strong {
  display: block;
  font-size: 1.2rem;
  color: #333;
}

.host-stats-sidebar span {
  font-size: 0.85rem;
  color: #666;
}

.info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 2em;
  line-height: 1;
}

.info-box {
  width: fit-content;
  background: #ffeaa7;
  padding: 16px;
  border-radius: 6px;
  text-align: left;
}

@media (max-width: 600px) {
  .info-box {
    padding: 10px;
  }
}

.info-label {
  display: block;
  font-size: 0.8em;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.info-value {
  display: flex;
  justify-content: left;
  align-items: center;
  gap: 8px;
  font-size: 1em;
  font-weight: bold;
  color: #333;
}

.info-value i {
  font-size: 1.3em;
  color: #e4c35f;
}

.amenities {
  list-style: none; /* remove default bullets */
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* ✅ 3 columns on desktop */
  gap: 10px 20px; /* row gap, column gap */
}

.amenities li {
  position: relative;
  padding-left: 24px;
  font-size: 16px;
  line-height: 1.5;
}

/* ✅ checkmark before each item */
.amenities li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  color: green;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

/* ✅ 2 columns on tablets */
@media (max-width: 992px) {
  .amenities {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ✅ mobile: flex wrap row */
@media (max-width: 600px) {
  .amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
  }

  .amenities li {
    flex: 0 0 auto; /* let items size by content */
    padding-left: 22px; /* keep space for check */
  }
}

/* Property Map */

.property-map {
  width: 100%;
  height: 300px; /* or 400px */
  border-radius: 8px;
  margin: 1em 0;
}

/* Sticky bottom bar */
.sticky-bar {
  display: none; /* default hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  z-index: 9999;
}

.sticky-bar .bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}

.sticky-bar .bar-text {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.sticky-bar .bar-btn {
  background: #e4c35f;
  color: #333;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  text-wrap: nowrap;
}

.sticky-bar .bar-btn:hover {
  background: #d1aa45;
}

/* Show only on tablet & smaller */
@media (max-width: 1200px) {
  .sticky-bar {
    display: block;
  }
  #details-page {
    margin-bottom: 60px; /* space for sticky bar */
  }
  
}


/*** 404 Page Styles ***/

.error-page {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: #f7f7f7;
  color: #2e2e2e;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
}

.error-container {
  max-width: 500px;
  padding: 2em;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.error-code {
  font-size: 6rem;
  font-weight: bold;
  color: #e4c35f; /* gold accent */
  margin: 0;
}

.error-message {
  font-size: 1.25rem;
  margin: 0.5em 0 1.5em;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}