/*
Hermit Talks Games
Custom template overrides
Child template: cassiopeia_htg
*/

/* ========================================
   Theme Tokens + Fonts
   ======================================== */

:root {
  --cassiopeia-font-family-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --cassiopeia-font-family-headings: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Bridge child-template style settings into Cassiopeia theme tokens */
  --template-special-color: var(--headerbg);
  --template-link-color: var(--link-color);
  --template-text-light: var(--headercolor);
  --template-text-dark: var(--body-color);
  --template-footer-bg: var(--footerbg);
  --template-footer-color: var(--footercolor);
}

.imagehp {
  border-radius: 10px;
}

.container-footer {
  background: var(--footerbg) !important;
  color: var(--footercolor) !important;
  background-image: none !important;
}

.container-footer a {
  color: var(--footercolor) !important;
}

.container-footer a:hover,
.container-footer a:focus {
  color: var(--link-hover-color) !important;
}
  
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.navbar-brand,
.container-header .mod-menu {
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.btn,
button,
input[type="submit"],
input[type="button"] {
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ========================================
   Site Width Tweak For Sidebar Pages
   ======================================== */

@media (min-width: 768px) {
  .has-sidebar-left .site-grid,
  .has-sidebar-right .site-grid {
    column-gap: 1rem;
  }

  .has-sidebar-left .container-sidebar-left,
  .has-sidebar-right .container-sidebar-right {
    width: 275px;
    flex: 0 0 275px;
  }

  .has-sidebar-left .container-component,
  .has-sidebar-right .container-component {
    flex: 1 1 auto;
    min-width: 0;
  }

  .has-sidebar-left .site-grid > .grid-child,
  .has-sidebar-right .site-grid > .grid-child {
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
  }
}

  @media (max-width: 767px) {
  .has-sidebar-left .container-sidebar-left {
    width: 100% !important;
    max-width: none;
    flex: none;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .has-sidebar-left .container-sidebar-left > * {
    width: 100%;
    max-width: 100%;
  }

  .has-sidebar-left .container-sidebar-left .card,
  .has-sidebar-left .container-sidebar-left .sidebar-left,
  .has-sidebar-left .container-sidebar-left .mod-custom,
  .has-sidebar-left .container-sidebar-left .gamewall-filters {
    width: 100%;
    max-width: 100%;
  }
}

.gamewall-close-btn {
  display: none;
}

@media (max-width: 767px) {
  .gamewall-close-btn {
    display: block;
    width: 100%;
    text-align: right;
    font-size: 1.8rem;
    line-height: 1;
    background: transparent;
    border: none;
    padding: 0 0 1rem;
    cursor: pointer;
    color: #111;
  }
}

/* ========================================
   Mobile filter drawer
   ======================================== */

@media (max-width: 767px) {
  .container-top-a,
  .container-top-b {
    display: none;
    min-height: 0;
    height: 0;
    padding: 0;
    margin: 0;
  }

  .gamewall-mobile-filter-btn {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.7rem 1rem;
    font-weight: 700;
    background: var(--btnbg);
    color: var(--btncolor);
    border: none;
    border-radius: 0.4rem;
    cursor: pointer;
  }

  .container-component {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .has-sidebar-left .container-sidebar-left {
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100vh;
    width: 88% !important;
    max-width: 360px;
    background: #f5f5f5;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding: 1rem;
    margin: 0;
    border-radius: 0;
  }

  body.gamewall-filters-open .container-sidebar-left {
    transform: translateX(0);
  }

  #gamewall-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.gamewall-filters-open #gamewall-filter-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (min-width: 768px) {
  .gamewall-mobile-filter-btn,
  #gamewall-filter-overlay {
    display: none;
  }
}

  
/* ========================================
   Header / Navigation
   ======================================== */

.container-header {
  background: var(--headerbg) !important;
  background-image: none !important;
}

.btn,
.btn-primary,
.btn-secondary {
  --cut-size: 0.8em;

  clip-path: polygon(
    var(--cut-size) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--cut-size)
  );

  border: none !important;
  box-shadow: none !important;
  background: var(--btnbg) !important;
  color: var(--btncolor) !important;
}

.btn:hover,
.btn:focus,
.btn-primary:hover,
.btn-primary:focus,
.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--btnbgh) !important;
  color: var(--btncolorh) !important;
}

