a/* =========================
   Font: Minecraft Dungeons (local)
   ========================= */
@font-face {
    font-family: 'MinecraftDungeons';
    src: url('../fonts/minecraft-dungeons.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* =========================
   Base / Reset
   ========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #222;
    background: #f6f7f8;
}

/* =========================
   Layout
   ========================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
}

main { padding-bottom: 24px; }

/* =========================
   Header
   ========================= */
.fw-header {
    background: #ffea00;
    border-bottom: 2px solid #dab000;

    /* Tooltip safety */
    position: relative;
    z-index: 50;
}

.fw-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    /* compacter */
    padding-bottom: 8px;
}

/* Title */
.site-title {
    margin: 0;
    font-family: 'MinecraftDungeons', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.05;
    display: flex;
    flex-direction: column;
}

.site-title .title-top { font-size: 22px; }
.site-title .title-bottom { font-size: 30px; }

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions form { margin: 0; }

.header-actions button {
    background: #fff;
    border: 1px solid #c29c00;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.header-actions button:hover { background: #fff6b0; }
.header-actions button:focus-visible {
    outline: 2px solid rgba(0,0,0,0.45);
    outline-offset: 2px;
}

/* =========================
   Navigation row (in header)
   ========================= */
.nav-row-wrap {
    background: transparent;
}

/* Zorg dat nav dezelfde "container padding" gebruikt */
.nav-row-wrap .container {
    padding-top: 0;
    padding-bottom: 12px;
}

/* ✅ NIEUW: scroll wrapper (hier komt overflow-x op!) */
.nav-scroll{
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;

    position: relative;
    z-index: 60;

    scrollbar-width: none; /* Firefox */
}
.nav-scroll::-webkit-scrollbar { display: none; } /* Chrome/Android */

/* ✅ nav-row zelf mag NIET scrollen (Firefox tooltip fix) */
.nav-row {
    display: flex;
    align-items: center;
    gap: 10px;

    flex-wrap: nowrap;
    white-space: nowrap;

    overflow: visible;       /* tooltip mag uitsteken */
    position: relative;
}

.nav-spacer { flex: 1 1 auto; }

/* =========================
   Nav icons
   ========================= */
.nav-ico {
    position: relative;
    width: 44px;
    height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(0,0,0,0.22);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.35),
        0 1px 0 rgba(0,0,0,0.08);

    flex: 0 0 auto;
    text-decoration: none;
}

.nav-ico:hover,
.nav-ico:focus-visible {
    background: rgba(255,255,255,0.28);
    border-color: rgba(0,0,0,0.30);
}

.nav-ico:focus-visible {
    outline: 2px solid rgba(0,0,0,0.45);
    outline-offset: 2px;
}

/* Active */
.nav-ico.is-active {
    background: rgba(255,255,255,0.42);
    border-color: rgba(0,0,0,0.45);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.55),
        0 0 0 3px rgba(255,255,255,0.55),
        0 2px 0 rgba(0,0,0,0.12);
}

/* Hidden text */
.nav-ico .nav-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Icon base */
.nav-ico::before {
    content: "";
    width: 18px;
    height: 18px;
    background: rgba(0,0,0,0.55);
    border-radius: 4px;
}

/* Icons */
.nav-home::before {
    border-radius: 3px;
    background:
        linear-gradient(transparent 55%, rgba(0,0,0,0.55) 55%),
        linear-gradient(90deg, rgba(0,0,0,0.55) 50%, transparent 50%);
}

.nav-news::before {
    border-radius: 3px;
    background:
        linear-gradient(rgba(0,0,0,0.55) 2px, transparent 2px) 0 4px / 18px 5px repeat-y;
}

.nav-rules::before {
    border-radius: 3px;
    background:
        linear-gradient(rgba(0,0,0,0.55) 2px, transparent 2px) 0 4px / 18px 6px repeat-y,
        linear-gradient(90deg, rgba(0,0,0,0.55) 3px, transparent 3px) 0 0 / 6px 18px repeat-x;
}

.nav-profile::before {
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 40%, rgba(0,0,0,0.55) 5px, transparent 6px),
        radial-gradient(circle at 50% 85%, rgba(0,0,0,0.55) 7px, transparent 8px);
}

.nav-server::before {
    border-radius: 3px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.55) 3px, transparent 3px) 0 0 / 6px 18px repeat-x,
        linear-gradient(rgba(0,0,0,0.55) 3px, transparent 3px) 0 0 / 18px 6px repeat-y;
}

/* Admin special (right side) */
.nav-admin-special {
    background: #e53935 !important;
    border-color: #b71c1c !important;
}

.nav-admin-special:hover,
.nav-admin-special:focus-visible {
    background: #ef5350 !important;
    border-color: #b71c1c !important;
}

