@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f6f3f2;
  --bg-soft: #f2ecff;
  --bg-hero: linear-gradient(145deg, #f8f1ff 0%, #e5d4ff 50%, #f0e5ff 100%);
  --primary: #7a509a;
  --primary-dark: #7a509a;
  --text: #1f1b2c;
  --muted: #6f6c7b;
  --surface: #ffffff;
  --shadow: 0 25px 60px rgba(122, 80, 154, 0.15);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
  color-scheme: light;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  color: var(--text);
  background: var(--bg);
  min-height: 100%;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  cursor: pointer;
  background: none;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: none;
  background: transparent;
  padding: 8px 12px;
}

.nav {
  max-width: 1393px;
  margin: 0 auto;
  padding: 4px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(31, 27, 44, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.logo img {
  width: 120px;
  height: 48px;
  object-fit: contain;
}

.logo:hover {
  transform: translateY(-2px);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  padding-bottom: 6px;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* Active nav highlight */
.nav-links a.active {
  color: var(--primary);
}
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a.nav-cta {
  background: var(--primary); /* #7a509a */
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(122, 80, 154, 0.28);
}
.nav-links a.nav-cta::after { display: none; }
.nav-links a.nav-cta:hover {
  background: #6a4488;
  color: #ffffff;
}

.nav-search img {
  width: 22px;
  height: 22px;
}

.nav-menu {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(122, 80, 154, 0.12);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: background 0.3s ease;
}

.nav-menu span {
  width: 20px;
  height: 2px;
  background: var(--primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav.is-open .nav-menu span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav.is-open .nav-menu span:nth-child(2) {
  opacity: 0;
}

.nav.is-open .nav-menu span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav.is-open .nav-links {
  display: flex;
}

.language-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  top: auto;
  transform: none;
  z-index: 9;
}

.language-toggle button {
  writing-mode: horizontal-tb;
  transform: none;
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-weight: 600;
  letter-spacing: 2px;
  transition: background 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.language-toggle .flag,
.language-toggle .lang-label {
  transform: none;
}

.language-toggle .flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.language-toggle .flag-en { display: none; }

.language-toggle .lang-label {
  font-weight: 700;
}

.language-toggle button:hover {
  background: var(--primary-dark);
}

.gradient-bg {
  background: var(--bg-hero);
  background-image: url("img/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.gradient-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  mix-blend-mode: normal;
}

.gradient-bg > * {
  position: relative;
  z-index: 1;
}

.hero {
  width: 100%;
  max-width: none;
  margin: -117px 0 0;
  padding: 160px 64px 64px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: block;
  box-shadow: var(--shadow);
}

@media (min-width: 992px) {
  html[lang="vi"] .hero.gradient-bg {
    min-height: 720px;
    padding-bottom: 145px;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.hero-side {
  text-align: left;
  justify-self: end;
}

.hero-eyebrow {
  text-transform: none;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--primary);
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 8px;
}

.hero-title {
  font-weight: 800;
  font-size: clamp(2.6rem, 5.5vw, 4.6rem);
  line-height: 1.08;
  margin: 0 0 12px;
}

.hero-description {
  color: #2b233d;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 420px;
  margin: 0 0 14px auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(122, 80, 154, 0.2);
  font-size: 0.9rem;

}

.chip-arrow .arrow {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
}

.btn {
  padding: 14px 26px;
  border-radius: 40px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease;
}

.btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 18px 30px rgba(122, 80, 154, 0.2);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 32px rgba(122, 80, 154, 0.25);
}

.btn.ghost {
  border: 1px solid rgba(122, 80, 154, 0.3);
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.6);
}

.btn.ghost:hover {
  background: rgba(122, 80, 154, 0.1);
}

.hero-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.hero-banner {
  margin-top: 28px;
  position: relative;
  border-radius: 28px;
  overflow: hidden;
}

.hero-banner-image {
  width: 100%;
  display: block;
  object-fit: cover;
}

.watch-video {
  position: absolute;
  right: 36px;
  bottom: 11px;
  background: none;
  border: none;
  padding: 0;
  color: #2b233d;
  font-weight: 700;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.watch-video .play {
  display: none;
}

.watch-video span[data-i18n="hero.ctaVideo"] {
  transition: color 0.2s ease;
}

.watch-video:hover span[data-i18n="hero.ctaVideo"] {
  color: var(--primary);
}

.watch-video svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
  transition: color 0.2s ease, transform 0.2s ease;
}

.watch-video:hover svg {
  color: var(--primary);
  transform: scale(1.1);
}

.video-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 24, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  z-index: 40;
}

.video-overlay[hidden] {
  display: none;
}

.video-frame {
  position: relative;
  width: clamp(320px, 80vw, 1100px);
  max-height: calc(100vh - 96px);
  background: #0f0d23;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(12, 10, 24, 0.35);
  aspect-ratio: 16 / 9;
}

#youtubePlayer {
  position: relative;
  width: 100%;
  height: 100%;
}

#youtubePlayer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.close-video {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  display: grid;
  place-items: center;
}

.close-video:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.section {
  max-width: 1200px;
  margin: 96px auto;
  padding: 0 32px;
}

.about {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: center;
}

.about-logo img {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.about h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0 0 20px;
}

.about p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.9rem;
  color: var(--primary);
}

.section-title-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.section-title-group h3 {
  margin: 0;
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  position: relative;
}

.link-arrow::after {
  content: "→";
  transition: transform 0.3s ease;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  position: relative;
  background: var(--surface);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(31, 27, 44, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.service-card.highlight {
  background: linear-gradient(135deg, #7a509a 0%, #b88ad5 100%);
}

.service-card img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  transform: scale(1.02);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 45px rgba(122, 80, 154, 0.2);
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

.card-body {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 92px; /* leave room for arrow button */
  padding: 0;
  z-index: 2;
}

.card-body h4 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: #ffffff;
  text-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.card-body p {
  color: rgba(255,255,255,0.9);
  margin: 0;
  line-height: 1.55;
  font-size: 0.92rem;
  text-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

.icon-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.75);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #ffffff;
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 2;
}

.service-card:hover .icon-button {
  background: #7a509a;
  color: white;
  transform: translate(4px, -4px);
}
.icon-button span {
  display: inline-block;   
  transform: rotate(0deg); 
}

.service-card:hover .icon-button span {
  transform: rotate(320deg) translate(1px, -1px);
}


.projects .project-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  padding: 48px;
  align-items: center;
}

.project-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.project-track {
  display: flex;
  width: 100%;
  will-change: transform;
  transition: transform 0.6s ease;
}

.project-track .project-card {
  flex: 0 0 100%;
}

/* Services page */
.services-page {
  max-width: 1200px;
  margin: 96px auto;
  padding: 0 24px;
}
.services-page__header .lead {
  color: var(--muted);
}
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.svc-card {
  background: #17151f;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.svc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.28);
  border-color: rgba(122, 80, 154, 0.35);
}
.svc-icon {
  font-size: 34px;
  margin-bottom: 14px;
}
.svc-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.svc-desc {
  margin: 0;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

.project-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 3;
}

.project-arrow {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(172, 172, 172, 0.5);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.project-arrow:hover {
  background: rgba(0,0,0,0.7);
  transform: translateY(-1px);
}

.project-dots {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.project-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.project-dots button[aria-selected="true"] {
  background: #ffffff;
  transform: scale(1.2);
}

.project-content h4 {
  font-size: 2rem;
  margin: 0 0 16px;
}

.project-content p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.project-media img {
  width: 100%;
  max-width: 420px;
  border-radius: 36px;
  margin: 0 auto;
}

/* Legacy light footer (kept for fallback) */
.footer {
  background: #ede9f7;
  padding: 64px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
}
.footer .logo span { font-weight: 700; }
.footer p { color: var(--muted); line-height: 1.6; }
.social-links { display: block; gap: 12px; margin-top: 16px; }
.social-links a { color: var(--primary); display: grid; place-items: left; font-weight: 600; transition: background .3s ease, color .3s ease; }
.social-links a:hover { color: rgb(203,203,203); }

/* New light-purple footer for all public pages (with subtle textured background) */
.footer-dark {
  background: #f2ecff; /* tím nhạt */
  background-image: url("img/backgroundft.png");
  background-size: auto;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text);
  padding: 56px 24px 20px;
  border-top: 1px solid #e2d5f6;
}
.footer-dark__grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto repeat(3, 1fr);
  gap: 32px;
  align-items: start;
}
.footer-logo {
  grid-column: 1;
}
.footer-logo img {
  max-width: 150px;
  height: auto;
}
.footer-dark__col {
  grid-column: auto;
}
.footer-dark__col h4 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1.25rem;
}
.footer-dark__col ul { list-style: none; margin: 0; padding: 0; }
.footer-dark__col li { margin: 10px 0; color: var(--muted); }
.footer-dark__col a { color: var(--text); text-decoration: none; }
.footer-dark__col a:hover { color: var(--primary); }
.footer-copyright {
  grid-column: 1 / -1;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2d5f6;
}
.footer-copyright p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.recent-blog { display: grid; gap: 16px; }
.rb-item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; color: var(--text); text-decoration: none; }
.rb-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; filter: none; border: 1px solid #e2d5f6; }
.rb-item .rb-title { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.rb-item .rb-date { font-size: .9rem; color: var(--muted); }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--text); }
.contact-list .icon { width: 22px; display: inline-grid; place-items: center; color: var(--primary); }

