/* XPoker independent rebuild — visual match to x-poker.net */
:root {
  --body-bg: #254a86;
  --body-color: #fff;
  --font: Arial, Helvetica, "Microsoft JhengHei", "Yu Gothic", sans-serif;
  --link-blue: #63b8e4;
  --active-blue: #ceeaff;
  --panel: #142c4e;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body-color);
  background: #335d9f url("../assets/images/original/background.jpg") repeat-x center top;
  background-size: auto max(1080px, 100vh);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--active-blue); }
button { font: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }

.site-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.site-header { position: relative; z-index: 20; }

.site-header .navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 20px;
  align-items: start;
  padding: 29px 26px 0;
  min-height: 90px;
}

.navbar-brand { padding: 0; margin: 0; justify-self: start; }
.navbar-brand img { width: 236px; height: auto; }

.navbar-nav {
  display: flex;
  flex-direction: row;
  gap: 30px;
  justify-content: center;
  align-items: start;
  padding-top: 9px;
}

.navbar-nav .nav-link {
  font-size: 17px;
  color: var(--link-blue);
  text-transform: uppercase;
  padding: 0 0 4px;
  line-height: 1.5;
  border-bottom: 1px solid transparent;
  text-align: center;
  white-space: nowrap;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--active-blue);
}

.navbar-nav .nav-link.active {
  border-bottom-color: var(--active-blue);
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  padding-top: 6px;
}

.certification img {
  width: 84px;
  height: 41px;
  object-fit: contain;
}

.desktop-certification { display: block; }
.mobile-certification { display: none; }

.lang-label {
  border: 0;
  color: var(--active-blue);
  background: #152a4259;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  font-size: 12px;
}

.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  outline: none;
  position: relative;
  z-index: 1;
}

.page-panel { position: relative; flex: 1; }

.home-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 530px;
}

#home-carousel {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

#home-carousel .carousel-track,
#home-carousel .carousel-item,
#home-carousel picture {
  width: 100%;
  height: 100%;
}

#home-carousel .carousel-track {
  position: relative;
  height: 100%;
}

#home-carousel .carousel-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

#home-carousel .carousel-item.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

#home-carousel picture { display: block; height: 100%; }

#home-carousel .carousel-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-control {
  position: absolute;
  top: 42%;
  z-index: 5;
  width: 70px;
  height: 100px;
  border: 0;
  background: transparent;
  opacity: 0.65;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-control:hover { opacity: 1; }
.carousel-control.prev { left: 7.5%; }
.carousel-control.next { right: 7.5%; }

.carousel-control .chev {
  width: 36px;
  height: 36px;
  border-top: 3px solid #cfe0f3;
  border-left: 3px solid #cfe0f3;
}

.carousel-control.prev .chev { transform: rotate(-45deg); }
.carousel-control.next .chev { transform: rotate(135deg); }

.home-downloads {
  position: relative;
  z-index: 2;
  padding: 0 24px 10px;
}

