* {
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}


body {
  margin: 0;
  min-height: 100vh;
  background-image: url(../images/Gemini_Generated_Image_ddenxbddenxbdden.png);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #111;
  overflow-x: hidden;
}


/* ===== NAVBAR ===== */
/* ЗАЛИШЕНО БЕЗ ЗМІН */
.navbar {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 0 40px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 14px;
  z-index: 9999;
}

.menu-item {
  position: relative;
  font-size: clamp(13px, 3.5vw, 30px);
  cursor: pointer;
}

.menu-item span {
  padding: 6px 10px;
}

.menu-item:hover > span {
  background: #f0f0f0;
  border-radius: 8px;
}

.dropdown-box {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  min-width: 180px;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  padding: 0;
  gap: 0;
}

.menu-item:hover .dropdown-box {
  display: flex;
}

.drop-btn {
  padding: 10px 16px;
  text-decoration: none;
  color: #222;
  font-size: 14px;
  font-weight: 400;
  transition: 0.15s;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 0;
  display: block;
}

.drop-btn:last-child {
  border-bottom: none;
}

.drop-btn:hover {
  background: #f5f5f5;
  color: #111;
}

.logo {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.logo img {
  height: 45px;
  width: auto;
  display: block;
}


/* ===== WRAPPER ===== */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  align-items: center;
}

.test-box {
  border-radius: 16px;
  padding: 40px;
  width: 90%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  margin-top: 20px;
}


/* ===== FOOTER ===== */
.my-footer {
  width: 100%;
  min-height: 100px;
  padding: 20px 15px;
  background: #393636;
  color: white;
  text-align: center;
  border-top: 3px solid #555;
  margin-top: auto;
}


/* ===== LINKS ===== */
.menu-item-link {
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #222;
  display: block;
  transition: 0.2s;
  font-size: inherit;
}

.menu-item-link:hover {
  background: #f0f0f0;
}


/* =========================================================
   INFO BLOCK
   ========================================================= */

.info-block {
  width: calc(100% - 40px);
  max-width: 900px;

  margin: 100px auto 20px;

  padding: 20px;

  background: #faf9f9;
  border: 2px solid grey;
}

#info-title {
  margin: 0 0 20px;

  text-align: center;

  font-size: 32px;
  line-height: 1.25;
}

.info-block .text {
  width: 100%;
  box-sizing: border-box;
}

.text p {
  flex: 1;
  width: 100%;

  margin: 0;

  text-align: justify;
  line-height: 1.6;

  overflow-wrap: break-word;
}

.politics a {
  color: white;
}


/* =========================================================
   СЛОВНИК ФРАЗЕОЛОГІЗМІВ
   ========================================================= */

.frazeo-wrapper {
  width: calc(100% - 40px);
  max-width: 900px;
  margin-top: 20px;
}



.frazeo-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b8860b;
}

.frazeo-title {
  margin: 6px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 28px;
  color: #1e2a22;
}

/* ---- "Книга" з двома колонками ---- */
.frazeo-book {
  position: relative;
  border-radius: 4px;
  padding: 30px 40px;
  box-shadow: 0 12px 30px rgba(30, 42, 34, 0.08);
}

/* заголовки колонок "Фразеологізми" / "Значення" */
.frazeo-columns-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
  padding-bottom: 12px;
  margin-bottom: 10px;
  border-bottom: 2px solid #1e2a22;
}

.col-header {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.col-header--term {
  color: #1e2a22;
}

.col-header--meaning {
  color: #b8860b;
}

/* рядки-пари: фразеологізм | значення, в одному рядку */
.frazeo-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
  position: relative;
}

/* палітурка / розділювач по центру, як у розгорнутій книзі */
.frazeo-columns::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    #d8cfb8 15%,
    #d8cfb8 85%,
    transparent
  );
}

.frazeo-phrase {
  margin: 0;
  padding: 9px 12px;
  font-size: 16px;
  line-height: 1.4;
  border-bottom: 1px dotted #eae4d4;
  text-align: center;
}

.frazeo-phrase--term {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 17px;
  color: #1e2a22;
}

.frazeo-phrase--meaning {
  font-family: "Segoe UI", sans-serif;
  font-style: italic;
  font-weight: 400;
  color: #5a5648;
}


/* ===== АДАПТИВНІСТЬ (спільна: навбар, футер, info-block) ===== */

@media (max-width: 1024px) {
  .navbar {
    width: 90%;
    gap: 20px;
    padding: 0 20px;
  }

  .menu-item {
    font-size: 24px;
  }

  #info-title { font-size: 28px; }

  .info-block {
    margin: 30px auto 20px;
    padding: 20px;
    width: calc(100% - 40px);
  }
}

@media (max-width: 768px) {
  .navbar {
    width: 95%;
    height: 50px;
    gap: 10px;
    padding: 0 10px;
  }

  .menu-item {
    font-size: 18px;
  }

  .logo img {
    height: 32px;
  }

  .drop-btn {
    font-size: 13px;
    padding: 8px 12px;
  }

  .info-block { margin: 25px auto 20px; width: calc(100% - 30px); padding: 18px; }
  #info-title { font-size: 22px; }

  .my-footer {
    font-size: 14px;
  }

  .frazeo-title {
    font-size: 22px;
  }

  .frazeo-book {
    padding: 22px 18px;
  }

  .frazeo-phrase {
    font-size: 15px;
  }

  .frazeo-phrase--term {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .frazeo-columns,
  .frazeo-columns-header {
    grid-template-columns: 1fr 1fr;
    gap: 0 10px;
  }

  .frazeo-book {
    padding: 18px 12px;
  }

  .col-header {
    font-size: 12px;
  }

  .frazeo-phrase {
    font-size: 13px;
    padding: 8px 6px;
  }

  .frazeo-phrase--term {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .navbar {
    top: 20px;
  }

  .menu-item {
    font-size: 16px;
  }

  .info-block { margin: 20px auto 20px; width: calc(100% - 24px); padding: 15px; }
  #info-title { font-size: 20px; }

  .logo img {
    height: 28px;
  }

  .drop-btn {
    font-size: 13px;
    padding: 8px 10px;
  }
}

@media (max-width: 360px) {
  .navbar {
    top: 15px;
    width: 95%;
    height: 45px;
    gap: 8px;
    padding: 0 8px;
  }

  .menu-item {
    font-size: 14px;
  }

  .logo img {
    height: 24px;
  }

  .dropdown-box {
    min-width: 140px;
  }

  .drop-btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  .info-block { margin: 15px auto 20px; width: calc(100% - 14px); padding: 10px; }
  #info-title { font-size: 15px; }

  .my-footer {
    font-size: 12px;
    text-align: center;
  }

  .frazeo-title {
    font-size: 19px;
  }

  .frazeo-phrase {
    font-size: 12px;
  }

  .frazeo-phrase--term {
    font-size: 13px;
  }
}