/* Production publication icon sizing. */
.dp-icon {
    display: flex;
    align-items: center;
}

.dp-icon img {
    width: 32px !important;
    height: 32px !important;
    max-width: none !important;
}

.cig-header-tagline {
    width: 80%;
    text-align: left;
}

.cig-header-tagline h3 {
    margin: 0;
    color: #b7262b;
    font-size: 29px;
}

/* Homepage Quick Links panel (previously stored only as Diplomat Custom CSS). */
.tmm-custom-menu-box {
    padding: 20px;
    background: #b7262b;
    color: #fff;
}

.tmm-custom-menu-box .tmm-menu-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #fff;
    font-size: 16px;
    font-weight: normal;
}

.tmm-custom-menu-box .tmm-menu-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tmm-custom-menu-box .tmm-menu-list li {
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, .3);
}

.tmm-custom-menu-box .tmm-menu-list li:first-child {
    border-top: 0;
}

.tmm-custom-menu-box .tmm-menu-list a {
    color: #fff;
    font-weight: normal;
    text-decoration: none;
}

.tmm-custom-menu-box .tmm-menu-list a:hover {
    opacity: .7;
}

.tmm-custom-menu-box .arrow-icon {
    font-size: 18px;
    font-weight: bold;
}

/* Homepage Recent Publications panel. */
.diplomat-publications-box .dp-tabs {
    display: flex;
    margin-bottom: 15px;
}

.diplomat-publications-box .dp-tab {
    width: 50%;
    padding: 12px 20px;
    background: #a31e22;
    color: #fff;
    cursor: pointer;
    font-weight: normal;
}

.diplomat-publications-box .dp-tab.active {
    background: #7a0f12;
}

.diplomat-publications-box .dp-tab a {
    color: #fff;
    text-decoration: none;
}

.diplomat-publications-box .dp-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 15px;
    background: #cdcdcd;
}

.diplomat-publications-box .dp-content {
    padding-left: 8px;
}

.diplomat-publications-box .dp-title {
    margin: 0;
}

.diplomat-publications-box .dp-title a {
    color: #333;
    font-size: 14px;
    font-weight: normal;
    text-decoration: none;
}

.diplomat-publications-box .dp-title a:hover {
    text-decoration: underline;
}

/* Requested footer heading treatment. */
#footer .footer-top .large-4:first-child .widget-title,
#footer .footer-top .large-4:first-child h3,
#footer .footer-top .large-4:first-child h4 {
    color: #8b8b8b;
}

/* Homepage lead story: viewport-wide image hero inspired by BFPE. */
body.home #content {
    padding-top: 0;
}

body.home #content > .large-12.columns:first-child {
    display: none;
}

body.home #main > .post-list.full-width:first-child {
    width: 100vw;
    max-width: none;
    margin-right: 0;
    margin-left: calc(50% - 50vw + .46875rem);
}

body.home #main > .post-list.full-width:first-child > article {
    padding: 0;
}

body.home #main > .post-list.full-width:first-child .post {
    position: relative;
    height: calc(100vh - 92px);
    min-height: 560px;
    max-height: 900px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
}

body.home #main > .post-list.full-width:first-child .post::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .04) 42%, rgba(0, 0, 0, .72) 100%);
    content: '';
    pointer-events: none;
}

body.home #main > .post-list.full-width:first-child .image-post,
body.home #main > .post-list.full-width:first-child .image-post img {
    width: 100%;
    height: 100%;
}

body.home #main > .post-list.full-width:first-child .image-post img {
    display: block;
    object-fit: cover;
    object-position: center;
}

body.home #main > .post-list.full-width:first-child .image-post::after {
    display: none;
}

body.home #main > .post-list.full-width:first-child .image-post:hover img {
    opacity: 1;
    transform: scale(1.025);
}