.download-platforms {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-button {
  display: block;
  width: 190px;
  height: 64px;
  border-radius: 10px;
  transition: filter 0.15s;
}

.platform-button:hover { filter: brightness(1.16); color: #fff; }

.platform-badge {
  display: flex;
  width: 100%;
  height: 100%;
  background: #000;
  border: 1px solid #aab4bc;
  border-radius: 10px;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 8px 11px;
  color: #fff;
}

.platform-badge .platform-icon {
  display: block;
  width: 38px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

.platform-badge strong {
  display: block;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.05;
}

.platform-badge small {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  margin-bottom: 3px;
}

.slideshow-tools {
  position: relative;
  margin: 13px auto 0;
  width: max-content;
  height: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.slideshow-tools .dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  opacity: 0.85;
  padding: 0;
}

.slideshow-tools .dot.active {
  background: #1c2427;
  opacity: 1;
  box-shadow: 0 0 0 1px #b6b6ae60;
}

.carousel-pause {
  width: 26px;
  height: 24px;
  padding: 0;
  border: 0;
  background: #142c4e38;
  border-radius: 3px;
  color: #e6effc;
  font-size: 13px;
  line-height: 24px;
}

.about-panel {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.about-scene {
  width: clamp(1000px, 70%, 1344px);
  max-width: 100%;
  position: relative;
  margin: -25px auto 0;
}

.about-desktop-image { width: 100%; height: auto; display: block; }
.about-mobile-image { display: none; }

.about-text {
  position: absolute;
  left: 42.8%;
  top: 27.2%;
  width: 16.25%;
  height: 47%;
  color: #fff;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #6eb4e0 transparent;
}

.about-text h1 {
  text-transform: uppercase;
  font-size: 1.9em;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  margin: 0 0 1.5em;
  overflow-wrap: anywhere;
}

.about-text p {
  font-size: 1em;
  line-height: 1.5;
  margin-bottom: 1em;
}

.contact-panel {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.contact-scene {
  width: min(550px, calc((100svh - 140px) * 0.7928));
  max-width: 92%;
  position: relative;
  margin-top: -25px;
}

.contact-scene > img {
  display: block;
  width: 100%;
  height: auto;
}

.contact-hotspot {
  position: absolute;
  left: 14%;
  width: 72%;
  height: 8.9%;
  border-radius: 4px;
  transition: box-shadow 0.15s;
}

.email-hotspot { top: 58.1%; }
.facebook-hotspot { top: 75.25%; }

.contact-hotspot:hover {
  box-shadow: 0 0 0 3px #a6dcff, 0 0 25px #83cdff66;
}

.site-footer {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 20px 10px;
  gap: 15px;
  color: #d2d7e5;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.footer-info p { margin: 8px 0 0; }

.legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 3px;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Content pages (list/article/search) */
.content-page {
  position: relative;
  z-index: 2;
  padding: 20px 0 48px;
}

.content-wrap {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.page-banner {
  background: rgba(20, 44, 78, 0.55);
  border: 1px solid rgba(206, 234, 255, 0.18);
  border-radius: 14px;
  padding: 28px 24px;
  margin-bottom: 22px;
}

.page-banner h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.page-banner p {
  margin: 0;
  color: #cfe0f3;
  font-size: 14px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.filters a {
  border: 1px solid rgba(170, 180, 188, 0.45);
  background: rgba(0, 0, 0, 0.35);
  color: #d0e9ff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
}

.filters a.active,
.filters a:hover {
  background: #3165a4;
  color: #fff;
  border-color: transparent;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.news-card {
  background: rgba(23, 41, 64, 0.88);
  border: 1px solid #6498c5;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px #0006;
  color: #fff;
}

.news-card .thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f1f35;
}

.news-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card .body { padding: 14px; }

.news-card .cat {
  display: inline-block;
  color: var(--link-blue);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.news-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.news-card .meta {
  font-size: 12px;
  color: #a0b9d2;
}

.news-card .excerpt {
  margin: 8px 0 0;
  font-size: 13px;
  color: #c5d7ea;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.pager button {
  min-width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #6498c5;
  background: #172940;
  color: #fff;
}

.pager button.active {
  background: #3165a4;
  border-color: transparent;
}

.article-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 22px;
}

.article-main {
  background: rgba(23, 41, 64, 0.92);
  border: 1px solid #6498c5;
  border-radius: 14px;
  padding: 24px;
}

.article-main .cover {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}

.article-main .cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-main h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

.article-meta {
  color: #a0b9d2;
  font-size: 13px;
  margin-bottom: 18px;
}

.article-body {
  font-size: 15px;
  line-height: 1.7;
  color: #e6effc;
}

.article-body p { margin: 0 0 14px; }
.article-body h2 { margin: 24px 0 10px; font-size: 20px; }
.article-body h3 { margin: 18px 0 8px; font-size: 17px; }
.article-body ul,
.article-body ol {
  margin: 0 0 14px;
  padding-left: 20px;
  list-style: disc;
}
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 6px; }
.article-body img {
  width: 100%;
  border-radius: 10px;
  margin: 12px 0;
}

.side-card {
  background: rgba(23, 41, 64, 0.92);
  border: 1px solid #6498c5;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.side-card h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.side-list a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid rgba(100, 152, 197, 0.35);
  font-size: 13px;
  color: #d0e9ff;
}

.side-list a:last-child { border-bottom: 0; }

.search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.search-row input {
  flex: 1;
  min-width: 220px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #6498c5;
  background: #172940;
  color: #fff;
  padding: 0 18px;
}

.search-row button {
  height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  background: #3165a4;
  color: #fff;
  font-weight: 600;
}

.mobile-hero {
  text-align: center;
  padding: 24px 0 8px;
  position: relative;
  z-index: 2;
}

.mobile-hero h1 {
  margin: 0 0 10px;
  font-size: 32px;
}

.mobile-hero .devices {
  max-width: 720px;
  margin: 20px auto 0;
  border-radius: 12px;
  overflow: hidden;
}

@media (min-width: 1600px) {
  .site-header .navbar { padding: 40px 35px 0; min-height: 101px; }
  .navbar-nav .nav-link { font-size: 22px; }
  .navbar-nav { gap: 40px; }
  .home-downloads { padding-bottom: 6vh; }
  .site-footer { padding-bottom: 30px; font-size: 12px; }
}

@media (max-width: 1199.98px) {
  .site-header .navbar {
    grid-template-columns: 190px 1fr auto;
    padding: 22px 22px 0;
    min-height: 80px;
    gap: 15px;
  }
  .navbar-brand img { width: 180px; }
  .navbar-nav { gap: 22px; padding-top: 7px; }
  .navbar-nav .nav-link { font-size: 14px; }
  .about-scene {
    width: 700px;
    max-width: 90%;
    margin: 40px auto 15px;
  }
  .about-desktop-image { display: none; }
  .about-text {
    position: static;
    width: auto;
    height: auto;
    font-size: 15px !important;
    overflow: visible;
    padding: 0 20px;
  }
  .about-text h1 {
    font-size: 22px;
    text-align: left;
    margin: 0 0 25px;
  }
  .about-mobile-image {
    display: block;
    width: 90%;
    height: auto;
    max-width: 500px;
    margin: 10px auto 0;
  }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .article-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 991.98px) {
  .desktop-certification { display: none; }
  .mobile-certification { display: block; }
}

@media (max-width: 767.98px) {
  .site-header .navbar {
    grid-template-columns: 1fr auto;
    row-gap: 14px;
    padding: 17px 18px 0;
    min-height: 103px;
  }
  .navbar-brand img { width: 137px; }
  .navbar-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    gap: 18px;
    flex-wrap: wrap;
    padding-top: 0;
    justify-content: flex-start;
  }
  .navbar-nav .nav-link { font-size: 13px; }
  .header-tools { grid-row: 1; grid-column: 2; }
  .home-panel { min-height: 550px; }
  .home-downloads {
    padding-bottom: 45px;
    margin-top: max(360px, calc(59svh - 103px));
  }
  .download-platforms {
    flex-direction: column;
    align-items: center;
    gap: 9px;
  }
  .platform-button { width: 165px; height: 55.6px; }
  .platform-badge { padding: 7px 9px; gap: 8px; }
  .platform-badge .platform-icon { width: 30px; height: 34px; }
  .platform-badge strong { font-size: 22px; }
  .carousel-control { width: 40px; height: 70px; top: 36%; }
  .carousel-control.prev { left: 3%; }
  .carousel-control.next { right: 3%; }
  .carousel-control .chev { width: 22px; height: 22px; border-width: 2px; }
  .news-grid { grid-template-columns: 1fr; }
  .site-footer {
    padding-left: 10px;
    padding-right: 10px;
    gap: 12px;
    font-size: 9px;
  }
  .footer-info { max-width: calc(100% - 86px); text-align: left; }
  .legal-links { justify-content: flex-start; }
}
