/* =========================================================
   Entrepreneurship One Magazine -- header
   Layout modelled on the Newspaper "Pulses PRO" header:
   black top strip, centred logo row with date, bordered
   nav strip with mega menus, sticky bar and mobile drawer.
   ========================================================= */

:root {
  --eo-accent:        #e8232b;   /* red from the logo */
  --eo-accent-dark:   #c2161d;
  --eo-ink:           #000;
  --eo-ink-soft:      #222;
  --eo-muted:         #747474;
  --eo-line:          #ededed;
  --eo-line-strong:   #dcdcdc;
  --eo-topbar-bg:     #000;
  --eo-topbar-text:   #fff;
  --eo-container:     1460px;
  /* The side gutter. Anything that spans the window swaps in the wide one,
     and the mega menu reads the same value so it lines up with the menu. */
  --eo-gutter:        20px;
  --eo-gutter-wide:   clamp(16px, 2.2vw, 46px);
  --eo-nav-h:         51px;
  /* Barlow throughout. Both tokens point at it, so every rule that
     already asks for one of them follows - there is nothing to mark
     !important, because nothing is competing. */
  --eo-font:          Barlow, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --eo-font-serif:    Barlow, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --eo-shadow:        0 2px 6px rgba(0, 0, 0, .12);
  --eo-shadow-lg:     0 12px 30px rgba(0, 0, 0, .14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--eo-font);
  color: var(--eo-ink-soft);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.eo-container {
  width: 100%;
  max-width: var(--eo-container);
  margin: 0 auto;
  padding: 0 var(--eo-gutter);
}

/* The header spans the window on every page, so the menu stays exactly where
   it is as you move between pages. */
.eo-topbar,
.eo-logobar,
.eo-nav,
.eo-search,
.eo-sticky {
  --eo-gutter: var(--eo-gutter-wide);
}

.eo-topbar .eo-container,
.eo-logobar .eo-container,
.eo-nav .eo-container,
.eo-search .eo-container,
.eo-sticky .eo-container {
  max-width: none;
}

/* The footer's dark band spans the window, but its columns stay in the
   measured container: four link lists stretched over 1900px read as four
   separate things rather than one footer. It is capped the same on every
   page, so nothing shifts there either. */

/* The homepage spans the window too; the article and archive pages keep the
   measured column, because long text needs a readable line length. */
.eo-body--wide .eo-main {
  --eo-gutter: var(--eo-gutter-wide);
}

.eo-body--wide .eo-main .eo-container {
  max-width: none;
}

.eo-topbar a,
.eo-logobar a,
.eo-nav a,
.eo-sticky a,
.eo-mobile a { text-decoration: none; }

.eo-topbar ul,
.eo-logobar ul,
.eo-nav ul,
.eo-sticky ul,
.eo-mobile ul { list-style: none; margin: 0; padding: 0; }

/* ---------------------------------------------------------
   1. Top bar
   --------------------------------------------------------- */
.eo-topbar {
  background: var(--eo-topbar-bg);
  color: var(--eo-topbar-text);
  font-size: 13px;
  line-height: 1;
}

.eo-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
}

.eo-topbar__menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.eo-topbar__menu a {
  display: inline-block;
  padding: 9px 11px;
  color: rgba(255, 255, 255, .82);
  transition: color .2s ease;
}

.eo-topbar__menu li:first-child a { padding-left: 0; }
.eo-topbar__menu a:hover { color: #fff; }

/* social icons sit at the right of the black strip (see also the
   .eo-topbar-scoped rules below the generic .eo-socials block) */
.eo-socials--bar { gap: 0; }

/* ---------------------------------------------------------
   2. Logo row
   --------------------------------------------------------- */
.eo-logobar { background: #fff; }

.eo-logobar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.eo-logobar__left  { display: flex; align-items: center; gap: 14px; }
.eo-logobar__right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }

/* logo */
.eo-logobar__center { text-align: center; }

.eo-logo img {
  display: block;
  margin: 0 auto;
  /* The artwork includes the strapline, which takes about a third of its
     height -- hence the taller box than the wordmark alone needed. */
  height: 76px;
  width: auto;
  max-width: 100%;
}

/* socials */
.eo-socials { display: flex; align-items: center; gap: 2px; }

.eo-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  color: var(--eo-ink);
  transition: color .2s ease, transform .2s ease;
}

.eo-socials a:hover { color: var(--eo-accent); transform: translateY(-1px); }

.eo-topbar .eo-socials--bar a {
  width: 30px;
  height: 30px;
  font-size: 13px;
  color: rgba(255, 255, 255, .82);
}