/* ========================================
   Hero / Banner
   ======================================== */

.mod-custom.custom.banner-overlay {
  height: 60vh;
}

.container-banner .banner-overlay .overlay {
  text-align: left;
  background-color: #00000030;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  padding-left: calc((100vw - 1320px) / 2 + 1rem) !important;
  display: flex !important;
}

.container-banner .banner-overlay .overlay > * {
  max-width: 700px;
}

  /* Collapse empty banner space on pages without a banner */

.container-banner:empty {
  display: none;
}

.container-banner:not(:has(*)) {
  display: none;
} 

  
.homehero {
  background-image: url('/images/banners/Echoes-Of-Aincrad-Hermit-Hero-Desktop.webp');
  height: 60vh;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.homehero h1,
.homehero h2 {
  text-align: left;
}
 

@media (max-width: 768px) {

  .container-banner .banner-overlay .overlay {
    padding-left: 1.5rem !important;
    padding-right: 1rem !important;
  }

  .container-banner .banner-overlay .overlay > * {
    max-width: 100%;
  }

  .homehero {
    background-image: url('/images/banners/Echoes-Of-Aincrad-Hermit-Hero-Mobile.webp') !important;
    min-height: 60vh !important;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
  }
}

/* ========================================
   Cut Corner Utilities
   ======================================== */

.cut-shape {
  --cut-x: 20px;
  --cut-y: 20px;

  clip-path: polygon(
    var(--cut-x) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--cut-y)
  );
}

.cut-30 {
  --cut-x: 24px;
  --cut-y: 14px;
}

.cut-45 {
  --cut-x: 35px;
  --cut-y: 35px;
}

.cut-60 {
  --cut-x: 14px;
  --cut-y: 24px;
}

.cut-box {
  background: #f5f5f5;
  padding: 2rem;
}

/* ========================================
   Review Panels
   ======================================== */

.review-panels-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 1rem 0;
}

.clipped-card {
  --cut-size: 30px;

  background: #f5f7f8;
  padding: 1.5rem;
  border-left: 4px solid #940007;

  clip-path: polygon(
    var(--cut-size) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--cut-size)
  );
}

hr {
  height: 1.5px;
  background-color: #940007;
  border: none;
  opacity: 1;
}

.review-panel h2 {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #940007;
  margin-bottom: 1rem;
}

.review-panel p {
  display: grid;
  grid-template-columns: 175px 1fr;
  margin: 0.25rem 0;
  line-height: 1.5;
}

.review-panel1 p {
  margin: 0.25rem 0;
  line-height: 1.5;
}

.review-panel strong {
  color: #2c7a7b;
}

.review-panel i,
.review-value i {
  vertical-align: middle;
  margin-left: 0.35rem;
  line-height: 1;
}

.gameinfo {
  margin: 0 0 1rem;
  line-height: 1.6;
  font-size: 0.98rem;
  border-left: 4px solid #2b7a78;
  padding-left: 0.75rem;
}

@media (max-width: 768px) {
  .review-panels-wrapper {
    grid-template-columns: 1fr;
  }
}
/*footer*/

/* Footer columns */
.container-footer .footer-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(2rem, 6vw, 6rem);
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.container-footer .footer-column {
    min-width: 0;
}

.container-footer .footer-columns h4 {
    margin: 0 0 1rem;
}

.container-footer .footer-columns p {
    margin: 0 0 1rem;
}

.container-footer .footer-columns a {
    color: inherit;
    text-decoration: none;
}

.container-footer .footer-columns a:hover,
.container-footer .footer-columns a:focus {
    text-decoration: underline;
}

/* Social icons */
.container-footer .footer-socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.container-footer .footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    line-height: 1;
}

