/**
 * Aktivs.org custom styles.
 *
 * Add all project-specific CSS to this file. It is loaded after Quatro's
 * global stylesheet, so the parent theme can be updated without losing edits.
 */

/*
 * Suggested brand variables. Uncomment and adjust when the palette is known.
 *
 * :root {
 *   --aktivs-primary: #d71920;
 *   --aktivs-secondary: #1f2937;
 *   --aktivs-background: #ffffff;
 *   --aktivs-text: #202124;
 * }
 */

/* Global typography and page background. */
/*
body {
  color: var(--aktivs-text);
  background: var(--aktivs-background);
}
*/

/* Header and navigation. */
/*
.navbar,
.site-header {
  background-color: var(--aktivs-background);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  color: var(--aktivs-primary);
}
*/

/* Restore Quatro's header alignment in Bootstrap's flex-based grid. */
.header-navbar-wrapper .region-navigation {
  align-items: center;
}

@media (min-width: 992px) {
  .header-navbar-wrapper .region-navigation {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .header-navbar-wrapper .region-navigation > .site-branding,
  .header-navbar-wrapper .region-navigation > .block-adv-header {
    padding-right: 0;
    padding-left: 0;
  }

  .header-navbar-wrapper .region-navigation > .site-branding {
    flex: 0 0 250px;
    width: 250px;
  }

  .header-navbar-wrapper .site-branding .logo {
    display: block;
    width: 100%;
  }

  .header-navbar-wrapper .site-branding .logo img {
    display: block;
    width: 100%;
    height: auto;
  }

  .header-navbar-wrapper .region-navigation > .block-adv-header {
    float: none;
    flex: 0 1 auto;
    margin-left: auto;
    text-align: right;
  }

  .header-navbar-wrapper .region-navigation > .block-adv-header img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-left: auto;
  }

  /* Remove Bootstrap gutters that pull the Search button 24px left. */
  .header-navbar-wrapper .region-navigation-collapsible {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .header-navbar-wrapper .region-navigation-collapsible > #block-quatro-main-menu {
    padding-right: 0;
    padding-left: 0;
  }
}

@media (max-width: 768px) {
  .header-navbar-wrapper .region-navigation > .block-adv-header {
    display: none;
  }
}

/* Show a home icon instead of the Home label in the primary menu. */
#block-quatro-main-menu ul.menu > li > a[data-drupal-link-system-path="<front>"] {
  position: relative;
  box-sizing: border-box;
  width: 60px;
  overflow: hidden;
  color: transparent !important;
  white-space: nowrap;
}

#block-quatro-main-menu ul.menu > li > a[data-drupal-link-system-path="<front>"]::before {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  content: "\f015";
  color: #fff;
  font-family: FontAwesome;
  font-size: 22px;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  pointer-events: none;
  text-rendering: auto;
}

/* Match every desktop menu button to Quatro's 63px Search button height. */
@media (min-width: 992px) {
  #block-quatro-main-menu ul.menu > li {
    vertical-align: top;
  }

  #block-quatro-main-menu ul.menu > li:not(:last-child) > a {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 63px;
  }
}

/* Buttons and links. */
/*
a {
  color: var(--aktivs-primary);
}

.btn-primary {
  color: #fff;
  background-color: var(--aktivs-primary);
  border-color: var(--aktivs-primary);
}
*/

/* Main content spacing. */
/*
main {
  padding-block: 2rem;
}
*/

/* Visually separate editorial sources from the article body. */
.node--type-article .article-sources {
  margin-block: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #b8bec6;
  border-radius: 0 4px 4px 0;
  color: #59616b;
  background: #f4f6f8;
  font-size: 0.875rem;
  line-height: 1.55;
}

.node--type-article .article-sources h2 {
  margin: 0 0 0.75rem;
  color: #3f4750;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.node--type-article .article-sources ul {
  margin: 0;
  padding-left: 1.25rem;
}

