/* ==== Root variables & global reset ==== */
:root {
  --bg1: #f4f8fb;
  --bg2: #dfe9f3;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #475569;
  --accent: #007bff;
  --accent-light: #e0f0ff;
  --radius: 16px;
  font-family: 'Inter', system-ui, sans-serif;
}

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

body {
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
  color: var(--text);
  padding: 24px;
  display: flex;
  justify-content: center;
}

.wrap {
  max-width: 1200px;
  width: 100%;
}

/* ==== HEADER ==== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #007bff, #0056cc);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
  margin-bottom: 40px;
  position: sticky;
  top: 16px;
  z-index: 100;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
  backdrop-filter: blur(0px);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  color: #003366;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
}

header.scrolled nav a {
  color: #003366;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  height: 54px;
  width: auto;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
}

.brand div {
  font-weight: 700;
  color: #f9fbff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

header.scrolled .brand div {
  color: #003366;
  text-shadow: none;
}

/* NAVIGATION */
nav {
  display: flex;
  align-items: center;
}

nav a {
  color: #e7f0ff;
  text-decoration: none;
  margin-left: 22px;
  font-weight: 600;
  transition: color 0.3s, transform 0.2s;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: #fff;
  transition: width 0.3s;
}

nav a:hover {
  color: #fff;
  transform: translateY(-2px);
}

nav a:hover::after {
  width: 100%;
}

.lang-btn {
  background: #fff;
  border: none;
  color: #007bff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  margin-left: 20px;
  font-weight: 700;
  transition: background 0.3s, transform 0.2s;
}

.lang-btn:hover {
  background: #eaf2ff;
  transform: scale(1.05);
}

/* ==== HERO ==== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 60px;
  flex-wrap: wrap;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.hero img {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* CHANGED: center hero content without altering other logic */
.hero-text {
  flex: 1;
  min-width: 300px;
  z-index: 2;
  position: relative;
  color: white;
  padding: 60px 40px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  text-align: center; /* center text horizontally */
  display: flex;       /* enable vertical centering */
  flex-direction: column;
  align-items: center; /* center items horizontally */
  justify-content: center; /* center items vertically */
}

h1 {
  font-size: 42px;
  margin-bottom: 16px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 20px;
}

.hero-text p {
  color: #f1f5f9;
}

.btn {
  padding: 12px 26px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.btn.primary {
  background: var(--accent);
  color: white;
  transition: background 0.3s, transform 0.2s;
}

.btn.primary:hover {
  background: #0056cc;
  transform: translateY(-2px);
}

/* ==== SERVICES ==== */
#services {
  text-align: center;
}

#services h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

#services .service-card {
  background: var(--card);
  padding: 28px 20px;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
}

#services .service-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--accent);
}

.service-card img {
  width: 140px;
  height: 120px;
  object-fit: cover;
  margin-bottom: 14px;
  border-radius: 12px;
}

.service-card h3 {
  margin-bottom: 10px;
}

/* ==== ABOUT ==== */
#about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  margin-top: 70px;
  background: var(--card);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

#about img {
  flex: 1;
  min-width: 300px;
  border-radius: var(--radius);
  width: 100%;
  object-fit: cover;
}

#about div {
  flex: 1;
  min-width: 300px;
}

/* ==== CONTACT ==== */
#contact {
  background: var(--accent-light);
  padding: 70px 40px;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-top: 60px;
}

#contact h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--text);
}

#contact p {
  text-align: center;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 500;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  margin-bottom: 30px;
}

.contact-item {
  background: rgba(255, 255, 255, 0.9);
  padding: 16px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--text);
  min-width: 250px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

form {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

form input,
form textarea {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  width: 100%;
  margin-bottom: 12px;
  font-size: 16px;
  color: var(--text);
}

form button {
  width: 100%;
}


/* ==== FOOTER ==== */
footer {
  text-align: center;
  color: var(--muted);
  margin-top: 50px;
  font-size: 14px;
  padding: 20px;
}

/* === Hiệu ứng "tung tăng" bounce thật sự cho ô dịch vụ === */
@keyframes cardBounce {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-10px) scale(1.05); }
  60% { transform: translateY(-6px) scale(1.03); }
  80% { transform: translateY(-9px) scale(1.04); }
  100% { transform: translateY(-8px) scale(1.05); }
}

#services .service-card:hover {
  animation: cardBounce 0.6s ease-out;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.18);
  z-index: 2;
}
