/*
Theme Name: EOU27 Twenty Twenty-One Child
Template: twentytwentyone
Version: 2.2.0
*/

:root {
  --eou-text: #1f2a37;
  --eou-accent: #8a6a20;
  --eou-content-width: 1024px;
  --eou-menu-strip: #c9e3ef;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #ffffff;
  color: var(--eou-text);
}

#page.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: none;
  background: #ffffff;
}

#masthead.site-header {
  position: relative;
  background: #ffffff;
  border-top: 4px solid #0d1115;
  border-bottom: 0;
  margin: 0;
  max-width: none;
  padding: 0;
}

#masthead::before {
  content: none;
}

#masthead .site-branding {
  position: relative;
  min-height: clamp(220px, 24vw, 360px);
  margin: 0 auto;
  width: min(100%, 1400px);
  padding-top: 20px;
  padding-bottom: 20px;
  padding-left: clamp(150px, 16vw, 260px);
  padding-right: clamp(150px, 16vw, 260px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

#masthead .site-title,
#masthead .site-description {
  display: none;
}

#masthead .site-branding::before {
  content: "";
  display: block;
  position: absolute;
  left: clamp(10px, 2vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(185px, 18vw, 300px);
  aspect-ratio: 1 / 1;
  z-index: 2;
  background-image: url("/wp-content/uploads/EOU%202027%20bez%20textu%20_%201.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#masthead .site-branding::after {
  content: "European Ornithologists' Union Conference\A Brno, Czech Republic\A 23-27 August 2027";
  white-space: pre-line;
  display: block;
  position: relative;
  top: 25px;
  width: min(100%, 900px);
  z-index: 1;
  text-align: center;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  font-size: clamp(24px, 2.6vw, 52px);
  line-height: 1.1;
  font-weight: 700;
  color: #10131a;
}

#masthead.site-header::after {
  content: "";
  display: block;
  position: absolute;
  right: calc((100vw - min(100vw, 1400px)) / 2 + clamp(10px, 2vw, 32px) + 44px);
  top: calc(37% + 10px);
  transform: translateY(-50%);
  width: clamp(90px, 10vw, 170px);
  aspect-ratio: 1 / 1;
  z-index: 2;
  background-image: url("/wp-content/uploads/eou-rybak-logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center 18%;
}

/* Menu full width + centered items */
#masthead .site-header-inner,
#masthead .primary-navigation,
#masthead .primary-navigation > div,
#masthead .primary-menu-container,
#masthead .primary-menu-container > ul {
  width: 100%;
  max-width: none;
  background: var(--eou-menu-strip);
}

#masthead .primary-navigation {
  padding: 18px 14px;
}

#masthead .primary-menu-container > ul {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 48px !important;
  margin: 0;
  padding: 0;
  list-style: none;
}

#masthead .primary-menu-container > ul > li {
  margin: 0;
  padding: 0;
}

#masthead .primary-menu-container > ul > li > a {
  display: inline-block;
  padding: 8px 0;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: #2d2d2d;
}

#masthead .primary-menu-container > ul > li > a:hover,
#masthead .primary-menu-container > ul > li.current-menu-item > a {
  color: var(--eou-accent);
}

/* Page content fixed width 1024 */
.site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 26px 0 72px;
  background: #ffffff;
}

article,
.page,
.post,
.entry-content,
.entry-content > * {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.entry-content,
.entry-footer {
  width: var(--eou-content-width);
  max-width: var(--eou-content-width);
  margin: 0 auto;
  padding: 0;
}

.singular .entry-content > * {
  max-width: 100% !important;
}

#colophon .site-info {
  display: none;
}

.site-footer,
#colophon {
  margin-top: auto;
  position: static;
  width: 100%;
  max-width: none;
  border: 0;
  background: #000;
}

#colophon {
  padding: 16px 20px 18px;
  text-align: center;
}

#colophon::after {
  content: "European Ornithologists Union Conference 2027";
  display: block;
  color: #fff;
  text-align: center;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

#colophon,
#colophon a,
#colophon p,
#colophon span {
  color: #fff;
}