.eo-topbar .eo-socials--bar a:hover { color: #fff; transform: none; }
.eo-topbar .eo-socials--bar li:last-child a { width: 22px; }

.eo-search-btn {
  border: 0;
  background: none;
  width: 34px;
  height: 34px;
  margin-left: 6px;
  font-size: 15px;
  color: var(--eo-ink);
  cursor: pointer;
  transition: color .2s ease;
}

.eo-search-btn:hover,
.eo-search-btn.is-active { color: var(--eo-accent); }

/* burger (shown under 1020px) */
.eo-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.eo-burger span {
  display: block;
  height: 2px;
  width: 20px;
  background: var(--eo-ink);
  border-radius: 2px;
  transition: background .2s ease;
}

.eo-burger:hover span { background: var(--eo-accent); }

/* ---------------------------------------------------------
   3. Main nav
   --------------------------------------------------------- */
.eo-nav {
  background: #fff;
  border-top: 1px solid var(--eo-line);
  border-bottom: 1px solid var(--eo-line);
  position: relative;
  z-index: 60;
}

.eo-nav__inner { display: flex; justify-content: center; position: relative; }

.eo-menu {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
}

.eo-menu__item { position: relative; }

/* mega panels span the container, so their item must not be the
   positioning context -- only the small dropdowns need that */
.eo-menu__item.has-mega { position: static; }

.eo-menu__item > a {
  display: flex;
  align-items: center;
  gap: 5px;
  height: var(--eo-nav-h);
  padding: 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.5px;
  text-transform: uppercase;
  color: var(--eo-ink);
  transition: color .2s ease;
}

.eo-menu__item.is-active > a,
.eo-menu__item:hover > a { color: var(--eo-accent); }

.eo-caret { font-size: 11px; opacity: .75; transition: transform .2s ease; }
.eo-menu__item:hover .eo-caret { transform: rotate(180deg); }

/* red underline on the active / hovered item */
.eo-menu__item::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: var(--eo-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .22s ease;
}

.eo-menu__item.is-active::after,
.eo-menu__item:hover::after { transform: scaleX(1); }

/* --- plain dropdown --- */
.eo-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 212px;
  padding: 6px 0;
  background: #fff;
  border-top: 2px solid var(--eo-accent);
  box-shadow: var(--eo-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 70;
}

.eo-menu__item:hover > .eo-submenu,
.eo-menu__item.is-open > .eo-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.eo-submenu a {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--eo-ink-soft);
  transition: background .2s ease, color .2s ease;
}

.eo-submenu a:hover { background: #fafafa; color: var(--eo-accent); }

/* --- mega menu --- */
.eo-mega {
  position: absolute;
  top: 100%;
  left: var(--eo-gutter);
  right: var(--eo-gutter);
  transform: translateY(8px);
  background: #fff;
  border-top: 2px solid var(--eo-accent);
  box-shadow: var(--eo-shadow-lg);
  padding: 30px 0 34px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 70;
}

.eo-menu__item:hover > .eo-mega,
.eo-menu__item.is-open > .eo-mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* the panel is already container-width: the inner wrapper only adds gutters */
.eo-mega > .eo-container { max-width: none; }

.eo-mega__posts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.eo-card__thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f2f2f2;
  aspect-ratio: 16 / 10;
}

.eo-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.eo-card:hover .eo-card__thumb img { transform: scale(1.05); }

.eo-badge {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 4px 8px;
  background: var(--eo-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.eo-card__title {
  margin: 14px 0 5px;
  font-family: var(--eo-font-serif);
  font-size: 16px;
  line-height: 1.26;
  font-weight: 700;
}

.eo-card__title a { color: var(--eo-ink-soft); transition: color .2s ease; }
.eo-card__title a:hover { color: var(--eo-accent); }

/* the mega-menu cards show no date, so nothing follows the title */
.eo-card__title { margin-bottom: 0; }

/* ---------------------------------------------------------
   4. Search panel
   --------------------------------------------------------- */
.eo-search {
  border-bottom: 1px solid var(--eo-line);
  background: #fff;
  overflow: hidden;
  animation: eo-slide-down .25s ease;
}

@keyframes eo-slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.eo-search__form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0 10px;
}

.eo-search__input {
  flex: 1;
  border: 0;
  border-bottom: 2px solid var(--eo-line-strong);
  padding: 10px 2px;
  font-family: inherit;
  font-size: 20px;
  outline: none;
  background: transparent;
}

.eo-search__input:focus { border-bottom-color: var(--eo-accent); }

.eo-search__submit {
  border: 0;
  background: var(--eo-accent);
  color: #fff;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: background .2s ease;
}

.eo-search__submit:hover { background: var(--eo-accent-dark); }

.eo-search__hint {
  padding-bottom: 20px;
  font-size: 12px;
  color: var(--eo-muted);
}

.eo-search__hint a {
  color: var(--eo-ink-soft);
  margin-left: 8px;
  border-bottom: 1px dotted var(--eo-line-strong);
}

.eo-search__hint a:hover { color: var(--eo-accent); }

/* ---------------------------------------------------------
   5. Sticky bar
   --------------------------------------------------------- */
.eo-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--eo-line);
  box-shadow: var(--eo-shadow);
  transform: translateY(-100%);
  transition: transform .3s ease;
  z-index: 90;
}

