/* Numerology.cz - static multilingual rebuild
   Visual language follows the source site (WordPress Twenty Twenty-One,
   background #d1e4de, black primary, system font stack). */

:root {
  --color-background: #d1e4de;
  --color-primary: #000;
  --color-secondary: #28303d;
  --color-border: rgba(0, 0, 0, 0.2);
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --content-width: 610px;
  --wide-width: 1240px;
  --gutter: 25px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--color-background);
  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: 1.25rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }

a { color: currentColor; text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { text-decoration-style: dashed; }
a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--color-background);
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}
.skip-link:focus { left: 6px; top: 6px; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 35px var(--gutter) 0;
}

.site-branding { flex: 0 1 auto; }

.site-logo img {
  display: block;
  max-width: 300px;
  width: 100%;
}

/* ---------- Primary navigation ---------- */

.primary-navigation {
  font-size: 1rem;
  margin-top: 8px;
}

.menu-button-container { display: none; }

.menu-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-wrapper li { position: relative; }

/* Top-level items keep their label and the +/- toggle on one line. */
.menu-wrapper > li {
  display: flex;
  align-items: center;
}

.menu-wrapper > li > a,
.menu-wrapper > li > .menu-label {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  font-weight: 500;
}

.menu-wrapper > li.menu-item-has-children > a,
.menu-wrapper > li.menu-item-has-children > .menu-label { padding-right: 4px; }

.menu-wrapper > li > a:hover,
.menu-wrapper > li > .menu-label:hover { text-decoration: underline; }

.menu-wrapper .current-menu-item > a { text-decoration: underline; font-weight: 700; }

/* Sub menus */

.menu-item-has-children > .sub-menu-toggle {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 6px;
  margin-left: -6px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.sub-menu-toggle .icon-minus { display: none; }
.sub-menu-toggle[aria-expanded="true"] .icon-minus { display: block; }
.sub-menu-toggle[aria-expanded="true"] .icon-plus { display: none; }

.sub-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 50;
  min-width: 260px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  display: none;
}

.sub-menu.is-open { display: block; }

.sub-menu a {
  display: block;
  padding: 10px 18px;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
}

.sub-menu a:hover { text-decoration: underline; }

/* ---------- Language switcher ---------- */

.language-switcher .lang-flag {
  width: 16px;
  height: 11px;
  display: inline-block;
  vertical-align: baseline;
}

.language-switcher .lang-label { margin-left: 0.3em; }

.language-switcher .sub-menu a { display: flex; align-items: center; }

.lang-item.current-lang > a { font-weight: 700; }

/* ---------- Content ---------- */

.site-content { padding: 0 var(--gutter); }

.site-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 80px 0 40px;
}

.entry-title {
  font-size: 2.6rem;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 50px;
  max-width: var(--content-width);
}

.entry-content > * { margin-top: 0; margin-bottom: 30px; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-content h2 {
  font-size: 2rem;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-top: 60px;
  margin-bottom: 25px;
}

.entry-content h3 {
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 400;
  margin-top: 45px;
  margin-bottom: 20px;
}

.entry-content h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 35px;
  margin-bottom: 15px;
}

.entry-content p { margin-bottom: 30px; }

.entry-content ul,
.entry-content ol { padding-left: 1.3em; margin-bottom: 30px; }

.entry-content li { margin-bottom: 10px; }

.entry-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 50px auto;
  max-width: 100px;
}

.entry-content strong { font-weight: 700; }

/* ---------- 28-day challenge widget ---------- */

.tdc-app {
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.35);
  padding: 30px;
  margin-bottom: 30px;
}

.tdc-app h3 { margin-top: 0; }

.tdc-progress { font-size: 1rem; margin-bottom: 20px; }

.tdc-field { margin-bottom: 20px; }

.tdc-field label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tdc-field input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.tdc-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.tdc-button,
.cn-button {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 22px;
  border: none;
  cursor: pointer;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0;
}

.tdc-button:hover { opacity: 0.85; }

.tdc-history { margin-top: 25px; }

.tdc-history[hidden] { display: none; }

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 40px var(--gutter) 60px;
}

.site-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  border-top: 1px solid var(--color-border);
  padding-top: 35px;
  font-size: 1rem;
}

.site-footer .site-logo img { max-width: 180px; }

.powered-by { font-size: 0.95rem; }

/* ---------- Cookie notice ---------- */

#cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  background-color: rgba(50, 50, 58, 1);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.5;
}

#cookie-notice[hidden] { display: none; }

.cookie-notice-container {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-align: center;
}

#cn-accept-cookie { background-color: #00a99d; padding: 8px 20px; font-size: 0.85rem; }

#cn-accept-cookie:hover { opacity: 0.9; }

/* ---------- Responsive ---------- */

@media only screen and (max-width: 900px) {
  body { font-size: 1.1rem; }

  .site-header {
    flex-direction: column;
    align-items: stretch;
    padding-top: 25px;
  }

  .menu-button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: -60px;
  }

  #primary-mobile-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    padding: 10px 0;
  }

  #primary-mobile-menu .dropdown-icon.close { display: none; }
  #primary-mobile-menu[aria-expanded="true"] .dropdown-icon.close { display: flex; align-items: center; gap: 6px; }
  #primary-mobile-menu[aria-expanded="true"] .dropdown-icon.open { display: none; }
  #primary-mobile-menu .dropdown-icon.open { display: flex; align-items: center; gap: 6px; }

  .primary-menu-container { display: none; }
  .primary-menu-container.is-open { display: block; }

  .menu-wrapper {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    border-top: 1px solid var(--color-border);
    margin-top: 15px;
    padding-top: 10px;
  }

  .menu-wrapper > li > a,
  .menu-wrapper > li > .menu-label { padding: 12px 0; }

  .sub-menu {
    position: static;
    border: none;
    box-shadow: none;
    background: transparent;
    min-width: 0;
    padding: 0 0 10px 20px;
  }

  .site-logo img { max-width: 220px; }

  .site-main { padding-top: 50px; }

  .entry-title { font-size: 2rem; margin-bottom: 35px; }

  .entry-content h2 { font-size: 1.6rem; }
  .entry-content h3 { font-size: 1.3rem; }
}

@media only screen and (max-width: 480px) {
  .site-logo img { max-width: 150px; }
  .cookie-notice-container { flex-direction: column; }
}
