/* === FONTS === */
@font-face {
  font-family: 'e-Ukraine';
  src: url('/base/vendor/e-Ukraine/e-Ukraine-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'e-Ukraine';
  src: url('/base/vendor/e-Ukraine/e-Ukraine-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

/* === GLOBAL STYLES === */
html,
html body,
body *,
input,
textarea,
button,
select,
.form-control,
.btn,
p,
h1,
h2,
h3,
h4,
h5,
h6,
span,
div,
a {
  font-family: 'e-Ukraine', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

/* Додатковий fallback для критично важливих елементів */
* {
  font-family: 'e-Ukraine', Arial, sans-serif !important;
}

/* === ICONS === */
.fa,
[class^="fa-"],
[class*=" fa-"] {
  font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "FontAwesome", "Font Awesome 5 Brands", "Font Awesome 6 Brands", sans-serif !important;
  font-weight: 900 !important;
}

.material-icons,
.icon {
  font-family: "Material Icons" !important;
}

/* === BACKGROUNDS === */
.bg-color {
  background: linear-gradient(120deg, #b7e2fa 0%, #bdc3ff 100%);
}

.bg-light-blue,
header.bg-light-blue {
  background: #97bdf6;
}

.header-container {
  margin-bottom: 20px;
  min-height: 450px;
  background: linear-gradient(1turn, #c2e59c, #64b3f4);
  display: flex;
  flex-direction: column;
}

.header-container--home {
  min-height: 100vh;
}

.header-container>header {
  flex: 0 0 auto;
}

/* .waves-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 400px;
  background: url(/base/images/waves.png) bottom center no-repeat;
  background-size: 115% auto;
  z-index: -1;
  animation: waves-move 12s ease-in-out infinite alternate;
  pointer-events: none;
  margin-top: 0px;
} */

@keyframes waves-move {
  0% {
    background-position: 0% 100%;
  }

  100% {
    background-position: 100% 100%;
  }
}

/* === HEADER === */
header,
header a,
header .fw-bold,
header .btn {
  color: #111 !important;
}

header .btn-primary,
header .btn-dark {
  color: #fff !important;
}

header .fa,
header [class^="fa-"],
header [class*=" fa-"] {
  color: unset !important;
}

.position-relative .badge {
  z-index: 10;
}

/* === NAVIGATION === */
.custom-navbar {
  background: linear-gradient(120deg, #b7e2fa 0%, #bdc3ff 100%);
  border-bottom: 1px solid #cfd8dc;
  padding: 0 48px;
  min-height: 70px;
}

.custom-navbar,
.navbar {
  padding-left: 32px;
  padding-right: 32px;
}

.custom-navbar-nav {
  gap: 48px;
  margin-left: 32px;
}

.custom-nav-link {
  font-size: 1.35rem;
  font-weight: 600;
  padding: 18px 36px !important;
  border-radius: 16px;
  color: #111 !important;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-nav-link i.fa {
  font-size: 1.3em;
  margin-right: 6px;
}

.custom-nav-link:hover,
.custom-nav-link:focus {
  background: rgba(0, 0, 0, 0.06);
  color: #000 !important;
  text-decoration: none;
}

.navbar-nav {
  gap: 32px;
}

.navbar-nav .nav-link {
  font-size: 1.15rem;
  position: relative;
  transition: color 0.2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #000;
}

.navbar-nav .nav-link::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: #000;
  transition: width 0.2s;
  position: absolute;
  left: 0;
  bottom: 0;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after {
  width: 100%;
}

/* Main Navigation */
.main-nav .nav-link-custom {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111 !important;
  transition: color 0.2s;
  padding: 0 8px;
}

.main-nav .nav-link-custom:hover,
.main-nav .nav-link-custom:focus {
  color: #1a237e !important;
  text-decoration: underline;
}

.nav-link-custom {
  font-size: 14px !important;
  font-weight: 700;
  color: #111 !important;
  transition: color 0.2s;
  padding: 0 8px;
}

/* === TABS === */
.nav-tabs>li.active>a,
.nav-tabs>li.active>a:focus,
.nav-tabs>li.active>a:hover {
  border-bottom: 3px solid #206b82 !important;
  color: #206b82 !important;
  background-color: #fff;
}

.main-tabs {
  border-bottom: 1.5px solid #e5e5e5;
  margin-bottom: 10px;
  padding-left: 0;
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.main-tabs>li {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: -2px;
}

.main-tabs>li>a {
  color: #2563eb;
  font-weight: 500;
  font-size: 1.13em;
  text-decoration: none;
  padding: 0 0 6px 0;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.main-tabs>li.active>a,
.main-tabs>li>a.active {
  color: #111;
  font-weight: 700;
}

.main-tabs>li.active>a::after,
.main-tabs>li>a.active::after {
  content: '';
  display: block;
  height: 4px;
  background: #2563eb;
  border-radius: 2px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
}

.main-tabs>li>a>i {
  margin-right: 6px;
  font-size: 1.1em;
}

/* Page Header Tabs */
.page-header {
  background: none !important;
  box-shadow: none !important;
  border-bottom: none !important;
}

.page-header .nav.nav-tabs {
  border-bottom: none;
  background: none;
  margin-bottom: 10px;
  padding-left: 0;
  display: flex;
  gap: 24px;
}

.page-header .nav.nav-tabs>li {
  position: relative;
  margin-bottom: -2px;
}

.page-header .nav.nav-tabs>li>a {
  color: #2563eb;
  font-weight: 500;
  font-size: 1.13em;
  text-decoration: none;
  background: none !important;
  border: none !important;
  padding: 0 0 6px 0;
  transition: color 0.2s;
  box-shadow: none;
  display: flex;
  align-items: center;
}

.page-header .nav.nav-tabs>li.active>a,
.page-header .nav.nav-tabs>li>a.active {
  color: #111;
  font-weight: 700;
}

.page-header .nav.nav-tabs>li.active>a::after,
.page-header .nav.nav-tabs>li>a.active::after,
.page-header .nav.nav-tabs>li>a:hover::after {
  content: '';
  display: block;
  height: 4px;
  background: #2563eb;
  border-radius: 2px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
}

.page-header .nav.nav-tabs>li>a:hover {
  color: #2563eb;
  background: none;
}

.page-header .nav.nav-tabs>li>a>i {
  margin-right: 6px;
  font-size: 1.1em;
}

/* === BUTTONS === */
.btn {
  font-size: 18px;
  border-radius: 50rem !important;
}

.btn-primary {
  color: #fff;
  background: #164e84;
  background-color: #1e6ced !important;
  border: none;
  border-color: #1e6ced !important;
  box-shadow: 0 4px 12px 0 rgba(53, 115, 234, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
}

.btn-primary:hover,
.btn-primary:focus {
  background: #2456b3;
  background-color: #2372f0 !important;
}

.btn-auth {
  font-size: 16px !important;
}

/* === USER ACTIONS === */
.user-actions {
  width: auto;
  justify-content: flex-end;
}

.user-actions>* {
  flex-shrink: 0;
}

.header-burger-btn {
  display: none;
  margin-left: auto;
  font-size: 24px;
  line-height: 1;
  padding: 10px 12px !important;
  min-width: 48px;
  min-height: 48px;
  border: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.header-burger-btn:hover,
.header-burger-btn:focus,
.header-burger-btn:active,
.header-burger-btn[aria-expanded="true"] {
  text-decoration: none !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

.header-burger-btn .burger-icon-close {
  display: none;
}

.header-burger-btn[aria-expanded="true"] .burger-icon-open {
  display: none;
}

.header-burger-btn[aria-expanded="true"] .burger-icon-close {
  display: inline-block;
}

.header-mobile-menu {
  margin-top: 12px;
}

.main-nav-mobile {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-nav-mobile .nav-link-custom {
  display: block;
  padding: 8px 0;
}

.mobile-user-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.mobile-user-actions .btn-auth {
  justify-content: flex-start !important;
  text-align: left !important;
  margin: 0 !important;
  padding-left: 0 !important;
}

.mobile-logout-form {
  margin-top: 8px;
}

.mobile-logout-form .btn-auth {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding-left: 1rem !important;
}

/* === LAYOUT COMPONENTS === */
.vr {
  width: 2px;
  min-height: 48px;
  background-color: #bbb;
}

.logo {
  width: 40%;
}

.header-container .logo {  
  width: auto;
  max-width: 100%;
  justify-content: center;
}

.header-container .logo-title {
  min-width: 0;
  width: auto;
  font-size: 30px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

ul.organization-list {
  padding-left: 0;
}

/* Layout helpers */
header,
.homepage-hero,
.container-fluid {
  position: relative;
  z-index: 1;
}

/* === HOMEPAGE === */
.homepage-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
  padding: 60px 0 8px 0;
  animation: waves-move 9s ease-in-out infinite alternate;
}

.homepage-logos {
  display: flex;
  gap: 64px;
  margin-bottom: 32px;
  justify-content: center;
}

.homepage-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.homepage-logo img {
  width: 56px;
  height: 56px;
}

.homepage-title {
  font-size: 40px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 40px 0;
  color: #111;
  letter-spacing: 1px;
  z-index: 1;
  margin-top: 100px;
}

/* Homepage Search */
.homepage-search {
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.homepage-search-bar-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 0 32px;
  height: 57px;
  margin-top: 15px;
}

.title_style {
  /* background-color: #97bdf6; */
  margin: auto;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  padding: 1px;
}

.header-container .title_style {
  background-color: transparent;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.header-container .moved-header-logos {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.header-container .homepage-title {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 12px;
  padding-right: 12px;
}

.header-container .homepage-search {
  margin-top: 0;
  padding-left: 12px;
  padding-right: 12px;
}

.homepage-search-bar {
  display: flex;
  align-items: center;
  width: 800px;
  max-width: 98vw;
  background: #ffffff96;
  border: 2px solid #2563EB;
  border-radius: 48px;
  box-shadow: 0 2px 12px 0 #2563eb22;
  padding: 6px 12px 6px 32px;
  position: relative;
}

@media (max-width: 899.98px) {
  .homepage-search-bar {
    width: 100%;
    max-width: 720px;
  }
}

.homepage-search-input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  color: #222;
  font-weight: 400;
  padding: 16px 0;
  min-width: 0;
}

.homepage-search-input::placeholder {
  color: #bbb;
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 1;
}

.homepage-search-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px;
  min-height: 38px;
  margin-left: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
}

.homepage-search-btn img {
  width: 38px !important;
  height: 38px !important;
  left: 0;
  top: 0;
  position: absolute;
  transform: translateY(0);
}

.homepage-search-btn:hover .search-ellipse,
.homepage-search-btn:focus .search-ellipse {
  filter: brightness(1.25);
}

/* Homepage Help Link */
.homepage-help-link {
  position: absolute;
  right: 48px;
  bottom: 32px;
  font-size: 22px;
}

.homepage-help-link a {
  color: #111;
  text-decoration: none;
  font-weight: 500;
}

.homepage-help-link .arrow-right {
  font-size: 1.5em;
  vertical-align: middle;
}

/* === CATEGORIES === */
.categories-bg {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.03);
  padding: 32px 32px 16px 32px;
  margin: 0 auto 16px auto;
}

.media-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 0;
  padding-bottom: 0.5rem;
  margin: 0;
  list-style: none;
}

/* Group listing: override core float grid from main.css */
.media-grid > .clearfix.js-hide {
  display: none;
}

.media-grid .media-item,
.media-grid .module-item {
  float: none !important;
  margin: 0 !important;
  width: calc((100% - 48px) / 3) !important;
  max-width: none;
  box-sizing: border-box;
}

.module-grid {
  margin: 0 0 20px 0;
  list-style: none;
  padding-left: 0px;
  min-height: fit-content !important;
  padding-top: 0.75rem;
  border: 1px solid #ddd;
  border-width: 0 0;
  text-align: center;
}

.media-grid,
body.group .module-grid {
  background: transparent !important;
  background-image: none !important;
}

.category-card {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: none;
  flex: 1 1 0;
  min-width: 260px;
  max-width: 370px;
  margin-bottom: 24px;
  padding: 24px 24px 24px 0;
  border-bottom: 3px solid #e6e8ef;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  transition: box-shadow 0.2s;
}

.category-card:hover,
.category-card:focus {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.36);
  text-decoration: none;
  color: inherit;
}

.category-card__icon {
  flex: 0 0 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  margin-right: 24px;
}

.category-card__icon img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.2);
}

.category-card__content {
  flex: 1 1 auto;
  text-align: left;
}

.category-card__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #222;
}

.category-card__datasets {
  font-size: 16px;
  color: #444;
  font-weight: 400;
}

/* === GROUPS === */
.group-mainpage-item:hover {
  background: #f5f5f5;
  border-radius: 8px;
  transition: background 0.2s;
}

.group-mainpage-icon {
  filter: grayscale(100%);
}

.group-mainpage-title {
  color: #3d5c7b;
}

.all-groups-link-item {
  text-align: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 150px;
  min-height: 150px;
  max-height: 150px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  margin: 0 auto;
  box-shadow: none;
  transition: transform 0.13s cubic-bezier(.4, 2, .6, 1), box-shadow 0.13s;
}

.all-groups-link-item:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
}

.all-groups-link-inside-card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-decoration: none;
  color: #111;
  font-size: 16px;
  font-weight: 700;
}

.all-groups-link-inside-card:hover,
.all-groups-link-inside-card:focus {
  color: #111;
  text-decoration: none;
}

/* === FACETS === */
.nav-facet {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-facet .nav-item {
  margin-bottom: 10px;
}

.nav-facet .nav-item a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #2563eb;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0;
  background: none;
  border: none;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-facet .nav-item a:hover,
.nav-facet .nav-item a:focus {
  background: #f2f6fa;
  color: #1746a2;
  text-decoration: none;
}

.item-label {
  flex: 1 1 0;
  min-width: 0;
  /* overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; */
  white-space: normal;
  overflow-wrap: break-word;
}

.item-count.badge {
  margin-left: auto;
  flex-shrink: 0;
}

/* === MODULES === */
.module>.page-header {
  margin-bottom: 15px;
}

.module-resource {
  background-color: transparent !important;
}

.module-narrow .module-heading,
.module-narrow .module-content,
.module-narrow .module-footer {
  padding-left: 0 !important;
}

.module.module-narrow.module-shallow {
  background: #fff;
  /* border-radius: 32px; */
  box-shadow: none;
  padding: 32px 24px 24px 24px;
  margin-bottom: 32px;
  border: none;
  position: relative;
}

.module-heading {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #111;
  background-color: transparent !important;
  border-bottom: none !important;
  border-top: none !important;
}

.module-heading .fa-filter {
  font-size: 1.2rem;
  color: #111;
  margin-right: 8px;
  vertical-align: middle;
}

.module-content {
  padding: 0 !important;
}

.module-content.empty {
  color: #bbb;
  font-size: 1.1rem;
  margin: 24px 0;
  text-align: center;
  background: none;
  border: none;
  padding: 0;
}

.module-footer {
  border: none;
  background: none;
  margin: 0;
  padding: 0;
  min-height: 0;
}

.module-shallow .module-content:first-child {
  padding-top: 10px;
  padding-bottom: 10px !important;
}

.module-shallow .module-content:last-child {
  padding-bottom: 10px !important;
}

/* Filters (sidebar) */
aside.secondary .filters {
  padding: 0 0 16px 0;
  background: none;
  border: none;
}

/* === MAINPAGE COMPONENTS === */
/* Media Grid */
.media-item {
  width: calc((100% - 48px) / 4);
}

.media-grid .media-item,
.media-grid .module-item {
  min-height: clamp(170px, 20vw, 240px);
  display: flex;
  flex-direction: column;
}

/* @media (max-width: 768px) {
  .media-grid .media-item,
  .media-grid .module-item {
    min-height: clamp(130px, 28vw, 180px);
  }
} */

.media-grid .media-item .media-image,
.media-grid .module-item .media-image {
 padding: 30px;
}

@media (max-width: 768px) {
  .media-grid .media-item .media-image,
  .media-grid .module-item .media-image {
    height: 200px;
  }
}

.media-grid-mainpage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0 0 32px 0;
  list-style: none;
  min-height: fit-content;
  background: #fafafa;
}

.media-item-main,
.media-item-main.empty {
  text-align: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 150px;
  min-height: 150px;
  max-height: 150px;
  background: #fff;
  /* border-radius: 20px; */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  margin: 0 auto;
  box-shadow: none;
  transition: transform 0.13s cubic-bezier(.4, 2, .6, 1), box-shadow 0.13s;
}

.media-item-main.empty {
  display: none;
  background: transparent;
}

.media-item-main:hover,
.media-item-main-link:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
}

.media-item-main-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.13s cubic-bezier(.4, 2, .6, 1), box-shadow 0.13s;
  text-decoration: none;
}

.media-item-main .media-image-main {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  object-fit: contain;
  display: block;
  filter: grayscale(100%);
  margin: auto;
}

.media-item-main .media-title-main {
  font-size: 16px;
  font-weight: 700;
  margin-top: 12px;
  margin-bottom: 0;
  color: #111;
  text-align: center;
  width: 100%;
  word-break: break-word;
  line-height: 1.2;
}

/* Statistics */
.statistics-mainpage-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 40px 0 32px 0;
  background: transparent;
}

.statistics-mainpage {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04);
  padding: 36px 32px;
  gap: 0;
  min-width: 320px;
  width: 100%;
  margin: 0 auto;
}

.stat-mainpage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 160px;
  flex: 0 0 auto;
}