body.home #main > .post-list.full-width:first-child .entry-header,
body.home #main > .post-list.full-width:first-child .entry-footer {
    position: absolute;
    right: max(24px, calc((100vw - 1170px) / 2));
    left: max(24px, calc((100vw - 1170px) / 2));
    z-index: 2;
}

body.home #main > .post-list.full-width:first-child .entry-header {
    bottom: 82px;
    max-width: 900px;
}

body.home #main > .post-list.full-width:first-child .entry-title {
    margin: 0;
    font-size: clamp(30px, 3vw, 54px);
    line-height: 1.12;
}

body.home #main > .post-list.full-width:first-child .entry-title a,
body.home #main > .post-list.full-width:first-child .entry-footer a {
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .45);
}

body.home #main > .post-list.full-width:first-child .entry-footer {
    bottom: 32px;
    border: 0;
}

body.home #main > .post-list.full-width:first-child .post.border::after {
    display: none;
}

/* Publications archive header and breadcrumb layout. */
body.post-type-archive-publication #content {
    padding-top: 0;
}

body.post-type-archive-publication #content > .large-12.columns .page-title {
    margin-bottom: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}

body.post-type-archive-publication .publication-archive > .page-header {
    width: calc(150% + 15px);
    margin-bottom: 58px;
    padding-bottom: 16px;
    border-bottom: 1px dashed #ababab;
}

body.post-type-archive-publication .publication-archive > .page-header .page-title {
    margin: 0;
    padding: 0;
    border: 0;
    color: #262626;
    font-family: "Roboto Slab", serif;
    font-size: 2.125rem;
    font-weight: 400;
    line-height: 1.2;
}

body.post-type-archive-publication #sidebar {
    margin-top: 70px;
}

/* Consistent breadcrumb/title treatment for generated listing pages. */
body.blog #content,
body.archive:not(.post-type-archive-publication) #content,
body.search #content {
    padding-top: 0;
}

body.blog #content > .large-12.columns .page-title,
body.archive:not(.post-type-archive-publication) #content > .large-12.columns .page-title,
body.search #content > .large-12.columns .page-title {
    display: flex;
    flex-direction: column;
    margin-bottom: 58px;
    padding: 0;
    border-bottom: 1px dashed #ababab;
    text-transform: uppercase;
}

body.blog #content > .large-12.columns .page-title .breadcrumbs,
body.archive:not(.post-type-archive-publication) #content > .large-12.columns .page-title .breadcrumbs,
body.search #content > .large-12.columns .page-title .breadcrumbs {
    order: 1;
    padding-top: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #ababab;
}

body.blog #content > .large-12.columns .page-title > h3,
body.archive:not(.post-type-archive-publication) #content > .large-12.columns .page-title > h3,
body.search #content > .large-12.columns .page-title > h3 {
    order: 2;
    margin: 0;
    padding-top: 16px;
    padding-bottom: 16px;
    color: #262626;
    font-family: "Roboto Slab", serif;
    font-size: 2.125rem;
    font-weight: 400;
    line-height: 1.2;
}

/* Matching full-width headers for the principal information pages. */
body.page-id-6 #content,
body.page-id-8 #content,
body.page-id-12 #content {
    padding-top: 0;
}

body.page-id-6 #content > .large-12.columns .page-title,
body.page-id-8 #content > .large-12.columns .page-title,
body.page-id-12 #content > .large-12.columns .page-title {
    display: flex;
    flex-direction: column;
    margin-bottom: 58px;
    padding: 0;
    border-bottom: 1px dashed #ababab;
    text-transform: uppercase;
}

body.page-id-6 #content > .large-12.columns .page-title .breadcrumbs,
body.page-id-8 #content > .large-12.columns .page-title .breadcrumbs,
body.page-id-12 #content > .large-12.columns .page-title .breadcrumbs {
    order: 1;
    padding-top: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #ababab;
}

