/* ========== General Styles ========== */
body {
    background-color: #1f2937;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
}

.hidden {
    display: none !important;
}

.fancy-header {
    /* background: url('header_img2_small.jpg') no-repeat center center; */
    background-color: #000000;
    background-size: cover;
    padding: 0.5rem 0;
    border-bottom: 5px solid #ffbf00;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.fancy-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(51, 56, 61, 0.7);
    z-index: 0;
}

.fancy-header * {
    position: relative;
    z-index: 1;
}

.header-logo {
    width: 280px;
    height: auto;
}

.social-icons {
    position: absolute;
    top: 10rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

input,
select,
textarea {
    background: #fff;
    color: #000;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

/* ========== Listing Cards ========== */
.listing-card {
    /* background: #374151; */
    padding: 15px;
    border: 1px solid #4b5563;
    border-radius: 15px;
    background: #111827;
    box-shadow: 3px 3px 13px #ffffff;
    color: #f9fafb;
    min-height: 250px;
    max-width: 800px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.listing-card img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 10px;
}

.listing-details p {
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #e5e7eb;
}

.listing-details strong {
    font-weight: 600;
    color: #f9fafb;
}

.button-row {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.listing-card button,
.listing-actions button {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 1;
}

.listing-card .edit-btn,
.listing-actions .edit-btn {
    background: #f59e0b;
    color: #fff;
}

.listing-card .delete-btn,
.listing-actions .delete-btn {
    background: #ef4444;
    color: #fff;
}

.listing-card .toggle-status-btn {
    background: #10b981;
    color: #fff;
}

.contact-btn,
.intasendPayButton {
    background: #ffbf00;
    color: #fff;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    text-align: center;
    width: 100%;
    transition: background-color 0.2s;
}

.contact-btn:hover,
.intasendPayButton:hover {
    background: #228b22;
}

.description {
    white-space: pre-line;
}

/* ========== Photo Slider ========== */
.photo-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 10px;
    scroll-behavior: smooth;
}

.photo-slider::-webkit-scrollbar {
    height: 6px;
}

.photo-slider::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.photo-slider img {
    scroll-snap-align: start;
    width: 95%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.photo-slider img:hover {
    transform: scale(1.05);
}

.slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slider img {
    display: none;
    width: 100%;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.slider img.active {
    display: block;
}

.slider button.prev,
.slider button.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 10;
}

.slider button.prev {
    left: 10px;
}

.slider button.next {
    right: 10px;
}

/* ========== Listing Mini Cards ========== */
.listing-mini-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    color: #f9fafb;
    gap: 10px;
}

.photo-stack {
    display: flex;
    position: relative;
    width: 100px;
    min-width: 100px;
}

.photo-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #fff;
    position: absolute;
}

.thumb-0 {
    left: 0;
    z-index: 3;
}

.thumb-1 {
    left: 20px;
    z-index: 2;
}

.thumb-2 {
    left: 40px;
    z-index: 1;
}

.photo-more {
    position: absolute;
    left: 60px;
    background: rgba(0, 0, 0, 0.66);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 10px;
    border-radius: 6px;
    min-width: 40px;
    text-align: center;
}

.no-photo {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
}

.listing-info h5 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
}

.listing-info p {
    margin: 2px 0 0;
    font-size: 12px;
}

/* ========== Footer ========== */
footer {
    background: #111827;
    color: #d1d5db;
    padding: 15px 0;
    margin-top: 20px;
    border-top: 5px solid #ffbf00;
    justify-content: center;
}

@media (max-width: 767px) {
    .footer-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: center;
    }

    .footer-content .col-md-4 {
        margin-bottom: 1rem;
        width: 100%;
    }
}

