/* ==========================================================================
   JOYBEAN — Global styles
   Shared by every static page. Mirrors the future WordPress theme parts:
   header.php, footer.php, functions.php enqueues and global components.
   ========================================================================== */

:root {
  --primary: #e4211b;
  --primary-dark: #b81510;
  --primary-soft: #fbe9e7;
  --ink: #17130f;
  --ink-soft: #3f3a35;
  --muted: #6b6560;
  --bg: #faf8f5;
  --bg-warm: #fdf9f5;
  --surface: #ffffff;
  --line: #eae3db;
  --dark: #17120f;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 32px;
  --shadow-sm: 0 10px 26px rgba(23, 19, 15, 0.06);
  --shadow-md: 0 18px 44px rgba(23, 19, 15, 0.1);
  --shadow-lg: 0 28px 70px rgba(23, 19, 15, 0.14);
  --container: 1240px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body.nav-open {
  overflow: hidden;
}

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

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

button {
  font-family: inherit;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-top: 0;
}

::selection {
  color: #fff;
  background: var(--primary);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding: clamp(64px, 8vw, 110px) 0;
}

.section-head {
  max-width: 840px;
  margin: 0 auto clamp(36px, 5vw, 58px);
  text-align: center;
}

.section-head h2 {
  margin: 14px 0 18px;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.section-head p strong {
  color: var(--ink-soft);
}

.section-cta {
  margin-top: clamp(36px, 5vw, 48px);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease,
    color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 26px rgba(228, 33, 27, 0.24);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 16px 34px rgba(228, 33, 27, 0.3);
  transform: translateY(-2px);
}

.btn-outline {
  color: var(--ink);
  background: transparent;
  border-color: var(--ink);
}

.btn-outline:hover {
  color: #fff;
  background: var(--ink);
  transform: translateY(-2px);
}

.btn-light {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.btn-light:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
}

.btn-outline-light:hover {
  color: var(--ink);
  background: #fff;
  border-color: #fff;
}

.btn-sm {
  padding: 11px 20px;
  font-size: 14px;
}

/* Header quote button: arrow + periodic nudge to draw the eye */

.header-actions .btn-primary::after {
  content: "\2192";
  display: inline-block;
  font-size: 15px;
  line-height: 1;
  transition: transform 0.25s ease;
  animation: quote-nudge 3.6s ease-in-out 1.6s infinite;
}

.header-actions .btn-primary:hover::after {
  animation: none;
  transform: translateX(4px);
}

@keyframes quote-nudge {
  0%,
  72%,
  100% {
    transform: translateX(0);
  }

  80% {
    transform: translateX(4px);
  }

  88% {
    transform: translateX(0);
  }
}

.btn-block {
  width: 100%;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  transition: gap 0.25s ease, color 0.25s ease;
}

.text-link:hover {
  gap: 11px;
  color: var(--primary-dark);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease,
    transform 0.3s ease;
}

/* 下滑收起、上划出现 */
.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 14px 34px rgba(23, 19, 15, 0.08);
}

.topbar {
  color: rgba(255, 255, 255, 0.82);
  background: var(--ink);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 38px;
}

.topbar-note {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.topbar-contact {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
}

.topbar-contact a {
  transition: color 0.2s ease;
}

.topbar-contact a:hover {
  color: #fff;
}

.topbar-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.22);
}

.header-main {
  position: relative;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 84px;
}

.site-logo {
  flex: none;
}

.site-logo img {
  width: auto;
  height: 44px;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  border-radius: 10px;
  transition: color 0.2s ease;
}

.nav-list > li > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-list > li:hover > a,
.nav-list > li:focus-within > a {
  color: var(--primary);
}

.nav-list > li:hover > a::after,
.nav-list > li:focus-within > a::after,
.nav-list > li > a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-list > li > a[aria-current="page"] {
  color: var(--primary);
}

.chevron {
  flex: none;
  transition: transform 0.25s ease;
}

.nav-list > li:hover .chevron,
.nav-list > li:focus-within .chevron {
  transform: rotate(180deg);
}

/* Dropdown */

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  z-index: 20;
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.dropdown a:hover,
.dropdown a[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-soft);
}

/* Third-level submenu (supports nested levels) */

.dropdown .has-submenu {
  position: relative;
}

.dropdown .has-submenu > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chevron-right {
  flex: none;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.dropdown .has-submenu:hover > a .chevron-right,
.dropdown .has-submenu:focus-within > a .chevron-right {
  color: var(--primary);
  transform: translateX(2px);
}

.submenu {
  position: absolute;
  top: -10px;
  left: calc(100% - 2px);
  z-index: 21;
  min-width: 235px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.dropdown .has-submenu:hover > .submenu,
.dropdown .has-submenu:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* Hamburger */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Mobile navigation
   -------------------------------------------------------------------------- */

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2001;
  display: flex;
  flex-direction: column;
  width: min(370px, 88vw);
  background: #fff;
  box-shadow: -20px 0 60px rgba(23, 19, 15, 0.2);
  visibility: hidden;
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1),
    visibility 0s linear 0.35s;
}

