/* ELIXIR-GR site styles (based on the colours and layout of the old "elixir2" theme). */

:root {
  --blue-dark: #023452;
  --blue: #047eaa;
  --orange: #f47d21;
  --grey-light: #efefef;
  --grey-line: #ebebeb;
  --text: #333;
  --heading: #3e3e3e;
}

* { box-sizing: border-box; }
html { background: #fefefe; }
body {
  margin: 0;
  font-family: 'Lato', Verdana, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#content-wrapper { flex: 1; }

a:link, a:visited { color: var(--blue); text-decoration: none; }
a:hover, a:focus { color: var(--orange); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; }
h2 { margin: 1.2em 0 0.5rem; }
img { max-width: 100%; height: auto; }
table { border-collapse: collapse; }
td, th { padding: 4px 8px; vertical-align: top; }

.container-site { max-width: 1240px; margin: 0 auto; padding: 0 15px; }

/* ---------------------------------------------------------------- header */
#header-wrapper { background: var(--blue-dark); }
.header { position: relative; min-height: 108px; display: flex; align-items: flex-end; flex-wrap: wrap; }
#logo { display: block; padding: 8px 0; margin-right: 30px; }
#logo img { width: 130px; display: block; }

#main-nav ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; }
#main-nav a {
  display: block; padding: 0 12px; color: #fefefe;
  text-transform: uppercase; font-size: 0.875rem; white-space: nowrap;
}
#main-nav a:hover, #main-nav a:focus { color: var(--orange); text-decoration: none; }
#main-nav a.active { color: var(--orange); font-weight: 700; }

#language-switcher {
  position: absolute; top: 12px; right: 15px;
  list-style: none; margin: 0; padding: 0; font-size: 0.875rem;
}
#language-switcher li { display: inline; margin-left: 15px; color: #fefefe; }
#language-switcher li.active { font-weight: 700; }
#language-switcher a { color: #b8d4e3; }
#language-switcher a:hover { color: var(--orange); }

#nav-toggle, .nav-toggle { display: none; }

/* --------------------------------------------------------------- columns */
.columns { display: flex; gap: 30px; padding-top: 10px; padding-bottom: 40px; }
#main-content { flex: 1; min-width: 0; }
.sidebar-first { order: -1; flex: 0 0 25%; max-width: 25%; padding-top: 1.5em; }
.sidebar-second { flex: 0 0 25%; max-width: 25%; padding-top: 1em; }
#page-title { margin: 1em 0 0.5em; }

