.portfolio-item {
  height: 260px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.google-map {
  position: relative;
  width: 100%;
  padding-top: 95vh;
}

@media (max-width: 768px) {
  .google-map {
      padding-top: 177.77%;
  }
}

.google-map iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.rounded {
  border-radius: 20px !important;
}

.shadow-dark {
  -webkit-box-shadow: 0px 5px 20px 0px rgba(47, 54, 64, 0.1);
  box-shadow: 0px 5px 20px 0px rgba(47, 54, 64, 0.1);
}

#logoOverlay {
  position: absolute;
  bottom: 2%;
  left: 1%;
  width: 18%;
  height: 7%;
  background-color: #ffffff;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: black;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  font-family: "Ubuntu", sans-serif;
}

@media (max-width: 768px) { 
  #logoOverlay {
      bottom: 12%;
      left: 0.7%;
      width: 13%;
      height: 7%;
      font-size: 10px;
      font-family: "Ubuntu", sans-serif;
  }
}

.google-map .bottomRightOverlay { 
  position: absolute;
  bottom: 0;
  right: 0;
  width: 25%;
  height: 2.2%;
  background-color: #F1EFEC;
  z-index: 11;
}

@media (max-width: 768px) {
  .google-map .bottomRightOverlay {
      bottom: 0%;
      right: 0;
      width: 50%;
      height: 2.2%;
  }
}

.google-map #bottomLeftOverlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 0%;
  background-color: #F1EFEC;
  z-index: 11;
}

@media (max-width: 768px) {
  .google-map #bottomLeftOverlay {
      bottom: 0%;
      left: 0.5%;
      width: 50%;
      height: 2.2%;
  }
}

.topOverlay {
  position: absolute;
  bottom: 91%;
  right: 1%;
  width: 8%;
  height: 7%;
  background-color: #ffffff;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: black;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  font-family: "Ubuntu", sans-serif;
}

@media (max-width: 768px) { 
  .topOverlay {
      bottom: 82.4%;
      right: 2.5%;
      width: 13.5%;
      height: 7.5%;
      font-size: 9px;
      font-family: "Ubuntu", sans-serif;
  }
}

#topOverlay2 {
  position: absolute;
  bottom: 91%;
  right: 1%;
  width: 8%;
  height: 7%;
  background-color: #ffffff;
  z-index: 9;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: black;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  font-family: "Ubuntu", sans-serif;
}

@media (max-width: 768px) { 
  #topOverlay2 {
      bottom: 2.8%;
      right: 2.5%;
      width: 12%;
      height: 7%;
      font-size: 9px;
      font-family: "Ubuntu", sans-serif;
      background-color: #1DB954;
      z-index: 10;
      color: #fff;
  }
}

/* Weather Widget */
.weather-widget {
  position: absolute;
  top: 72px;
  right: 24px;
  height: 46px;
  background-color: #1DB954;
  color: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
  z-index: 1001;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-family: "Ubuntu", sans-serif;
  cursor: pointer;
}

.weather-widget:hover {
  background-color: #0b7530;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.weather-widget:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.weather-icon {
  font-size: 22px;
  margin-right: 8px;
}

.weather-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.weather-info #weather-temp {
  font-size: 16px;
  font-weight: bold;
}

.weather-info #weather-desc {
  font-size: 12px;
}

/* Weather Details Modal */
.weather-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.weather-modal.active {
  display: flex;
  opacity: 1;
}

.weather-modal-content {
  background-color: white;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  padding: 0;
  position: relative;
  animation: modal-in 0.4s ease;
}

@keyframes modal-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.weather-modal-header {
  background-color: #1DB954;
  color: white;
  padding: 15px 20px;
  border-radius: 12px 12px 0 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.weather-modal-title {
  font-size: 18px;
  font-weight: bold;
  margin: 0;
  padding: 0;
}

.weather-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 26px;
  height: 26px;
  background-color: rgba(0, 0, 0, 0.1);
  color: #333;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  text-align: center;
}

.weather-modal-close:hover {
  background-color: rgba(220, 53, 69, 0.8);
  color: white;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .weather-modal-close {
    top: 10px;
    right: 12px;
    width: 24px;
    height: 24px;
    font-size: 18px;
  }
}

.weather-modal-body {
  padding: 20px;
}

.weather-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.weather-detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  background-color: #f8f9fa;
  transition: transform 0.2s ease;
}