.mobile-nav.is-open {
  visibility: visible;
  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1),
    visibility 0s linear 0s;
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.mobile-nav-head img {
  width: auto;
  height: 36px;
}

.mobile-close {
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  background: var(--bg);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.mobile-nav-body {
  flex: 1;
  padding: 14px 22px 32px;
  overflow-y: auto;
}

.mobile-nav-body > ul > li {
  border-bottom: 1px solid var(--line);
}

.mobile-nav-body > ul > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 700;
}

.mobile-nav-body .has-children > a::after {
  content: "+";
  color: var(--primary);
  font-size: 18px;
  font-weight: 500;
}

.mobile-nav-body .has-children.is-open > a::after {
  content: "\2212";
}

.mobile-nav-body .sub-menu {
  display: none;
  padding: 0 0 12px 14px;
}

.mobile-nav-body .sub-menu a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 15px;
}

.mobile-nav-body .sub-menu a:hover,
.mobile-nav-body a[aria-current="page"] {
  color: var(--primary);
}

/* Parent links at every nesting level keep the +/- control on the right */

.mobile-nav-body .has-children > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-body > .btn {
  margin-top: 24px;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(23, 19, 15, 0.46);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-top: clamp(56px, 7vw, 80px);
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.45fr;
  gap: clamp(30px, 4vw, 52px);
  padding-bottom: clamp(40px, 5vw, 58px);
}

.footer-brand img {
  width: auto;
  height: 48px;
  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 310px;
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.75;
}

.footer-company {
  color: #9a9188;
  font-size: 13px !important;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.footer-social svg,
.footer-social i {
  flex: none;
}

.footer-social i {
  font-size: 16px;
  line-height: 1;
}

.footer-col h4 {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 9px;
}

.footer-col ul a {
  color: var(--ink-soft);
  font-size: 15px;
  transition: color 0.2s ease;
}

.footer-col ul a:hover {
  color: var(--primary);
}

.footer-contact p {
  margin: 0 0 9px;
  font-size: 14.5px;
  line-height: 1.6;
}

.footer-contact strong {
  color: var(--ink);
  font-weight: 600;
}

.footer-contact a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom ul {
  display: flex;
  gap: 24px;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* Homepage: copyright centered in the footer bottom bar */
.home .footer-bottom {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(228, 33, 27, 0.34);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
    background-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
}

/* Floating WhatsApp button — sits above the back-to-top button */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 84px;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.34);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.whatsapp-float:hover {
  background: #1fb457;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   FAQ accordion — shared by the homepage and inner pages
   -------------------------------------------------------------------------- */

.faq-section {
  background: var(--bg);
}

/* FAQ page: the hero already provides the top spacing */
.faq-page {
  padding-top: 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
}

/* Full-width item for an odd number of questions */
.faq-item.is-wide {
  grid-column: 1 / -1;
}

.faq-item {
  padding: 0 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item.is-open {
  border-color: #f0c3bf;
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  margin: 0;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 20px 0;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

.faq-icon {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  background: var(--primary-soft);
  border-radius: 50%;
  transition: background-color 0.25s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--primary);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, background-color 0.25s ease;
}

.faq-icon::before {
  width: 10px;
  height: 2px;
}

.faq-icon::after {
  width: 2px;
  height: 10px;
}

.faq-item.is-open .faq-icon {
  background: var(--primary);
}

.faq-item.is-open .faq-icon::before,
.faq-item.is-open .faq-icon::after {
  background: #fff;
}

.faq-item.is-open .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-answer {
  display: none;
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.76;
}

.faq-answer p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

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

  .nav-toggle {
    display: flex;
  }

  .header-inner {
    justify-content: space-between;
    gap: 18px;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 36px);
  }

  .topbar-contact {
    display: none;
  }

  .topbar-inner {
    justify-content: center;
  }

  .topbar-note {
    text-align: center;
  }

  .header-inner {
    height: 72px;
  }

  .site-logo img {
    height: 34px;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-contact {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom ul {
    gap: 18px;
  }

  .btn {
    padding: 14px 24px;
  }
}

/* --------------------------------------------------------------------------
   Softer scroll reveal — keep AOS, reduce travel distance
   -------------------------------------------------------------------------- */

[data-aos="fade-up"] {
  transform: translate3d(0, 20px, 0);
}

[data-aos="fade-right"] {
  transform: translate3d(-24px, 0, 0);
}

[data-aos="fade-left"] {
  transform: translate3d(24px, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
