/* The Author Central — contained header within the site-wide 1400px max-width.
   Desktop: centered menu, left-aligned logo and right-aligned phone.
   Mobile: preserve the existing hamburger, dropdowns and safe gutters. */

@media (min-width: 1201px) {
  header.desktop-head .main-header > .container {
    width: 100% !important;
    max-width: var(--tac-site-container-width, 1400px) !important;
    padding-left: clamp(16px, 1.5vw, 24px) !important;
    padding-right: clamp(16px, 1.5vw, 24px) !important;
  }
  header.desktop-head .main-header > .container > .row {
    display: grid !important;
    grid-template-columns: minmax(155px, 1fr) max-content minmax(155px, 1fr);
    align-items: center;
    width: 100%;
    margin: 0 !important;
  }
  header.desktop-head .main-header .row > .logo-box,
  header.desktop-head .main-header .row > .menu-box-new,
  header.desktop-head .main-header .row > .col-md-3 {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
  }
  header.desktop-head .main-header .row > .logo-box {
    grid-column: 1;
    justify-self: start;
    text-align: left;
  }
  header.desktop-head .main-header .row > .menu-box-new {
    grid-column: 2;
    justify-self: center;
    text-align: center;
  }
  header.desktop-head .main-header .row > .col-md-3 {
    grid-column: 3;
    justify-self: end;
    text-align: right;
  }
  header.desktop-head .logo-box a.logo {
    display: inline-flex;
    align-items: center;
    margin: 0 !important;
  }
  header.desktop-head .menu-box-new .menuWrap {
    width: auto;
    margin: 0 !important;
  }
  header.desktop-head .main-header ul.menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: clamp(12px, 1.45vw, 23px);
    width: max-content;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap;
  }
  header.desktop-head .main-header ul.menu > li {
    display: block;
    flex: none;
    margin: 0 !important;
  }
  header.desktop-head ul.header-cta-new {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0 !important;
    padding: 0 !important;
  }
  header.desktop-head ul.header-cta-new > li {
    margin: 0 !important;
  }
  header.desktop-head ul.header-cta-new > li > a {
    white-space: nowrap;
    text-align: right;
  }
  /* Keep the existing Genre hover flyout inside narrow desktop viewports.
     The original panel used 43vw and could project a few pixels past the edge. */
  header.desktop-head .tac-genre-menu .tac-genre-group > .tac-genre-panel:not(.is-flipped) {
    width: min(625px, calc(43vw - 18px)) !important;
  }
}

/* The existing hamburger navigation begins at 1200px, so preserve that
   breakpoint and its JavaScript. Only correct the header's outer alignment. */
@media (max-width: 1200px) {
  header.desktop-head .main-header > .container {
    width: 100% !important;
    max-width: var(--tac-site-container-width, 1400px) !important;
    padding-left: clamp(16px, 2vw, 20px) !important;
    padding-right: clamp(16px, 2vw, 20px) !important;
  }
  header.desktop-head .main-header > .container > .row {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    margin: 0 !important;
  }
  header.desktop-head .main-header .row > .logo-box {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  header.desktop-head .main-header .row > .col-md-3 {
    margin-left: auto !important;
    padding-left: 8px !important;
    padding-right: 49px !important;
    width: auto !important;
    max-width: none !important;
  }
  header.desktop-head .main-header ul.header-cta-new {
    margin: 0 !important;
    padding: 0 !important;
    justify-content: flex-end;
  }
  header.desktop-head .menu-Bar {
    right: 0 !important;
  }
}

@media (max-width: 480px) {
  header.desktop-head .logo-box .logo img {
    width: auto !important;
    max-width: 97px !important;
    max-height: 73px !important;
  }
  header.desktop-head .main-header .row > .col-md-3 {
    padding-right: 40px !important;
    padding-left: 4px !important;
  }
  header.desktop-head ul.header-cta-new > li > a {
    font-size: 12px !important;
    gap: 4px !important;
  }
  header.desktop-head ul.header-cta-new > li > a i {
    font-size: 12px !important;
    padding-right: 0 !important;
  }
  header.desktop-head .menu-Bar {
    width: 26px;
  }
}

@media (max-width: 350px) {
  header.desktop-head .logo-box .logo img {
    max-width: 82px !important;
    max-height: 62px !important;
  }
  header.desktop-head ul.header-cta-new > li > a {
    font-size: 11px !important;
  }
}
