:root {
  --bg: #ffffff;
  --card: #fff;
  --muted: #6b6b6b;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(8, 20, 40, .08);
  font-family: Inter, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  /* Smooth transitions for theme change */
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: #111;
}

.page-layout {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 280px 1fr;
  grid-template-areas:
    "header header"
    "sidebar main"
    "footer footer";
  min-height: 100vh;
}

.navbar {
  grid-area: header;
  background: #0b3a5b;
  padding: 20px 0;
  color: #fff;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.nav-links ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar {
  grid-area: sidebar;
  background: #fafafa;
  border-right: 1px solid #e9ecef;
  padding: 20px;
}

.sidebar h3 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #0b3a5b;
  padding-bottom: 8px;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav a {
  display: block;
  text-decoration: none;
  color: #555;
  padding: 8px 6px;
  border-radius: 4px;
  font-size: 16px;
}

.sidebar-nav a:hover {
  background: #0b3a5b;
  color: #fff;
}

.main-content {
  grid-area: main;
  padding: 20px;
  background: white;
}

.tours-section {
  padding: 8px 16px;
  margin-bottom: 50px;
}

.tours-section h2 {
  margin: 0 0 12px 0;
  font-size: 25px;
  font-weight: 800;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  max-width: 980px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 16px;
  align-items: stretch;
}

.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  min-height: 320px;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-top {
  position: relative;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.card-top img.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px 9px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(8, 20, 40, 0.06);
  font-weight: bold;
  min-width: 120px;
  text-align: center;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.card-title {
  margin: 4px 0 12px;
  font-size: 18px;
  font-weight: 800;
}

.card-desc {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
  flex: 1 1 auto;
}

.card-button {
  position: relative;
  z-index: 3;
  display: inline-block;
  text-decoration: none;
  background: #0b3a5b;
  color: white;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  align-self: flex-start;
  margin-top: 12px;
}

.card-button:hover {
  background: rgb(0, 62, 127);
}

.card-link-overlay {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 1;
  background: transparent;
  text-indent: -9999px;
  overflow: hidden;
  border-radius: var(--radius);
}

.card-link-overlay:focus {
  outline: 3px solid rgba(39, 90, 255, 0.25);
  z-index: 2;
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  width: 0%;
  background: linear-gradient(to right, #00e1ff, #0066ff);
  z-index: 9999;
  transition: width 0.2s linear;
}

.stats-section {
  text-align: center;
  padding: 50px 15px;
  background: linear-gradient(135deg, #0b3a5b, #0f6da5);
  color: white;
  border-radius: 16px;
  margin: 0 0 40px 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 40%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.06), transparent 60%);
  z-index: 0;
}

.stats-section .section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 35px;
  flex-wrap: wrap;
  z-index: 1;
  position: relative;
}

.stat {
  background: rgba(255, 255, 255, 0.1);
  padding: 18px 25px;
  border-radius: 12px;
  min-width: 160px;
  transition: transform 0.3s ease, background 0.3s ease;
  backdrop-filter: blur(4px);
}

.stat:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.18);
}

.stat-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 6px;
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

.stat p {
  font-size: 15px;
  margin: 0;
  font-weight: 500;
}

.footer-site {
  grid-area: footer;
  text-align: center;
  padding: 15px;
  background: #0b3a5b;
  color: white;
}

.footer-site a {
  text-decoration: none;
  color: inherit;
}

.hamburger-menu {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  z-index: 100;
}

/* TOGGLE BUTTON Dark/Light Mode */
.theme-btn {
  padding: 8px 14px;
  border: 1px solid #ffffff66;
  border-radius: 8px;
  background: #ffffff1a;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.theme-btn:hover {
  background: #ffffff2a;
  transform: translateY(-2px);
}

/*--- DARK MODE CSS STYLES ---*/
.dark-mode {
  --bg: #1e1e1e;
  --card: #2c2c2c;
  --muted: #b0b0b0;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);

  color: #f0f0f0;
}

.dark-mode html,
.dark-mode body {
  background: var(--bg);
  color: #f0f0f0;
}

.dark-mode .sidebar {
  background: #252526;
  border-right: 1px solid #3d3d3d;
}

.dark-mode .sidebar h3 {
  color: #f0f0f0;
  border-bottom: 2px solid #0099ff;
}

.dark-mode .sidebar-nav a {
  color: #ccc;
}

.dark-mode .sidebar-nav a:hover {
  background: #0078d4;
  color: #fff;
}

.dark-mode .main-content {
  background: var(--bg);
}

.dark-mode .tours-section h2 {
  color: #f0f0f0;
  border-bottom: 1px solid #3d3d3d;
}

.dark-mode .card {
  background: var(--card);
  box-shadow: var(--shadow);
}

.dark-mode .card:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.dark-mode .badge {
  background: rgba(44, 44, 44, 0.9);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.dark-mode .card-title {
  color: #fff;
}

.dark-mode .card-desc {
  color: var(--muted);
}

.dark-mode .stats-section {
  background: linear-gradient(135deg, #1f4a66, #305e7e);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.dark-mode .stat {
  background: rgba(0, 0, 0, 0.15);
}

.dark-mode .stat:hover {
  transform: translateY(-4px);
  background: rgba(0, 0, 0, 0.3);
}

.dark-mode .navbar,
.dark-mode .footer-site {
  background: #0a2436;
}

.dark-mode .theme-btn {
  border: 1px solid #ffffff66;
  background: #3d3d3d;
  color: #fff;
}

.dark-mode .theme-btn:hover {
  background: #505050;
}

/*--- END DARK MODE CSS STYLES ---*/

/* MEDIA QUERIES */

@media (max-width: 992px) {
  .page-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "header"
      "sidebar"
      "main"
      "footer";
    min-height: auto;
  }

  .hamburger-menu {
    display: block;
  }

  .nav-container {
    justify-content: space-between;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 65px;
    left: 0;
    width: 100%;
    background: #0b3a5b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    z-index: 90;
  }

  /* Dark Mode Media Query Fix */
  .dark-mode .nav-links {
    background: #0d3047;
  }


  .nav-links.open {
    display: block;
  }

  .nav-links ul {
    flex-direction: column;
    gap: 0;
    text-align: center;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 10px 20px;
    border-radius: 0;
    font-size: 18px;
    line-height: normal;
  }

  .theme-btn {
    margin: 10px auto;
    display: block;
    width: 80%;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 20px;
  }

  .sidebar h3 {
    display: none;
  }

  .sidebar-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    justify-content: center;
  }

  .sidebar-nav a {
    padding: 5px 10px;
    font-size: 19px;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 10px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stats-grid {
    flex-direction: column;
    gap: 20px;
  }

  .logo h1 {
    font-size: 22px;
  }

  .tours-section h2 {
    font-size: 26px;
  }

  .nav-links a {
    font-size: 19px;
  }

  .sidebar-nav a {
    font-size: 20px;
  }

  .card-title {
    font-size: 20px;
  }

  .card-desc {
    font-size: 16px;
    margin-bottom: 15px;
  }

  .stat-number {
    font-size: 50px;
  }

  .footer-site p {
    font-size: 15px;
  }
}