/* ========== Modals ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: #1f2937;
    color: #fff;
    max-width: 90%;
    width: 600px;
    border-radius: 10px;
    padding: 20px;
    margin: 50px auto;
}

.lightbox-modal {
    position: fixed;
        z-index: 9999;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.9);
        display: flex;
        align-items: center;
        justify-content: center;
}

.lightbox-modal.hidden {
    display: none;
}

.lightbox-content {
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    font-size: 40px;
    color: #ffbf00;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ffbf00;
    font-size: 40px;
    cursor: pointer;
    padding: 10px;
}

#lightboxPrev {
    left: 20px;
}

#lightboxNext {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    color: #fff;
    font-size: 16px;
}

/* ========== Loaders and Animations ========== */
#listingLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 41, 55, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-overlay {
    text-align: center;
    color: #fff;
}

.spinner-border {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #ffbf00;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* .skeleton-card {
    height: 300px;
    background: linear-gradient(-90deg, #2e2e2e 0%, #3a3a3a 50%, #2e2e2e 100%);
    background-size: 400% 400%;
    animation: shimmer 1.2s ease infinite;
    border-radius: 8px;
} */

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

img.lazy {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

img.loaded {
    opacity: 1;
}

/* ========== Buttons ========== */
 
 
    /* background: #228B22; */
#seeMoreBtn {
    display: none;
    width: 100%;
    background-color: #228B22;
    color: #fff;
    font-weight: bold;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease forwards;
}

#seeMoreBtn:hover {
    background-color: #e6ac00;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ========== Admin Panel ========== */
.admin-photo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

/* ========== Media Queries ========== */
@media (max-width: 576px) {
    .listing-card {
        padding: 10px;
        border-radius: 0;
    
    }

    .header-logo {
        height: auto;
        width: 200px;
    }

    .social-icons {
        top: 8rem;
    }
}

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: none;
    /* hidden by default */
    background: #228B22;
    color: #fff;
    border: none;
    outline: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

#backToTop:hover {
    background: #eab308;
}

.occupied-card {
    opacity: 0.55;
    position: relative;
}

.occupied-card::after {
    content: "OCCUPIED";
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ffbf00;
    color: #000;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 6px;
}

.address-autocomplete {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    color: #000 !important;
    /* Black text */
    background-color: #fff;
    box-shadow: none;
    outline: none;
    transition: border-color 0.3s;
}

.address-autocomplete:focus {
    border-color: #ffbf00;
    box-shadow: 0 0 5px rgba(255, 191, 0, 0.5);
}

.address-autocomplete.invalid {
    border-color: #ff4d4d;
    background-color: #fff5f5;
}

.address-autocomplete::placeholder {
    color: #999;
    opacity: 1;
}

.form-control {
    font-family: Arial, sans-serif;
}

 /* Default state */
 #faqAccordion .accordion-button {
     color: white;
 }

 /* Hover state */
 #faqAccordion .accordion-button:hover {
     color: #ffbf00;
 }

 /* Active/expanded state */
 #faqAccordion .accordion-button:not(.collapsed) {
     color: #ffbf00 !important;
     background-color: #222 !important;
     /* keeps dark bg */
     box-shadow: none;
 }
 
 .bg-testimonials {
     background:
         linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.85)),
         url("images/eldoret-bg.jpg") center/cover no-repeat;
 }
  
 .bg-testimonials {
     background-attachment: fixed;
     /* parallax effect */
 }