.weather-detail-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.weather-detail-icon {
  font-size: 24px;
  margin-bottom: 10px;
  color: #1DB954;
}

.weather-detail-value {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
}

.weather-detail-label {
  font-size: 12px;
  color: #6c757d;
}

.weather-current {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  padding: 15px;
  background-color: rgba(29, 185, 84, 0.1);
  border-radius: 12px;
}

.weather-current-temp {
  font-size: 40px;
  font-weight: bold;
  margin: 0 15px;
}

.weather-current-icon {
  font-size: 50px;
  color: #1DB954;
}

.weather-current-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.weather-current-desc {
  font-size: 18px;
  font-weight: bold;
}

.weather-current-location {
  font-size: 14px;
  color: #6c757d;
}

.weather-current-time {
  font-size: 12px;
  color: #6c757d;
  margin-top: 4px;
}

.weather-suntime {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 12px;
}

.suntime-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.suntime-item i {
  font-size: 28px;
  color: #f8b500;
}

.suntime-label {
  font-size: 12px;
  color: #6c757d;
}

.suntime-value {
  font-size: 16px;
  font-weight: bold;
}

/* UV Index color coding */
.uv-low {
  color: #3CB371; /* Green */
}

.uv-moderate {
  color: #FFD700; /* Yellow */
}

.uv-high {
  color: #FFA500; /* Orange */
}

.uv-very-high {
  color: #FF4500; /* Red */
}

.uv-extreme {
  color: #800080; /* Purple */
}

.weather-attr {
  text-align: center;
  font-size: 8px;
  color: #aaaaaa;
  opacity: 0.4;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .weather-widget {
    top: 120px;
    right: 11px;
    height: 40px;
    padding: 0 8px;
  }
  
  .weather-icon {
    font-size: 18px;
    margin-right: 6px;
  }
  
  .weather-info #weather-temp {
    font-size: 14px;
  }
  
  .weather-info #weather-desc {
    font-size: 10px;
  }

  .weather-modal {
    align-items: center;
    padding: 0 10px;
  }
  
  .weather-modal-content {
    width: 85%;
    max-width: 320px;
    max-height: 80vh;
    margin: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  .weather-modal-header {
    padding: 12px 15px;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 2;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }
  
  .weather-modal-title {
    font-size: 16px;
  }
  
  .weather-modal-body {
    padding: 12px;
    max-height: calc(80vh - 45px);
    overflow-y: auto;
  }
  
  .weather-current-container {
    width: 100%;
    margin-bottom: 12px;
  }
  
  .weather-details-container {
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    width: 100%;
  }
  
  .weather-details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .weather-detail-item {
    padding: 8px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.5);
  }
  
  .weather-detail-icon {
    font-size: 18px;
    margin-bottom: 4px;
    color: #1DB954;
  }
  
  .weather-detail-value {
    font-size: 13px;
    margin-bottom: 2px;
    font-weight: 600;
  }
  
  .weather-detail-label {
    font-size: 9px;
    color: #777;
  }
  
  .weather-current {
    padding: 9px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    justify-content: center;
    background-color: rgba(29, 185, 84, 0.05);
    border-radius: 8px;
  }
  
  .weather-current-temp {
    font-size: 28px;
    margin: 0 8px;
  }
  
  .weather-current-icon {
    font-size: 30px;
  }
  
  .weather-current-info {
    margin-top: 4px;
    text-align: center;
    width: 100%;
  }
  
  .weather-current-desc {
    font-size: 15px;
  }
  
  .weather-current-location {
    font-size: 12px;
  }
  
  .weather-current-time {
    font-size: 9px;
    margin-top: 3px;
  }
  
  .weather-suntime {
    padding: 8px;
    margin: 12px 0;
    flex-direction: row;
    justify-content: space-evenly;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
  }
  
  .suntime-item {
    gap: 6px;
  }
  
  .suntime-item i {
    font-size: 18px;
    color: #e67e22;
  }
  
  .suntime-value {
    font-size: 12px;
    font-weight: 600;
  }
  
  .suntime-label {
    font-size: 9px;
  }
  
  .weather-attr {
    font-size: 7px;
    margin-top: 12px;
    text-align: center;
    color: #aaaaaa;
    opacity: 0.35;
  }
  
  /* Air Quality mobile adjustments */
  .air-quality-container {
    padding: 0.6rem;
    margin-top: 1rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
  }
  
  .air-quality-header i {
    font-size: 1rem;
  }
  
  .air-quality-header h6 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
  
  .air-quality-value {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
  }
  
  .air-quality-desc {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .air-quality-bar {
    height: 7px;
    margin: 0.4rem 0;
  }
  
  .air-quality-details {
    margin-top: 0.6rem;
  }
  
  .air-quality-detail-item {
    padding: 0.3rem;
    margin-bottom: 0.4rem;
  }
  
  .air-detail-label {
    font-size: 0.65rem;
    margin-bottom: 0.2rem;
  }
  
  .air-detail-value {
    font-size: 0.8rem;
  }
}