.statistics-mainpage .stat-mainpage-item:nth-child(2) {
  margin: 0 auto;
}

.stat-mainpage-number {
  font-size: 3.2rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
  font-family: 'e-Ukraine', Arial, sans-serif;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.stat-mainpage-label {
  font-size: 1.25rem;
  color: #222;
  font-family: 'e-Ukraine', Arial, sans-serif;
  font-weight: 400;
  margin-top: 0;
  text-align: center;
  letter-spacing: 0.01em;
}

/* Recent Datasets */
.recent-datasets-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 32px auto;
}

.recent-datasets-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.recent-dataset-link {
  flex: 1 1 calc(33% - 24px);
  min-width: 260px;
  background: #fff;
  border: 1px solid #e0e0e0;
  /* border-radius: 16px; */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  padding: 20px 18px 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 0;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.13s cubic-bezier(.4, 2, .6, 1), box-shadow 0.13s;
}

.recent-dataset-link:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
  text-decoration: none !important;
}

.recent-dataset-title {
  font-size: 1.2em;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 8px;
  text-decoration: none !important;
}

.recent-dataset-meta {
  margin-bottom: 8px;
  color: #222;
}

.recent-dataset-meta .org-title {
  font-weight: 600;
  margin-left: 12px;
  color: #222;
}

