/**
 * Labo Gold Smile — Tra cứu bảo hành
 * Tone: trắng – xám – vàng (#f8b400), phong cách y tế / chuyên nghiệp
 */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f5f6f8;
  --color-bg-section: #fafbfc;
  --color-text: #2c2e33;
  --color-text-muted: #5c616b;
  --color-border: #e6e8ec;
  --color-gold: #f8b400;
  --color-gold-dark: #d99a00;
  --color-gold-soft: rgba(248, 180, 0, 0.12);
  --shadow-header: 0 2px 16px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 12px 32px rgba(15, 23, 42, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
  --transition: 0.25s ease;
}

/* --------------------------------------------------------------------------
   Reset nhẹ & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Layout: container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* --------------------------------------------------------------------------
   Fade-in khi section vào viewport (kết hợp JS)
   -------------------------------------------------------------------------- */
.section-fade {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.section-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .section-fade {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .service-card:hover {
    transform: none;
  }

  .btn--primary:hover {
    transform: none;
  }

  .site-header.is-nav-open .nav-toggle__bar:nth-child(1),
  .site-header.is-nav-open .nav-toggle__bar:nth-child(3) {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Eyebrow / tiêu đề phụ
   -------------------------------------------------------------------------- */
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-bottom: 0.75rem;
}

.eyebrow--dark {
  color: var(--color-text-muted);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.section-title--center {
  text-align: center;
}

/* --------------------------------------------------------------------------
   HEADER — sticky, nền trắng, bóng nhẹ
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg);
  box-shadow: var(--shadow-header);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
}

.logo:hover {
  text-decoration: none;
}

.logo__image {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo__mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-gold) 0%, #ffc93d 100%);
  box-shadow: 0 2px 8px var(--color-gold-soft);
  flex-shrink: 0;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.logo__sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

/* Menu chính */
.nav-main {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-main__link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition:
    background var(--transition),
    color var(--transition);
}

.nav-main__link:hover {
  text-decoration: none;
  background: var(--color-gold-soft);
  color: var(--color-gold-dark);
}

/* Social icons */
.social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--color-text-muted);
  background: transparent;
  transition:
    background var(--transition),
    color var(--transition),
    transform 0.15s ease;
}

.social__link:hover {
  text-decoration: none;
  color: var(--color-gold-dark);
  background: var(--color-gold-soft);
  transform: translateY(-1px);
}

.social__icon {
  width: 20px;
  height: 20px;
}

/* Nút hamburger — ẩn trên desktop */
.nav-toggle {
  display: none;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
}

.nav-toggle:hover {
  background: var(--color-bg-soft);
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition:
    transform var(--transition),
    opacity var(--transition);
  transform-origin: center;
}

/* Panel mobile */
.mobile-panel {
  display: none;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  padding: 1rem 0 1.25rem;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.mobile-panel__link {
  font-weight: 600;
  font-size: 1rem;
  padding: 0.35rem 0;
}

.social--mobile {
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  width: 100%;
}

/* --------------------------------------------------------------------------
   WARRANTY — nền hình răng mờ bên phải, nội dung căn giữa
   -------------------------------------------------------------------------- */
.warranty {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 55%, #f0f2f5 100%);
  padding: 2.5rem 0 3.5rem;
}

/* Lớp hình minh họa răng 3D mờ — placeholder */
.warranty__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("../img/card-background.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80% 100%;
  opacity: 0.45;
  filter: saturate(0.85);
}

.warranty__inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.warranty__content {
  max-width: 90%;
  width: 100%;
  text-align: center;
}

.warranty__title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.warranty__lead {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.75;
}

.warranty__figure {
  margin: 0 auto 2rem;
  display: inline-block;
}

.warranty__card-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-left: auto;
  margin-right: auto;
}

/* Form */
.warranty-form {
  text-align: left;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem 1.75rem;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(6px);
}

.warranty-form__field {
  margin-bottom: 1.25rem;
}

.warranty-form__input {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.warranty-form__input::placeholder {
  color: #9aa0a8;
}

.warranty-form__input:hover {
  border-color: #d0d4dc;
}

.warranty-form__input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px var(--color-gold-soft);
}

.warranty-form__check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.warranty-form__checkbox {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--color-gold);
  cursor: pointer;
}