.node--type-article .article-sources li + li {
  margin-top: 0.45rem;
}

.node--type-article .article-sources a {
  color: #435f78;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.node--type-article .article-sources a:hover,
.node--type-article .article-sources a:focus {
  color: #233f58;
}

@media (max-width: 575.98px) {
  .node--type-article .article-sources {
    padding: 0.875rem 1rem;
  }
}

/* Render the Article card view mode like Quatro's Views "Show: Fields" card. */
.block-topic-news .view-content article.article-card {
  margin-bottom: 0;
}

.block-topic-news .view-content .article-card .field--name-field-image,
.block-topic-news .view-content .article-card .field--name-body {
  margin: 0;
}

/* Keep category article titles visually identical when their semantic wrapper
 * is changed from a div to an H2. The link retains Quatro's existing styling.
 */
.view-topic-page.view-list-articles h2.views-field-title {
  margin: 0;
  font: inherit;
}

/* Breadcrumbs live in Highlighted, immediately above the page content. */
.highlighted .block-system-breadcrumb-block .block-inner {
  overflow: visible;
  padding: 0;
  background: transparent;
}

.highlighted .aktivs-breadcrumbs .breadcrumb {
  display: flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 0;
  color: #6f6f6f;
  background: transparent;
  font-size: 14px;
}

.highlighted .aktivs-breadcrumbs .breadcrumb-item,
.highlighted .aktivs-breadcrumbs .breadcrumb-item a {
  color: #6f6f6f;
}

.highlighted .aktivs-breadcrumbs .breadcrumb-item + .breadcrumb-item {
  padding-left: 0;
}

.highlighted .aktivs-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
  float: none;
  padding: 0 8px;
  color: #9a9a9a;
  content: "›";
}

.highlighted .aktivs-breadcrumbs .breadcrumb-item a:hover,
.highlighted .aktivs-breadcrumbs .breadcrumb-item a:focus {
  color: #b70000;
}

.highlighted .aktivs-breadcrumbs .breadcrumb-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  text-decoration: none;
}

.highlighted .aktivs-breadcrumbs .breadcrumb-home::before {
  content: none;
}

.highlighted .aktivs-breadcrumbs .breadcrumb-home .fa {
  font-size: 17px;
  line-height: 1;
}

/* Footer. */
/*
.site-footer {
  color: #fff;
  background-color: var(--aktivs-secondary);
}
*/

/* Preserve Quatro's footer layout when placed-block IDs are theme-prefixed. */
.footer .footer-inner {
  padding: 15px;
}

.footer .region-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-right: 0;
  margin-left: 0;
}

.footer [id*="blockcopyright"] {
  float: left;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  text-align: center;
}

.footer [id*="blocksocialicons"] {
  flex: 0 0 100%;
  max-width: 100%;
  padding-top: 10px;
  text-align: center;
}

.footer [id*="blocksocialicons"] img {
  display: inline;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .footer [id*="blockcopyright"] {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin-bottom: 0;
    padding: 0 0 0 10px;
    text-align: left;
  }

  .footer [id*="blocksocialicons"] {
    float: right;
    clear: right;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin-left: auto;
    padding: 0;
    border: 0;
    text-align: right;
  }
}

/* Small screens. */
/*
@media (max-width: 767.98px) {
  main {
    padding-block: 1rem;
  }
}
*/