.recent-dataset-tags {
  margin-bottom: 8px;
}

.recent-dataset-tag {
  display: inline-block;
  background: #f5f5f5;
  border: 1px solid #bbb;
  /* border-radius: 16px; */
  padding: 2px 14px;
  font-size: 14px;
  margin-right: 6px;
  margin-bottom: 4px;
  color: #222;
}

.recent-dataset-resources {
  margin-top: 4px;
}

.recent-dataset-resource {
  display: inline-block;
  background: #4caf50;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  padding: 2px 12px;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 2px;
}

.recent-dataset-card--empty {
  flex: 1 1 calc(33% - 24px);
  min-width: 260px;
  background: #fafafa;
  border: 1px dashed #e0e0e0;
  /* border-radius: 16px; */
  box-shadow: none;
  padding: 20px 18px 16px 18px;
}

/* Mainpage Blocks */
.mainpage-flex-row {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  flex-direction: row;
  margin-bottom: 30px;
}

.mainpage-block {
  background: #fff;
  /* border-radius: 16px; */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 32px 24px;
  flex: 1 1 0;
  min-width: 320px;
  max-width: 370px;
  box-sizing: border-box;
}

.mainpage-block--left {
  max-width: 370px;
  min-width: 320px;
  flex: 0 0 370px;
}

