/*
 * Gsglyfadas: site-specific adjustments on top of template.css, loaded by
 * the template.user asset (partials/setup.php).
 */

/* Icon badge inside a card: the light circle of the design. template.css
   turns the badge white in muted bands, which hides it on a white card. */
.card .gsg-icon-badge,
.gsg-section-muted .card .gsg-icon-badge {
  background: #f9fafe;
}

/* A centred section (module class "text-center"): its head centred too */
.text-center > .gsg-section-head {
  justify-content: center;
  text-align: center;
}

/* Featured cards under the hero (module class "gsg-featured-cards"):
   image on top, then date and title, centred */
.gsg-featured-cards .card-body {
  align-items: center;
  text-align: center;
}

.gsg-featured-cards .gsg-card-meta {
  justify-content: center;
}

.gsg-featured-cards .gsg-card-meta .gsg-meta {
  margin-bottom: 0.5rem;
}

/*
 * "Blog Cards" pages (Τμήματα Στίβου): department cards, image beside the
 * text, two to a row from lg with an odd last card centred; one to a row
 * below lg, image above the text on phones. The square department images
 * (350 px) are shown at their own size so they stay sharp.
 */
.gsg-blogcards-page .gsg-blogcards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.875rem;
}

.gsg-blogcards-page .gsg-dept {
  flex: 0 0 100%;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  color: #585858;
}

.gsg-blogcards-page .gsg-dept-img {
  flex: none;
  padding: 0;
  background: #003b76;
  aspect-ratio: auto;
  border: 0;
}

.gsg-blogcards-page .gsg-dept-img img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gsg-blogcards-page .gsg-dept .card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.75rem 1.875rem;
}

.gsg-blogcards-page .gsg-dept-title {
  margin: 0;
  color: #111;
  font-family: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.3;
}

.gsg-blogcards-page .gsg-dept-title a {
  color: inherit;
  text-decoration: none;
}

.gsg-blogcards-page .gsg-dept .item-introtext {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.gsg-blogcards-page .gsg-dept-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.25rem;
  color: #115b7e;
  font-family: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.gsg-blogcards-page .gsg-dept-more .gsg-icon {
  transition: transform 0.2s ease;
}

.gsg-blogcards-page .gsg-dept:hover .gsg-dept-title,
.gsg-blogcards-page .gsg-dept:focus-within .gsg-dept-title {
  color: #115b7e;
}

.gsg-blogcards-page .gsg-dept:hover .gsg-dept-more .gsg-icon,
.gsg-blogcards-page .gsg-dept:focus-within .gsg-dept-more .gsg-icon {
  transform: translateX(4px);
}

@media (min-width: 576px) {
  .gsg-blogcards-page .gsg-dept {
    flex-direction: row;
  }

  .gsg-blogcards-page .gsg-dept-img {
    width: 38%;
    max-width: 240px;
  }
}

@media (min-width: 992px) {
  .gsg-blogcards-page .gsg-dept {
    flex-basis: calc((100% - 1.875rem) / 2);
  }
}

/* The banner of a "Blog Cards" page: title on the left, the description in a
   second column, so the band is not half empty on wide screens */
.layout-gsglyfadasblogcards .gsg-page-hero-desc hr {
  display: none;
}

@media (min-width: 992px) {
  .layout-gsglyfadasblogcards .gsg-page-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 4rem;
    align-items: center;
  }

  .layout-gsglyfadasblogcards .gsg-page-hero-inner > * {
    grid-column: 1;
  }

  .layout-gsglyfadasblogcards .gsg-page-hero-inner > .gsg-page-hero-desc {
    grid-column: 2;
    grid-row: 1 / span 4;
    max-width: none;
    margin: 0;
    padding-left: 2rem;
    border-left: 3px solid #19b1f0;
  }

  .layout-gsglyfadasblogcards .gsg-page-hero-desc > :last-child {
    margin-bottom: 0;
  }
}

/*
 * Language switcher (mod_languages, dropdown) in the navbar and in the
 * phone offcanvas, both on the blue gradient: a white outline button as tall
 * as the search field, and a white menu card with the active language marked.
 */
.gsg-header-actions .mod-languages__select > .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 45px;
  padding: 0 0.875rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 3px;
  color: #fff;
  font-family: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.gsg-header-actions .mod-languages__select > .dropdown-toggle:hover,