.share-button-overlay {
  position: absolute;
  top: 14px;
  right: 68px;
  width: 46px;
  height: 46px;
  background-color: #1DB954;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;
  z-index: 1004;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* Hover effect */
.share-button-overlay:hover {
  background-color: #0b7530;
}

/* Add Font Awesome share icon */
.share-button-overlay::before {
  content: "\f1e0"; /* Font Awesome share-alt icon - three connected nodes */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* 📌 Mobile Mode - Move Button to Bottom Right */
@media (max-width: 768px) {
  .share-button-overlay {
    top: auto; /* Remove the top positioning */
    bottom: 69px;
    right: 11px;
  }
}

/* Custom Logo Overlay Styles (Default for Desktop) */
.custom-logo {
  position: absolute;
  bottom: 10px;
  left: 8px;
  background-color: #f1efec;
  color: #595959;
  padding: 9px 60px;
  border-radius: 5px;
  font-size: 25px;
  font-weight: bold;
  z-index: 1006;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile View (Square Logo) */
@media (max-width: 768px) {
  .custom-logo {
      width: 45px;
      height: 45px;
      padding: 0;
      font-size: 12px;
      border-radius: 8px;
      bottom: 67px;
  }
}

/* 📌 Floating Menu Button (Mobile Only) */
.menu-button {
  position: absolute;
  width: 45px;
  height: 45px;
  background: #1DB954;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  z-index: 1002;
  transition: all 0.3s ease;
  top: 14px; /* Mobile Position */
  right: 14px;
}

.menu-button:hover {
  background: #0b7530;
}

/* 📌 Adjust Menu Button Position for Mobile */
@media (max-width: 768px) {
  .menu-button {
      top: 65px;
      right: 10px;
  }
}

/* 📌 Dropdown Menu */
.menu-dropdown {
  position: absolute;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 12px;
  display: none;
  z-index: 1003;
  width: 220px;
  max-height: 400px; /* Increased max-height */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(29, 185, 84, 0.5) #f5f5f5;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Scrollbar styling for Webkit browsers */
.menu-dropdown::-webkit-scrollbar {
  width: 6px;
}

.menu-dropdown::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 10px;
}

.menu-dropdown::-webkit-scrollbar-thumb {
  background-color: rgba(29, 185, 84, 0.5);
  border-radius: 10px;
}

/* 📌 Desktop Dropdown Position */
@media (min-width: 769px) {
  .menu-dropdown {
    top: 70px;
    right: 20px;
  }
}

/* 📌 Mobile Dropdown Position */
@media (max-width: 768px) {
  .menu-dropdown {
    top: 115px;
    right: 10px;
    width: 180px; /* Reduced width for mobile */
    max-height: 350px; /* Slightly reduced max-height */
    padding: 8px; /* Reduced padding */
    font-size: 90%; /* Slightly reduced base font size */
  }
  
  /* Make menu items more compact on mobile */
  .menu-dropdown a {
    padding: 8px 10px; /* Reduced padding */
    gap: 7px; /* Reduced gap between icon and text */
    font-size: 13px; /* Smaller font size for mobile */
  }
  
  .menu-dropdown a i {
    font-size: 14px; /* Smaller icons */
    width: 20px; /* Reduced icon container width */
    height: 20px; /* Reduced icon container height */
  }
  
  /* Reduce category header size */
  .menu-category {
    font-size: 10px;
    margin: 8px 0 3px 8px;
  }
  
  /* Make submenu more compact */
  .submenu {
    margin-left: 15px; /* Reduced indentation */
    padding: 3px 0;
  }
  
  .submenu a {
    padding: 5px 8px; /* Reduced padding */
    font-size: 12px; /* Smaller font size */
  }
  
  /* Reduce spacing between items */
  .menu-dropdown > ul > li {
    margin-bottom: 3px;
  }
  
  /* Reduce divider margins */
  .menu-divider {
    margin: 6px 0;
  }
}

/* 📌 Show Dropdown When Active */
.menu-dropdown.active {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

/* 📌 Dropdown Menu Structure */
.menu-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Menu Category Headers */
.menu-category {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #777;
  margin: 10px 0 5px 10px;
  font-weight: bold;
}

/* 📌 Style for Parent Menu Items */
.menu-dropdown > ul > li {
  margin-bottom: 5px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.menu-dropdown > ul > li:hover {
  background-color: rgba(29, 185, 84, 0.05);
}

/* 📌 Style for Submenu Items */
.submenu li {
  padding: 3px 0;
  text-align: left;
  margin-bottom: 2px;
}

/* 📌 Dropdown Links */
.menu-dropdown a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.menu-dropdown a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background-color: rgba(29, 185, 84, 0.1);
  z-index: -1;
  transition: width 0.2s ease;
}

.menu-dropdown a:hover::before {
  width: 100%;
}

/* 📌 Icons Inside Menu */
.menu-dropdown a i {
  font-size: 16px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1DB954;
  transition: transform 0.2s ease;
}

.menu-dropdown a:hover i {
  transform: scale(1.1);
}

/* 📌 Hide Submenu by Default */
.submenu {
  display: none;
  margin-left: 22px; /* Increased indentation */
  padding: 5px 0;
  border-left: 2px solid rgba(29, 185, 84, 0.2);
}

/* 📌 Show Submenu When Parent is Active */
.toggle-views.active + .submenu,
.toggle-directions.active + .submenu {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 📌 Style for Submenu Links */
.submenu a {
  padding: 8px 12px;
  font-size: 13px;
  display: block;
  border-bottom: 2px solid #f0f0f0; /* Light but visible separator */
  margin-bottom: 5px; /* Increased spacing */
  border-radius: 4px 4px 0 0; /* Rounded top corners only */
}

.submenu li:last-child a {
  border-bottom: none;
  margin-bottom: 0;
  border-radius: 4px; /* All corners rounded for last item */
}

.submenu a:hover {
  color: #1DB954;
  background-color: rgba(29, 185, 84, 0.1); /* Green-tinted hover effect */
  border-bottom-color: #1DB954; /* Green underline on hover */
}

/* 📌 Add Caret Icon for Dropdown */
.toggle-views::after,
.toggle-directions::after {
  content: "\25BC";
  font-size: 10px;
  margin-left: 5px;
  opacity: 0.6;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toggle-views.active::after,
.toggle-directions.active::after {
  content: "\25B2";
  opacity: 1;
  transform: translateY(-2px);
}

/* Add dividers between main menu sections */
.menu-divider {
  height: 1px;
  background: linear-gradient(to right, rgba(0,0,0,0.03), rgba(0,0,0,0.1), rgba(0,0,0,0.03));
  margin: 8px 0;
}

/* Container for 360 button and badge */
.view-btn-360-container {
  position: absolute;
  bottom: 68px;
  left: 9px;
  z-index: 1007;
}

/* Base Styles for 360 View Button */
.view-btn-360 {
  width: 34px;
  height: 34px;
  background-color: #1DB954;
  color: white;
  font-size: 14px;
  font-weight: bold;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1), -2px -2px 4px rgba(255, 255, 255, 0.6);
  transition: background-color 0.3s ease, transform 0.2s ease;
  padding: 5px;
  border: none;
  position: relative;
}

/* Available Now Badge */
.available-now-badge {
  position: absolute;
  top: -40px;
  right: -65px;
  transform: scale(0.6);
  transform-origin: bottom left;
  display: flex;
  flex-direction: column;
  line-height: 1;
  filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
  animation: badge-pulse 2s infinite;
}

/* Badge Animation */
@keyframes badge-pulse {
  0% { transform: scale(0.6); filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3)); }
  50% { transform: scale(0.65); filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.4)); }
  100% { transform: scale(0.6); filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3)); }
}