body.page-id-6 #content > .large-12.columns .page-title > h3,
body.page-id-8 #content > .large-12.columns .page-title > h3,
body.page-id-12 #content > .large-12.columns .page-title > h3 {
    order: 2;
    margin: 0;
    padding-top: 16px;
    padding-bottom: 16px;
    color: #262626;
    font-family: "Roboto Slab", serif;
    font-size: 2.125rem;
    font-weight: 400;
    line-height: 1.2;
}

/* Individual news articles show breadcrumbs only in the header strip. */
body.single-post #content {
    padding-top: 0;
}

body.single-post #content > .large-12.columns .page-title {
    margin-bottom: 58px;
    padding-top: 14px;
    padding-bottom: 14px;
}

/* CIG header: logo and uppercase navigation share one desktop row. */
@media only screen and (min-width: 48.063em) {
    #header .header-middle {
        display: none;
    }

    #header .header-bottom #navigation {
        display: flex;
        align-items: center;
        min-height: 92px;
    }

    #header #navigation .desktop-nav-logo {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        margin-right: 42px;
        position: relative;
        z-index: 20;
    }

    #header #navigation .desktop-nav-logo .logo {
        float: none;
        margin: 0;
        padding: 0;
    }

    #header #navigation .desktop-nav-logo .tmm_logo {
        display: block;
        line-height: 1;
    }

    #header #navigation .desktop-nav-logo img {
        display: block;
        width: auto;
        max-width: 165px;
        max-height: 70px;
    }

    #header #navigation .menu-primary-menu-container {
        flex: 1 1 auto;
        position: relative;
        z-index: 10;
    }

    #header #navigation .menu-primary-menu-container > ul {
        display: flex;
        align-items: stretch;
    }

    #header #navigation .search-form-nav {
        flex: 0 0 auto;
        margin-left: auto;
    }

    /* Compact desktop menu with the same red used by Quick Links. */
    #header .header-bottom #navigation .menu-primary-menu-container > ul > li > a {
        padding-top: 12px;
        padding-left: 17px;
        padding-right: 17px;
        padding-bottom: 12px;
    }

    /* Short introduction shown below each primary item except Home. */
    #header .header-bottom #navigation a[data-menu-intro]::after {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 100;
        visibility: hidden;
        width: 270px;
        padding: 16px 18px;
        background: #fff;
        border-top: 3px solid #b7262b;
        box-shadow: 0 5px 14px rgba(0, 0, 0, .18);
        color: #555;
        content: attr(data-menu-intro);
        font-family: "Roboto", sans-serif;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.5;
        opacity: 0;
        pointer-events: none;
        text-align: left;
        text-transform: none;
        white-space: normal;
        transform: translateY(8px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    }

    #header .header-bottom #navigation li:nth-last-child(-n+2) > a[data-menu-intro]::after {
        right: 0;
        left: auto;
    }

    #header .header-bottom #navigation li:hover > a[data-menu-intro]::after,
    #header .header-bottom #navigation a[data-menu-intro]:focus::after {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    #header .header-bottom #navigation .menu-primary-menu-container > ul > li:hover > a,
    #header .header-bottom #navigation .menu-primary-menu-container > ul > li.current-menu-item > a,
    #header .header-bottom #navigation .menu-primary-menu-container > ul > li.current_page_item > a,
    #header .header-bottom #navigation .menu-primary-menu-container > ul > li.current-menu-parent > a,
    #header .header-bottom #navigation .menu-primary-menu-container > ul > li.current-menu-ancestor > a,
    #header .header-bottom #navigation .menu-primary-menu-container > ul > li.current_page_parent > a,
    #header .header-bottom #navigation .menu-primary-menu-container > ul > li.current_page_ancestor > a {
        background-color: #b7262b;
        color: #fff;
    }

    /* Applied by cigonline-sticky-menu.js after the navigation reaches the viewport top. */
    #header .header-bottom.cig-menu-is-sticky {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 9990;
        width: 100%;
        box-shadow: 0 2px 7px rgba(0, 0, 0, .18);
    }

    body.admin-bar #header .header-bottom.cig-menu-is-sticky {
        top: 32px;
    }
}

