
/* ==========================================================
   HAVEPRÆMIER.CSS — clean build (desktop “org størrelse”,
   mobil = 3 på én række, modal = centreret)
   ========================================================== */

/* ===== 2-kolonne layout (seneste vindere + årsknapper) ===== */
.winners-twocol {
  display: flex;
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.winner-col,
.winner-col-btn {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 1rem;
  padding: 1.5rem;
  box-sizing: border-box;
}

@media (max-width: 750px) {
  .winners-twocol {
    flex-direction: column;
    gap: 1.5rem;
  }
  .winner-col,
  .winner-col-btn {
    width: 100%;
  }
}

/* ===== Knapper til tidligere år ===== */
.alle-are-knapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.alle-vindere-btn {
  background: #1976D2;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 0.9rem 2.1rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .18s;
  width: 100%;
  max-width: 260px;
}

.alle-vindere-btn:hover { background: #0d53a3; }

/* ===== Vinderkort — DESKTOP/TABLET (org. størrelse) ===== */
.winners-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  justify-content: center;   /* centrer columns */
  justify-items: center;     /* centrer indhold i celler */
  text-align: center;
  margin-bottom: 0.8rem;
}

.winner-single {
  background: #fafafa;
  border-radius: .75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: .8rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  max-width: 180px;
}

.winner-single img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: .5rem;
  border-radius: 50%;
}

.winner-placement { font-weight: 700; margin-bottom: .2rem; }
.winner-have      { font-size: .96rem; color: #5c5c5c; }

/* ===== Vinderkort — MOBIL (3 på én række, kompakt) ===== */
@media (max-width: 600px) {
  .winners-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .winner-single {
    padding: 6px;
    min-width: 0;
    max-width: none;
  }
  .winner-single img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    margin-bottom: 4px;
  }
  .winner-placement,
  .winner-have {
    font-size: 12px;
    line-height: 1.25;
    margin: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ===== Modal ===== */
.modal-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  align-items: flex-start;
  justify-content: center;
  padding-top: 8vh;
}

.modal-popup.open { display: flex; }

.modal-popup-content {
  position: relative;
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 8px 38px rgba(0,0,0,0.18);
  width: 98vw;
  max-width: 700px;
  padding: 1.5rem 1.3rem .5rem;
  display: flex;
  flex-direction: column;
  max-height: 87vh;
  box-sizing: border-box;
  margin: 0 auto;
}

/* Luk-knap */
.modal-popup-close {
  position: absolute;
  top: 0.6rem;
  right: 1.1rem;
  z-index: 1001;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #333;
  cursor: pointer;
  transition: color .18s;
}
.modal-popup-close:hover { color: #d32f2f; }

.modal-title {
  text-align: center;
  font-size: 1.15rem;
  margin: 0 0 1.1rem;
}

.modal-popup-scroll {
  overflow-y: auto;
  max-height: 54vh;
  margin-bottom: .2rem;
  padding-bottom: 1rem;
}

.modal-popup-footer {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
  background: #fff;
  position: sticky;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.modal-prev,
.modal-next {
  background: #e8e8e8;
  border: none;
  border-radius: 30px;
  padding: .45rem .6rem;
  min-width: 100px;
  cursor: pointer;
  transition: background .15s;
  color: #1976D2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-prev:disabled,
.modal-next:disabled {
  opacity: .5;
  pointer-events: none;
}

.modal-prev:hover,
.modal-next:hover {
  background: #1976D2;
  color: #fff;
}

/* Modal: brug samme størrelser som siden — bare centreret */
#vindereModalBody { margin-top: .2rem; }

#vindereModal .winners-container {
  justify-content: center;
  justify-items: center;
  width: max-content;    /* shrink-to-fit */
  margin: 0 auto;        /* centrer hele blokken */
}

/* ===== Billed-override i tekst (mobil) ===== */
@media (max-width: 800px) {
  .maintext_container .maintext_text img.leftimg,
  .floattext_container .floattext_text img.leftimg {
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 0 1rem 0 !important;
  }
}
/* WEB (≥601px): 3 vindere på én række i modal + fuld bredde */
@media (min-width: 601px) {
  #vindereModal .winners-container {
    display: grid;                         /* sikre grid i modal */
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 16px;
    justify-content: center;               /* centrer sporrækkerne */
    justify-items: center;                 /* centrer indhold i celler */
    width: 100%;                           /* vigtig: giv plads til 3 kolonner */
    margin: 0 auto;
  }
}

/* MOBIL (≤600px): 3 kompakte kolonner (som du ønskede) */
@media (max-width: 600px) {
  #vindereModal .winners-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    justify-content: center;
    justify-items: center;
    width: 100%;
  }
  #vindereModal .winner-single img {
    width: 64px;
    height: 64px;
  }
}

/* Fjern evt. tidligere “shrink-to-fit” i modal */
#vindereModal .winners-container {
  width: 100%;          /* overskriv tidligere width:max-content */
}

/* Lås baggrunden når modal er åben */
body.modal-lock {
  position: fixed;
  overflow-y: scroll; /* undgå layout-hop i desktop */
  width: 100%;
}