/* Alignment only: preserve existing colors, shapes and horizontal spacing. */
.btn, a.btn-contribute, .submit-btn, .advertise-button, .contribute-button,
#load-more, #load-more-magazine, #load-more-report, #cookie-banner button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}
#load-more, #load-more-magazine, #load-more-report {
    padding-top: 9px;
    padding-bottom: 9px;
}
.hbspt-form .hs-button {
    text-align: center !important;
    vertical-align: middle;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    height: auto !important;
}
a.btn-contribute { top: 0; }
/* Align the normal header logo and account/subscribe controls on one center line. */
#top-nav .contener-flex { align-items: center; }
#top-nav .site-branding { top: 0; }
#top-nav .site-logo { display: flex; align-items: center; }
#top-nav .custom-logo-link { display: block; line-height: 0; }
#top-nav .custom-logo { display: block; }
#top-nav .text-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .auto-reveal, .reveal-scroll, .reveal-onload {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
/* A closed search overlay must not leave invisible keyboard targets. */
.search-popup:not(.active) { visibility: hidden; pointer-events: none; }
/* Existing magazine/report columns otherwise overflow small viewports. */
@media (max-width: 768px) {
    .books-template { grid-template-columns: minmax(0, 1fr); }
    .books-template > div { min-width: 0; }
    .col-floating-mag, .col-content-mag { padding-top: 30px; padding-bottom: 30px; }
    .cover-issue { position: static; text-align: center; }
    .cover-issue img { display: block; max-width: 250px; }
    .cover-issue .btn, .cover-issue .sharing-section { margin-left: 0; }
    .books-template h1 { font-size: 36px; line-height: 1.15; }
    .books-template .form-columns-2 { grid-template-columns: minmax(0, 1fr); }
    .books-template .hs-form-field { min-width: 0; }
    .books-template .hs-input:not([type=checkbox]):not([type=radio]) { max-width: 100%; box-sizing: border-box; }
    .col-content-mag { overflow-wrap: break-word; }
}
/* Explore is a label, so it needs its own flex alignment (including Safari). */
.open-menu.sidebarIconToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 34px;
    top: 0;
    box-sizing: border-box;
    line-height: 20px;
    padding: 8px 10px 6px;
    vertical-align: middle;
}
.open-menu.sidebarIconToggle i {
    margin: 0;
    line-height: 1;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .open-menu.sidebarIconToggle { gap: 0; }
}
/* Optical centering for Helvetica Neue in the search overlay. */
.search-popup .submit-btn {
    min-height: 40px;
    line-height: 20px;
    padding: 12px 12px 8px;
}
#close-search-popup {
    padding: 0;
    line-height: 1;
}
/* Match the optical text center in the header's compact pill buttons. */
a.btn-contribute.gecko-btn {
    padding-top: 9.5px;
    padding-bottom: 5.5px;
}
.main-menu #theme-menu-list li a,
.main-menu #category-menu-list li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    vertical-align: middle;
    line-height: 20px;
    padding: 5px 8px 3px;
}

/* Center the complete navigation row, without legacy baseline/top offsets. */
#sub-nav { padding-top: 10px; padding-bottom: 10px; }
#sub-nav .contener > .flex { align-items: center; }
#sub-nav .main-menu { margin-top: 0; }
.main-menu #theme-menu-list,
.main-menu #category-menu-list {
    display: flex;
    align-items: center;
    margin-top: 0;
    padding-bottom: 0;
}
#sub-nav .theme-menu-container,
#sub-nav .category-menu-container {
    height: auto;
    margin-top: 0;
    padding-top: 0;
}

/* One continuous, fading scroll row: contextual links followed by admin extras. */
#sub-nav .contener-flex { align-items: center; gap: 12px; }
#sub-nav .sub-nav-links { flex: 1 1 auto; min-width: 0; }
#sub-nav .sub-nav-links > .open-menu { flex: 0 0 auto; white-space: nowrap; }
#sub-nav .sub-nav-search { flex: 0 0 auto; }
@media (min-width: 769px) {
    #sub-nav .sub-nav-search { display: flex; align-items: center; }
    #sub-nav #open-search-popup {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        top: 0;
        width: 34px;
        height: 34px;
        padding: 0;
        box-sizing: border-box;
    }
}
@media (max-width: 768px) {
    #sub-nav #open-search-popup { top: 0; }
    .stickyheader #sub-nav .sub-nav-search { display: flex; align-items: center; }
    .stickyheader #sub-nav .open-menu.sidebarIconToggle,
    .stickyheader #sub-nav #open-search-popup {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        top: 0;
    }
    .stickyheader #sub-nav .sticky-titleage { margin-top: 0; }
}
#sub-nav .main-menu {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
    padding: 4px 0;
}
#sub-nav .main-menu::-webkit-scrollbar { display: none; }
#sub-nav .sub-nav-menu-inner {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 6px;
    padding: 0 8px;
}
#sub-nav .theme-menu-container,
#sub-nav .category-menu-container {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
    padding: 0;
}
#sub-nav #theme-menu-list,
#sub-nav #category-menu-list,
#sub-nav #sub-nav-extra-list {
    display: flex;
    align-items: center;
    width: max-content;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
#sub-nav .sub-nav-menu-inner > *,
#sub-nav .sub-nav-menu-inner li { flex: 0 0 auto; white-space: nowrap; }
#sub-nav #sub-nav-extra-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 20px;
    padding: 5px 8px 3px;
    border-radius: 30px;
    color: #8F8F8F;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
}
#sub-nav #sub-nav-extra-list a:hover,
#sub-nav #sub-nav-extra-list .current-menu-item > a { color: #171817; background: #F2F2F2; }
.stickyheader #sub-nav .sub-nav-links { flex: 0 0 auto; }
#sub-nav .sticky-titleage { min-width: 0; }