.available-now-badge .available {
  background-color: #FFA500; /* Orange for Coming Soon */
  color: white;
  padding: 3px 8px;
  font-weight: bold;
  font-size: 12px;
  transform: perspective(100px) rotateX(5deg);
  display: inline-block;
  text-align: center;
  position: relative;
}

/* Sparkle effect */
.available-now-badge .available::before,
.available-now-badge .available::after {
  content: "✦";
  position: absolute;
  font-size: 10px;
  opacity: 0;
}

.available-now-badge .available::before {
  top: -8px;
  left: 5px;
  animation: sparkle-1 3s infinite;
}

.available-now-badge .available::after {
  top: -5px;
  right: 5px;
  animation: sparkle-2 4s infinite;
}

@keyframes sparkle-1 {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  50% { opacity: 1; transform: translateY(-5px) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(0.5); }
}

@keyframes sparkle-2 {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  30% { opacity: 0; transform: translateY(0) scale(0.5); }
  60% { opacity: 1; transform: translateY(-5px) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(0.5); }
}

.available-now-badge .now {
  background-color: #333;
  color: white;
  padding: 3px 8px;
  font-weight: bold;
  font-size: 16px;
  transform: perspective(100px) rotateX(-5deg);
  display: inline-block;
  text-align: center;
  margin-top: 1px;
  position: relative;
}

