/*
 Theme Name: Layers SWH
 Description: Layers Child Theme for Software Heritage
 Author: The Software Heritage developers
 Template: layerswp
 Version: 0.1.0
 License: GNU General Public License version 2, or any later version
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ======== FONTS ======== */

body,
button, .button, input[type="submit"] {
    font-family: 'Alegreya Sans', sans-serif;
}

.heading {
    font-family: 'Alegreya', serif;
}

.sitename.sitetitle .first-word {
    font-family: 'Alegreya Sans', sans-serif;
}
.sitename.sitetitle .second-word {
    font-family: 'Alegreya', serif;
}


/* ======== HEADER ======== */

/* slider */
.home-slide-show .section-title.large .heading {
    font-size: 5rem;
}
.slide-massive .section-title.large .heading {
    font-size: 7rem;
}
.home-slide-show {
    border-bottom: 1px solid #e20026;
}

/* software heritage logo: large by default, smaller when sticky */
.sitename { /* when at top */
    font-weight: normal;
    font-size: 3rem;
}
.is_stuck .sitename { /* when sticky */
    font-weight: normal;
    font-size: 1.8rem;
}
.custom-logo-link img { /* when at top */
    max-height: 70px;
}
.is_stuck .custom-logo-link img { /* when sticky */
    max-height: 40px;
}

/* sans variant of the font in the top logo */
.sitename.sitetitle {
    font-family: 'Alegreya Sans', sans-serif;
}

/* featured image thumbnail on the left, title on the right */
.title-container .title {
    display: flex;
}
.title-container .title .thumbnail {
    order: 1;
    display: inline-block;
}
.title-container .title .heading {
    order: 2;
    display: inline-block;
    margin-top: 50px;  /* vertically center title, assuming 150x150 thumbnails */
}
.title-container { /* ensure title has same height w/ or w/o featured image */
    min-height: 177px;
}


/* ======== HEADINGS & SECTIONS ======== */

/* heading/titles, throughout the website */
.heading,
.invert .section-title .heading,
.title-container .heading,
.section-title .heading,
.article-title .heading a,
h1, h2, h3, h4, h5, h6,
.heading a
 {
    color: #e20026;
}

/* fonts (override layers' framework.css). Changes:
   - decrease size difference between heading and excerpt
   - use lighter font for excerpts
   - reduce line height for excerpts
*/

.title-container .heading {
    font-size: 4.5rem;
    font-weight: 400;
}

.section-title.large .heading {
    font-size: 3.5rem;
    font-weight: 400;
}
.section-title .heading {
    font-size: 3rem;
    font-weight: 400;
}
.section-title.small .heading {
    font-size: 2.5rem;
    font-weight: 400;
}
.section-title.large .excerpt {
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.2;
}
.section-title .excerpt {
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1.2;
    max-width: none;
}
.section-title.small .excerpt {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.2;
}
.media.large .heading {
    font-size: 2.3rem;
    margin-bottom: -8px;
}

/*
 * #wrapper-content > div.widget {
 *     border-bottom: 1px solid #e20026;  /\* section separator *\/
 * }
 * #wrapper-content > div.widget:nth-last-child(2) {
 *     border-bottom: none;
 * }
 */

/* sections */
.content-vertical-massive {  /* layers sections */
    padding-top: 2%;     /* reduce vertical spacing between sections */
    padding-bottom: 2%;
}
.content-main {  /* standard page content */
    padding-top: 0;
}


/* ======== FLOW ======== */

p a {  /* underlined hyperlinks in paragraph, for better visibilty */
    border-bottom: 1px #5b5e6f dotted;
}
.story a:not(.button) {
    text-decoration: none;
}


/* ======== IMAGES, THUMBNAILS, SLIDES, etc. ======== */

/* post excerpts, e.g., for quotes on the home page */
.thumbnail-body {
    background-color: #efeff2;
}
.thumbnail-body:hover {
    background-color: hsl(240, 10%, 92%);
}
.slide .invert .section-title .excerpt,
.slide .section-title .excerpt
 { /* red excerpts, only in the slider */
    color: #e20026;
}

/* homepage slide show: text should not overflow onto images */
.home-slide-show div.text-left p {
    margin-right: 60%;  /* left-aligned text */
}
.home-slide-show div.text-right p {
    margin-left: 60%;  /* right-aligned text */
}

/* avoid that in-flow thumbnail images touch the surrounding text */
img.size-thumbnail.alignleft {
    padding-right: 5px;
}
img.size-thumbnail.alignright {
    padding-left: 5px;
}

/* vertical red separator between layers images and side text */
.media.image-left .media-image {
    border-right: 1px solid #e20026;
    padding-right: 20px;
}
.media.image-right .media-image {
    border-left: 1px solid #e20026;
    padding-left: 20px;
}


/* ======== POSTS ======== */

article .thumbnail {
    text-align: center;
}


