@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* ---------- Global Styles ---------- */
body {
  font-family: 'Montserrat', sans-serif;
  padding: 20px;
  margin: 0;
  transition: background 0.3s, color 0.3s;
  scroll-behavior: smooth;
  background: linear-gradient(to right, #a8d5e2, #fcefe3);
  color: #2d3a4b;
}

/* ---------- Dark Mode Overrides ---------- */
.dark {
  background-color: #2d3a4b;
  color: #fcefe3;
}
.dark #navbar {
  background-color: #1b1f29;
  color: #d6d6d6;
}
.dark #navbar ul li a {
  color: #d6d6d6;
}
.dark #navbar ul li a:hover {
  color: #f26a4b;
}
.dark .search-container input {
  background-color: #3a3a3a;
  border: 1px solid #555;
  color: #fcefe3;
}
.dark .search-section button {
  background-color: #f26a4b;
  color: #fff;
}
.dark #site-footer {
  background-color: #1b1f29;
  color: #d6d6d6;
}

/* ---------- Weather Animation Styles ---------- */
#weatherAnimation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.rainy { background-color: rgba(100, 100, 100, 0.2); }
.snowy { background-color: rgba(240, 240, 240, 0.3); }
.thunderstorm { background-color: rgba(50, 50, 50, 0.4); }
.cyclone { background-color: rgba(70, 70, 70, 0.5); }

.raindrop {
  position: absolute;
  width: 2px;
  height: 10px;
  background: blue;
  opacity: 0.8;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translateY(-100px); opacity: 0.8; }
  100% { transform: translateY(100vh); opacity: 0.2; }
}

.snowflake {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: white;
  opacity: 0.9;
  animation: snowFall linear infinite;
}
@keyframes snowFall {
  0% { transform: translateY(-50px) translateX(0); opacity: 0.9; }
  100% { transform: translateY(100vh) translateX(50px); opacity: 0.3; }
}

#lightningFlash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0;
  pointer-events: none;
  animation: lightning 5s linear infinite;
}
@keyframes lightning {
  0%, 90%, 100% { opacity: 0; }
  92%, 94%, 96% { opacity: 1; }
}

.debris {
  position: absolute;
  width: 4px;
  height: 4px;
  background: darkgray;
  opacity: 0.8;
  animation: swirl linear infinite;
}
@keyframes swirl {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
  100% { transform: translate(50vw, 50vh) rotate(360deg); opacity: 0.2; }
}

/* ---------- Header, Navigation & Section Layout ---------- */
header {
  text-align: center;
  margin-bottom: 20px;
}

#greeting {
  position: absolute;
  top: 10px;
  left: 10px;
  font-weight: bold;
}

/* Navbar */
#navbar {
  background-color: #2d3a4b;
  color: #a8d5e2;
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 1000;
}
#navbar ul {
  list-style-type: none;
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 0;
  padding: 0;
}
#navbar ul li a {
  text-decoration: none;
  color: #a8d5e2;
  font-weight: bold;
}
#navbar ul li a:hover {
  color: #f26a4b;
}

/* Search Section */
.search-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.search-container {
  display: flex;
  align-items: center;
  width: 50px;
  transition: width 0.5s ease;
  overflow: hidden;
}
.search-container:hover,
.search-container:focus-within {
  width: 300px;
}
.search-container input {
  height: 40px;
  line-height: 40px;
  padding: 0 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: all 0.5s ease;
  box-sizing: border-box;
}
.search-container:not(:hover):not(:focus-within) input::placeholder {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.search-container:hover input::placeholder,
.search-container:focus-within input::placeholder {
  opacity: 1;
}
.search-section button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin: 0;
  padding: 0 15px;
  border-radius: 4px;
}

/* Map Section */
#map {
  width: 100%;
  height: 300px;
  margin: 20px 0;
  border: 1px solid #ccc;
}

/* Weather Section */
#weather {
  margin-top: 20px;
}
#loading {
  display: none;
}

/* Buttons */
button {
  padding: 10px;
  margin-top: 10px;
  cursor: pointer;
  background-color: #f26a4b;
  color: white;
  border: none;
  border-radius: 8px;
  transition: background 0.3s ease;
}
button:hover {
  background-color: #d45439;
}
#toggleTheme {
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 999;
}
#toggleTheme:hover {
  transform: rotate(20deg);
}