/* Connection tail */
.available-now-badge .now::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 10px;
  width: 10px;
  height: 18px;
  background-color: #333;
  transform: rotate(45deg);
}

/* Hover & Click Effects */
.view-btn-360:hover {
  background-color: #0b7530;
  transform: scale(1.05); /* Slight pop effect */
}

.view-btn-360:active {
  transform: scale(0.95);
}

/* Desktop Tooltip Styles */
@media (min-width: 769px) {
  .view-btn-360::after {
      content: "Toggle 360° View";
      position: absolute;
      top: 50%;
      left: calc(100% + 8px);
      transform: translateY(-50%);
      background-color: rgba(0, 0, 0, 0.8);
      color: white;
      padding: 5px 10px;
      border-radius: 6px;
      font-size: 12px;
      white-space: nowrap;
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
  }

  .view-btn-360:hover::after {
      opacity: 1;
  }
}

/* Mobile Position */
@media (max-width: 768px) {
  .view-btn-360-container {
    bottom: 115px;
    left: 9px;
  }
  
  .view-btn-360 {
    width: 35px;
    height: 35px;
    font-size: 12px;
  }
  
  .available-now-badge {
    top: -35px;
    right: -50px;
    transform: scale(0.5);
    animation: badge-pulse-mobile 2s infinite;
  }
  
  @keyframes badge-pulse-mobile {
    0% { transform: scale(0.5); filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3)); }
    50% { transform: scale(0.55); filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.4)); }
    100% { transform: scale(0.5); filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3)); }
  }
}

/* Air Quality Styles */
.air-quality-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: rgba(240, 240, 240, 0.2);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.air-quality-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.air-quality-header i {
    margin-right: 8px;
    font-size: 1.2rem;
    color: #4a6fa1;
}

.air-quality-header h6 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.air-quality-meter {
    text-align: center;
    margin-bottom: 1rem;
}

.air-quality-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.air-quality-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.air-quality-level {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.5s ease, background-color 0.5s ease;
}

.air-quality-desc {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.3rem;
}

.air-quality-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 1rem;
}

.air-quality-detail-item {
    flex: 0 0 48%;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.air-detail-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.2rem;
}

.air-detail-value {
    font-size: 1rem;
    font-weight: 600;
}

/* Desktop layout - enhanced landscape orientation */
@media (min-width: 769px) {
  .air-quality-container {
    flex: 0 0 100%;
    margin-bottom: 15px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    padding: 15px;
    margin-top: 0;
    box-shadow: none;
  }
  
  .air-quality-header {
    margin-bottom: 10px;
  }
  
  .air-quality-header i {
    font-size: 1.3rem;
    margin-right: 10px;
  }
  
  .air-quality-header h6 {
    font-size: 1.1rem;
  }
  
  .air-quality-meter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    text-align: left;
  }
  
  .air-quality-info {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .air-quality-value {
    font-size: 2.2rem;
    margin-bottom: 5px;
    line-height: 1;
  }
  
  .air-quality-desc {
    font-size: 1rem;
    margin-top: 0;
    font-weight: 500;
  }
  
  .air-quality-bar-container {
    flex: 0 0 65%;
    padding: 0 15px;
    display: flex;
    align-items: center;
  }
  
  .air-quality-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 6px;
    margin: 0;
    overflow: hidden;
    width: 100%;
  }
  
  .air-quality-level {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease, background-color 0.5s ease;
  }
  
  .air-quality-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 15px;
  }
  
  .air-quality-detail-item {
    flex: none;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 0;
    transition: transform 0.2s ease;
  }
  
  .air-quality-detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  }
}