/* Agents listings scroll */

  /* make modal scrollable for many listings */
  .modal-body {
      max-height: 70vh;
      overflow-y: auto;
      padding-right: 10px;
      scroll-behavior: smooth;
  }

  /* sticky header inside modal */
  .modal-header {
      position: sticky;
      top: 0;
      background: #111;
      z-index: 10;
  }

  /* enhance table visuals */
  #adminUsersTable th,
  #adminUsersTable td {
      vertical-align: middle;
  }

  /* modal shadows */
  .modal-content {
      border-radius: 12px;
      box-shadow: 0 0 20px rgba(255, 191, 0, 0.3);
  }

  .admin-summary {
      background: rgba(255, 191, 0, 0.1);
      border-left: 5px solid #ffbf00;
      font-size: 15px;
      font-weight: 500;
  }

  /* ========== My Listings Grid Layout ========== */
  .my-listings-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
      gap: 16px;
      margin-top: 15px;
  }

  /* Each listing card */
  .landlord-listing-card {
      background: #1e293b;
      /* dark slate background */
      border-radius: 10px;
      overflow: hidden;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
      transition: transform 0.2s ease;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      color: #fff;
  }

  .landlord-listing-card:hover {
      transform: translateY(-3px);
  }

  /* Media (image or video) */
  .listing-media {
      width: 100%;
      height: 180px;
      overflow: hidden;
  }

  .listing-img,
  .listing-media video {
      width: 100%;
      height: 100%;
      object-fit: cover;
  }

  /* Details Section */
  .listing-details {
      padding: 10px 12px;
      flex-grow: 1;
  }

  .listing-details h5 {
      margin-bottom: 6px;
      font-size: 1.1rem;
      color: #ffbf00;
  }

  .listing-details p {
      margin: 2px 0;
      font-size: 0.9rem;
  }

  /* Actions Section */
  .listing-actions {
      display: flex;
      justify-content: space-around;
      padding: 10px;
      background: rgba(255, 255, 255, 0.05);
      border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .listing-actions button {
      border: none;
      font-size: 0.85rem;
      border-radius: 6px;
      padding: 5px 8px;
  }

 /* Smooth animation for showing edit form */
 /* #listingForm {
     display: none;
     opacity: 0;
     transform: translateY(-15px);
     transition: all 0.4s ease-in-out;
 }

 #listingForm.active {
     display: block;
     opacity: 1;
     transform: translateY(0);
     z-index: 999;
 } */

 /* === Smooth Edit Form Reveal === */
 #listingForm {
     display: none;
     opacity: 0;
     transform: translateY(-20px);
     transition: all 0.4s ease-in-out;
 }

 #listingForm.active {
     display: block;
     opacity: 1;
     transform: translateY(0);
 }

 /* ===== Modal Overlay ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Modal Box ===== */
.modal-content {
  background: #1e1e1e;
  color: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

/* ===== Buttons ===== */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.save-btn {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.cancel-btn {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}


/* ========== Photo Slider Enhanced ========== */
 .photo-slider {
     position: relative;
     overflow: hidden;
     border-radius: 12px;
     background: #111;
 }

 .slider-wrapper {
     display: flex;
     will-change: transform;
 }

 .photo-slider img {
     width: 100%;
     height: 250px;
     object-fit: cover;
     transition: transform 0.25s ease;
 }

 .slider-dots {
     position: absolute;
     bottom: 10px;
     left: 50%;
     transform: translateX(-50%);
     display: flex;
     gap: 6px;
 }

 .slider-dots .dot {
     width: 8px;
     height: 8px;
     border-radius: 50%;
     background: rgba(255, 255, 255, 0.5);
     transition: background 0.3s;
 }

 .slider-dots .dot.active {
     background: #ffd700;
 }

 /* === Listing Upload Loader === */
 .loader-overlay {
     position: fixed;
     inset: 0;
     background: rgba(0, 0, 0, 0.6);
     backdrop-filter: blur(6px);
     display: flex;
     justify-content: center;
     align-items: center;
     z-index: 99999;
     transition: opacity 0.3s ease;
 }

 .loader-overlay.hidden {
     opacity: 0;
     pointer-events: none;
 }

 .loader-box {
     text-align: center;
     color: #fff;
     font-family: "Poppins", sans-serif;
 }

 .spinner {
     width: 60px;
     height: 60px;
     border: 6px solid rgba(255, 255, 255, 0.2);
     border-top-color: #ffbf00;
     border-radius: 50%;
     margin: 0 auto 16px;
     animation: spin 0.8s linear infinite;
 }

 @keyframes spin {
     to {
         transform: rotate(360deg);
     }
 }