/* ======== NAVIGATION ======== */

/* tighter page title and bread crumbs */
.title-container .title {
    padding: 10px;
    margin-bottom: 20px;
}

.bread-crumbs {  /* in-page breadcrumbs */
    display: initial;   /* show breadcrumbs */
    /* display: none;  /\* hide breadcrumbs *\/ */
    margin: 0;
    font-size: 1.5rem;  /* slightly larger than default */
    position: absolute;  /* position after the banner */
    margin-top: 170px;
    margin-left: 10px;
}
.header-site .bread-crumbs {  /* in-header bread crumbs */
    /* display: initial;  /\* show breadcrumbs *\/ */
    display: none;
    float: left;
    margin-left: 30px;
    font-size: 1.4rem;  /* slightly larger than default */
}

#back-to-top {
    display: initial;  /* visible back-to-top button */
}

/* no horizontal line separating menu items (both footer and navigation bar) */
.sub-menu li {
    border-bottom: none;
}

/* top-level navigation bar */
section.header-site {
    padding: 10px;                     /* reduce padding */
    /* border-bottom: 1px solid #e20026;  /\* thin red separator *\/ */
    border: 0;  /* thick, red-to-orange gradient separator */
    border-bottom: 5px solid transparent;
    -moz-border-image: -moz-linear-gradient(left, #e20026 0%, #fecd1b 100%);
    -webkit-border-image: -webkit-linear-gradient(left, #e20026 0%, #fecd1b 100%);
    border-image: linear-gradient(to right, #e20026 0%, #fecd1b 100%);
    border-image-slice: 1;
    margin-top: 30px;
}

.nav.nav-horizontal { /* when at top */
    font-size: 1.8rem;  /* bigger fonts in navbar */
}
.is_stuck .nav.nav-horizontal { /* when sticky */
    font-size: 1.5rem;
}


/* ======== FOOTER ======== */

#footer {
    color: hsl(0, 0%, 100%);
    font-size: 2rem;
}
/*
 * #footer .grid div.column:nth-child(1) { /\* small 1st column, e.g., newsletter *\/
 *     width: calc(((100% / 12) * 3) - 20px);
 * }
 * #footer .grid div.column:nth-child(2) { /\* large 2nd column, e.g., footer menu *\/
 *     width: calc(((100% / 12) * 6) - 20px);
 * }
 * #footer .grid div.column:nth-child(3) { /\* small 3rd column, e.g., social icons *\/
 *     width: calc(((100% / 12) * 3) - 20px);
 * }
 */

#footer .widget_text {
    text-align: center;
}
#footer .content-vertical-massive {
    padding-top: 0;
}

#footer .sub-menu { /* make sub-menu items visible in the footer */
    display: initial;
    visibility: initial;
    opacity: initial;
    top: initial;
    border: initial;
    position: initial;
}
#footer .menu li {
    float: left;
}
#footer .sub-menu li {
    float: initial;
    width: iherit;
    margin: 0;
}
#footer .menu a,
#footer .sub-menu a {
    background-color: inherit;
    font-weight: 400;
    padding: 0;
    color: hsl(0, 0%, 100%);
    line-height: 40px;
}
#footer .menu a:hover,
#footer .sub-menu a:hover {
    color: white;
    text-decoration: underline;
}
#footer .menu a {
    font-size: 2.3rem;
}
#footer .sub-menu a {
    font-size: 1.8rem;
}
#footer .heading,
#footer .widget_text .section-nav-title {  /* headings in footer */
    font-family: sans-serif;
    font-size: 2.1rem;
    font-weight: initial;
    text-transform: initial;
    font-weight: initial;
    color: hsl(0, 0%, 100%);
}
.grid + .copyright {
    border-top: 1px solid hsl(0, 0%, 70%);
    padding-top: 20px;
}
.copyright {
    color: hsl(0, 0%, 100%);
    font-size: 1.2rem;
}


/* ======== BUTTONS & FORMS ======== */