/* Weather Details Container - Base Styles */
.weather-current-container {
  width: 100%;
  margin-bottom: 20px;
}

.weather-details-container {
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  width: 100%;
}

/* Weather modal scrollbar styling */
.weather-modal-content::-webkit-scrollbar,
.weather-modal-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.weather-modal-content::-webkit-scrollbar-track,
.weather-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.weather-modal-content::-webkit-scrollbar-thumb,
.weather-modal-body::-webkit-scrollbar-thumb {
  background: rgba(29, 185, 84, 0.4);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.weather-modal-content::-webkit-scrollbar-thumb:hover,
.weather-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(29, 185, 84, 0.6);
}

/* Firefox scrollbar styling */
.weather-modal-content,
.weather-modal-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(29, 185, 84, 0.4) rgba(0, 0, 0, 0.05);
}

/* Desktop layout - enhanced landscape orientation */
@media (min-width: 769px) {
  .weather-modal-content {
    max-width: 900px; /* Wider for better landscape layout */
    max-height: 80vh;
    border-radius: 16px;
    overflow: hidden; /* Hide overflow initially */
  }
  
  .weather-modal-header {
    background-color: white;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
  }
  
  .weather-modal-title {
    font-size: 1.3rem;
    font-weight: 600;
  }
  
  .weather-modal-close {
    top: 16px;
    right: 16px;
    background-color: #f5f5f5;
  }
  
  .weather-modal-body {
    display: flex;
    flex-wrap: wrap;
    padding: 15px 20px;
    max-height: calc(80vh - 60px); /* Account for header */
    overflow-y: auto; /* Scrollable content area */
  }
  
  .weather-current-container {
    flex: 0 0 35%; /* Slightly smaller */
    padding-right: 25px;
    margin-bottom: 15px;
  }
  
  .weather-details-container {
    flex: 0 0 65%; /* Slightly larger */
    margin-bottom: 15px;
  }
  
  .weather-current {
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    background-color: rgba(29, 185, 84, 0.05);
    border-radius: 12px;
    padding: 20px 15px;
  }
  
  .weather-current-temp {
    font-size: 3.5rem;
    margin: 15px 0;
  }
  
  .weather-current-icon {
    font-size: 4rem;
  }
  
  .weather-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
  
  .weather-detail-item {
    padding: 15px 10px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
  
  .weather-detail-item:hover {
    background-color: rgba(29, 185, 84, 0.08);
    transform: translateY(-2px);
  }
  
  /* Bottom sections that span full width */
  .weather-suntime {
    flex: 0 0 100%;
    margin: 0 0 15px 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
  }
  
  .suntime-item {
    gap: 15px;
  }
  
  .suntime-item i {
    font-size: 1.8rem;
    color: #e67e22;
  }
  
  .air-quality-container {
    flex: 0 0 100%;
    margin-bottom: 15px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    padding: 15px;
  }
  
  .air-quality-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
  }
  
  .weather-attr {
    flex: 0 0 100%;
    text-align: center;
    padding: 10px 0;
    font-size: 8px;
    color: #aaaaaa;
    opacity: 0.4;
  }
}

/* AQI Colors */
.aqi-good {
    background-color: #4CAF50; /* Green - Good (0-50) */
    color: #fff;
}

.aqi-satisfactory {
    background-color: #8BC34A; /* Light Green - Satisfactory (51-100) */
    color: #333;
}

.aqi-moderate {
    background-color: #FFC107; /* Amber - Moderately Polluted (101-200) */
    color: #333;
}

.aqi-poor {
    background-color: #FF9800; /* Orange - Poor (201-300) */
    color: #333;
}

.aqi-very-poor {
    background-color: #F44336; /* Red - Very Poor (301-400) */
    color: #fff;
}

.aqi-severe {
    background-color: #7E0023; /* Dark Red - Severe (401-500+) */
    color: #fff;
}

/* Responsive styles for air quality */
@media (max-width: 768px) {
    .air-quality-container {
        padding: 0.8rem;
    }
    
    .air-quality-value {
        font-size: 1.5rem;
    }
    
    .air-quality-detail-item {
        flex: 0 0 48%;
        margin-bottom: 0.5rem;
        padding: 0.4rem;
    }
    
    .air-detail-label {
        font-size: 0.7rem;
    }
    
    .air-detail-value {
        font-size: 0.9rem;
    }
}