/* Carousel */
.carousel {
  width: 80%;
  margin: 30px auto;
}
.carousel img {
  width: 100%;
  border-radius: 10px;
  position: relative;
}
.carousel .slick-slide {
  overflow: visible !important;
}

/* Fun Fact Overlay */
.fun-fact-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 8px;
  font-size: 14px;
  border-radius: 4px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Datepicker */
.ui-datepicker {
  font-size: 14px;
}

/* Error & Confirmation Messages */
.error-msg {
  color: red;
  font-size: 13px;
  margin-top: 4px;
}
.confirmation-msg {
  color: green;
  font-size: 14px;
  font-weight: bold;
  margin-top: 10px;
  padding: 10px;
  background-color: #e0ffe0;
  border: 1px solid #88cc88;
  border-radius: 5px;
}

/* Trip List */
#tripList {
  list-style: none;
  padding-left: 0;
}
#tripList li {
  padding: 8px 12px;
  margin-bottom: 5px;
  background-color: #eee;
  border-radius: 4px;
  cursor: move;
  position: relative;
}
#tripList li a::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -30px;
  left: 0;
  background-color: #333;
  color: white;
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
  border-radius: 5px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}
#tripList li a:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* Slick Dots */
.slick-dots {
  display: flex !important;
  justify-content: center;
  margin-top: 20px;
  list-style: none;
  padding: 0;
}
.slick-dots li {
  margin: 0 8px;
}
.slick-dots button.slick-label {
  background: #f0f0f0;
  border: 1px solid #ccc;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}
.slick-dots li.slick-active button.slick-label,
.slick-dots button.slick-label:hover {
  background-color: #007BFF;
  color: white;
  border-color: #007BFF;
}

/* Currency Converter */
#currency-converter {
  padding: 20px;
  text-align: center;
  background-color: #f4f6f8;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 600px;
}
#currency-converter h2 {
  margin-bottom: 20px;
}
#currency-converter input,
#currency-converter select,
#currency-converter button {
  padding: 10px;
  margin: 5px;
  border-radius: 4px;
  border: 1px solid #ccc;
}
#currency-converter button {
  background-color: #f26a4b;
  color: #fff;
  cursor: pointer;
  border: none;
}
#currency-converter button:hover {
  background-color: #d45439;
}
#conversionResult {
  margin-top: 10px;
  font-weight: bold;
}

/* Currency Ticker */
.currency-ticker-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  background: #f0f0f0;
  border-top: 1px solid #ccc;
  padding: 10px 0;
}
.currency-ticker {
  display: inline-block;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
}
.currency-ticker span {
  display: inline-block;
  margin: 0 20px;
  font-weight: 500;
}
@keyframes tickerScroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Testimonial Carousel */
#testimonial-carousel {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;
  background-color: #f9f9f9;
  border-radius: 8px;
}
.testimonial-slider .testimonial-slide {
  padding: 20px;
  background: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  text-align: center;
}
.testimonial-slider .testimonial-slide p {
  font-style: italic;
  margin-bottom: 10px;
}
.testimonial-slider .testimonial-slide h4 {
  margin-top: 0;
  font-weight: normal;
  color: #333;
}

/* Footer */
#site-footer {
  text-align: center;
  padding: 20px;
  background-color: #222;
  color: #fff;
  margin-top: 20px;
}

/* Activity List in Other Notes */
#activityList {
  list-style: none;
  padding: 0;
  margin: 0;
}
#activityList li {
  padding: 10px;
  margin: 5px 0;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.remove-item {
  cursor: pointer;
  color: red;
  font-weight: bold;
  margin-left: 10px;
}
.activity-item.selected {
  background-color: #d45439;
  color: #fff;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 768px) {
  /* Adjust navbar to stack vertically */
  #navbar ul {
    flex-direction: column;
    gap: 10px;
  }
  /* Ensure the search container expands to full width */
  .search-section {
    flex-direction: column;
  }
  .search-container, 
  .search-section button {
    width: 90%;
    max-width: 400px;
  }
  /* Reduce carousel width */
  .carousel {
    width: 95%;
  }
  /* Booking section adjustments */
  .booking {
    width: 90%;
    margin: 20px auto;
  }
  /* Footer padding reduction for smaller screens */
  #site-footer {
    padding: 10px;
  }
}
