/* PeakRummy – layout inspired by allplayrummy.com */

:root {
  --pr-header: #2d3748;
  --pr-footer: #215387;
  --pr-bg: #f7fafc;
  --pr-text: #2d3748;
  --pr-muted: #4a5568;
  --pr-blue: #2b6cb0;
  --pr-blue-btn: #2b6cb0;
  --pr-green: #56b320;
  --pr-green-hover: #4a9c1b;
  --pr-white: #ffffff;
  --pr-border: #e2e8f0;
  --pr-shadow: 10px 5px 5px rgba(0, 0, 0, 0.2);
  --pr-radius: 10px;
  --pr-max: 1100px;
  --pr-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--pr-font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--pr-text);
  background: var(--pr-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--pr-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100000;
  width: auto;
  height: auto;
  clip: auto;
  padding: 10px 16px;
  background: #000;
  color: #fff;
}

/* ===== Header ===== */
.site-header {
  background: var(--pr-header);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header__inner {
  max-width: var(--pr-max);
  margin: 0 auto;
  padding: 10px 12px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.site-branding {
  flex: 0 0 auto;
  min-width: 0;
}

.site-branding .custom-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.site-branding .custom-logo {
  display: block;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 8px;
}

.site-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.site-logo-fallback {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.site-logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1e3a5f, #0d9488);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  color: #fbbf24;
}

.site-logo-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.primary-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.primary-menu a {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 8px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}

.primary-menu > li:nth-child(n+4) {
  display: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.nav-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.mobile-menu {
  background: #1a202c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu[hidden] {
  display: none !important;
}

.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 8px 0 16px;
}

.mobile-menu__list a {
  display: block;
  color: #fff;
  padding: 14px 20px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-menu__list a:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ===== Layout ===== */
.site-main {
  min-height: 50vh;
}

.page-wrap {
  max-width: var(--pr-max);
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.content-card {
  background: var(--pr-white);
  box-shadow: var(--pr-shadow);
  padding: 22px 20px;
  margin-bottom: 22px;
}

.home-intro__title,
.entry-title,
.archive-header h1,
.app-single__heading h1 {
  color: var(--pr-blue);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
}

.home-intro__text,
.archive-header__desc {
  margin: 0;
  color: var(--pr-muted);
  font-size: 1rem;
}

.home-section h2,
.entry-content h2 {
  color: var(--pr-text);
  font-size: 1.35rem;
  margin: 1.4em 0 14px;
}

.entry-content h3 {
  color: var(--pr-text);
  font-size: 1.12rem;
  margin: 1.2em 0 10px;
}

.entry-content p {
  margin: 0 0 1em;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25em;
  margin: 0 0 1em;
}

.entry-content li {
  margin-bottom: 0.35em;
}

/* ===== App list rows ===== */
.app-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.app-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--pr-border);
}

.app-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.app-row:first-child {
  padding-top: 0;
}

.app-row__icon {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #edf2f7;
}

.app-row__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-row__placeholder {
  width: 100%;
  height: 100%;
  min-height: 80px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2b6cb0, #2c7a7b);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
}

.app-row__title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

.app-row__title a {
  color: var(--pr-text);
  text-decoration: none;
}

.app-row__title a:hover {
  color: var(--pr-blue);
}

.app-row__subtitle {
  margin: 0;
  font-size: 11px;
  color: var(--pr-muted);
}

.app-row__badge {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--pr-green);
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.app-row__action {
  align-self: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: var(--pr-radius);
  font-size: 14.4px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn--green {
  background: var(--pr-green);
  color: #fff !important;
}

.btn--green:hover {
  background: var(--pr-green-hover);
}

.btn--blue {
  background: var(--pr-blue-btn);
  color: #fff !important;
}

.btn--blue:hover {
  background: #245a96;
}

.btn--lg {
  padding: 12px 22px;
  font-size: 16px;
  width: 100%;
  max-width: 420px;
}

.btn--sm {
  padding: 5px 12px;
  font-size: 13px;
}

/* ===== FAQ ===== */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--pr-border);
  background: #fafbfc;
  border-radius: 6px;
  overflow: hidden;
}

.faq-item__q {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__q::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--pr-blue);
  flex-shrink: 0;
}

.faq-item[open] .faq-item__q::after {
  content: "−";
}

.faq-item__a {
  padding: 0 16px 14px;
  color: var(--pr-muted);
}

.faq-item__a p {
  margin: 0;
}

/* ===== App single ===== */
.app-single__top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.app-single__icon {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.app-single__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-single__lead {
  color: var(--pr-muted);
  margin: 0;
}

.app-single__download {
  margin: 0 0 16px;
}

.app-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.app-meta-grid dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pr-muted);
  margin: 0;
}

.app-meta-grid dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.related-apps {
  margin-bottom: 22px;
}

.related-apps__tabs {
  margin-bottom: 10px;
}

.related-apps__tab {
  display: inline-block;
  background: var(--pr-blue);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px 6px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.related-apps__grid {
  background: var(--pr-white);
  box-shadow: var(--pr-shadow);
  padding: 8px 12px;
}

.related-app {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--pr-border);
  color: inherit;
  text-decoration: none !important;
}