.mainpage-block--right {
  max-width: 100%;
  min-width: 0;
  flex: 1 1 0;
}

.mainpage-block-title-small {
  font-size: 1.3em;
  font-weight: 700;
}

.mainpage-block-title-large {
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 24px;
}

.mainpage-tab-label {
  font-size: 1.1em;
  font-weight: 600;
}

/* === FOOTER === */
.custom-footer {
  background: #f7f9fc !important;
  color: #23408e !important;
  font-size: 1.08rem;
  border-top: none;
}

.custom-footer .footer-title {
  font-weight: 700;
  color: #23408e;
  font-size: 1.1rem;
}

.custom-footer .footer-subtitle {
  color: #23408e;
  font-size: 1rem;
}

.custom-footer a,
.custom-footer .footer-link {
  color: #3573ea !important;
  text-decoration: underline;
  transition: color 0.2s;
}

.custom-footer a:hover,
.custom-footer .footer-link:hover {
  color: #1746a2 !important;
  text-decoration: underline;
}

.custom-footer .footer-support-label {
  color: #7a869a;
  font-size: 1rem;
  margin-right: 8px;
}

.custom-footer hr {
  border-color: #e0e4ef;
}

.custom-footer img {
  vertical-align: middle;
}

.footer-icon-black {
  filter: grayscale(100%) brightness(0) invert(0);
}

