/* ------------------------------------------------------
   GLOBAL RESET
------------------------------------------------------ */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #e1f1f7;
  margin: 0;
  padding: 0;
  color: #2c3e50;
}

/* ------------------------------------------------------
   NAVBAR STYLING
------------------------------------------------------ */
.navbar {
  padding: 12px 0;
  background: #2977b3 !important;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

/* Notification badge positioning */
#notificationBadge {
  font-size: 0.7rem;
  padding: 0.25em 0.5em;
}

/* Menu dropdown icon */
#menuDropdown {
  border: none;
  background: transparent;
}

#menuDropdown:hover {
  opacity: 0.8;
}

/* Dropdown menu styling */
.dropdown-menu {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
}

.dropdown-item {
  padding: 10px 20px;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #e1f1f7;
}

.dropdown-item i {
  width: 20px;
}

/* ------------------------------------------------------
   HERO SECTION
------------------------------------------------------ */
header {
  background: #ffffff;
  padding: 60px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

header h1 {
  font-size: 2.2rem;
  font-weight: bold;
  color: #2977b3;
}

header .lead {
  font-size: 1.1rem;
  color: #5a6c7d;
}

header .btn {
  padding: 12px 30px;
  font-size: 1rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: #5ebfff;
  border: none;
  color: #ffffff;
}

header .btn:hover {
  background: #4aadeb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(94, 191, 255, 0.3);
}

/* ------------------------------------------------------
   PROMO CAROUSEL - FIXED VERSION
------------------------------------------------------ */
#promoSection {
  background: #e1f1f7;
  padding: 0; /* Remove padding for full-width */
}

#promoCarousel {
  background: white;
  border-radius: 0; /* Remove border radius */
  overflow: hidden;
  box-shadow: none; /* Remove shadow */
}

#promoCarousel .carousel-item {
  position: relative;
  height: 450px;
  overflow: hidden;
  background: #000;
}

/* Blurred background layer */
#promoCarousel .carousel-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  transform: scale(1.1);
  z-index: 1;
}

/* Main image - prevent stretching */
#promoCarousel .carousel-item img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* Prevent stretching */
  margin: auto;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Carousel controls */
#promoCarousel .carousel-control-prev-icon,
#promoCarousel .carousel-control-next-icon {
  background-color: rgba(41, 119, 179, 0.8);
  border-radius: 50%;
  padding: 25px;
  z-index: 10;
}

/* ------------------------------------------------------
   PROMO CAROUSEL - FIXED VERSION
------------------------------------------------------ */
#promoSection {
  background: #e1f1f7;
  padding: 0; /* Remove padding for full-width */
}

#promoSection .container {
  max-width: 100%; /* Full width */
  padding: 0; /* Remove container padding */
}

#promoCarousel {
  background: white;
  border-radius: 0; /* Remove border radius */
  overflow: hidden;
  box-shadow: none; /* Remove shadow */
  width: 100%; /* Ensure 100% width */
}

#promoCarousel .carousel-item {
  position: relative;
  height: 450px;
  overflow: hidden;
  background: #000;
}

/* Background layer - no blur */
#promoCarousel .carousel-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

/* Main image - prevent stretching */
#promoCarousel .carousel-item img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* Prevent stretching */
  margin: auto;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Carousel controls */
#promoCarousel .carousel-control-prev-icon,
#promoCarousel .carousel-control-next-icon {
  background-color: rgba(41, 119, 179, 0.8);
  border-radius: 50%;
  padding: 25px;
  z-index: 10;
}

/* ------------------------------------------------------
   CAGE CARD DISPLAY WITH AVAILABILITY BADGE
------------------------------------------------------ */
.cage-img {
  height: 260px;
  object-fit: contain;
  background-color: #f8f8f8;
  border-radius: 10px 10px 0 0;
  width: 100%;
}

.cage-card-clickable {
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  background: white;
  transition: box-shadow 0.3s ease;
}

.cage-card-clickable:hover {
  box-shadow: 0 4px 16px rgba(94, 191, 255, 0.2);
}

.cage-card-clickable .card-body {
  padding: 20px;
}

.cage-card-clickable .card-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #2977b3;
}

.cage-card-clickable .card-text {
  color: #6c757d;
}

/* Availability badge overlay - Updated to show "X slots left" */
.availability-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(25, 135, 84, 0.95);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.85rem;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.availability-badge.low {
  background: rgba(255, 193, 7, 0.95);
  color: #000;
}

.availability-badge.full {
  background: rgba(220, 53, 69, 0.95);
}

