/* ============================================================
   MP Group — Modern Refresh
   โหลดหลัง styles.css / building-version.css เพื่อยกระดับดีไซน์
   ให้ดูทันสมัยขึ้น: glass header, การ์ดโค้งมน, เงานุ่ม, ปุ่มไล่เฉดสี
   ============================================================ */

:root {
  --mr-radius: 20px;
  --mr-radius-sm: 14px;
  --mr-shadow: 0 10px 30px rgba(18, 49, 61, 0.08);
  --mr-shadow-hover: 0 24px 55px rgba(18, 49, 61, 0.16);
  --mr-gradient: linear-gradient(120deg, var(--teal), var(--blue));
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(0, 167, 157, 0.22);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #eef6f5;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 167, 157, 0.45);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 167, 157, 0.7);
}

:focus-visible {
  outline: 3px solid rgba(0, 167, 157, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Scroll progress bar */
.scroll-progress span,
[data-scroll-progress] {
  background: var(--mr-gradient) !important;
}

/* ---------- Header: glassmorphism ---------- */

.site-header {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(215, 232, 234, 0.6);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(18, 49, 61, 0.1);
}

.primary-nav a {
  position: relative;
  border-radius: 999px;
  padding: 8px 12px;
  transition: color 0.18s ease, background 0.18s ease;
}

.primary-nav a:hover {
  color: var(--teal);
  background: rgba(0, 167, 157, 0.08);
}

.language-switcher {
  border-radius: 999px;
  overflow: hidden;
}

.language-switcher button {
  transition: background 0.18s ease, color 0.18s ease;
}

.language-switcher button.is-active {
  background: var(--mr-gradient);
  color: #fff;
}

/* ---------- Buttons ---------- */

.button {
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  will-change: transform;
}

.button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.button-dark {
  background: var(--mr-gradient);
  border: 0;
  box-shadow: 0 10px 26px rgba(0, 167, 157, 0.32);
}

.button-light {
  box-shadow: 0 10px 26px rgba(18, 49, 61, 0.16);
}

.button-outline {
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.1);
}

.text-link {
  color: var(--teal);
  font-weight: 800;
  transition: color 0.18s ease, transform 0.18s ease;
}

.text-link:hover {
  color: var(--blue);
}

.text-link::after {
  content: " →";
  display: inline-block;
  transition: transform 0.18s ease;
}

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

/* ---------- Eyebrow & headings ---------- */

.eyebrow {
  letter-spacing: 0.14em;
}

.section-heading h2,
.hero-content h1 {
  letter-spacing: -0.01em;
}

/* ---------- Tags & chips ---------- */

.tag {
  align-items: center;
  border-radius: 999px;
  background: rgba(17, 119, 168, 0.09);
  padding: 4px 12px;
  letter-spacing: 0.06em;
}

.product-list span,
.pill-list span,
.activity-filters span,
.health-certificates span {
  border-radius: 999px !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.product-list span:hover,
.pill-list span:hover,
.activity-filters span:hover {
  background: var(--mr-gradient);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 167, 157, 0.28);
  cursor: default;
}

/* ---------- Cards: การ์ดโค้งมน + hover lift ---------- */

.mission-card,
.compact-card,
.news-card,
.activity-card,
.media-card,
.visual-card,
.health-hero-card,
.orbit-card,
.journey-timeline article,
.anniversary-pillars article,
.anniversary-statement,
.cinema-stage,
.image-panel,
.r2r-media img,
.award-grid > img {
  border-radius: var(--mr-radius);
}

.mission-card,
.compact-card,
.news-card,
.activity-card,
.media-card,
.visual-card,
.health-hero-card,
.journey-timeline article,
.anniversary-pillars article {
  overflow: hidden;
  border: 1px solid rgba(215, 232, 234, 0.85);
  box-shadow: var(--mr-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.mission-card:hover,
.compact-card:hover,
.news-card:hover,
.activity-card:hover,
.media-card:hover,
.visual-card:hover,
.health-hero-card:hover,
.journey-timeline article:hover,
.anniversary-pillars article:hover {
  transform: translateY(-6px);
  box-shadow: var(--mr-shadow-hover);
  border-color: rgba(0, 167, 157, 0.4);
}

.mission-card img,
.news-card img,
.activity-card img,
.media-card img {
  transition: transform 0.35s ease;
}

.mission-card:hover img,
.news-card:hover img,
.activity-card:hover img,
.media-card:hover img {
  transform: scale(1.04);
}

.orbit-card {
  backdrop-filter: blur(8px);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.orbit-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--mr-shadow-hover);
}

.compact-card svg {
  color: var(--teal);
}

.card-link {
  color: var(--teal);
  font-weight: 800;
}

.card-link:hover {
  color: var(--blue);
}

/* ---------- Images ---------- */

.image-panel,
.r2r-media {
  overflow: hidden;
}

.image-panel img,
.r2r-media img {
  transition: transform 0.4s ease;
}

.image-panel:hover img,
.r2r-media:hover img {
  transform: scale(1.03);
}

/* ---------- Footer: โทนเข้มทันสมัย ---------- */

.site-footer {
  background:
    radial-gradient(900px 300px at 85% -20%, rgba(0, 167, 157, 0.25), transparent 60%),
    linear-gradient(160deg, #0d2b34, #123742);
  color: rgba(255, 255, 255, 0.72);
}

.site-footer h2 {
  color: #ffffff;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.18s ease, transform 0.18s ease;
}

.site-footer a:hover {
  color: #6fe3d9;
}

.site-footer .footer-logo {
  background: #ffffff;
  border-radius: 14px;
  padding: 8px 12px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: rgba(255, 255, 255, 0.55);
}

/* ปุ่มเข้าสู่ระบบหลังบ้าน */
.admin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.admin-link:hover {
  background: var(--mr-gradient);
  border-color: transparent;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ---------- Motion preferences ---------- */

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

  .button,
  .mission-card,
  .compact-card,
  .news-card,
  .activity-card,
  .media-card,
  .visual-card,
  .health-hero-card,
  .orbit-card,
  .journey-timeline article,
  .anniversary-pillars article,
  .mission-card img,
  .news-card img,
  .activity-card img,
  .media-card img,
  .image-panel img,
  .r2r-media img {
    transition: none;
  }

  .mission-card:hover,
  .compact-card:hover,
  .news-card:hover,
  .activity-card:hover,
  .media-card:hover,
  .visual-card:hover,
  .health-hero-card:hover,
  .orbit-card:hover,
  .journey-timeline article:hover,
  .anniversary-pillars article:hover,
  .button:hover {
    transform: none;
  }
}