/* Aktivs: append to themes/custom/aktivs/css/custom.css. */
.klaro.klaro-theme-aktivs {
  --klaro-primary-color: #b51218;
  --klaro-link-color: #a51016;
  --klaro-link-color-hover: #790c10;
  --klaro-link-decoration-line: underline;
  --klaro-button-bg: #b51218;
  --klaro-button-text-color: #fff;
  --klaro-button-border: 1px solid #b51218;
  --klaro-button-border-radius: 6px;
  --klaro-button-padding: 13px 18px;
  --klaro-button-font-size: 14px;
  --klaro-button-font-weight: 700;
  --klaro-button-line-height: 1.4;
  --klaro-button-bg-hover: #900e13;
  --klaro-button-text-color-hover: #fff;
  --klaro-button-border-hover: 1px solid #900e13;
  --klaro-button-box-shadow: none;
  --klaro-button-focus-outline: 3px solid #262626;
  --klaro-button-focus-outline-offset: 3px;
  --klaro-dialog-focus-outline: none;
  --klaro-dialog-focus-box-shadow: 0 16px 60px rgba(0, 0, 0, .22);
  --klaro-slider-bg: #d5d8dd;
  --klaro-slider-bg-active: #b51218;
  --klaro-slider-bg-required: #657163;
  --font-family: Arial, sans-serif;
  --font-size: 15px;
  --border-radius: 10px;
}

.klaro.klaro-theme-aktivs .cookie-modal .cm-bg {
  background: rgba(20, 24, 28, .48);
}

.klaro.klaro-theme-aktivs .cookie-modal-notice,
.klaro.klaro-theme-aktivs .cookie-modal .cm-modal {
  box-sizing: border-box;
  background: #fff;
  color: #292d32;
  border: 1px solid #e1e3e6;
  border-top: 4px solid #b51218;
  border-radius: 10px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, .22);
}

.klaro.klaro-theme-aktivs .cookie-modal-notice {
  width: calc(100% - 32px);
  max-width: 520px;
  padding: 26px;
  max-height: 85vh;
  max-height: 85dvh;
}

.klaro.klaro-theme-aktivs .cookie-modal-notice .cn-body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: #363c43;
}

.klaro.klaro-theme-aktivs .cookie-modal-notice .cn-ok {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  margin-top: 22px;
}

