/* ===== NAVBAR STYLES ===== */
.navbar {
  background-color: var(--nav-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 70px;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 15px var(--nav-text);
  border-radius: var(--border-radius);
  width: 70%;
  max-width: 1200px;
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background-color: var(--nav-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
}

/* ===== LOGO STYLES ===== */
.logo {
  flex: 0 0 auto;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

/* ===== NAVIGATION LINKS ===== */
.nav-links {
  display: flex;
  list-style: none;
  justify-content: center;
  margin: 0 30px;
  flex: 1;
  gap: 25px;
}

.nav-links li {
  margin: 0;
  flex: 1;
  max-width: 140px;
}

.nav-links a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--nav-text);
  text-decoration: none;
  display: block;
  transition: var(--transition);
  font-size: 18px;
  position: relative;
  border-radius: 25px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  font-weight: bold;
  padding: 10px 5px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--accent-color);
  transition: var(--transition);
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-links a:hover::after {
  width: 70%;
}

/* ===== NAV BUTTONS ===== */
.nav-buttons {
  display: flex;
  gap: 15px;
  margin-left: -26px;
}

.nav-button {
  padding: 10px 30px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  width: 165px;
}

/* Book Now Button */
.book-button {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-color));
  color: var(--text-dark);
  box-shadow: 0 4px 12px rgba(254, 189, 15, 0.3);
  border: 2px solid transparent;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.book-button:hover {
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 250, 7, 0.4);
  border-color: var(--accent-secondary);
}

/* ===== MOBILE MENU TOGGLE BUTTON ===== */
.mobile-menu-toggle {
  display: none;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-color));
  color: var(--text-dark);
  border: none;
  border-radius: var(--border-radius);
  padding: 10px 20px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(254, 189, 15, 0.3);
  position: relative;
  width: 120px;
  height: 40px;
  z-index: 1001;
}

.mobile-menu-toggle:hover {
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 250, 7, 0.4);
}

.mobile-menu-toggle .menu-text,
.mobile-menu-toggle .close-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.mobile-menu-toggle .menu-text {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-toggle .close-text {
  opacity: 0;
  visibility: hidden;
}

.mobile-menu-toggle.active .menu-text {
  opacity: 0;
  visibility: hidden;
}

.mobile-menu-toggle.active .close-text {
  opacity: 1;
  visibility: visible;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Tablets and Small Desktops (1025px - 1200px) */
@media (max-width: 1200px) {
  .navbar {
    width: 80%;
  }

  .nav-links {
    gap: 20px;
    margin: 0 20px;
  }

  .nav-links a {
    font-size: 16px;
  }
}

/* Tablets (769px - 1024px) */
@media (max-width: 1024px) {
  .navbar {
    width: 85%;
    padding: 0 30px;
  }

  .nav-links {
    gap: 15px;
    margin: 0 15px;
  }

  .nav-links a {
    font-size: 15px;
    padding: 8px 4px;
  }

  .nav-button {
    width: 150px;
    padding: 8px 25px;
    font-size: 15px;
    margin-left: 5px;
  }

  .logo img {
    height: 35px;
  }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
  .navbar {
    padding: 10px 20px;
    height: 60px;
    width: 90%;
    flex-direction: row;
    align-items: center;
    transition: all 0.3s ease;
    overflow: hidden; /* Keep hidden to contain the expanded menu */
  }

  .nav-container {
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
  }

  /* Logo on the left */
  .logo {
    order: 1;
    flex: 0 0 auto;
    z-index: 1002;
  }

  .logo img {
    height: 35px;
  }

  /* Navigation links - hidden by default on mobile */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin: 0;
    gap: 8px;
    order: 3;
    position: absolute;
    top: 60px; /* Position below the initial navbar */
    left: 0;
    background-color: transparent;
    padding: 15px 20px;
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 0;
    width: 100%;
    max-width: none;
  }

  .nav-links a {
    padding: 12px 15px;
    text-align: center;
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    width: 100%;
    backdrop-filter: blur(10px);
  }

  /* Buttons container on the right */
  .nav-buttons-container {
    display: flex;
    gap: 10px;
    align-items: center;
    order: 2;
    flex: 0 0 auto;
    z-index: 1002;
  }

  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: block;
    width: 120px;
    height: 40px;
    order: 2;
  }

  /* Show Book A Call button next to menu */
  .nav-buttons {
    display: flex !important;
    margin-left: 0;
    order: 1;
  }

  .nav-buttons .nav-button {
    width: 130px;
    padding: 8px 20px;
    font-size: 14px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Expand navbar into a square/rectangle when menu is open */
  .navbar:has(.nav-links.active) {
    height: 400px; /* Square/rectangle height */
    min-height: 400px;
    padding-bottom: 20px;
    /* Keep the same width and position */
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  /* Adjust nav container for expanded state */
  .navbar:has(.nav-links.active) .nav-container {
    height: 100%;
    align-items: flex-start;
    padding-top: 10px;
  }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
  .navbar {
    padding: 8px 15px;
    width: 92%;
    height: 60px;
  }

  .navbar:has(.nav-links.active) {
    height: 350px; /* Slightly smaller square for small screens */
    min-height: 350px;
    padding: 8px 15px 15px;
  }

  .logo img {
    height: 26px;
  }

  .mobile-menu-toggle {
    width: 70px;
    font-size: 14px;
    padding: 8px 15px;
    height: 40px;
  }

  .nav-buttons .nav-button {
    width: 120px;
    padding: 7px 15px;
    font-size: 13px;
    height: 40px;
  }

  .nav-links {
    gap: 6px;
    padding: 12px 15px;
  }

  .nav-links a {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}

/* Very Small Mobile Devices (360px and below) */
@media (max-width: 360px) {
  .navbar {
    padding: 6px 10px;
    height: 60px;
  }

  .navbar:has(.nav-links.active) {
    height: 320px; /* Even smaller for very small screens */
    min-height: 320px;
    padding: 6px 10px 12px;
  }

  .logo img {
    height: 23px;
  }

  .mobile-menu-toggle {
    width: 60px;
    font-size: 12px;
    padding: 6px 12px;
    height: 36px;
    margin-left: -7px;
  }

  .nav-buttons .nav-button {
    width: 100px;
    padding: 6px 12px;
    font-size: 12px;
    height: 36px;
  }

  .nav-links {
    gap: 5px;
    padding: 10px 12px;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
}