.eo-sticky.is-visible { transform: translateY(0); }

.eo-sticky__inner {
  display: flex;
  align-items: center;
  justify-content: center;   /* logo, menu and search sit as one centred group */
  gap: 18px;
  height: 56px;
}

.eo-sticky__logo img {
  height: 40px;
  width: auto;
  display: block;
}

.eo-sticky__menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

.eo-sticky__menu a {
  display: block;
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.3px;
  text-transform: uppercase;
  color: var(--eo-ink);
  transition: color .2s ease;
}

.eo-sticky__menu a:hover,
.eo-sticky__menu li.is-active a { color: var(--eo-accent); }

/* ---------------------------------------------------------
   6. Mobile drawer
   --------------------------------------------------------- */
.eo-mobile {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  pointer-events: none;
}

.eo-mobile.is-open { visibility: visible; pointer-events: auto; }

.eo-mobile__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .25s ease;
}

.eo-mobile.is-open .eo-mobile__backdrop { opacity: 1; }

.eo-mobile__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(330px, 86vw);
  background: #1b1b1b;
  color: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .3s ease;
  overflow-y: auto;
}

.eo-mobile.is-open .eo-mobile__panel { transform: translateX(0); }

.eo-mobile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.eo-socials--light a { color: rgba(255, 255, 255, .8); width: 30px; height: 30px; }
.eo-socials--light a:hover { color: #fff; }

.eo-mobile__close {
  border: 0;
  background: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.eo-mobile__search {
  display: flex;
  padding: 16px 18px;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.eo-mobile__search input {
  flex: 1;
  border: 0;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.eo-mobile__search input::placeholder { color: rgba(255, 255, 255, .5); }

.eo-mobile__search button {
  border: 0;
  background: var(--eo-accent);
  color: #fff;
  width: 42px;
  cursor: pointer;
}

.eo-mobile__menu { padding: 8px 0; }

.eo-mobile__menu > li {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.eo-mobile__menu > li > a {
  display: block;
  padding: 13px 52px 13px 18px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.3px;
  color: #fff;
}

.eo-mobile__menu > li > a:hover { color: var(--eo-accent); }

.eo-mobile__toggle {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 42px;
  height: 40px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
  font-size: 14px;
}

.eo-mobile__toggle i { transition: transform .2s ease; }
.eo-mobile__menu > li.is-open .eo-mobile__toggle i { transform: rotate(90deg); }

.eo-mobile__sub {
  display: none;
  padding: 2px 0 10px;
  background: rgba(0, 0, 0, .25);
}

.eo-mobile__menu > li.is-open .eo-mobile__sub { display: block; }

.eo-mobile__sub a {
  display: block;
  padding: 9px 18px 9px 32px;
  font-size: 13px;
  color: rgba(255, 255, 255, .75);
}

.eo-mobile__sub a:hover { color: #fff; }

.eo-mobile__foot {
  margin-top: auto;
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.eo-mobile__signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

body.eo-no-scroll { overflow: hidden; }

/* ---------------------------------------------------------
   7. Breakpoints
   --------------------------------------------------------- */
@media (max-width: 1200px) {
  .eo-menu__item > a { padding: 0 8px; font-size: 14px; }
}

@media (max-width: 1020px) {
  .eo-burger { display: flex; }
  .eo-nav { display: none; }
  .eo-sticky__menu { display: none; }
  .eo-sticky__inner { justify-content: space-between; }
  .eo-logobar__inner { padding: 16px 20px; }
  .eo-logo img { height: 70px; }
}

@media (max-width: 767px) {
  .eo-topbar__menu { display: none; }
  .eo-topbar__inner { justify-content: flex-end; }
  .eo-topbar .eo-socials--bar a { width: 27px; }
  .eo-logo img { height: 54px; }
  .eo-search__input { font-size: 16px; }
}

@media (max-width: 420px) {
  .eo-logobar__inner { gap: 8px; }
  .eo-topbar .eo-socials--bar a { width: 24px; font-size: 12px; }
  .eo-logo img { height: 46px; }
}
