*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background: #f5f6f8;
}

a {
  color: #0077b5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Top Bar */
.top-bar {
  background: #2c3e50;
  color: #ccc;
  font-size: 12px;
  padding: 6px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lang-select select {
  background: #3d5166;
  color: #ccc;
  border: 1px solid #5d7a9a;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.lang-select select:hover {
  color: #fff;
}

.lang-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-select label {
  color: #ccc;
  font-size: 12px;
  white-space: nowrap;
}

.lang-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 3px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.logo-icon {
  color: #e74c3c;
  font-size: 26px;
}

.header-center {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.header-favicon {
  display: block;
  height: 64px;
}

.header-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-nav #memberNavWrap {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: #0077b5;
  color: #fff;
}

.btn-primary:hover {
  background: #005f91;
}

.btn-outline {
  background: transparent;
  color: #0077b5;
  border: 1px solid #0077b5;
}

.btn-outline:hover {
  background: #0077b5;
  color: #fff;
}

.btn-large {
  padding: 10px 32px;
  font-size: 15px;
}

.btn-small {
  padding: 5px 14px;
  font-size: 12px;
  background: #0077b5;
  color: #fff;
  border-radius: 3px;
}

.btn-full {
  width: 100%;
  padding: 12px;
  font-size: 15px;
}

/* Main Navigation */
.main-nav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.nav-tabs {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  justify-content: center;
}

.nav-tabs li {
  margin: 0;
}

.nav-tabs a {
  display: block;
  padding: 5px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav-tabs a:hover {
  color: #0077b5;
  border-bottom-color: #0077b5;
}

.nav-tabs a.active {
  color: #0077b5;
  border-bottom-color: #0077b5;
}

/* City Bar */
.city-bar {
  background: #34495e;
  color: #fff;
  padding: 2px 0;
}

.city-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.city-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.city-selector label {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

.city-selector select {
  height: 22px;
  box-sizing: border-box;
  padding: 2px 10px;
  border-radius: 3px;
  border: 1px solid #5d7a9a;
  background: #fff;
  color: #333;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  max-width: 180px;
}

/* Active region/city filter indicator (bright yellow) */
.city-bar select.filter-active {
  background: #ffd400;
  border-color: #c9a600;
  color: #222;
  font-weight: 600;
}
.city-bar select.filter-active option {
  background: #fff;
  color: #222;
  font-weight: 400;
}
.city-bar select.filter-active option:checked {
  background: #ffd400;
  font-weight: 600;
}

.member-stats {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: #ccd;
}

.member-stats strong {
  color: #fff;
  font-size: 15px;
}

/* Visitor counter: number in a white box with bar-colored text */
.visitor-count strong {
  display: inline-flex;
  align-items: center;
  height: 22px;
  line-height: 1.2;
  box-sizing: border-box;
  background: #fff;
  color: #34495e;
  padding: 0 6px;
  border-radius: 3px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #2980b9 0%, #3498db 50%, #5dade2 100%);
  color: #fff;
  padding: 3px 0;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-text h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 3px;
}

.hero-text p {
  font-size: 15px;
  line-height: 1.5;
  max-width: 700px;
  margin: 0 auto 3px;
}

/* Main Content */
.main-content {
  padding: 30px 0;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #0077b5;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
}

.view-all {
  font-size: 12px;
  color: #0077b5;
  font-weight: 600;
}

/* Forum Posts */
.content-left {
  background: #fff;
  border-radius: 6px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.forum-posts {
  list-style: none;
}

.forum-posts li {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.forum-posts li:last-child {
  border-bottom: none;
}

.post-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 3px;
}

.post-title:hover {
  color: #0077b5;
}

.post-meta {
  font-size: 11px;
  color: #999;
}

/* Offers */
.content-right {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.offers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.offer-card {
  background: #fff;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.offer-discount {
  background: #e74c3c;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  padding: 8px 10px;
  border-radius: 4px;
  min-width: 56px;
  text-align: center;
  flex-shrink: 0;
}

.offer-details h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
  color: #2c3e50;
}

.offer-details p {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

/* Guides Banner */
.guides-banner {
  background: #fff;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  padding: 30px 0;
  text-align: center;
}

.banner-content h2 {
  font-size: 22px;
  margin-bottom: 6px;
  color: #2c3e50;
}

.banner-content p {
  font-size: 14px;
  color: #777;
  margin-bottom: 16px;
}

/* Footer */
.footer {
  background: #2c3e50;
  color: #bbb;
  padding: 28px 0;
  font-size: 13px;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-links a {
  color: #bbb;
}

.footer-links a:hover {
  color: #fff;
}

.footer-cities {
  color: #8899aa;
  font-size: 12px;
}

.sep {
  color: #556;
  margin: 0 4px;
}

.footer-copy {
  font-size: 11px;
  color: #778;
}

.footer-disclosure {
  display: block;
  font-size: 11px;
  color: #8899aa;
  line-height: 1.5;
  max-width: 720px;
  margin: 0 auto;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  width: 400px;
  max-width: 90vw;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

/* Global form-control sizing: fields fill their container and stay aligned
   (account settings matches the sign-up form layout). */
.form-control {
  width: 100%;
  box-sizing: border-box;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

.terms-check input[type="checkbox"] {
  margin-top: 3px;
  width: auto;
}

.terms-check label {
  margin: 0;
  font-weight: 400;
  display: inline;
}

.policy-link {
  color: #0077b5;
  text-decoration: underline;
  cursor: pointer;
}

.modal.policy-modal {
  width: 520px;
  max-width: 92vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
}

.policy-content {
  overflow-y: auto;
  padding-right: 8px;
}

.policy-content h1 {
  font-size: 18px;
  color: #2c3e50;
  border-bottom: 1px solid #eef0f2;
  padding-bottom: 10px;
  margin-top: 0;
}

.policy-content h2 {
  font-size: 14px;
  color: #d2232a;
  margin: 14px 0 4px;
}

.policy-content p,
.policy-content li {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

.policy-content ul {
  margin: 4px 0 0;
  padding-left: 20px;
}

.policy-content a {
  color: #0077b5;
}

/* Page Banner */
.page-banner {
  background: linear-gradient(135deg, #2980b9, #5dade2);
  color: #fff;
  padding: 12px 0;
  text-align: center;
}

.banner-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.banner-side {
  width: 120px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
}

.banner-flex .container {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 1000px) {
  .banner-side {
    display: none;
  }
}

.page-banner h1 {
  font-size: 22px;
  margin-bottom: 4px;
}

.page-banner p {
  font-size: 13px;
  opacity: 0.9;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.card-img {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #fff;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #2c3e50;
}

.card-body p {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

/* Activities cards + ad layout */
.cards-ads-row {
  display: flex;
  align-items: stretch;
  gap: 24px;
}
.cards-col {
  width: 400px;
  flex: 0 0 400px;
  display: grid;
  gap: 18px;
  align-content: start;
}
.cards-col .card {
  width: 400px;
}
.cards-ads-row .ad-slot {
  min-height: 320px;
}
@media (max-width: 1000px) {
  .cards-ads-row {
    gap: 0;
  }
  .cards-col {
    width: 100%;
    flex: 1 1 auto;
  }
  .cards-col .card {
    width: 100%;
  }
}

/* Content + ad layout (shared by news, groups, etc.) */
.content-ads-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.content-col {
  flex: 1 1 0;
  min-width: 0;
}
.content-ads-row .ad-slot {
  flex: 0 0 300px;
  min-height: 320px;
}

/* News city-image rotator: 3:2 box, image only. */
.content-ads-row .ad-slot.city-rotator {
  min-height: 0;
  aspect-ratio: 3 / 2;
  border-style: solid;
}
.city-rotator img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* News city rotator: on narrow screens, stack and show the image ABOVE the feed. */
@media (max-width: 1000px) {
  .content-ads-row.news-city-row {
    flex-direction: column;
    gap: 10px;
  }
  .content-ads-row.news-city-row .ad-slot.city-rotator {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    order: -1;
  }
}


.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.news-filter-note {
  background: #fff7e6;
  border: 1px solid #ffe0a3;
  color: #8a6d3b;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.news-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.news-group-btn {
  background: #fff;
  border: 1px solid #d5dbe1;
  border-radius: 16px;
  color: #555;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
}
.news-group-btn:hover {
  border-color: #0077b5;
  color: #0077b5;
}
.news-group-btn.active {
  background: #0077b5;
  border-color: #0077b5;
  color: #fff;
}
.news-status {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}
.news-list {
  display: grid;
  gap: 14px;
}
.news-item {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-left: 3px solid #0077b5;
  padding: 14px 16px;
}
.news-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #2c3e50;
}
.news-item h3 a {
  color: #2c3e50;
  text-decoration: none;
}
.news-item h3 a:hover {
  color: #0077b5;
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
}
.news-source {
  display: inline-block;
  background: #eef6fb;
  color: #0077b5;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
}
.news-source.regional {
  background: #e7f6ec;
  color: #1e7e3c;
}
.news-source.national {
  background: #f2effb;
  color: #6a3fb5;
}
.news-source.francais {
  background: #fdf2f8;
  color: #c21f6b;
}
.news-source.indigenous {
  background: #fff7e6;
  color: #b7791f;
}
.news-item p {
  font-size: 13px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* Tag */
.tag {
  display: inline-block;
  background: #eef6fb;
  color: #0077b5;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 3px;
}

/* Member Card */
.member-card {
  display: flex;
  align-items: center;
}

.member-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.member-card-link:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.member-card-link.card {
  display: flex;
  align-items: center;
}

.member-card-link .tag {
  margin-top: 6px;
}

.member-search-box {
  margin-bottom: 18px;
}

.member-search-box input {
  width: 100%;
  max-width: 460px;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.member-notice {
  background: #f7f4f0;
  border: 1px solid #e5dccb;
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 18px;
  color: #444;
  font-size: 14px;
}

.member-notice .btn {
  margin-right: 8px;
}

.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0077b5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin: 16px;
  flex-shrink: 0;
}

.btn-danger {
  background: #d2232a;
  color: #fff;
}

.btn-danger:hover {
  background: #a91a20;
}

.member-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.member-blocked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #eee;
  font-size: 14px;
}

/* Job List */
.job-list {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.job-item {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.job-item:last-child {
  border-bottom: none;
}

.job-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
}

.job-item h3 a {
  color: #2c3e50;
}

.job-item h3 a:hover {
  color: #0077b5;
}

.job-meta {
  font-size: 12px;
  color: #999;
}

/* Responsive */
@media (max-width: 768px) {
  .banner-side {
    display: none;
  }

  .banner-flex {
    gap: 0;
  }

  .nav-tabs {
    justify-content: flex-start;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 24px;
  }

  .header-inner {
    flex-direction: column;
    gap: 10px;
  }

  .city-bar-inner {
    flex-direction: column;
    gap: 8px;
  }

  .content-ads-row,
  .cards-ads-row,
  .game-ads-row {
    flex-direction: column;
    gap: 16px;
  }

  .content-col,
  .cards-col {
    width: 100%;
    flex: 1 1 auto;
  }

  .cards-col .card {
    width: 100%;
  }

  .member-posts-grid {
    grid-template-columns: 1fr;
  }

  .news-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .page-banner h1 {
    font-size: 19px;
  }
}

@media (max-width: 480px) {
  .top-bar .container {
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }

  .lang-group {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .lang-select select {
    max-width: 130px;
  }

  .header-center {
    order: -1;
  }

  .header-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .member-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
}

/* === CanSpirit site search (Pagefind) === */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.search-modal.is-open {
  display: flex;
}
.search-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.search-modal__box {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.search-modal__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
}
.search-modal__input {
  flex: 1;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
}
.search-modal__input:focus {
  border-color: #4682b4;
}
.search-modal__close {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
  padding: 0 4px;
}
.search-modal__close:hover {
  color: #000;
}
.search-modal__results {
  padding: 16px;
  overflow-y: auto;
}
.search-modal__note {
  padding: 10px 16px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.8rem;
  color: #888;
  text-align: right;
}
body.search-open {
  overflow: hidden;
}
.search-result {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-bottom: 10px;
}
.search-result:hover {
  border-color: #4682b4;
  background: #f3f8fc;
}
.search-result__type {
  display: block;
  font-weight: 600;
  color: #4682b4;
  margin-bottom: 4px;
}
.search-result__excerpt {
  display: block;
  font-size: 0.92rem;
  color: #333;
  line-height: 1.45;
}
.search-result__excerpt::after {
  content: "…";
}
.search-hit {
  background: #fff3b0;
  padding: 0 2px;
  border-radius: 2px;
}
.search-empty {
  color: #666;
  padding: 8px 4px;
}
.search-more {
  font-size: 0.82rem;
  color: #888;
  padding: 4px;
}
.search-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #999;
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
}
.search-result--post {
  border-color: #cfd8e3;
}
.search-result__title {
  display: block;
  font-weight: 600;
  color: #002856;
  font-size: 0.98rem;
  margin-bottom: 4px;
}
.search-result--post .search-result__excerpt::after {
  content: "";
}

/* Games: ad rails on left/right, width proportional to spare space */
.game-block {
  margin: 24px 0 40px;
}
.game-block h2 {
  margin: 0 0 4px;
  color: #2c3e50;
}
.game-block p {
  margin: 0 0 14px;
  color: #555;
}
.game-open-new {
  font-size: 0.85rem;
  color: #4682b4;
  margin-left: 10px;
  text-decoration: none;
}
.game-card {
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  outline: none;
}
.game-card:hover,
.game-card:focus-visible {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}
.game-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.game-topbar-title {
  flex: 1 1 auto;
  min-width: 0;
}
.game-topbar-title h2 {
  color: #2c3e50;
  margin: 0;
}
.game-topbar-title p {
  color: #555;
  margin: 2px 0 0;
}
.game-topbar .game-open-new {
  margin-left: 0;
  white-space: nowrap;
}
.game-ads-row {
  display: flex;
  align-items: stretch;
  gap: 24px;
}
.game-frame {
  flex: 0 1 660px;
  max-width: 100%;
}
.game-frame iframe {
  width: 660px;
  max-width: 100%;
  height: 700px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  display: block;
}
.ad-slot {
  flex: 1 1 0;
  min-width: 0;
  border: 1px dashed #ccc;
  border-radius: 8px;
  background: #f8f9fa;
  overflow: hidden;
}
.ad-slot .ad-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 160px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: #333;
  box-sizing: border-box;
}
.ad-slot .ad-card:hover {
  background: #f1f3f5;
}
.ad-slot .ad-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a9a9a;
}
.ad-slot .ad-card strong {
  font-size: 16px;
  line-height: 1.25;
}
.ad-slot .ad-card .ad-image {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}
.ad-slot .ad-cta {
  background: #2c3e50;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
}
@media (max-width: 1000px) {
  .ad-slot {
    display: none;
  }
  .content-ads-row {
    gap: 0;
  }
  .game-ads-row {
    gap: 0;
  }
  .game-frame {
    max-width: 100%;
    flex: 1 1 auto;
  }
}

/* Full-screen intro video overlay */
.intro-video {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
}
.intro-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.intro-video-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: 20px;
}
.intro-video.intro-hide {
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.intro-video.intro-hide video {
  visibility: hidden;
}

/* --- Member directory table --- */
.member-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 18px;
  font-size: 14px;
}
.member-table th,
.member-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eef1f4;
  vertical-align: top;
}
.member-table thead th {
  background: #f4f6f8;
  color: #002856;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.member-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.member-table th.sortable .sort-arrow {
  display: inline-block;
  width: 14px;
  color: #667;
}
.member-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}
.member-table tbody tr:hover {
  background: #f8fafc;
}
.member-table .dir-member-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.member-table .dir-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: #dce6f3;
  color: #002856;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
}
.member-table .dir-name {
  font-weight: 600;
  color: #002856;
}
.member-table .dir-user {
  color: #667;
  font-size: 12px;
}
.member-table .dir-about {
  color: #445;
  cursor: help;
  max-width: 320px;
}
.member-table .dir-about.expanded {
  cursor: pointer;
}
.member-table .dir-about .dir-about-more {
  display: none;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #dbe1e6;
  font-size: 13px;
  color: #333;
  white-space: normal;
}
.member-table .dir-about.expanded .dir-about-more {
  display: block;
}
.member-table .dir-about .dir-about-more .dir-about-labels {
  color: #002856;
  font-size: 12px;
  margin-top: 4px;
}
.member-table .dir-since {
  color: #667;
  font-size: 13px;
  white-space: nowrap;
}
.member-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.member-pagination #dirPageInfo {
  color: #445;
  font-size: 13px;
}
.member-pagination .per-page-label {
  color: #667;
  font-size: 13px;
  margin-left: 10px;
}
@media (max-width: 720px) {
  .member-table th:nth-child(3),
  .member-table td:nth-child(3),
  .member-table th:nth-child(5),
  .member-table td:nth-child(5) {
    display: none;
  }
  .member-table .dir-about {
    max-width: 220px;
  }
}

.member-card .member-tags {
  margin-top: 6px;
  font-size: 12px;
  color: #445;
}

/* Aggressive mobile compaction for listing pages (applies <=1000px, incl. 780px).
   Kept at the end so it overrides the older 768px rules. */
@media (max-width: 1000px) {
  .main-content { padding: 4px 0; }
  .page-banner { padding: 3px 0; }
  .page-banner h1 { font-size: 17px; line-height: 1.2; margin-bottom: 2px; }
  .page-banner p { font-size: 11px; line-height: 1.25; margin: 0; }

  .content-ads-row, .cards-ads-row, .game-ads-row { gap: 8px; }
  .card-grid { gap: 6px; }
  .card-body { padding: 6px 8px; }
  .content-col .post-item { padding: 6px 8px; }

  .news-toolbar { margin-bottom: 3px; gap: 4px; }
  .news-status { font-size: 11px; line-height: 1.25; }
  .news-groups {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    margin-bottom: 4px;
    padding-bottom: 2px;
  }
  .news-group-btn { flex: 0 0 auto; white-space: nowrap; font-size: 10px; padding: 3px 8px; }

  .news-list { gap: 3px; }
  .news-item { padding: 3px 6px; }
  .news-item h3 { font-size: 12px; line-height: 1.2; margin-bottom: 2px; }
  .news-meta { font-size: 9px; line-height: 1.2; gap: 4px; margin-bottom: 0; }
  .news-source { font-size: 9px; padding: 0 5px; }
}

/* Mobile header + city-bar compaction (<=1000px only). */
@media (max-width: 1000px) {
  .header { padding: 2px 0; }
  .header-inner { gap: 4px; }
  .header-favicon { height: 40px; }
  .header-nav { gap: 5px; }
  .header-nav .btn { padding: 5px 10px; font-size: 12px; }
  .logo a { font-size: 22px; gap: 4px; }
  .logo-icon { font-size: 20px; }

  .city-bar { padding: 1px 0; }
  .city-bar-inner { gap: 4px; }
  .city-selector { gap: 3px; }
  .city-selector label { font-size: 12px; }
  .city-selector select { padding: 3px 8px; }
  .member-stats { gap: 6px; }
}

/* Mobile header + city-bar: keep everything in one row, no wrapping/centering. */
@media (max-width: 1000px) {
  .header-inner { flex-direction: row; flex-wrap: nowrap; gap: 0; }
  .header-center { order: 0; }
  .header-nav { flex-wrap: nowrap; justify-content: flex-end; }

  .city-bar-inner { flex-direction: row; flex-wrap: nowrap; gap: 4px; }
  .member-stats { flex-wrap: nowrap; justify-content: flex-end; }
}

/* Shrink to fit at 768 and below (all header items kept). */
@media (max-width: 768px) {
  .logo a { font-size: 18px; gap: 2px; }
  .logo-icon { font-size: 18px; }
  .header-favicon { height: 32px; }
  .header-nav { gap: 3px; }
  .header-nav .btn { padding: 3px 6px; font-size: 11px; }

  .city-selector label { font-size: 11px; }
  .city-selector select { height: 22px; box-sizing: border-box; padding: 2px 6px; font-size: 11px; }
  .visitor-count strong { height: 22px; font-size: 12px; }
  .member-stats { font-size: 11px; gap: 4px; }
}

/* Small phones (<=480): keep labels, hide the visitor counter so the row fits. */
@media (max-width: 480px) {
  .city-selector { flex: 1 1 0; min-width: 0; }
  .city-selector select { width: 100%; max-width: none; }
  .member-stats { display: none; }
}

/* Mobile footer compaction (<=1000px). */
@media (max-width: 1000px) {
  .footer { padding: 12px 0; }
  .footer-inner { gap: 8px; }
  .footer-links { gap: 4px 12px; }
  .footer-cities { font-size: 11px; }
  .footer-copy { font-size: 10px; }
  .footer-disclosure { font-size: 10px; line-height: 1.35; }
}
@media (max-width: 480px) {
  .footer { padding: 8px 0; }
  .footer-inner { gap: 6px; }
  .footer-links { gap: 3px 10px; }
}

/* City-bar boxes: 18px tall across <=1000px (counter hidden <=480). */
@media (max-width: 1000px) {
  .city-selector select {
    height: 18px;
    box-sizing: border-box;
    padding: 1px 6px;
    font-size: 10px;
  }
  .visitor-count strong {
    height: 18px;
    font-size: 11px;
  }
}