.nav-admin-special.is-active {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.55),
        0 0 0 3px rgba(255,255,255,0.55),
        0 2px 0 rgba(0,0,0,0.18);
}

/* =========================
   Tooltip — desktop only
   (Gebruik data-label in je <a ... data-label="Home">)
   ========================= */
@media (hover: hover) and (pointer: fine) {
    .nav-ico::after {
        content: attr(data-label);
        position: absolute;
        top: 52px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0,0,0,0.88);
        color: #fff;
        padding: 4px 8px;
        border-radius: 8px;
        font-size: 12px;
        line-height: 1;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.12s ease;
        z-index: 9999;
    }

    .nav-ico:hover::after,
    .nav-ico:focus-visible::after {
        opacity: 1;
    }
}

/* =========================
   Mobile sizing
   ========================= */
@media (max-width: 768px) {
    .site-title .title-top { font-size: 20px; }
    .site-title .title-bottom { font-size: 26px; }
}

/* Smalle telefoons */
@media (max-width: 480px) {
    .nav-ico { width: 36px; height: 36px; }
    .nav-ico::before { width: 14px; height: 14px; }

    .nav-row-wrap .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .nav-row { gap: 8px; }
}

/* Extra smal */
@media (max-width: 360px) {
    .nav-ico { width: 34px; height: 34px; }
    .nav-ico::before { width: 13px; height: 13px; }

    .nav-row { gap: 6px; }
}

/* =========================
   Content / Footer
   ========================= */
.card {
    background: #fff;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

footer {
    background: #eee;
    border-top: 1px solid #ddd;
    padding: 12px 0;
    font-size: 14px;
    color: #555;
}
/* =========================
   Mods page: Tabs + Carousel
   ========================= */
.fw-tabs { margin-top: 12px; }

.fw-tabs-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.fw-tab-btn {
  border: 1px solid rgba(0,0,0,0.25);
  background: rgba(255,255,255,0.6);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
}

.fw-tab-btn:hover { background: rgba(255,255,255,0.8); }

.fw-tab-btn.is-active {
  background: #fff;
  border-color: rgba(0,0,0,0.45);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.7);
}

.fw-tab-panel { margin-top: 4px; }

/* Carousel wrapper */
.fw-carousel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fw-car-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.25);
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}
.fw-car-btn:hover { background: rgba(255,255,255,0.8); }

@media (max-width: 768px) {
  .fw-car-btn { display: none; } /* swipe/scroll on mobile */
}

/* Track */
.fw-car-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;

  scrollbar-width: none;
}
.fw-car-track::-webkit-scrollbar { display: none; }

/* Card */
.fw-mod-card {
  flex: 0 0 auto;
  width: 320px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
  scroll-snap-align: start;
}

@media (max-width: 480px) {
  .fw-mod-card { width: 260px; }
}

.fw-mod-thumb {
  /* Iets hoger frame zodat artwork + tekst lekker past */
  aspect-ratio: 4 / 3;

  /* “frame” look */
  background: rgba(255,255,255,0.65);
  border-bottom: 1px solid rgba(0,0,0,0.08);

  /* centreren */
  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden; /* behoud afgeronde hoeken van de card */
}

.fw-mod-thumb img {
  width: 100%;
  height: 100%;
  display: block;

  /* ✅ dit is de kern: niets croppen */
  object-fit: contain;
  object-position: center;

  image-rendering: auto;
}


.fw-mod-thumb-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: rgba(0,0,0,0.55);
}

.fw-mod-body { padding: 12px 12px 14px; }

.fw-mod-title {
  font-weight: 900;
  margin-bottom: 6px;
}

.fw-mod-summary { font-size: 14px; }

.fw-mod-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.fw-tag {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.12);
}
/* =========================
   Mods carousel — IMAGE ONLY (no crop)
   ========================= */
.fw-mods--images-only .fw-mod-body {
  display: none !important;
}

/* card: tighter + only image */
.fw-mods--images-only .fw-mod-card--imgonly {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 12px;
}

/* image area: fixed height, center, no crop */
.fw-mods--images-only .fw-mod-thumb {
  height: 220px;               /* tweak: 200–280 afhankelijk van smaak */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

/* KEY: contain instead of cover => nooit afkappen */
.fw-mods--images-only .fw-mod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  display: block;
}

/* placeholder netjes */
.fw-mods--images-only .fw-mod-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: rgba(0,0,0,0.55);
  background: rgba(255,255,255,0.6);
}

/* mobile: iets lager */
@media (max-width: 480px) {
  .fw-mods--images-only .fw-mod-thumb { height: 170px; }
}
/* =========================
   Mods page (tabs + carousel)
   ========================= */