.button {
   transition: all 0.3s linear 0s;
}
.button:hover {
   transition: all 0.3s linear 0s;
}
.invert .button {
    color: hsl(0, 0%, 100%);
    background-color: hsla(0, 0%, 100%, 0.1);
    border: 1px solid hsl(0, 0%, 60%);
    border-radius: 4px;
    transition: all 0.3s linear 0s;
}
.invert .button:hover {
    background-color: hsla(0, 0%, 100%, 0.3);
    transition: all 0.3s linear 0s;
    border: 1px solid hsl(0, 0%, 60%);
}
.invert .button.btn-small {
    font-size: 1.5rem;
    height: 3rem;
    padding: 4px 4px 25px 4px;
}
.invert .button.btn-small {
    color: hsl(0, 0%, 100%);
}
.button.btn-large {
    background-color: hsl(0, 0%, 20%);
    color: hsl(0, 0%, 100%);
    font-size: 1.8rem;
    padding: 10px 25px;
    transition: all 0.3s linear 0s;
}
.button.btn-large:hover {
    background-color: hsl(0, 0%, 100%);
    color: hsl(231, 10%, 40%);
    transition: all 0.3s linear 0s;
    border-color: hsl(0, 0%, 60%);
}
.button.btn-massive {
    font-size: 2rem;
    padding: 15px 30px;
    background-color: hsl(0, 0%, 20%);
    color: hsl(0, 0%, 100%);
}
.button.btn-massive:hover {
    background-color: hsl(0, 0%, 100%);
    color: hsl(231, 10%, 40%);
    border-color: hsl(0, 0%, 60%);
}
/* various textboxes, e.g., for AJAX calls, inline forms, etc. */
.inline-textbox {
    max-height: 3rem;
    background-color: inherit;
    border: 1pt solid;
}
.invert .inline-textbox {
    max-height: 3rem;
    background-color: inherit;
    border: 1pt solid hsla(0, 0%, 100%, 0.5);
    color: hsl(0, 0%, 100%);
}

/* default font color for input placeholders, implemented for multiple browsers */
::-webkit-input-placeholder { color: rgba(0, 0, 0, 0.55); }
:-moz-placeholder { color: rgba(0, 0, 0, 0.55); }
:-ms-input-placeholder { color: rgba(0, 0, 0, 0.55); }

.invert ::-webkit-input-placeholder { color: hsl(0, 0%, 100%); }
.invert :-moz-placeholder { color: hsl(0, 0%, 100%); }
.invert :-ms-input-placeholder { color: hsl(0, 0%, 100%); }

/* ======== SWH WIDGETS ======== */

/* content counters */
.swh-counter {
    font-size: 150%;
}
.swh-counter-widget {
    border-left: 1px solid #e20026;
}
.swh-counter-widget .media.large .heading + .excerpt {
    margin-top: 0;
}
.swh-counter-widget > div {
    padding-left: 20px;
}
/*
 * .swh-counter-widget.last.column {
 *     border-right: initial;
 * }
 */

/* search box */
#swh-search-query {
    max-width: initial;  /* take all available horizontal place */
}
.swh-search {
    border: 1px dashed black;
    border-radius: 10px;
    background-image: url('/wp-content/uploads/2016/06/drag-and-drop_small.png');
    background-repeat: no-repeat;
    background-position: 95% 5%;
    background-color: hsl(47, 99%, 75%);
}
.swh-search-origin {
    background-image: none;
}
.swh-search:hover {
    background-color: hsl(47, 99%, 80%);
}
.swh-search form {
    padding: 20px;
}
.swh-search input {
    max-width: initial;
}
.swh-search .swh-search-buttons
/* #swh-search-results, */
/* #swh-search-message */
{
    text-align: center;
}
#swh-search-results {
    padding: 20px;
}
#swh-search-results table {
    font-size: small;
    border: none;
    background-color: #fee35d;
}
#swh-search-results tr,
#swh-search-results th {
    line-height: 0.5rem;
}
#swh-search-results td,
#swh-search-results th {
    border: none;
    text-align: left;
}
#swh-search-results td:nth-child(2),
#swh-search-results td:nth-child(3)
{ /* SHA1 and filename columns in monospace */
    font-family: monospace;
}
#swh-hashed-files {
    font-family: monospace;
    background-color: #fee35d;
    margin: 0;
}
li.swh-hashed-file {
    list-style-type: none;
    display: inline;
}
li.swh-hashed-file:not(:last-child)::after {
    content: ", ";
}

.swh-top-bar {
    direction: ltr;
    height: 30px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    background-color: #262626;
    color: #fff;
    text-align: center;
    font-family: "Alegreya Sans", sans-serif;
    font-size: 14px;
}

.swh-top-bar ul {
    margin-top: 4px;
}

.swh-top-bar li {
    display: inline-block;
    margin-left: 10px;
    margin-right: 10px;
}

.swh-top-bar a,
.swh-top-bar a:visited {
    color: white;
}

.swh-top-bar a:hover,
.swh-top-bar a:visited:hover {
    text-decoration: underline;
}

.swh-top-bar a.swh-current-site,
.swh-top-bar a.swh-current-site:visited {
    color: #fecd1b;
}

.wpml-ls-legacy-list-horizontal.wpml-ls-statics-footer {
    margin-bottom: 0;
}

/* Emphasize the "Donate" menu entry */
.menu-item-16908 a,
.menu-item-16961 a,
.menu-item-16962 a {
    border: 2px solid #fecd1b;
    background-color: #e20026;
    color: white !important;
}

.flot-tick-label {
    font-family: "Alegreya Sans", sans-serif;
    fill: rgba(0, 0, 0, 0.55);
}

.flot-x-axis .flot-tick-label {
    font-size: 13px;
}

.flot-y-axis .flot-tick-label {
    font-size: 16px;
}