/* left sidebar menus */
.sidebar-menu h2 {
  margin: 0;
  text-transform: uppercase; font-weight: normal; font-size: 0.875rem;
  color: #fefefe; background: var(--blue-dark);
  padding: 6px 10px; border-radius: 6px 6px 0 0;
}
.sidebar-menu ul { list-style: none; margin: 0; padding: 0; }
.sidebar-menu a {
  display: block; position: relative;
  padding: 6px 0 6px 15px; color: var(--text);
  border-bottom: 1px solid var(--grey-line);
}
.sidebar-menu ul ul a { padding-left: 30px; }
.sidebar-menu a.active { color: #e1680b; }
.sidebar-menu li.collapsed > a::before,
.sidebar-menu li.expanded > a::before {
  font-family: FontAwesome; position: absolute; left: 3px;
}
.sidebar-menu li.collapsed > a::before { content: "\f0da"; color: var(--blue-dark); }
.sidebar-menu li.expanded > a::before { content: "\f0d7"; color: var(--orange); }

/* ---------------------------------------------------------------- blocks */
.block-title { border-bottom: 2px solid #b8b6b7; padding-bottom: 4px; }
.news-box ul { padding-left: 18px; }
.news-box li { margin-bottom: 8px; }
.more-link { text-align: right; }

.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.partner-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 12px; border: 1px solid var(--grey-line); border-radius: 5px;
}
.partner-card:hover { border-color: var(--orange); text-decoration: none; }
.partner-logo { height: 90px; display: flex; align-items: center; margin-bottom: 8px; }
.partner-logo img { max-height: 90px; max-width: 140px; }
.partner-name { color: var(--blue); font-size: 0.9rem; }
.partner-header { text-align: center; }
.partner-page-logo { max-height: 130px; margin-top: 1.5em; }

.training-list li { margin-bottom: 6px; }
.training-list .date, .posted { color: #848484; font-size: 0.9em; }

dl.fields { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 1em 0; }
dl.fields dt { font-weight: 700; }
dl.fields dd { margin: 0; }

.news-teaser { border-bottom: 1px solid var(--grey-line); padding-bottom: 1em; }
.news-teaser h2 { font-size: 1.3em; margin-bottom: 0.2em; }

/* -------------------------------------------------------------- services */
.service-filters { display: flex; flex-wrap: wrap; gap: 16px; margin: 1em 0; }
.service-filters label { display: flex; flex-direction: column; font-weight: 700; font-size: 0.9em; }
.service-filters input, .service-filters select {
  font: inherit; font-weight: normal; padding: 4px 6px; margin-top: 3px; min-width: 200px;
}
.services-table { width: 100%; }
.services-table th { text-align: left; background: var(--grey-light); border-bottom: 2px solid #b8b6b7; }
.services-table td { border-bottom: 1px solid var(--grey-line); }

/* ----------------------------------- classes used inside the old page bodies */
.front_box_first_row { padding-top: 5px; padding-bottom: 10px; }
.front_box_row { padding-bottom: 10px; }
.front_grey_box_cell, .front_grey_box_cell_gr {
  text-align: left; background-color: var(--grey-light); padding: 15px; border-radius: 5px;
}
.front_box_image, .front_box_image_gr { display: inline-block; }
.front_button_left, .front_button_right {
  width: 100%; display: inline-block; background-color: #ececec; border-radius: 5px;
}
.front_button_image {
  display: inline-block; width: 100px; float: left; padding: 5px; text-align: center;
  background-color: #99bac7; border-radius: 5px 0 0 5px;
}
.front_button_image i, .front_button_image a { color: white; text-decoration: none; }
.front_button_text { display: inline-block; font-size: 26px; color: var(--blue); padding-left: 5px; }
.front_button_small_text { font-size: 16px; margin-left: 100px; color: black; padding-left: 5px; }
.row > [class*="col-"] { margin-bottom: 10px; }

.marine-image-block { width: 200px; height: 150px; display: inline-block; }
.center-pilot-image { margin: auto; }
.agreement-document-wrapper { margin-bottom: 10px; font-size: 24px; }

/* ---------------------------------------------------------------- footer */
#footer-wrapper { background: var(--grey-light); border-top: 1px solid var(--grey-light); }
.footer { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 10px 15px; flex-wrap: wrap; }
.footer-logo-etpa { height: 60px; }
.footer-logo-espa { height: 55px; }
.footer-logo-text { color: #000; font-size: 0.875rem; }

/* ------------------------------------------------------------ small screens */
@media (max-width: 900px) {
  .columns { flex-direction: column; gap: 0; }
  .sidebar-first, .sidebar-second { order: 0; flex: none; max-width: none; width: 100%; }
  .sidebar-first { order: 2; }
  .header { min-height: 0; padding-top: 8px; padding-bottom: 8px; align-items: center; }
  #logo img { width: 90px; }
  .nav-toggle {
    display: block; color: #fefefe; cursor: pointer; margin-left: auto; margin-top: 28px;
    text-transform: uppercase; font-size: 0.875rem;
  }
  #main-nav { display: none; width: 100%; }
  #nav-toggle:checked ~ #main-nav { display: block; }
  #main-nav ul { flex-direction: column; margin: 8px 0 0; }
  #main-nav a { padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.15); }
  .front_button_text { font-size: 20px; }
  .pathogens-image-1, .pathogens-image-2, .nc-biomarkers-image-1,
  .nc-biomarkers-image-2, .metabolomics-image { width: 100% !important; height: auto !important; }
}