@media (max-width: 900px) {
  .footer-dark__grid { 
    grid-template-columns: auto repeat(2, 1fr);
  }
  .footer-logo img {
    max-width: 120px;
  }
}
@media (max-width: 1200px) {
  .footer-dark__grid { 
    grid-template-columns: 1fr;
  }
  .footer-dark {
    background-size: cover;
  }
  .footer-logo img {
    max-width: 100px;
  }
  .footer-copyright {
    grid-column: 1;
  }
  .footer-copyright p {
    font-size: 0.85rem;
  }
}

.modal-open {
  overflow: hidden;
}

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.appear {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.15s;
}

.delay-2 {
  transition-delay: 0.3s;
}

@media (max-width: 992px) {
  .nav {
    padding: 14px 20px;
    flex-wrap: wrap;
  }

  .nav-menu {
    display: flex;
  }

  .nav-links {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    background: rgba(246, 243, 242, 0.95);
    border-radius: 11px;
    margin-top: 12px;
    padding: 12px 16px;
    box-shadow: 0 20px 35px rgba(31, 27, 44, 0.1);
  }

  .nav-links li a {
    padding: 12px 0;
    display: block;
  }

  .hero {
    padding: 48px 32px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-media img {
    border-radius: var(--radius-md);
  }

  .about {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .projects .project-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 28px;
  }

  .language-toggle button {
    writing-mode: horizontal-tb;
    transform: none;
    padding: 12px 24px;
  }

  .language-toggle {
    top: auto;
    bottom: 24px;
    right: 24px;
    transform: none;
  }
}

@media (max-width: 1120px) {
  .hero {
    margin: 0;
    padding: 24px 16px;
  }
  .hero.gradient-bg {
    margin: -117px 0 0;
    padding-top: 140px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
  .top-bar { background: transparent; }

  .section {
    margin: 48px auto;
    padding: 0 16px;
  }

  .card-body {
    padding: 20px;
  }

  .language-toggle {
    right: 16px;
    bottom: 16px;
  }

  .footer {
    padding: 48px 20px;
  }

  /* Hero text tweaks */
  .hero-eyebrow {
    font-size: 1.6rem;
  }
  .hero-title {
    font-size: 2rem;
    line-height: 1.1;
  }
  .hero-description {
    max-width: 100%;
    margin: 8px 0 12px 0;
    font-size: 0.95rem;
  }
  .chip {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  /* Mobile: improve Watch video button usability */
  .watch-video {
    right: 16px;
    bottom: 16px;
    background: rgba(255,255,255,0.9);
    color: #1f1b2c;
    padding: 8px 12px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(31,27,44,0.12);
    backdrop-filter: blur(6px);
  }
  .watch-video svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
    color: var(--primary);
  }
  .watch-video span[data-i18n="hero.ctaVideo"] {
    font-weight: 700;
  }
  .watch-video:active {
    transform: translateY(1px);
  }

  /* Service cards */
  .service-card img {
    height: 260px;
  }
  .card-body {
    left: 16px;
    right: 16px;
    bottom: 72px;
  }
  .icon-button {
    width: 44px;
    height: 44px;
    bottom: 14px;
    right: 14px;
    border-radius: 12px;
    font-size: 18px;
  }

  /* Project slider nav */
  .project-nav {
    bottom: 8px;
    grid-template-columns: 44px 1fr 44px;
    padding: 0 8px;
    gap: 8px;
  }
  .project-arrow {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .project-dots button {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 640px) {
  .watch-video span[data-i18n="hero.ctaVideo"] {
    display: none;
  }
  .watch-video {
    gap: 0;
    padding: 10px;
  }
}
.play-button {
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 20px solid #333; 
  cursor: pointer;
}


.play-button:hover {
  border-left-color: #007bff; 
}
