/* Blog list and single post, matched to the ggpoker.to homepage cards and article pages.
   Scoped under #content so the ID beats Hello's reset and Elementor kit link colours. */

/* Keeps the footer at the bottom of the window when a page has little content.
   The admin-bar variable is set by WordPress only while the bar is showing. */
body {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

body > #content { flex: 1 0 auto; }

#content.ggb-archive,
#content.ggb-single {
  --ggb-ink: #252525;
  --ggb-text: #333;
  --ggb-navy: #00377f;
  --ggb-card-ink: #053779;
  --ggb-blue: #087dcc;
  --ggb-link: #0b6cae;
  --ggb-frame: #bdd6e9;
  --ggb-line: #d5e6f8;
  --ggb-panel: #edf6fd;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 36px 0 56px;
  color: var(--ggb-text);
  font-family: "GG Editorial Sans", "Hiragino Sans", Meiryo, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

#content.ggb-archive *,
#content.ggb-single * { box-sizing: border-box; }

#content .ggb-date {
  display: block;
  color: #4d6f96;
  font-size: 13px;
  line-height: 1.5;
}

/* List */

#content.ggb-archive { background: #fff; }

#content.ggb-archive .ggb-shell {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

#content.ggb-archive .ggb-archive-header { margin-bottom: 22px; text-align: center; }

#content.ggb-archive .ggb-archive-title {
  margin: 0;
  color: var(--ggb-navy);
  font-size: clamp(26px, 2.5vw, 38px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .04em;
}

#content.ggb-archive .ggb-archive-description { margin-top: 8px; color: #194d94; font-size: 15px; }
#content.ggb-archive .ggb-archive-description p { margin: 0; }

#content.ggb-archive .ggb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

#content.ggb-archive .ggb-card { display: flex; min-width: 0; }

#content.ggb-archive .ggb-card-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--ggb-line);
  border-top: 3px solid var(--ggb-blue);
  border-radius: 8px;
  background: #fff;
  color: var(--ggb-card-ink);
  text-decoration: none;
  transition: transform .2s ease;
}

#content.ggb-archive .ggb-card-link:hover { transform: translateY(-2px); }
#content.ggb-archive .ggb-card-link:focus-visible { outline: 3px solid #087ac2; outline-offset: 4px; }

#content.ggb-archive .ggb-card-title {
  margin: 0 0 10px;
  color: var(--ggb-card-ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#content.ggb-archive .ggb-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--ggb-frame);
  border-radius: 8px;
  background: #f1f8fd;
}

#content.ggb-archive .ggb-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#content.ggb-archive .ggb-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-top: 10px;
}

#content.ggb-archive .ggb-card-excerpt {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ggb-card-ink);
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#content.ggb-archive .ggb-card-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: auto;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(120deg, #159fdf 0%, var(--ggb-blue) 52%, #0a4a98 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

#content.ggb-archive .ggb-card-excerpt + .ggb-card-more { margin-top: 14px; }

#content.ggb-archive .ggb-card-link:hover .ggb-card-more {
  background: linear-gradient(120deg, #0e8ed3 0%, #075fa4 52%, #063a7b 100%);
}

#content.ggb-archive .ggb-empty { text-align: center; color: #194d94; }

#content.ggb-archive .pagination,
#content.ggb-archive .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

#content.ggb-archive .pagination { margin-top: 32px; }

#content.ggb-archive .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--ggb-frame);
  border-radius: 999px;
  background: #fff;
  color: var(--ggb-card-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

#content.ggb-archive a.page-numbers:hover { border-color: var(--ggb-blue); color: var(--ggb-blue); }
#content.ggb-archive .page-numbers.current { border-color: var(--ggb-blue); background: var(--ggb-blue); color: #fff; }
#content.ggb-archive .page-numbers.dots { border: 0; background: none; }

/* Single post */

#content.ggb-single { background: #fff; }

#content.ggb-single .ggb-article,
#content.ggb-single #comments {
  width: min(780px, calc(100% - 32px));
  margin-inline: auto;
}

#content.ggb-single .ggb-article-title {
  margin: 0 0 10px;
  color: var(--ggb-ink);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

#content.ggb-single .ggb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 18px;
}

#content.ggb-single .ggb-meta a,
#content.ggb-single .ggb-tags a {
  color: var(--ggb-blue);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  text-decoration: none;
}

#content.ggb-single .ggb-meta a:hover,
#content.ggb-single .ggb-tags a:hover { text-decoration: underline; text-underline-offset: 3px; }

#content.ggb-single .ggb-cover {
  margin: 0 0 24px;
  border: 1px solid var(--ggb-frame);
  border-radius: 8px;
}

#content.ggb-single .ggb-cover img {
  display: block;
  width: 100%;
  height: auto;
}

/* Same light sweep as the ggpoker.to eye-catch images (v49-shine.css). */
#content .ggb-shine {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