@media only screen and (min-width: 48.063em) and (max-width: 782px) {
    body.admin-bar #header .header-bottom.cig-menu-is-sticky {
        top: 46px;
    }
}

#header #navigation .menu > li > a {
    text-transform: uppercase;
}

@media only screen and (max-width: 48em) {
    body.post-type-archive-publication .publication-archive > .page-header {
        width: 100%;
    }

    body.post-type-archive-publication #sidebar {
        margin-top: 24px;
    }

    body.home #main > .post-list.full-width:first-child .post {
        height: 62vh;
        min-height: 420px;
        max-height: 650px;
    }

    body.home #main > .post-list.full-width:first-child .entry-header,
    body.home #main > .post-list.full-width:first-child .entry-footer {
        right: 20px;
        left: 20px;
    }

    body.home #main > .post-list.full-width:first-child .entry-header {
        bottom: 76px;
    }

    body.home #main > .post-list.full-width:first-child .entry-title {
        font-size: clamp(25px, 7vw, 36px);
    }

    #header {
        position: relative;
    }

    #header .header-top {
        display: none;
    }

    #header .header-middle .header-middle-entry {
        display: flex;
        align-items: center;
        min-height: 78px;
        text-align: left;
    }

    #header .header-middle .header-middle-entry:after,
    #header .header-middle .cig-header-tagline {
        display: none;
    }

    #header .header-middle .header-middle-entry .logo {
        display: block;
        max-width: calc(100% - 64px);
        margin: 0;
        padding: 7px 0;
    }

    #header .header-middle .header-middle-entry .logo img {
        display: block;
        width: auto;
        max-width: 165px;
        max-height: 64px;
    }

    #header .header-bottom,
    #header .header-bottom .row,
    #header .header-bottom .columns {
        position: static;
    }

    #header .header-bottom {
        min-height: 0;
        box-shadow: none;
    }

    #responsive-nav-button {
        position: absolute;
        top: 50%;
        right: 15px;
        z-index: 50;
        margin: 0;
        background-color: #b7262b;
        transform: translateY(-50%);
    }

    #responsive-nav-button:hover,
    #responsive-nav-button:focus,
    #responsive-nav-button:active,
    #advanced-menu-hide,
    #advanced-menu-hide:hover,
    #advanced-menu-hide:focus,
    #advanced-menu-hide:active {
        background-color: #b7262b;
    }

    #header #navigation .desktop-nav-logo {
        display: none;
    }

    #mobile-advanced > .menu-primary-menu-container > ul > li > a,
    #mobile-advanced .menu-primary-menu-container a {
        text-transform: uppercase;
    }

    #mobile-advanced > .menu-primary-menu-container > ul > li > a {
        background-color: #fff;
        color: #262626;
    }

    #mobile-advanced .menu-primary-menu-container li:hover > a,
    #mobile-advanced .menu-primary-menu-container li.current-menu-item > a,
    #mobile-advanced .menu-primary-menu-container li.current_page_item > a,
    #mobile-advanced .menu-primary-menu-container li.current-menu-parent > a,
    #mobile-advanced .menu-primary-menu-container li.current-menu-ancestor > a,
    #mobile-advanced .menu-primary-menu-container li.current_page_parent > a,
    #mobile-advanced .menu-primary-menu-container li.current_page_ancestor > a {
        background-color: #b7262b;
        color: #fff;
    }
}

/* CIG warm, active site palette. */
body {
    background-color: #fff9f1;
    color: #6f7377;
}

#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
    color: #171b1f;
}

#content a:not(.image-post):not(.button),
#sidebar a {
    color: #b3131e;
}

#content a:not(.image-post):not(.button):hover,
#sidebar a:hover {
    color: #d21f2b;
}