/* Keep the homepage logo inside the sticky row without vertical clipping. */
.home .stickyheader #sub-nav .sticky-titleage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-top: 0;
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
}
.home .stickyheader #sub-nav .sticky-titleage .custom-logo {
    display: block;
    position: static;
    width: 130px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}
/* Preserve button heights while lowering Helvetica's visible glyphs by 2px. */
.page-template-planet a.btn.alt {
    padding-top: 10px;
    padding-bottom: 6px;
}
#register-gecko {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    vertical-align: middle;
    line-height: 16px;
    padding-top: 12px;
    padding-bottom: 8px;
}

/* Shade the text on the left and reveal the photo toward the right. */
.carousel-home .overlay {
    background: linear-gradient(90deg,
        rgba(0, 0, 0, .60) 0%,
        rgba(0, 0, 0, .35) 35%,
        rgba(0, 0, 0, .10) 65%,
        rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}
.carousel-home .title,
.carousel-home #slide-desc,
.carousel-home #slide-link {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .65);
}

/* Let Flickity handle movement and keep the edge fade inside the card viewport. */
#interviews::after { display: none; }
.home #interviews { padding-bottom: 90px; }
#interviews > .contener { container-type: inline-size; }
#interviews .main-carousel { width: calc(50% + 50vw); }
#interviews .flickity-viewport { overflow: hidden; }
#interviews .flickity-viewport::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: clamp(60px, 12vw, 220px);
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
    z-index: 2;
}
#interviews .carousel-cell {
    width: calc(25cqw - 30px);
    opacity: 1;
    transition: none !important;
    transform: none;
}
/* Keep both arrows aligned with the heading and the rule beside them. */
#interviews .main-carousel .flickity-prev-next-button.previous,
#interviews .main-carousel .flickity-prev-next-button.next {
    position: absolute;
    top: calc(100% + 37px);
    bottom: auto;
    right: auto;
    width: 53px;
    height: 53px;
    box-sizing: border-box;
    margin: 0;
    transform: none;
}
#interviews .flickity-prev-next-button.previous { left: 0; }
#interviews .flickity-prev-next-button.next { left: 83px; }
#interviews .main-carousel.flickity-enabled.is-draggable::after {
    left: 166px;
    right: auto;
    width: calc(100cqw - 166px);
    top: calc(100% + 63px);
    bottom: auto;
}
@media (max-width: 768px) {
    #interviews .carousel-cell { width: calc(80cqw - 15px); }
}

/* Series thumbnails follow the image height instead of the generic 200px card. */
.series-boxe .card .thumbnail-content {
    display: block;
    height: auto;
}
.series-boxe .card .thumbnail-content > a {
    position: static;
    display: block;
    height: auto;
}
.series-boxe .card .thumbnail-content img {
    display: block;
    width: 100%;
    height: auto;
}

/* Explore-only menus follow the existing primary navigation styling. */
#sidebarMenu .sidebar-extra-navigation .menu-wrapper {
	list-style: none;
	padding: 0;
	margin: 0;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper li {
	text-align: left;
	width: 100%;
	position: relative;
	margin-bottom: 10px;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper li ul li {
	margin-bottom: 0px;
	padding: 5px 0px;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper li ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper .sub-menu {
	opacity: 0;
	visibility: hidden;
	transition: .5s all;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper .open .sub-menu {
	opacity: 1;
	visibility: visible;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper .menu-item a {
	color:#000000;
	padding: 5px 0px;
	width: 100%;
	font-size: 21px;
	line-height: 1.3;
	font-weight: 800;
	display: block;
	transition: opacity .25s ease-in-out;
	opacity: 1!important;
	background: none;
	text-decoration-thickness: 0px;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper .menu-item a:hover {
	opacity: .6!important;
	font-weight: 800;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper .menu-item .sub-menu a {
	color:#56668A;
	width: 100%;
	font-size: 15px;
	line-height: 1;
	padding: 0px;
	font-weight: 400;
	display: block;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper .menu-item .sub-menu-toggle {
	background-color: #E8E8E8;
	border:0px;
	color:#000;
	border-radius: 40px;
	display: flex;
	width: 30px;
	height: 30px;
	justify-content: center;
	align-items: center;
	position: absolute;
	top:3px;
	right: 0px;
	line-height: 0px;
	padding: 0;
	z-index: 0;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper li.open .icon-plus, #sidebarMenu .sidebar-extra-navigation .menu-wrapper li .icon-minus {
	display: none;
}

#sidebarMenu .sidebar-extra-navigation .menu-wrapper li.open .icon-minus, #sidebarMenu .sidebar-extra-navigation .menu-wrapper li .icon-plus {
	display: block;
}
#sidebarMenu .sidebar-extra-navigation > .menu-wrapper { padding: 0; }
#sidebarMenu .sidebar-extra-navigation .sidebar-group-title {
    display: block;
    padding: 5px 40px 5px 0;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 800;
    color: #000;
}
#sidebarMenu .sidebar-extra-navigation .sub-menu-toggle[aria-expanded="true"] ~ .sub-menu {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
}
#sidebarMenu .sidebar-extra-navigation .sub-menu-toggle[aria-expanded="true"] .icon-plus,
#sidebarMenu .sidebar-extra-navigation .sub-menu-toggle[aria-expanded="false"] .icon-minus {
    display: none;
}
#sidebarMenu .sidebar-extra-navigation .sub-menu-toggle[aria-expanded="true"] .icon-minus {
    display: block;
}