#content .ggb-shine::after {
  position: absolute;
  z-index: 2;
  inset: -25% 0;
  background: linear-gradient(112deg,
    transparent 33%, rgba(255,255,255,.06) 41%,
    rgba(255,255,255,.44) 49%, rgba(255,255,255,.14) 55%, transparent 64%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-115%, 0, 0);
  animation: ggb-light-pass 8.6s cubic-bezier(.25,.46,.45,.94) infinite;
  animation-delay: var(--ggb-shine-delay, .25s);
}

#content .ggb-card:nth-child(3n+2) .ggb-shine { --ggb-shine-delay: .57s; }
#content .ggb-card:nth-child(3n) .ggb-shine { --ggb-shine-delay: .89s; }

@keyframes ggb-light-pass {
  0% { opacity: 0; transform: translate3d(-115%, 0, 0); }
  3% { opacity: 1; }
  23% { opacity: 1; transform: translate3d(115%, 0, 0); }
  24%, 100% { opacity: 0; transform: translate3d(115%, 0, 0); }
}

#content.ggb-single .ggb-content {
  color: var(--ggb-text);
  font-size: 15.5px;
  line-height: 1.68;
  overflow-wrap: anywhere;
}

#content.ggb-single .ggb-content > * { margin-block: 0 16px; }

#content.ggb-single .ggb-content h2 {
  margin: 38px 0 15px;
  padding: 15px 18px;
  border-radius: 6px;
  background: var(--ggb-panel);
  color: var(--ggb-ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.38;
}

#content.ggb-single .ggb-content h3 {
  margin: 30px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #9fc7df;
  color: #123f60;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
}

#content.ggb-single .ggb-content h4 {
  margin: 24px 0 10px;
  color: var(--ggb-ink);
  font-size: 17px;
  font-weight: 700;
}

#content.ggb-single .ggb-content a {
  color: var(--ggb-link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#content.ggb-single .ggb-content a:hover { color: #075fa4; }

#content.ggb-single .ggb-content strong,
#content.ggb-single .ggb-content b {
  font-weight: 700;
  background: linear-gradient(transparent 60%, #fff1a8 60%, #fff1a8 92%, transparent 92%);
}

#content.ggb-single .ggb-content :is(ul, ol) { padding-left: 1.5em; }
#content.ggb-single .ggb-content li + li { margin-top: 6px; }
#content.ggb-single .ggb-content li::marker { color: var(--ggb-blue); }

#content.ggb-single .ggb-content img { max-width: 100%; height: auto; border-radius: 6px; }
#content.ggb-single .ggb-content figure { margin-inline: 0; }
#content.ggb-single .ggb-content figcaption { margin-top: 8px; color: #686868; font-size: 13px; text-align: center; }

#content.ggb-single .ggb-content blockquote {
  margin-inline: 0;
  padding: 14px 18px;
  border-left: 4px solid #9fc7df;
  border-radius: 0 6px 6px 0;
  background: #f4faff;
  color: #194d94;
}

#content.ggb-single .ggb-content blockquote > :last-child { margin-bottom: 0; }

#content.ggb-single .ggb-content .wp-block-table { overflow-x: auto; }

#content.ggb-single .ggb-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#content.ggb-single .ggb-content thead { border-bottom: 0; }

#content.ggb-single .ggb-content :is(th, td) {
  padding: 10px 12px;
  border: 1px solid var(--ggb-line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
}

#content.ggb-single .ggb-content td:first-child,
#content.ggb-single .ggb-content th:first-child { white-space: nowrap; }

#content.ggb-single .ggb-content th { background: var(--ggb-panel); color: var(--ggb-ink); }

#content.ggb-single .ggb-content hr { border: 0; border-top: 1px solid var(--ggb-line); }

#content.ggb-single .ggb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 28px 0 0;
}

#content.ggb-single .ggb-back {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--ggb-line);
  text-align: center;
}

#content.ggb-single .ggb-back a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 28px;
  border-radius: 999px;
  background: linear-gradient(120deg, #159fdf 0%, var(--ggb-blue) 52%, #0a4a98 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

#content.ggb-single .ggb-back a:hover {
  background: linear-gradient(120deg, #0e8ed3 0%, #075fa4 52%, #063a7b 100%);
  color: #fff;
}

@media (max-width: 999px) {
  #content.ggb-archive .ggb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  #content.ggb-archive,
  #content.ggb-single { padding: 16px 0 36px; }
  #content.ggb-archive .ggb-shell { width: calc(100% - 32px); }
  #content.ggb-archive .ggb-archive-title { font-size: 25px; }
  #content.ggb-archive .ggb-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #content.ggb-archive .ggb-card-title { font-size: 18px; }
  #content.ggb-single .ggb-article-title { font-size: 25.5px; }
  #content.ggb-single .ggb-content { font-size: 15px; }
  #content.ggb-single .ggb-content h2 { margin-top: 27px; padding: 11px 12px; border-radius: 5px; font-size: 20px; }
  #content.ggb-single .ggb-content h3 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  #content.ggb-archive .ggb-card-link { transition: none; }
  #content .ggb-shine::after { display: none; animation: none; }
}