.footer-icon {
  width: 50px;
}

.no-radius-end {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.no-radius-start {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* === MEDIA QUERIES === */
@media (max-width: 767.98px) {
  .header-container .logos-row {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .header-desktop-nav {
    display: none !important;
  }

  .header-auth-actions {
    display: none !important;
  }

  .header-burger-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 6px !important;
  }

  .header-mobile-menu {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .header-burger-btn,
  .header-mobile-menu {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .logos-row {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.75rem;
  }

  .header-auth-actions {
    margin-left: 0 !important;
  }

  .col-md-3.align-items-start {
    align-items: center !important;
    text-align: center !important;
  }
}

.logos-row>a {
  margin-right: 0 !important;
}

.main-nav {
  flex-direction: row !important;
  justify-content: flex-start !important;
  overflow-x: auto;
  white-space: nowrap;
  width: 100%;
}

.main-nav a {
  display: inline-block;
  margin-right: 16px;
  margin-bottom: 0 !important;
}

.user-actions {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  gap: 8px;
}

.user-actions .btn-auth {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  margin: 4px 0 !important;
}

.logout-form {
  display: flex !important;
  justify-content: center !important;
  margin-top: 8px !important;
  max-width: 230px;
}

.logout-form .btn {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.waves-bg {
  background-size: 110% auto;
}


@media (max-width: 767.98px) {
  .user-actions {
    width: 100% !important;
    justify-content: center !important;
  }

  .custom-footer .col-md-6 {
    justify-content: center !important;
    text-align: center !important;
    margin-bottom: 16px;
  }

  .resource-item .description {
    white-space: normal;
    width: 100%;
    display: block;
  }
}

@media (min-width: 768px) {
  .logos-row {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
}

@media (max-width: 991.98px) {
  .logo {
    width: 40%;
  }

  .header-container .logo {
    width: auto !important;
  }

  .main-nav {
    flex-wrap: wrap;
    gap: 1rem !important;
  }

  header .d-flex.flex-wrap.align-items-center.justify-content-between {
    flex-direction: column !important;
    align-items: center !important;
  }

  header .d-flex.align-items-center.flex-shrink-0 {
    justify-content: center !important;
    width: 100%;
    margin-bottom: 1rem;
  }

  header nav.main-nav {
    justify-content: center !important;
    width: 100%;
    margin-bottom: 1rem;
  }

  header .d-flex.align-items-center.flex-shrink-0.mt-3 {
    justify-content: center !important;
    width: 100%;
    margin-bottom: 0;
  }
}

@media (max-width: 1000px) {
  .category-card {
    width: calc(50% - 24px);
    min-width: 200px;
  }

  .categories-bg {
    padding: 24px 8px 8px 8px;
  }
}

@media (max-width: 1200px) {
  .custom-navbar-nav {
    gap: 24px;
    margin-left: 0;
  }

  .custom-nav-link {
    padding: 14px 16px !important;
    font-size: 1.1rem;
  }

  .media-grid-mainpage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {

  .custom-navbar,
  .navbar {
    padding: 0 8px;
  }

  .mainpage-flex-row {
    flex-direction: column;
    gap: 16px;
  }

  .mainpage-block,
  .mainpage-block--left,
  .mainpage-block--right {
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100%;
  }

  .statistics-mainpage {
    gap: 24px;
    padding: 24px 8px;
    max-width: 98vw;
  }

  .stat-mainpage-item {
    min-width: 100px;
  }
}

@media (max-width: 700px) {
  .custom-navbar {
    padding: 0 8px;
  }

  .homepage-title {
    margin-top: 10px;
  }

  .custom-navbar-nav {
    gap: 8px;
  }

  .category-card {
    width: 100%;
    min-width: 0;
    margin: 0 0 16px 0;
  }

  .categories-bg {
    padding: 12px 0 0 0;
  }

  .media-item-main .media-image-main {
    width: 40px;
    height: 40px;
  }

  .media-item-main .media-title-main {
    font-size: 12px;
  }

  .all-groups-link-inside-card {
    font-size: 12px;
  }

  .recent-datasets-grid {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 1024px) {
  .media-grid-mainpage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .media-grid .media-item,
  .media-grid .module-item {
    width: calc((100% - 32px) / 3) !important;
  }
}

@media (max-width: 991px) {
  .media-grid .media-item,
  .media-grid .module-item {
    width: calc((100% - 32px) / 2) !important;
  }
}

@media (max-width: 768px) {
  .media-grid-mainpage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-grid .media-item,
  .media-grid .module-item {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .media-grid-mainpage {
    grid-template-columns: 1fr;
  }

  /* .media-grid .media-item,
  .media-grid .module-item {
    width: 100% !important; 
  } */
}

@media (max-width: 380px) {
  .media-grid-mainpage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .statistics-mainpage {
    flex-direction: column;
    gap: 12px;
    padding: 12px 4px;
  }

  .stat-mainpage-item {
    min-width: 0;
  }

  .stat-mainpage-number {
    font-size: 2.1rem;
  }

  .stat-mainpage-label {
    font-size: 1rem;
  }

  .logo {
    width: 50% !important;
  }

  .header-container .logo {
    width: auto !important;
  }
}

/* Стилі для вкладок модерації */
.moderation-tabs {
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.moderation-tabs .nav-tabs {
  border-bottom: none;
}

.moderation-tabs .nav-tabs > li > a {
  border-radius: 4px 4px 0 0;
  margin-right: 2px;
  padding: 10px 15px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  color: #666;
  text-decoration: none;
  cursor: pointer;
}

.moderation-tabs .nav-tabs > li.moderation-active > a {
  background-color: #fff;
  border-bottom-color: transparent;
  color: #333;
  font-weight: bold;
}

.moderation-tabs .nav-tabs > li > a:hover {
  background-color: #e9e9e9;
  border-color: #ccc;
}

.moderation-tabs .nav-tabs > li.moderation-active > a:hover {
  background-color: #fff;
}

.moderation-tabs .badge {
  background-color: #337ab7;
  margin-left: 5px;
}

.moderation-tab-content {
  padding-top: 20px;
}

.moderation-tab-pane {
  display: none;
}

.moderation-tab-pane.moderation-active {
  display: block;
}
