@font-face {
  font-family: "iCiel Brush Up";
  src: url("../fonts/iCielBrushUp.woff2") format("woff2"),
    url("../fonts/iCielBrushUp.woff") format("woff"),
    url("../fonts/iCiel-Brush-Up.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Be Vietnam Pro", sans-serif;
  background: var(--secondary);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ===================== PRELOADER ===================== */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader {
  font-size: 18px;
  color: var(--secondary);
  font-weight: 600;
  letter-spacing: 0.05em;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.04); }
}

body.loading { overflow: hidden; visibility: hidden; }
body.loaded  { visibility: visible; }

/* ===================== HEADER ===================== */
header {
  position: sticky;
  top: 0;
  z-index: 998;
  padding: 0 60px;
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 2px 24px rgba(0,0,0,0.08);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.logo h1 {
  font-family: "iCiel Brush Up", cursive;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 2px 2px 0 var(--day1);
  white-space: nowrap;
  line-height: 1.1;
}

/* ===================== NAV ===================== */
nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--secondary);
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--primary);
  border: 2px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}

nav a:hover {
  background: var(--secondary);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  border: 2px solid var(--primary);
  border-radius: 14px;
  padding: 10px 8px;
  z-index: 1001;
  min-width: 180px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.14);
  text-align: center;
}

.dropdown-menu.active {
  display: block;
  animation: dropDown 0.2s ease;
}

@keyframes dropDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dropdown-item {
  display: block;
  padding: 8px 16px;
  margin: 4px 0;
  color: var(--secondary);
  background: var(--primary);
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--day1);
  color: var(--day1-text);
  transform: translateX(2px);
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.menu-toggle:hover { opacity: 0.85; }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.15) 55%,
    transparent 100%
  );
  z-index: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom; /* Thay đổi dòng này */ 
  z-index: -1;
  transform: scale(1.04);
  animation: heroZoom 16s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.04); }
  to   { transform: scale(1.09); }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 80px;
  max-width: 780px;
  animation: heroFadeIn 1s ease 0.3s both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
  font-family: "iCiel Brush Up", cursive;
  font-size: clamp(64px, 10vw, 130px);
  font-weight: 800;
  line-height: 1.0;
  color: var(--day1);
  text-shadow: 4px 4px 0 var(--primary), 8px 6px 20px rgba(0,0,0,0.3);
  margin-bottom: 16px;
}

.hero-content p {
  font-family: "iCiel Brush Up", cursive;
  font-size: clamp(18px, 3vw, 26px);
  color: var(--secondary);
  text-shadow: 1px 1px 8px rgba(0,0,0,0.5);
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 12px 0;
  padding: 13px 26px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 100px;
  background: var(--secondary);
  color: var(--primary);
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-3px);
  background: var(--primary);
  color: var(--secondary);
  border-color: var(--secondary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* ===================== SECTIONS ===================== */
.section {
  padding: 96px 60px;
  text-align: center;
  background: var(--secondary);
}

.section h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 48px;
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin: 14px auto 0;
  opacity: 0.4;
}

/* ===================== GALLERY ===================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery a:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.18);
}

.gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery a:hover img {
  transform: scale(1.06);
}

/* ===================== VIDEO LINKS ===================== */
.video-links-section {
  padding: 80px 60px;
  text-align: center;
  background: var(--highlight);
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--text-dark);
  border-radius: 2px;
  margin: 14px auto 0;
  opacity: 0.3;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1040px;
  margin: 40px auto 0;
}

.link-card {
  background: var(--secondary);
  border: 2px solid var(--primary);
  border-radius: 20px;
  padding: 36px 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.link-card:hover {
  transform: translateY(-8px);
  background: var(--primary);
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  border-color: var(--secondary);
}

.card-icon {
  font-size: 44px;
  color: var(--primary);
  transition: color 0.3s;
  line-height: 1;
}

.link-card:hover .card-icon,
.link-card:hover h3,
.link-card:hover p {
  color: #fff;
}

.link-card h3 {
  font-family: "iCiel Brush Up", cursive;
  font-size: 26px;
  color: var(--primary);
  letter-spacing: 0.5px;
  transition: color 0.3s;
}

.link-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dark);
  transition: color 0.3s;
  margin: 0;
}

/* ===================== TIMELINE ===================== */
.timeline {
  padding: 96px 24px;
  background: var(--secondary);
}

.timeline > h2 {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 56px;
  position: relative;
}

.timeline > h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin: 14px auto 0;
  opacity: 0.4;
}

.timeline-days-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.timeline-day {
  border-radius: 24px;
  padding: 36px 32px;
  opacity: 0;
  transform: translateY(32px);
  animation: fadeInUp 0.65s ease forwards;
  box-shadow: 0 6px 28px rgba(0,0,0,0.08);
}

.timeline-day:nth-child(1) {
  background: var(--day1);
  color: var(--day1-text);
  animation-delay: 0.1s;
}
.timeline-day:nth-child(1) i { color: var(--day1-text); }

.timeline-day:nth-child(2) {
  background: var(--day2);
  color: var(--day2-text);
  animation-delay: 0.25s;
}
.timeline-day:nth-child(2) i { color: var(--day2-text); }