#content .entry-title a,
#sidebar .widget_recent_entries li a,
.diplomat-publications-box .dp-title a {
    color: #171b1f;
}

#sidebar .widget .widget-title,
#sidebar .widget.widget_recent_entries li:hover,
.widget.widget_recent_entries li:hover {
    background-color: #c41624;
    color: #fff;
}

#sidebar .widget.widget_recent_entries li,
.diplomat-publications-box .dp-item,
#content input[type="text"],
#content input[type="search"] {
    background-color: #fff;
}

.diplomat-publications-box .dp-item {
    border: 1px solid #ecd7d2;
    box-shadow: 0 3px 10px rgba(90, 28, 28, .07);
}

.page-title,
body.post-type-archive-publication .publication-archive > .page-header,
body.blog #content > .large-12.columns .page-title,
body.archive:not(.post-type-archive-publication) #content > .large-12.columns .page-title,
body.search #content > .large-12.columns .page-title,
body.page-id-6 #content > .large-12.columns .page-title,
body.page-id-8 #content > .large-12.columns .page-title,
body.page-id-12 #content > .large-12.columns .page-title,
body.blog #content > .large-12.columns .page-title .breadcrumbs,
body.archive:not(.post-type-archive-publication) #content > .large-12.columns .page-title .breadcrumbs,
body.search #content > .large-12.columns .page-title .breadcrumbs,
body.page-id-6 #content > .large-12.columns .page-title .breadcrumbs,
body.page-id-8 #content > .large-12.columns .page-title .breadcrumbs,
body.page-id-12 #content > .large-12.columns .page-title .breadcrumbs {
    border-color: #dfc8c3;
}

.page-title .breadcrumbs,
.page-title .breadcrumbs a,
.posted-on,
.cat-links {
    color: #6f7377;
}

/* Brighter brand accents and clearer white-card contrast. */
.tmm-custom-menu-box,
#sidebar .widget .widget-title,
#header .header-bottom #navigation .menu-primary-menu-container > ul > li:hover > a,
#header .header-bottom #navigation .menu-primary-menu-container > ul > li.current-menu-item > a,
#header .header-bottom #navigation .menu-primary-menu-container > ul > li.current_page_item > a,
#header .header-bottom #navigation .menu-primary-menu-container > ul > li.current-menu-parent > a,
#header .header-bottom #navigation .menu-primary-menu-container > ul > li.current-menu-ancestor > a,
#responsive-nav-button,
#advanced-menu-hide,
#mobile-advanced .menu-primary-menu-container li:hover > a,
#mobile-advanced .menu-primary-menu-container li.current-menu-item > a,
#mobile-advanced .menu-primary-menu-container li.current_page_item > a {
    background-color: #c41624;
}

#header .header-bottom #navigation a[data-menu-intro]::after {
    border-top-color: #c41624;
}

#sidebar .widget.widget_recent_entries li,
.diplomat-publications-box .dp-item {
    box-shadow: 0 3px 12px rgba(90, 28, 28, .08);
}

/* Keep text legible wherever the vibrant red is used as a surface. */
#content .tmm-custom-menu-box,
#content .tmm-custom-menu-box .tmm-menu-title,
#content .tmm-custom-menu-box .arrow-icon,
#content .tmm-custom-menu-box .tmm-menu-list a,
#content .diplomat-publications-box .dp-tab,
#content .diplomat-publications-box .dp-tab a,
#sidebar .widget.widget_recent_entries li:hover,
#sidebar .widget.widget_recent_entries li:hover a,
.widget.widget_recent_entries li:hover,
.widget.widget_recent_entries li:hover a {
    color: #fff;
}

#content .tmm-custom-menu-box .tmm-menu-list a:hover,
#content .tmm-custom-menu-box .tmm-menu-list a:focus {
    color: #fff;
    opacity: .72;
}
