@media (max-width: 768px) {
  .offcanvas {
    width: 100%;
    border-left: none;
    border-top: 3px solid #0077ff1a;
    animation: offcanvas-slide-up 0.5s ease forwards;
  }

  @keyframes offcanvas-slide-up {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .offcanvas-header {
    justify-content: space-between;
  }

  .offcanvas-nav li a {
    font-size: 1.05rem;
    padding: 12px 20px;
  }
}

/* ❌ Removed the old button-hiding code */

/* NAVBAR SPACING */
@media (max-width: 992px){
  .navbar {
    margin: 0 !important;           
    padding: 0.6rem 1.2rem;          
    flex-wrap: nowrap;              
    justify-content: space-between;  
  }
}

@media (max-width: 1024px){
  .navbar {
    margin: 0 !important;           
    padding: 0.6rem 1.2rem;          
    flex-wrap: nowrap;              
    justify-content: space-between;  
  }
  #logo{
    height: 40px;
    margin: 0;
  }
  #mainNav{
    padding: 0 10px !important;
  }

  .btn-enquire button,
  .brochure-btn{
    width: 100px;
    text-align: center !important;
    font-size: 12px;
  }

  .nav-link{
    font-size: 14px;
    gap: 2px!important;
  }
}

@media (max-width: 820px){
  .navbar {
    margin: 0 !important;           
    padding: 0.6rem 1.2rem;          
    flex-wrap: nowrap;              
    justify-content: space-between;  
  }
}

@media (max-width: 768px) {
  .navbar {
    margin: 0 !important;           
    padding: 0.6rem 1.2rem;          
    flex-wrap: nowrap;              
    justify-content: space-between;  
  }

  .dropdown-item{
    font-size: 0.85rem !important;
  }

  #logo {
    max-height: 50px;
    width: auto;
  }

  .navbar-nav {
    display: none !important;
  }

  .navbar-toggler {
    margin-left: auto;
    order: 2;
  }

  /* ❌ VERY IMPORTANT — removed: display: none for buttons */

  .offcanvas-nav li a {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  .dropdown-toggle b {
    font-size: 0.80rem;
  }

  .offcanvas-body{
    overflow-x: hidden;
  }
}

/* Offcanvas visibility */
.offcanvas {
  display: none;
}

@media (max-width: 1024px) {
  .offcanvas {
    display: block; 
  }

  .navbar-toggler {
    display: block; 
  }
}

@media (min-width: 1025px) {
  .navbar-toggler {
    display: none !important;
  }
  
  .navbar .nav-link{
    padding: 0.8rem 0.7rem !important;
  }
}

/* ===================== carousel ===================== */

@media (min-width: 1024px){
  #heroCarousel .carousel-item {
    height: 60vh;
  }
  .carousel-control-prev,
  .carousel-control-next{
    transform: translateY(-50%);
  }
  
  #heroCarousel .carousel-caption {
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
      max-width: 90%;
      white-space: normal;
      padding: 0 1rem;
  }

  #heroCarousel .carousel-caption h1 {
      font-size: 2.4rem;
      line-height: 1.2;
  }

  #heroCarousel .carousel-caption p {
      font-size: 1.2rem;
      max-width: 100%;
  }
}

@media (min-width: 992px) {
  #heroCarousel .carousel-caption {
      left: 10%;
      right: auto;
      text-align: left;
      transform: translateY(-50%);
      white-space: normal;
      max-width: 600px;
  }
}

@media (max-width: 991px) {
  #heroCarousel .carousel-item {
    height: 40vh;
  }

  .carousel-control-prev,
  .carousel-control-next{
    transform: translateY(-60%);
  }
  
  #heroCarousel .carousel-caption {
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
      max-width: 90%;
      white-space: normal;
      padding: 0 1rem;
  }

  #heroCarousel .carousel-caption h1 {
      font-size: 1.8rem;
      line-height: 1.2;
  }

  #heroCarousel .carousel-caption p {
      font-size: 1rem;
      max-width: 100%;
  }
}

@media (max-width: 768px){
  .carousel-control-prev,
  .carousel-control-next{
    transform: translateY(-20px);
  }
}

@media (max-width: 576px) {
  #heroCarousel .carousel-item {
    height: 50vh;
  }

  #heroCarousel .carousel-caption h1 {
      font-size: 1.4rem;
  }

  #heroCarousel .carousel-caption p {
      font-size: 0.9rem;
  }
}
