/* =========================
   Heti oldal – CSAK tartalom (topbar a topbar.css-ben van)
========================= */

:root{
  --card: rgba(245,248,252,0.75);
  --text: #111827;
  --muted: #3f4c5f;
  --sep: rgba(15,23,42,0.18);
}

*{ box-sizing: border-box; }

html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body{
  margin: 0;

  /* Desktopon mehet a középre igazítás */
  display: grid;
  place-items: center;

  min-height: 100vh;
  background-color: #9bd3fb;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);

  /* hely a fixed topbar számára (desktop) */
  padding-top: 72px;
}

button{
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background: #0d6efd;
  color: #fff;
  font-weight: 600;
}

/* Kártyák az archívum oldalakhoz */
.archive-wrap{
  width: min(1100px, 96vw);
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 12px 24px;
}
.archive-card{
  background: #f8fbff;
  border: 1px solid #d6d9de;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15,23,42,0.12);
  padding: 16px 18px;
  margin: 0 6px 28px;
}

.wrap{
  width: min(900px, 92vw);
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  overflow: hidden;
}

.header{
  padding: 18px 22px;
  border-bottom: 1px solid var(--sep);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header h1{
  font-size: 18px;
  margin: 0;
  letter-spacing: .3px;
}

.header .sub{
  color: var(--muted);
  font-size: 14px;
}

/* Egy „kisebb rész” (időjárás slot) */
.slot{
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #d1d5db;
}
.slot:last-child{ border-bottom: none; }

/* Bal oldal (idő felül, hőfok + emoji alul) */
.slot-left{
  position: relative;
  min-height: 110px;
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.time{
  align-self: start;
  font-weight: 700;
  font-size: 20px;
}

.bottom-left{
  align-self: end;
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.temp{
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .5px;
}

.emoji{
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

.desc{
  margin-left: 6px;
  color: var(--muted);
  font-size: 14px;
}

/* Jobb oldal metrikák */
.slot-right{
  display: grid;
  align-content: space-between;
  border-left: 1px dashed var(--sep);
  padding-left: 18px;
}

.metric{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.metric .label{
  color: var(--muted);
  font-size: 14px;
}

.metric .value{
  font-weight: 700;
}

.badge{
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--sep);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

/* Dropdown menu alapállapotban rejtve; csak .open-re nyíljon (kattintásra) */
.nav-dropdown-menu{
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  display: flex;
  flex-direction: column;
  min-width: 140px;
  padding: 10px;
  background: #f8fbff;
  color: var(--text);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 7500;
}
.nav-dropdown.open .nav-dropdown-menu{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 4px);
}
.nav-dropdown.open .nav-caret{
  transform: translateY(1px) rotate(180deg);
  border-top-color: #dbeafe;
}
.nav-dropdown:hover .nav-dropdown-menu{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Mobilon igazítsuk jobbra, hogy ne lógjon ki */
@media (max-width: 768px){
  .nav-dropdown-menu{
    left: auto;
    right: 0;
    transform: translate(0, 8px);
    min-width: 170px;
  }
  .nav-dropdown.open .nav-dropdown-menu{
    transform: translate(0, 4px);
  }
}
/* Dropdown (archívum) – alapból rejtve, csak kattintásra (open osztály) látszik */
.nav-dropdown-menu{
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  display: flex;
  flex-direction: column;
  min-width: 140px;
  padding: 10px;
  background: #f8fbff;
  color: var(--text);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 10;
}
.nav-dropdown.open .nav-dropdown-menu{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 4px);
}
.nav-dropdown.open .nav-caret{
  transform: translateY(1px) rotate(180deg);
  border-top-color: #dbeafe;
}
/* Tiltsuk a hover-open viselkedést */
.nav-dropdown:hover .nav-dropdown-menu{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* =========================
   Reszponzív
========================= */

@media (max-width: 640px){
  .slot{
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .slot-right{
    border-left: none;
    border-top: 1px dashed var(--sep);
    padding-left: 0;
    padding-top: 12px;

    grid-template-columns: 1fr 1fr;
    row-gap: 10px;
    column-gap: 12px;
  }

  .metric{ padding: 0; }
}

/* =========================
   Mobil – egységes topbar miatt több hely kell felül
   (topbar stílus NINCS itt, az a topbar.css-ben van)
========================= */

@media (max-width: 768px){
  body{
    /* mobilon normál görgetés */
    display: block;
    place-items: initial;

    padding-top: 120px; /* 2 soros topbar + menü */
    padding-left: 12px;
    padding-right: 12px;

    overflow-x: hidden;
  }

  .wrap{
    width: 100%;
  }
}

@media (max-width: 520px){
  .temp{ font-size: 34px; }
  .emoji{ font-size: 30px; }
  .time{ font-size: 18px; }
  .desc{ font-size: 13px; }
}