.related-app:last-child {
  border-bottom: 0;
}

.related-app__icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #edf2f7;
}

.related-app__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-app__title {
  display: block;
  font-weight: 700;
  color: var(--pr-text);
  font-size: 0.95rem;
}

.related-app__note {
  display: block;
  font-size: 12px;
  color: var(--pr-muted);
  margin-top: 2px;
}

/* ===== Guides ===== */
.guides-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.guide-card {
  background: var(--pr-white);
  box-shadow: var(--pr-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.guide-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #cbd5e0;
}

.guide-card__media img,
.guide-card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-card__placeholder {
  display: block;
  background: linear-gradient(120deg, #a0aec0, #718096);
  min-height: 180px;
}

.guide-card__body {
  padding: 18px 18px 22px;
}

.guide-card__cat {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guide-card__cat a {
  color: var(--pr-blue);
}

.guide-card__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.3;
}

.guide-card__title a {
  color: var(--pr-text);
  text-decoration: none;
}

.guide-card__title a:hover {
  color: var(--pr-blue);
}

.guide-card__meta {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--pr-muted);
}

.guide-card__excerpt {
  color: var(--pr-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.guide-card__more {
  font-weight: 600;
  font-size: 0.95rem;
}

.guide-single__thumb {
  margin: 0 0 1.25rem;
  border-radius: 8px;
  overflow: hidden;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--pr-footer);
  color: #e2e8f0;
  margin-top: 24px;
}

.site-footer__inner {
  max-width: var(--pr-max);
  margin: 0 auto;
  padding: 28px 16px 36px;
}

.footer-age {
  margin: 0 0 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.footer-social__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}

.footer-social__link:hover {
  opacity: 0.85;
}

.footer-notice {
  background: rgba(0, 0, 0, 0.18);
  padding: 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 18px;
}

.footer-notice__label {
  margin: 0 0 8px;
  font-weight: 700;
  color: #fff;
}

.footer-notice p {
  margin: 0;
}

.footer-copy {
  text-align: center;
  font-size: 0.85rem;
  margin: 0 0 14px;
  opacity: 0.9;
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.footer-menu a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.telegram-fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #229ed9;
  color: #fff !important;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  text-decoration: none !important;
}

.telegram-fab:hover {
  filter: brightness(1.05);
}

.empty-apps {
  margin: 0;
  color: var(--pr-muted);
}

.navigation.pagination {
  margin: 24px 0;
  text-align: center;
}

.navigation.pagination .page-numbers {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 3px;
  background: #fff;
  border-radius: 6px;
  color: var(--pr-text);
}

.navigation.pagination .current {
  background: var(--pr-blue);
  color: #fff;
}

/* ===== Tablet+ ===== */
@media (min-width: 768px) {
  .nav-toggle,
  .mobile-menu {
    display: none !important;
  }

  .site-header__inner {
    padding: 10px 16px;
    gap: 16px;
    min-height: 80px;
  }

  .primary-nav {
    display: flex;
    justify-content: flex-end;
  }

  .primary-menu {
    gap: 8px;
  }

  .primary-menu > li:nth-child(n+4) {
    display: list-item;
  }

  .primary-menu a {
    font-size: 15px;
    padding: 8px 14px;
  }

  .site-branding .custom-logo {
    width: 64px;
    height: 64px;
  }

  .site-title {
    font-size: 1.2rem;
  }

  .page-wrap {
    padding: 28px 24px 48px;
  }

  .content-card {
    padding: 28px 32px;
  }

  .app-row {
    grid-template-columns: 88px 1fr auto;
    gap: 16px 20px;
    padding: 16px 0;
  }

  .app-row__icon {
    width: 88px;
    height: 88px;
  }

  .guides-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn--lg {
    width: auto;
  }

  .related-app {
    grid-template-columns: 64px 1fr auto;
  }
}

/* ===== Desktop ===== */
@media (min-width: 1024px) {
  .guides-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .app-single__heading h1 {
    font-size: 1.85rem;
  }

  .home-intro__title {
    text-align: left;
  }
}

@media (max-width: 767px) {
  .primary-menu .sub-menu {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-header__inner {
    flex-wrap: wrap;
  }

  .primary-nav {
    order: 3;
    flex: 1 1 100%;
    padding: 0 0 8px;
  }

  .nav-toggle {
    margin-left: auto;
  }

  .primary-menu a {
    font-size: 12px;
    padding: 6px 7px;
  }
}

/* Narrow phones: stack Read More below */
@media (max-width: 420px) {
  .app-row {
    grid-template-columns: 72px 1fr;
  }

  .app-row__icon {
    width: 72px;
    height: 72px;
  }

  .app-row__action {
    grid-column: 1 / -1;
  }

  .app-row__action .btn {
    width: 100%;
  }

  .related-app {
    grid-template-columns: 48px 1fr;
  }

  .related-app .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