.klaro.klaro-theme-aktivs .cookie-modal-notice .cn-buttons {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.klaro.klaro-theme-aktivs .cookie-modal .cm-btn,
.klaro.klaro-theme-aktivs .cookie-notice .cm-btn {
  min-height: 46px;
  margin: 0;
  text-transform: none;
  white-space: normal;
  text-align: center;
  letter-spacing: .01em;
}

.klaro.klaro-theme-aktivs .cookie-modal-notice .cm-btn {
  flex: 1 1 auto;
}

.klaro.klaro-theme-aktivs .cookie-modal .cm-modal {
  width: calc(100% - 32px);
  max-width: 720px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
}

.klaro.klaro-theme-aktivs .cookie-modal .cm-modal .cm-header,
.klaro.klaro-theme-aktivs .cookie-modal .cm-modal .cm-body,
.klaro.klaro-theme-aktivs .cookie-modal .cm-modal .cm-footer {
  padding: 22px 26px;
  border-color: #e5e7eb;
}

.klaro.klaro-theme-aktivs .cookie-modal .cm-modal .cm-header {
  padding-right: 56px;
}

.klaro.klaro-theme-aktivs .cookie-modal .cm-modal .cm-header h1 {
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.25;
  font-weight: 700;
  color: #24282d;
}

.klaro.klaro-theme-aktivs .cookie-modal .cm-modal p {
  font-size: 15px;
  line-height: 1.6;
  color: #505861;
}

.klaro.klaro-theme-aktivs .cookie-modal .cm-modal .cm-footer {
  background: #f6f7f8;
}

.klaro.klaro-theme-aktivs .cookie-modal .cm-footer-buttons {
  gap: 10px;
  flex-wrap: wrap;
}

.klaro.klaro-theme-aktivs .cookie-modal .cm-footer-buttons .cm-btn {
  flex: 1 1 150px;
}

/* Keep a clear keyboard focus indicator on every control. */
.klaro.klaro-theme-aktivs .cm-btn:focus-visible,
.klaro.klaro-theme-aktivs a:focus-visible,
.klaro.klaro-theme-aktivs button.hide:focus-visible {
  outline: 3px solid #262626;
  outline-offset: 3px;
}

@media (max-width: 540px) {
  .klaro.klaro-theme-aktivs .cookie-modal-notice {
    padding: 20px;
  }

  .klaro.klaro-theme-aktivs .cookie-modal-notice .cn-ok {
    flex-direction: column;
  }

  .klaro.klaro-theme-aktivs .cookie-modal-notice .cn-ok > .cm-btn,
  .klaro.klaro-theme-aktivs .cookie-modal-notice .cn-buttons {
    width: 100%;
  }

  .klaro.klaro-theme-aktivs .cookie-modal .cm-modal .cm-header,
  .klaro.klaro-theme-aktivs .cookie-modal .cm-modal .cm-body,
  .klaro.klaro-theme-aktivs .cookie-modal .cm-modal .cm-footer {
    padding: 18px;
  }

  .klaro.klaro-theme-aktivs .cookie-modal .cm-modal .cm-header {
    padding-right: 48px;
  }
}


/* Aktivs.org 404 page */
.aktivs-404 {
  max-width: 760px;
  margin: clamp(3rem, 10vw, 7rem) auto;
  padding: 0 1.25rem 4rem;
  color: #292d32;
  text-align: center;
}

.aktivs-404__code {
  color: #b51218;
  font-size: clamp(4rem, 13vw, 8rem);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: .9;
}

.aktivs-404 h1 {
  margin: 1.5rem 0 .75rem;
  color: #292d32;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

.aktivs-404 > p {
  max-width: 540px;
  margin: 0 auto 2rem;
  color: #5a626b;
  font-size: 1.1rem;
  line-height: 1.65;
}

.aktivs-404__search {
  max-width: 560px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.aktivs-404__search label {
  display: block;
  margin-bottom: .45rem;
  color: #292d32;
  font-weight: 700;
}

.aktivs-404__search-row {
  display: flex;
  gap: .65rem;
}

.aktivs-404__search input {
  min-width: 0;
  flex: 1 1 auto;
  padding: .8rem .95rem;
  border: 1px solid #c9cdd2;
  border-radius: 5px;
  color: #292d32;
  background: #fff;
  font: inherit;
}

.aktivs-404__search input:focus {
  outline: 3px solid rgba(181, 18, 24, .25);
  border-color: #b51218;
}

.aktivs-404__search button,
.aktivs-404__home {
  display: inline-block;
  padding: .8rem 1.15rem;
  border: 1px solid #b51218;
  border-radius: 5px;
  color: #fff;
  background: #b51218;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}

.aktivs-404__search button:hover,
.aktivs-404__search button:focus,
.aktivs-404__home:hover,
.aktivs-404__home:focus {
  border-color: #8f0e13;
  color: #fff;
  background: #8f0e13;
}

.aktivs-404__search button:focus-visible,
.aktivs-404__home:focus-visible,
.aktivs-404__links a:focus-visible {
  outline: 3px solid #292d32;
  outline-offset: 3px;
}

.aktivs-404__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.25rem;
  margin-top: 2rem;
}

.aktivs-404__links a {
  color: #8f0e13;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.aktivs-404__links a:hover {
  color: #5f090d;
}

@media (max-width: 520px) {
  .aktivs-404__search-row {
    flex-direction: column;
  }

  .aktivs-404__search button {
    width: 100%;
  }
}

/* Paslēpj Drupal virsrakstu un breadcrumb tikai lapā,
   kurā ir mūsu 404 saturs */
body:has(.aktivs-404) .block-page-title-block,
body:has(.aktivs-404) .highlighted .block-system-breadcrumb-block {
  display: none !important;
}

/* Sākumlapas poga */
.aktivs-404__home {
  display: inline-block !important;
  color: #fff !important;
  background-color: #b51218 !important;
  border: 1px solid #b51218 !important;
  text-decoration: none !important;
}

.aktivs-404__home:hover,
.aktivs-404__home:focus {
  color: #fff !important;
  background-color: #8f0e13 !important;
  border-color: #8f0e13 !important;
}