.timeline-day:nth-child(3) {
  background: var(--day3);
  color: var(--day3-text);
  animation-delay: 0.4s;
}
.timeline-day:nth-child(3) i { color: var(--day3-text); }

.timeline-day h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(0,0,0,0.08);
}

.timeline-day ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-day li {
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  line-height: 1.5;
  transition: background 0.2s;
}

.timeline-day li:hover {
  background: rgba(0,0,0,0.05);
}

.timeline-day li i {
  font-size: 16px;
  min-width: 18px;
  margin-top: 2px;
  opacity: 0.85;
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== FOOTER ===================== */
footer {
  background: var(--primary);
  color: var(--secondary);
  text-align: center;
  padding: 36px 24px;
  font-size: 14px;
  letter-spacing: 0.03em;
}

footer b {
  font-weight: 700;
}

/* ===================== LIGHTBOX ===================== */
#lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
  padding: 24px;
}

#lightbox-overlay.active {
  display: flex;
}

#lightbox-overlay img {
  max-width: 92%;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 0 60px rgba(255,255,255,0.12);
  animation: zoomIn 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes zoomIn {
  from { transform: scale(0.75); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ===================== REVEAL ===================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  header {
    padding: 0 24px;
  }

  .hero-content {
    padding: 0 32px;
  }

  .section,
  .video-links-section,
  #videos {
    padding: 72px 32px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 20px;
    height: 64px;
  }

  .logo h1 {
    font-size: 16px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .menu-toggle {
    display: block;
  }

  nav .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    position: absolute;
    top: 68px;
    right: 20px;
    background: var(--secondary);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 36px rgba(0,0,0,0.15);
    border: 2px solid var(--primary);
    min-width: 200px;
    z-index: 997;
  }

  nav .nav-links.show {
    display: flex;
  }

  nav .nav-links a {
    margin: 0;
    width: 100%;
  }

  .hero-content {
    padding: 0 24px;
  }

  .hero-content h1 {
    font-size: clamp(52px, 14vw, 80px);
  }

  .hero-content p {
    font-size: 20px;
    margin-bottom: 32px; 
  }

  .btn {
    font-size: 14px;
    padding: 11px 20px;
  }

  .section,
  .video-links-section,
  .timeline {
    padding: 64px 20px;
  }

  .timeline-days-wrapper {
    grid-template-columns: 1fr;
  }

  .timeline-day {
    padding: 28px 22px;
  }
}

/* ===================== GALLERY SLIDER ===================== */
.gallery-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.gallery-slider-container {
  overflow: hidden; /* Giấu các ảnh bị tràn ra ngoài */
  width: 100%;
  border-radius: 18px;
}

.gallery-track {
  display: flex;
  gap: 20px;
  transition: transform 0.4s ease-in-out; /* Hiệu ứng trượt mượt mà */
}

/* Kích thước mỗi ảnh trong slider */
.gallery-track a {
  flex: 0 0 calc(33.333% - 14px); /* Hiển thị 3 ảnh */
  display: block;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  text-decoration: none;
}

.gallery-track img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-track a:hover img {
  transform: scale(1.06);
}

/* Nút bấm trượt ảnh */
.gallery-btn {
  background: var(--primary);
  color: var(--secondary);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.gallery-btn:hover {
  background: var(--text-dark);
  transform: scale(1.1);
}

/* Responsive cho Mobile/Tablet */
@media (max-width: 900px) {
  .gallery-track a {
    flex: 0 0 calc(50% - 10px); /* Hiển thị 2 ảnh */
  }
}

@media (max-width: 600px) {
  .gallery-track a {
    flex: 0 0 100%; /* Hiển thị 1 ảnh */
  }
}

/* ===================== MAP SECTION ===================== */
.map-card-container {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--secondary);
  border: 2px solid var(--primary);
  border-radius: 24px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 12px 36px  var(--primary);
  text-align: left;
}

.map-info {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--accent);
}

.route-point {
  display: flex;
  align-items: center;
  gap: 16px;
}

.point-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
}

.point-icon.origin { background: var(--contrast); }
.point-icon.destination { background: var(--primary); }

.route-point h4 {
  font-size: 14px;
  color: var(--text-dark);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.route-point p {
  font-size: 18px;
  font-weight: 700;
  color: var(--secondary);
  margin: 0;
}

.route-line {
  width: 4px;
  height: 40px;
  background: repeating-linear-gradient(to bottom, var(--highlight) 0, var(--highlight) 8px, transparent 8px, transparent 16px);
  margin: 8px 0 8px 22px;
}

.route-stats {
  margin: 32px 0;
  display: flex;
  gap: 24px;
  font-weight: 600;
  color: var(--primary);
}

.route-stats span {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--day1);
  padding: 8px 16px;
  border-radius: 8px;
}

.map-btn {
  margin: 0;
  align-self: flex-start;
}

.map-embed {
  flex: 1;
  min-height: 350px;
  background: var(--secondary);
  position: relative;
}

.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--day2);
  color: var(--contrast);
  font-size: 18px;
  font-weight: 600;
}

.map-placeholder i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.8;
}

/* Responsive cho điện thoại */
@media (max-width: 768px) {
  .map-card-container {
    flex-direction: column;
  }
  .map-embed {
    min-height: 250px;
  }
  .route-stats {
    flex-direction: column;
    gap: 12px;
  }
}