/* ------------------------------------------------------
   MODAL STYLING
------------------------------------------------------ */
.modal-content {
  border-radius: 15px;
  border: none;
  overflow: hidden;
}

.modal-header {
  background: #2977b3;
  color: white;
  border-radius: 15px 15px 0 0;
  border: none;
  padding: 20px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  margin: 0;
  padding: 0;
}

.modal-title {
  font-weight: bold;
  margin: 0;
  flex: 1;
}

.modal-body {
  padding: 25px;
  background: #ffffff;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

.modal-body .row {
  margin: 0;
}

.modal-body .col-md-6 {
  padding: 0 15px;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 15px 25px;
  background: #ffffff;
  border-radius: 0 0 15px 15px;
}

/* Modal cage image */
#cageInfoImage {
  max-height: 340px;
  width: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #f8f8f8;
  display: block;
  margin: 0 auto;
}

#cageInfoModal .modal-dialog {
  margin: 2rem auto;
}

#cageInfoModal .modal-body h5 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #2977b3;
  font-weight: bold;
}

#cageInfoModal .modal-body p {
  margin-bottom: 10px;
  line-height: 1.6;
}

/* ------------------------------------------------------
   FEEDBACK SECTION & CAROUSEL
------------------------------------------------------ */
#feedbackSection {
  background: #e1f1f7;
}

#feedbackSection h3 {
  font-size: 1.8rem;
  font-weight: bold;
  color: #2977b3;
}

.feedback-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Initials Circle */
.feedback-initials {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #2977b3;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.feedback-rating {
  color: #f5c518;
  font-size: 1.4rem;
  letter-spacing: 2px;
}

.feedback-text {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  flex-grow: 1;
  padding: 10px 0;
}

.feedback-date {
  font-size: 0.8rem;
  color: #999;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e9ecef;
}

/* Carousel controls for feedback */
#feedbackCarousel .carousel-control-prev,
#feedbackCarousel .carousel-control-next {
  width: 5%;
  opacity: 0.7;
}

#feedbackCarousel .carousel-control-prev-icon,
#feedbackCarousel .carousel-control-next-icon {
  background-color: rgba(41, 119, 179, 0.8);
  border-radius: 50%;
  padding: 20px;
}

/* Add Feedback Button */
#addFeedbackBtn {
  border-radius: 25px;
  padding: 10px 25px;
  font-weight: 600;
  background: #5ebfff;
  border: none;
  color: #ffffff;
}

#addFeedbackBtn:hover {
  background: #4aadeb;
}

#addFeedbackBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #cccccc;
}

/* ------------------------------------------------------
   ABOUT US SECTION
------------------------------------------------------ */
.about-bar {
  background-color: #2977b3;
  color: white;
}

.about-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.about-link {
  color: #fff;
  text-decoration: underline;
  transition: all 0.2s ease;
}

.about-link:hover {
  color: white;
}

/* ------------------------------------------------------
   FORM STYLING
------------------------------------------------------ */
.form-label {
  font-weight: 600;
  color: #2977b3;
  margin-bottom: 8px;
}