.warranty-form__check-label {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  cursor: pointer;
}

.warranty-form__error {
  font-size: 0.875rem;
  color: #c41e3a;
  margin-bottom: 0.75rem;
}

/* Nút vàng cam */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  transition:
    background var(--transition),
    box-shadow var(--transition),
    transform 0.15s ease;
}

.btn--primary {
  width: 100%;
  background: linear-gradient(
    180deg,
    #ffc42e 0%,
    var(--color-gold) 45%,
    var(--color-gold-dark) 100%
  );
  color: #1a1a1a;
  box-shadow: 0 4px 14px rgba(248, 180, 0, 0.35);
}

.btn--primary:hover {
  box-shadow: 0 6px 20px rgba(248, 180, 0, 0.45);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
}

/* Nút Tra cứu: chỉ active khi đã nhập mã + tick đồng ý */
.btn--primary:disabled,
.btn--primary[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
  filter: grayscale(0.25);
  transform: none;
}

.btn--primary:disabled:hover,
.btn--primary[aria-disabled="true"]:hover {
  box-shadow: none;
  transform: none;
}

/* --------------------------------------------------------------------------
  MISSION + SERVICES (gộp chung 1 khối)
  -------------------------------------------------------------------------- */
.mission {
  padding: 4rem 0;
  background: var(--color-bg);
}

.mission__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.mission__text {
  max-width: 900px;
}

.mission__p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.mission__p:last-of-type {
  margin-bottom: 0;
}

.mission__p strong {
  color: var(--color-text);
  font-weight: 600;
}

.services--embedded {
  padding: 2.25rem 0 0;
  margin-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  background: transparent;
}

/* --------------------------------------------------------------------------
   SERVICES — grid card
   -------------------------------------------------------------------------- */
.services {
  padding: 4rem 0 4.5rem;
  background: var(--color-bg-section);
  border-top: 1px solid var(--color-border);
}

.services__head {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.services__intro {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 1.75rem 1.25rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(248, 180, 0, 0.35);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-gold-soft);
  color: var(--color-gold-dark);
}

.service-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   FOOTER — nền đen nhạt
   -------------------------------------------------------------------------- */
.site-footer {
  background: #1e1f23;
  color: #c9ccd3;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  padding: 3rem 0 2rem;
}

.footer__logo {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer__tagline {
  font-size: 0.9rem;
  color: #8b9099;
  line-height: 1.5;
}

.footer__heading {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}

.footer__list li {
  margin-bottom: 0.65rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.footer__label {
  color: #8b9099;
  margin-right: 0.35rem;
}

.footer__list a {
  color: #e8eaef;
}

.footer__list a:hover {
  color: var(--color-gold);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__bottom-inner {
  padding: 1.15rem 0;
}

.footer__copy {
  margin: 0;
  font-size: 0.8125rem;
  color: #6b7078;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .warranty__bg {
    background-position: 50% 100%;
    background-size: min(90vw, 420px) auto;
    opacity: 0.35;
  }
  .footer__grid {
    padding: 2.5rem 1rem 1rem;
  }
}

@media (max-width: 768px) {
  .nav-main {
    display: none;
  }

  .social:not(.social--mobile) {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .header-inner {
    min-height: 64px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1rem 1rem;
  }
}

@media (max-width: 520px) {
  .warranty {
    padding: 2.5rem 0 3rem;
  }

  .warranty-form {
    padding: 1.35rem 1.15rem;
  }

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

  .logo__sub {
    display: none;
  }
}

/* Trạng thái mở menu: icon hamburger -> X */
.site-header.is-nav-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