/* Prevent long email addresses causing overflow */
.container-footer .footer-column a[href^="mailto:"] {
    overflow-wrap: anywhere;
}

/* Tablet and mobile */
@media (max-width: 768px) {
    .container-footer .footer-columns {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2.5rem 1.5rem;
    }
}


/* Footer social icons */
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  margin-top: 1.25rem;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--footercolor) !important;
  text-decoration: none;
  line-height: 1;
}

.footer-socials a:hover,
.footer-socials a:focus {
  color: var(--link-hover-color) !important;
}

.footer-socials .fa,
.footer-socials .fab,
.footer-socials .fa-brands {
  font-size: 2.25rem;
  line-height: 1;
}

/* ========================================
   Game Wall
   ======================================== */

.gamewall {
  max-width: none;
  margin: 0;
  padding: 1.25rem 0 2rem;
}

/* ========================================
   Game Wall Filter Sidebar
   ======================================== */

.gamewall-filters {
  display: grid;
  gap: 1rem;
}

/* Search */
.gamewall-filters .gamewall__search {
  margin-bottom: 0;
}


/* Filter groups */
.gamewall-filters .gamewall__filter {
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-top: 1px solid #1d7989;
}

.gamewall-filters .gamewall__filter:first-of-type {
  padding-top: 0;
  border-top: none;
}

/* Section headings */
.gamewall-filters .gamewall__filter > label:first-of-type {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #940007;
}

/* Checklist layout */
.gamewall-filters .gamewall__checklist {
  display: grid;
  gap: 0.5rem;
}

.gamewall-filters .gamewall__checkitem {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 400;
  cursor: pointer;
  color: #111;
}

.gamewall-filters .gamewall__checkitem input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 14px;
  accent-color: #1f2937;
}

.gamewall-filters .gamewall__checkitem span {
  display: inline-block;
}

.gamewall-filters .gamewall__checkitem:hover span {
  text-decoration: underline;
}

/* Button */
.gamewall-filters .gamewall__actions {
  margin-top: 0.25rem;
}

.gamewall__actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gamewall-filters .gamewall__btn {
  --cut-size: 0.8em;

  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--btnbg);
  color: var(--btncolor);
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-radius: 0.375rem;

  clip-path: polygon(
    var(--cut-size) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--cut-size)
  );
}

.gamewall-filters .gamewall__btn:hover,
.gamewall-filters .gamewall__btn:focus {
  background: var(--btnbgh);
  color: var(--btncolorh);
}

/* ========================================
   Game Wall Meta + Grid
   ======================================== */

.gamewall__meta {
  margin-bottom: 1.25rem;
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.95rem;
}

.gamewall__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

/* ========================================
   Game Wall Cards
   ======================================== */

.gamewall__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gamewall__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.gamewall__imgwrap {
  padding: 1rem 1rem 0;
}

.gamewall__img {
  width: 100%;
  display: block;
  background: #fff;
  aspect-ratio: 2 / 3;
  object-fit: contain;
}

.gamewall__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 0.85rem 0.9rem 1rem;
}

.gamewall__title {
  font-size: 1.05rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

/* ========================================
   Game Wall Action Buttons
   ======================================== */

.gamewall__reviewAction {
  margin: 0.35rem 0 0.7rem;
}

.gamewall__reviewBtn,
.gamewall__footer .gamewall__btn {
  --cut-size: 0.8em;

  display: inline-block;
  padding: 0.65rem 0.95rem;
  background: var(--btnbg);
  color: var(--btncolor);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;

  clip-path: polygon(
    var(--cut-size) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--cut-size)
  );
}

.gamewall__reviewBtn:hover,
.gamewall__reviewBtn:focus,
.gamewall__footer .gamewall__btn:hover,
.gamewall__footer .gamewall__btn:focus {
  background: var(--btnbgh);
  color: var(--btncolorh);
  text-decoration: none;
}

.gamewall__footer {
  margin-top: 1.5rem;
  text-align: center;
}

.gamewall__footer .gamewall__btn {
  min-width: 180px;
}
/* gamewall action buttons*/