.form-control,
.form-select {
  border: 2px solid #e1f1f7;
  border-radius: 8px;
  padding: 10px 15px;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #5ebfff;
  box-shadow: 0 0 0 0.2rem rgba(94, 191, 255, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ------------------------------------------------------
   BUTTON STYLING
------------------------------------------------------ */
.btn {
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #5ebfff;
  border: none;
  color: #ffffff;
}

.btn-primary:hover {
  background: #4aadeb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(94, 191, 255, 0.3);
}

.btn-outline-light {
  border: 2px solid white;
  font-weight: 600;
  transition: all 0.3s ease;
  color: white;
}

.btn-outline-light:hover {
  background: white;
  color: #2977b3;
}

.btn-outline-secondary {
  border: 2px solid #6c757d;
}

/* ------------------------------------------------------
   UTILITY CLASSES
------------------------------------------------------ */
.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.d-none {
  display: none !important;
}

/* =========================================================
   COMPLETE RESPONSIVE CSS FOR MOBILE
========================================================= */
@media (max-width: 768px) {
  /* ---------------- General Text Shrink ---------------- */
  body,
  p,
  label,
  a {
    font-size: 0.85rem !important;
    row-gap: 5px;
  }

  h1 {
    font-size: 1.6rem !important;
  }
  h2,
  .section-title {
    font-size: 1.3rem !important;
  }
  h3 {
    font-size: 1.2rem !important;
  }
  h5,
  .card-title {
    font-size: 1rem !important;
  }

  /* ---------------- Navbar Shrink ---------------- */
  .navbar-brand span {
    font-size: 14px !important;
  }
  .brand-logo {
    width: 30px;
    height: 30px;
  }
  #UserGreeting,
  #notificationArea i,
  #menuDropdown i {
    font-size: 16px !important;
  }
  #loginBtn {
    font-size: 12px;
    padding: 3px 8px;
    margin-left: 5px;
  }

  /* ---------------- Hero Section ---------------- */
  header {
    padding: 40px 15px !important;
  }
  header h1 {
    font-size: 1.5rem !important;
  }
  header p {
    font-size: 0.9rem !important;
  }
  #bookNowBtn {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }

  /* ---------------- Promo Carousel ---------------- */
  #promoCarousel .carousel-item {
    height: 200px !important;
  }
  #promoCarousel .carousel-item img {
    max-height: 180px;
    object-fit: cover;
  }

  /* ---------------- Cage Cards - 3 per row ---------------- */
  #cageAvailability .col-12 {
    flex: 0 0 33.3333% !important;
    max-width: 33.3333% !important;
    padding: 5px !important;
  }
  .cage-img {
    height: 120px !important;
  }
  .cage-card-clickable .card-body {
    padding: 8px !important;
  }
  .availability-badge {
    font-size: 11px !important;
    padding: 3px 6px !important;
  }
  .card-title {
    font-size: 0.95rem !important;
  }
  .card-text {
    font-size: 0.75rem !important;
  }

  /* ---------------- Feedback Cards - 3 per row ---------------- */
  #feedbackSection .col-md-4 {
    flex: 0 0 33.3333% !important;
    max-width: 33.3333% !important;
    padding: 5px !important;
  }
  .feedback-card {
    min-height: 150px !important;
    padding: 8px !important;
  }
  .feedback-text {
    font-size: 0.75rem !important;
  }
  .feedback-initials {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .feedback-rating {
    font-size: 0.8rem;
  }

  /* ---------------- About Section ---------------- */
  #about-us .about-logo {
    width: 50px;
    height: 50px;
  }
  #about-us p,
  #about-us h6,
  #about-us a {
    font-size: 0.75rem;
  }

  /* ---------------- Forms & Inputs ---------------- */
  .form-label {
    font-size: 0.75rem !important;
  }
  .form-control,
  .form-select,
  textarea {
    font-size: 0.75rem !important;
    padding: 5px 8px !important;
  }

  /* ---------------- Buttons ---------------- */
  .btn {
    font-size: 0.75rem !important;
    padding: 5px 10px !important;
  }

  /* ---------------- Modal ---------------- */
  .modal-content {
    font-size: 0.8rem !important;
  }
  #cageInfoImage {
    max-height: 150px !important;
  }
}

/* ---------------- Ultra small phones (<400px) ---------------- */
@media (max-width: 400px) {
  h1 {
    font-size: 1.3rem !important;
  }
  h2,
  .section-title {
    font-size: 1.1rem !important;
  }
  header {
    padding: 30px 10px !important;
  }
  #bookNowBtn {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  #cageAvailability .col-12,
  #feedbackSection .col-md-4 {
    flex: 0 0 33.33% !important;
    max-width: 33.33% !important;
    padding: 3px !important;
  }

  .cage-img {
    height: 100px !important;
  }
  .feedback-card {
    min-height: 120px !important;
    padding: 5px !important;
  }
  .feedback-text {
    font-size: 0.7rem !important;
  }
}

/* ---------------- Responsive Cage Modal ---------------- */
@media (max-width: 992px) {
  #cageInfoModal .modal-header {
    padding: 15px 20px;
    justify-content: space-between !important; /* Override center alignment */
    text-align: left; /* Override center text */
  }

  #cageInfoModal .modal-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  #cageInfoModal .modal-header {
    flex-direction: row !important; /* Keep horizontal layout */
    align-items: center;
    justify-content: space-between !important;
  }

  #cageInfoModal .modal-title {
    font-size: 1rem;
    margin-bottom: 0; /* Remove bottom margin */
  }
}

/* Ultra small screens */
@media (max-width: 576px) {
  #cageInfoModal .modal-dialog {
    max-width: 95%;
  }

  #cageInfoModal .modal-header {
    flex-direction: column;
    align-items: center;
  }

  #cageInfoModal .modal-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
  }

  #cageInfoModal img#cageInfoImage {
    max-height: 150px;
  }

  #cageInfoModal .modal-body {
    font-size: 0.85rem;
  }
}

/* ------------------------------------------------------
   SMOOTH SCROLLING
------------------------------------------------------ */
html {
  scroll-behavior: smooth;
}

/* ------------------------------------------------------
   LOADING STATES
------------------------------------------------------ */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #5ebfff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