.mods-wrap { padding: 18px; }
.mods-title { margin: 0 0 6px; }
.mods-sub { margin: 0 0 14px; color: #444; }

.mods-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
}

.mods-tab {
  border: 1px solid rgba(0,0,0,0.28);
  background: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  font-weight: 700;
  cursor: pointer;
}

.mods-tab.is-active {
  background: #fff6b0;
  border-color: rgba(0,0,0,0.45);
}

.mods-panel { display: none; }
.mods-panel.is-active { display: block; }

.mods-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
}

.mods-prev,
.mods-next {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.22);
  background: rgba(255,255,255,0.75);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.mods-prev:hover,
.mods-next:hover {
  background: rgba(255,255,255,0.95);
}

.mods-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding: 10px 6px;
  scroll-snap-type: x mandatory;
}
.mods-track::-webkit-scrollbar { display: none; }

.mods-card {
  flex: 0 0 auto;
  width: 320px;                 /* groter */
  aspect-ratio: 4 / 3;          /* uniforme tile */
  scroll-snap-align: start;

  /* “paint” box stijl */
  background: #fff;
  border-radius: 16px;
  border: 2px solid rgba(0,0,0,0.18);
  box-shadow:
    0 10px 18px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.65);

  padding: 10px;
  display: grid;
  place-items: center;
}

.mods-imglink {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 12px;

  /* inner frame */
  background: #fffdf3;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  text-decoration: none;
}

.mods-img {
  width: 100%;
  height: 100%;
  object-fit: contain;          /* ✅ nooit meer afkappen */
  border-radius: 10px;
}

.mods-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: #fffdf3;
  border: 1px dashed rgba(0,0,0,0.25);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: rgba(0,0,0,0.55);
}

.mods-empty {
  padding: 14px 6px;
  color: #555;
}

/* Mobile sizing */
@media (max-width: 900px) {
  .mods-card { width: 280px; }
}
@media (max-width: 560px) {
  .mods-row { grid-template-columns: 36px 1fr 36px; }
  .mods-prev, .mods-next { width: 36px; height: 36px; font-size: 20px; }
  .mods-card { width: 240px; }
}

/* Footer centeren */
footer { text-align: center; }
footer .container { text-align: center; }

/* =========================
   Mods carousel — MOBILE: 1 card per view
   ========================= */
@media (max-width: 560px) {

  /* small arrows */
  .mods-row {
    grid-template-columns: 34px 1fr 34px;
    gap: 8px;
  }
  .mods-prev, .mods-next {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 18px;
  }

  /* track: less padding so nothing clips */
  .mods-track {
    gap: 10px;
    padding: 8px 0;
  }

  /* ✅ 1 card takes the available width */
  .mods-card {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 5;     /* iets hoger op mobiel, oogt nicer */
    padding: 10px;
  }

  /* keep inner frame tight */
  .mods-imglink {
    width: 100%;
    height: 100%;
  }
}

/* extra small phones */
@media (max-width: 360px) {
  .mods-row {
    grid-template-columns: 30px 1fr 30px;
    gap: 6px;
  }
  .mods-prev, .mods-next {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
}
/* =========================
   Mods page — single carousel + modal
   ========================= */

.mods-wrap--single .mods-tabs { display: none; }

/* Mobile: geen extra uitleg/ruimte -> zo min mogelijk verticale scroll */
@media (max-width: 560px) {
  .mods-title, .mods-sub { display: none; }
  .mods-wrap { padding: 12px; }
  .mods-track { padding: 6px 0; }
}

/* Modal overlay */
.mods-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.mods-modal.is-open { display: block; }

.mods-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.mods-modal__dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(920px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);

  background: #fff;
  border-radius: 16px;
  border: 2px solid rgba(0,0,0,0.15);
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
  overflow: hidden;

  display: grid;
  grid-template-columns: 1fr;
}

.mods-modal__close {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 1px solid rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.9);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  font-weight: 900;
  cursor: pointer;
}

.mods-modal__media {
  background: #fffdf3;
  padding: 12px;
  display: grid;
  place-items: center;
}

.mods-modal__img {
  width: 100%;
  height: auto;
  max-height: 62svh;
  object-fit: contain;
  border-radius: 12px;
}

.mods-modal__info {
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(0,0,0,0.10);
}

.mods-modal__title {
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 6px;
}
.mods-modal__meta {
  color: rgba(0,0,0,0.6);
  font-size: 13px;
  margin-bottom: 10px;
}
.mods-modal__summary {
  color: rgba(0,0,0,0.85);
  line-height: 1.4;
}

/* Lock background scroll when modal is open */
html.mods-lock, body.mods-lock { overflow: hidden; }