@media (max-width: 1060px) {
  :root {
    --eou-content-width: 96vw;
  }

  #masthead .site-branding {
    width: min(100%, 1000px);
    min-height: 180px;
    padding-top: 14px;
    padding-bottom: 14px;
    padding-left: clamp(100px, 14vw, 170px);
    padding-right: clamp(95px, 13vw, 160px);
  }

  #masthead .site-branding::before {
    left: 10px;
    width: clamp(112px, 15vw, 190px);
  }

  #masthead.site-header::after {
    right: calc((100vw - min(100vw, 1000px)) / 2 + 10px);
    width: clamp(68px, 9vw, 110px);
  }

  #masthead .site-branding::after {
    width: min(100%, 700px);
    font-size: clamp(20px, 4.2vw, 38px);
  }

  #masthead .primary-menu-container > ul {
    gap: 20px !important;
  }

  .site-main {
    padding: 18px 0 56px;
  }

  .entry-content,
  .entry-footer {
    width: var(--eou-content-width);
    max-width: var(--eou-content-width);
    padding: 0 10px;
  }
}

@media (min-width: 1600px) {
  #masthead .site-branding {
    width: min(100%, 1500px);
    min-height: 300px;
    padding-left: 250px;
    padding-right: 250px;
  }

  #masthead .site-branding::before {
    left: 20px;
    width: 280px;
  }

  #masthead.site-header::after {
    right: calc((100vw - min(100vw, 1500px)) / 2 + 64px);
    width: 160px;
  }

  #masthead .site-branding::after {
    white-space: pre;
    width: 980px;
    font-size: clamp(26px, 2.1vw, 44px);
  }
}

@media (max-width: 680px) {
  #masthead .site-branding {
    display: block;
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 10px;
    padding-right: 10px;
  }

  #masthead .site-branding::before {
    left: 10px;
    top: 10px;
    transform: none;
    width: 74px;
  }

  #masthead.site-header::after {
    right: 10px;
    top: 10px;
    transform: none;
    width: 56px;
  }

  #masthead .site-branding::after {
    width: auto;
    top: 0;
    margin-top: 68px;
    padding: 0 6px;
    font-size: clamp(20px, 7.2vw, 34px);
    line-height: 1.08;
  }
}

/* HOTFIX: compact centered menu (no stretched distribution) */
#masthead .primary-menu-container > ul {
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  justify-content: center !important;
  gap: 40px !important;
}

#masthead .primary-menu-container > ul > li {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
}

#masthead .primary-menu-container > ul > li > a {
  white-space: nowrap !important;
}

@media (max-width: 782px) {
  #masthead .menu-button-container,
  #masthead #primary-mobile-menu {
    display: none !important;
  }

  #masthead .primary-navigation {
    position: static !important;
    clear: both;
    margin: 0;
    padding: 10px 12px;
    width: 100%;
    background: var(--eou-menu-strip) !important;
  }

  #masthead .primary-menu-container {
    display: block !important;
    position: static !important;
    inset: auto !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    overflow: visible !important;
    background: var(--eou-menu-strip) !important;
  }

  #masthead .primary-menu-container > ul {
    width: 100% !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px 16px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  #masthead .primary-menu-container > ul > li {
    width: auto !important;
    flex: 0 0 auto !important;
  }

  #masthead .primary-menu-container > ul > li > a {
    display: inline-block;
    width: auto;
    padding: 8px 0;
    font-size: 0.95rem;
    white-space: nowrap !important;
  }
}

@media only screen and (max-width: 481.98px) {
  #masthead.site-header.has-logo.has-title-and-tagline.has-menu {
    display: block;
  }

  #masthead.site-header.has-title-and-tagline .site-branding {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

.eou-floating-menu {
  display: none;
}

@media (max-width: 782px) {
  .eou-floating-menu {
    display: block;
  }

  .eou-floating-menu__trigger {
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    border: 1px solid #7fa2b3;
    border-radius: 999px;
    background: #ffffff;
    color: #1f2a37;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 10px 12px;
    box-shadow: 0 6px 16px rgba(10, 25, 35, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(12px) scale(0.96);
    will-change: transform, opacity;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .eou-floating-menu__trigger.is-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(-50%) translateX(0) scale(1);
  }

  .eou-floating-menu__panel {
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) translateX(18px) scale(0.98);
    width: min(72vw, 260px);
    max-height: 70vh;
    overflow: auto;
    z-index: 1000;
    background: var(--eou-menu-strip);
    border: 1px solid #8eb3c2;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 10px 28px rgba(10, 25, 35, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    will-change: transform, opacity;
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .eou-floating-menu__panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0) scale(1);
  }

  .eou-floating-menu__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .eou-floating-menu__list li {
    margin: 0;
    padding: 0;
  }

  .eou-floating-menu__list a {
    display: block;
    padding: 8px 4px;
    color: #1f2a37;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .eou-floating-menu__list .current-menu-item > a,
  .eou-floating-menu__list .current_page_item > a {
    color: var(--eou-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eou-floating-menu__trigger,
  .eou-floating-menu__panel {
    transition: none;
  }
}