/* Chips */
.gamewall__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.gamewall__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Status/Rating row */
.gamewall__metaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.75);
  font-size: 0.92rem;
}

.gamewall__metaItem strong {
  font-weight: 800;
}

/* ========================================
   Cut-corner input wrappers
   ======================================== */

.gamewall-filters .gamewall__inputwrap {
  --cut-size: 0.8em;

  width: 100%;
  padding: 1px;
  background: #d6d9de;
  border-radius: 0.375rem;

  clip-path: polygon(
    var(--cut-size) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--cut-size)
  );
}

.gamewall-filters .gamewall__input {
  --cut-size: 0.8em;

  width: 100%;
  padding: 0.75rem 0.9rem;
  border: none;
  background: #fff;
  box-shadow: none;
  outline: none;
  border-radius: 0.275rem;

  clip-path: polygon(
    var(--cut-size) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--cut-size)
  );

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.gamewall-filters .gamewall__inputwrap:focus-within {
  background: var(--btnbg);
  box-shadow: 0 0 0 1px rgba(148, 0, 7, 0.15);
}

.gamewall-filters .gamewall__input[type="number"]::-webkit-inner-spin-button,
.gamewall-filters .gamewall__input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* filter collapse button*/

.gamewall__moreBtn {
  width: fit-content;
  margin-top: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #940007;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
}

.gamewall__moreBtn:hover,
.gamewall__moreBtn:focus {
  color: #1d7989;
}

/* Responsive */
@media (max-width: 992px) {
  .gamewall__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .gamewall__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 992px) {
  .container-sidebar-left {
    position: sticky;
    top: 2rem;
    align-self: start;
  }
}

  /*mobile layout breathing space*/
  @media (max-width: 767px) {

  .container-component {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .container-sidebar-left {
    padding-left: 1rem;
    padding-right: 1rem;
  }

}

  @media (max-width: 767px) {

  .container-sidebar-left {
    width: 100%;
    max-width: 100%;
  }

}

  @media (max-width: 767px) {

  .container-sidebar-left {
    background: #f5f5f5;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
  }

}


/* Status colours */
.gamewall__status {
  font-weight: 600;
}

.gamewall__status[data-status="backlog"] {
  color: rgba(0, 0, 0, 0.55);
}

.gamewall__status[data-status="playing"] {
  color: #2f6fed;
}

.gamewall__status[data-status="finished"] {
  color: #2e7d32;
}

.gamewall__status[data-status="on hold"] {
  color: #b26a00;
}

.gamewall__status[data-status="dropped"] {
  color: #8a1f1f;
}

/* ========================================
   Sidebar
   ======================================== */

.container-sidebar-left {
  background-color: #f5f5f5;
}

/*AI Icons Styling*/

.ai-icons {
    display: flex;
    gap: 0.5rem;
}

.ai-icons img {
    display: block;
}

/* ========================================
   Reveal
   ======================================== */

.reveal {
  opacity: 0;
}

.reveal.is-visible {
  opacity: 1;
}

/* ========================================
   Mobile compact pagination
   ======================================== */

@media (max-width: 767px) {

  .pagination {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
  }

  .pagination .page-item {
    flex: 0 0 auto;
  }

  .pagination .page-link {
    min-width: 2.75rem;
    text-align: center;
  }

  /* Hide page numbers 2 onwards, except the last page number */
  .pagination .page-item:not(:first-child):not(:nth-child(2)):not(:nth-child(3)):not(:nth-last-child(3)):not(:nth-last-child(2)):not(:last-child) {
    display: none;
  }

  /* Make the final page number look like an ellipsis + last page */
  .pagination .page-item:nth-last-child(3) .page-link::before {
    content: "...";
    margin-right: 1rem;
    color: #666;
  }
}

#mod-custom125 {
  background: #f5f5f5;
  padding: 25px 15px;
}

#mod-custom128 {
  background: #f5f5f5;
  padding: 25px 15px;
}

.ai-icons { display: flex; gap: 0.5rem; } .ai-icons img { display: block; width: 50px; height: 50px; }