@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  font-family: "Quicksand", sans-serif;
  line-height: 1.6;
  color: #2d3436;
  scroll-behavior: smooth;
  background: #f8fafc;
  overflow-x: hidden;
}

/* Bảng màu lấy cảm hứng từ Phú Yên */
:root {
  --primary-color: #00a8e8; /* Xanh biển */
  --secondary-color: #ffca28; /* Vàng hoa vàng cỏ xanh */
  --accent-color: #ff6b6b; /* Đỏ san hô */
  --text-color: #2d3436;
  --bg-light: #e6f0fa;
  --white: #ffffff;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --champa-border: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="%2300A8E8" d="M10 2a8 8 0 0 0-8 8 8 8 0 0 0 8 8 8 8 0 0 0 8-8 8 8 0 0 0-8-8zm0 14a6 6 0 1 1 6-6 6 6 0 0 1-6 6z"/></svg>');
}

/* Scroll Progress Bar */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  z-index: 10000;
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, var(--white), rgba(255, 255, 255, 0.9));
  backdrop-filter: blur(12px);
  padding: 10px 0;
  box-shadow: var(--shadow);
  z-index: 1000;
}

.navbar-brand {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 50px;
  transition: transform 0.3s ease;
}

.navbar-brand img:hover {
  transform: rotate(360deg);
}

.navbar-brand::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

.navbar .nav-link {
  color: var(--text-color) !important;
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  padding: 8px 15px;
  transition: color 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--primary-color) !important;
}

.navbar .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 15px;
  width: calc(100% - 30px);
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* Page Header */
.page-header,
.page-header-food,
.page-header-itinerary {
  position: relative;
  height: 40vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.7);
}

.page-header h1,
.page-header-food h1,
.page-header-itinerary h1 {
  font-family: "Noto Sans", sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  animation: fadeInUp 1s ease;
}

.page-header p,
.page-header-food p,
.page-header-itinerary p {
  font-size: 1.2rem;
  margin: 15px 0;
  animation: fadeInUp 1.4s ease;
}

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  margin-bottom: 20px;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

.card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 25px;
  height: 25px;
  background: var(--champa-border) no-repeat center;
  opacity: 0.4;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card-img-top {
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-top {
  transform: scale(1.1);
}

.card-body {
  padding: 20px;
}

.card-title {
  font-family: "Noto Sans", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
}

.card-text {
  font-size: 0.9rem;
  color: #636e72;
}

/* Buttons */
.btn-primary {
  border-radius: 50px;
  padding: 10px 25px;
  font-weight: 500;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  background: var(--primary-color);
  border: none;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.3s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: var(--secondary-color);
  color: var(--text-color);
  box-shadow: 0 4px 15px rgba(0, 168, 232, 0.4);
}

/* Footer */
footer {
  background: linear-gradient(135deg, #2d3436, #1e272e);
  color: var(--white);
  padding: 30px 0;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23F8FAFC" fill-opacity="0.3" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z"></path></svg>')
    no-repeat top center;
  z-index: 0;
}

footer p {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  color: #e6e6e6;
}

/* Scroll to Top Button */
#scrollTopBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

#scrollTopBtn.show {
  opacity: 1;
}

#scrollTopBtn:hover {
  background: var(--secondary-color);
  transform: scale(1.1);
}

/* Sound Toggle */
#soundToggle {
  position: fixed;
  bottom: 90px;
  right: 25px;
  background: var(--accent-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

#soundToggle:hover {
  background: var(--secondary-color);
  transform: scale(1.1);
}

/* Loading Animation */
#pageLoader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#pageLoader .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.4em;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark Mode */
body.dark-mode {
  background: #1e272e;
  color: #e6e6e6;
}

body.dark-mode .navbar {
  background: linear-gradient(135deg, #2d3436, #1e272e);
}

body.dark-mode .card {
  background: #2a2e35;
  color: #e6e6e6;
}

body.dark-mode .card-text {
  color: #b2bec3;
}

body.dark-mode footer {
  background: #1a202c;
}

/* Responsive */
@media (max-width: 768px) {
  .page-header,
  .page-header-food,
  .page-header-itinerary {
    height: 35vh;
  }

  .page-header h1,
  .page-header-food h1,
  .page-header-itinerary h1 {
    font-size: 2rem;
  }

  .card-img-top {
    height: 160px;
  }

  .navbar .nav-link {
    font-size: 0.95rem;
    padding: 6px 10px;
  }
}