.gsg-header-actions .mod-languages__select > .dropdown-toggle:focus-visible,
.gsg-header-actions .mod-languages__select > .dropdown-toggle.show {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
  color: #fff;
}

.gsg-header-actions .mod-languages__select > .dropdown-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: none;
}

.gsg-header-actions .mod-languages__select > .dropdown-toggle::after {
  margin-left: 0.125rem;
  border-top-color: currentColor;
}

.gsg-header-actions .mod-languages img {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.gsg-header-actions .mod-languages .dropdown-menu {
  min-width: 100%;
  margin-top: 0.375rem !important;
  padding: 0.375rem;
  background: #fff;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 8px 40px -6px rgba(105, 104, 178, 0.28);
}

/* mod_languages' own CSS greys the whole active row: the link marks it */
.gsg-header-actions .mod-languages .dropdown-menu li,
.gsg-header-actions .mod-languages .dropdown-menu li.lang-active {
  margin: 0;
  padding: 0;
  background: transparent;
}

.gsg-header-actions .mod-languages .dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 40px;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  color: #111;
  font-family: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  text-decoration: none;
}

.gsg-header-actions .mod-languages .dropdown-menu a:hover,
.gsg-header-actions .mod-languages .dropdown-menu a:focus-visible {
  background: #f1f0f1;
  color: #111;
}

.gsg-header-actions .mod-languages .dropdown-menu .lang-active a {
  background: #f9fafe;
  color: #115b7e;
  font-weight: 500;
}

/* Sponsor logos in a centred section (Partners band): a centred row of
   tiles at the grid's widths (2 / 3 / 6 a row), so a short row sits in the
   middle instead of filling from the left */
.text-center .gsg-sponsors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.text-center .gsg-sponsors > li {
  flex: 0 0 calc((100% - 1.5rem) / 2);
  min-width: 0;
}

@media (min-width: 768px) {
  .text-center .gsg-sponsors > li {
    flex-basis: calc((100% - 3rem) / 3);
  }
}

@media (min-width: 992px) {
  .text-center .gsg-sponsors > li {
    flex-basis: calc((100% - 7.5rem) / 6);
  }
}

/* Sponsor logos in a sidebar: two to a row at every width */
.gsg-sidebar .gsg-sponsors {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* A table in a dark card (training schedule): scrolls sideways in its box
   on phones instead of squeezing every cell into several lines */
.gsg-card-dark .table-responsive > .table {
  min-width: 36rem;
}

/* Category list: space between the filters (month, limit) and the table */
.com-content-category__table {
  margin-top: 1.5rem;
}

/* Category list and blog: space between the "New Article" button (or the
   last item) and the pagination */
.com-content-category__navigation,
.com-content-category-blog__navigation {
  margin-top: 2rem;
}

/*
 * Category blog in two or more columns: the intro image always on top
 * (16:10), whatever "Float" the article sets. A side image leaves the text a
 * narrow column at these widths. The leading article keeps its own layout.
 */
.blog-items:is(.masonry-2, .columns-2, .masonry-3, .columns-3, .masonry-4, .columns-4) > .blog-item:has(> .item-image) {
  flex-direction: column !important;
}

.blog-items:is(.masonry-2, .columns-2, .masonry-3, .columns-3, .masonry-4, .columns-4) > .blog-item > .item-image {
  flex: none !important;
  order: -1 !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
}

.blog-items:is(.masonry-2, .columns-2, .masonry-3, .columns-3, .masonry-4, .columns-4) > .blog-item > .item-image img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 10 !important;
  object-fit: cover;
  border-radius: 0 !important;
}

/* Convert Forms inside the design: primary button and Bootstrap-like
   fields. The form's own colour setting (#444) is printed per form id, so
   these declarations need !important. */
.gsg-site .convertforms .cf-btn {
  background-color: #0171cd !important;
  border-color: transparent !important;
  border-radius: 3px !important;
  color: #fff !important;
  font-family: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
}

.gsg-site .convertforms .cf-btn:hover,
.gsg-site .convertforms .cf-btn:focus-visible {
  background-color: #0b70d8 !important;
}

.gsg-site .convertforms .cf-label {
  font-family: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  color: #111;
}
