.md-typeset code{
  font-size:105%;
}

.md-typeset pre{
  font-size:110%;
}

p {
  text-align: justify;
}

.md-typeset__table {
  min-width: 100%;
}

.md-typeset__table td:first-child {
  min-width: 35%;
}

.md-header {
  background-color: #172028;
}

.md-footer {
  background-color: #172028;
}

.gp {
  -webkit-user-select: none;
  -khtml-user-drag: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -moz-user-select: -moz-none;
  -ms-user-select: none;
  user-select: none;
}

.md-tabs {
  background-color: #172028;
}
.md-tabs a:hover { 
  color: #bf60db;                  
  transform: scale(1.1);              
}

/*hero section*/
.hero {
  text-align: center;
  color: var(--md-primary-bg-color);
  padding: 4rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out;
  opacity: 95%;
  backdrop-filter: blur(2px);
}

.hero-link-group {
  display: inline-block;
  max-width: 800px;   
  margin: 0 auto;     
  text-decoration: none !important;
  transition: transform 0.3s ease; 
  cursor: pointer;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: white!important;
  letter-spacing: -0.02em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.4);
  transition: color 0.3s ease, text-shadow 0.3s ease; 
}

.hero-description {
  font-size: 0.7rem;   
  font-weight: 600; 
  line-height: 2;
  color: white !important;
  opacity: 1;
  text-align: center;  
  display: block;     
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  transition: color 0.3s ease, text-shadow 0.3s ease; 
}

.hero-link-group:hover h1 {
  color: var(--md-primary-fg-color) !important;  
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9); 
}

.hero-link-group:hover .hero-description {
  color: var(--md-primary-fg-color) !important;  
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9);                
}


@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero-description {
    font-size: 1rem;
  }
}

/*statistics*/
.stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr); 
  gap: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
  width: 100%; 
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
  align-items: center; 
}

.stat {
  background: var(--md-default-bg-color);
  border: solid;
  border-color: var(--md-primary-fg-color);
  border-radius: 0.5rem;
  padding: 1.5rem 0.75rem; 
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 95%;
}

.stat:hover { 
  transform: translateY(-3px); 
  box-shadow: 0 5px 15px rgba(124, 71, 145, 0.2);
}

.stat-num {
  font-size: 2.4rem;    
  font-weight: 800;
  color: var(--md-primary-fg-color);
  line-height: 1.1;
  margin-bottom: 6px;   
  font-feature-settings: "tnum";
}

.stat-lbl { 
  font-size: 0.6rem;   
  color: var(--md-accent-fg-color); 
  opacity: 0.6; 
  line-height: 1.3; 
  font-weight: 600;
  text-transform: uppercase; 
  letter-spacing: .06em; 
}

.static-part { 
  font-size: inherit; 
  font-weight: inherit; 
  color: inherit; 
}

@media (max-width: 1024px) {
  .stat-row {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 600px) {
  .stat-row {
    grid-template-columns: 1fr;
  }
}

/*clusters presentation grid*/
.cluster-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.cluster-grid .cluster-card:last-child:nth-child(odd) {
  grid-column: span 2;
}

.cluster-card {
  background: var(--md-default-bg-color);
  border: solid;
  border-color: var(--md-primary-fg-color);
  border-radius: 0.5rem;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  opacity: 95%;
  max-height: 500px;
}

.cluster-card.featured {
  border-width: 2px;
  position: relative;
  opacity: 95%;
}

.cluster-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.cluster-header h3 {
  margin: 0 !important;
  font-size: 1.5rem;
}

.cluster-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 10px;
  margin-top: auto;
}

.cluster-buttons hr {
  grid-column: span 2;
  border: 0;
  border-top: 1px solid #eeeeee33;
  margin: 10px 0;
}

.btn-cluster {
  padding: 0.7rem 1.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  border: solid;
  border-radius: 6px;
  border-color: var(--md-primary-fg-color);
  text-decoration: none;
  color: var(--md-accent-fg-color) !important;
  transition: 0.2s;
}

.btn-cluster:hover {
  background: var(--md-primary-fg-color);
  color: white !important;
}

.btn-special {
  grid-column: span 1;
  padding: 0.8rem;
  font-size: 0.85rem;
  font-weight: bold;
  text-align: center;
  background: var(--md-primary-fg-color);
  color: white !important;
  border-radius: 6px;
  text-decoration: none;
}

.btn-special:hover {
  filter: brightness(1.2);
}


@media (max-width: 768px) {
  .cluster-grid {
    grid-template-columns: 1fr; 
  }
  .cluster-grid .cluster-card:last-child:nth-child(odd) {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .cluster-buttons {
    grid-template-columns: 1fr; 
  }
  .cluster-buttons hr, .btn-special {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .cluster-buttons {
    grid-template-columns: 1fr;
  }
  .cluster-buttons hr, .btn-special {
    grid-column: span 1;
  }
}

/* Announcements Card*/
.news-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; 
  max-height: 500px; 
  box-sizing: border-box;
}

#hpc-announcements-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  overflow-y: auto; 
  padding-right: 6px; 
}

#hpc-announcements-container::-webkit-scrollbar {
  width: 4px;
}
#hpc-announcements-container::-webkit-scrollbar-thumb {
  background: var(--md-primary-fg-color);
  border-radius: 4px;
}

.news-item {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.5rem; 
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-size: 0.65rem;
  color: var(--md-accent-fg-color);
  opacity: 0.55;
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 0.02em;
}

.news-title-link {
  font-size: 0.85rem; 
  font-weight: 500;
  color: var(--md-accent-fg-color) !important;
  text-decoration: none !important;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.news-item:hover .news-title-link {
  color: var(--md-primary-fg-color) !important;
}

.news-loading, .news-empty, .news-error {
  font-size: 0.8rem;
  opacity: 0.6;
  padding: 1.5rem 0;
  text-align: center;
  font-style: italic;
}

.news-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.8rem;
  width: 100%;
  background: var(--md-default-bg-color); 
}

.news-btn-all {
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--md-accent-fg-color) !important;
  opacity: 0.8;
  text-decoration: none !important;
  transition: opacity 0.2s ease, color 0.2s ease;
  width: fit-content;
}

.news-btn-all:hover {
  opacity: 1;
  color: var(--md-primary-fg-color) !important;
}

/* Request cards */
.hpc-section-label {
  margin-top: 3rem;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease-out;
}

.hpc-section-label h2 {
  color: #ffffff !important;
  mix-blend-mode: difference;
  font-weight: bold;
  font-size: 1.5rem;
  margin: 0;
}

.req-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1rem;
  width: 100%;
}

.hpc-req-more-card {
  background: var(--md-primary-fg-color) !important; 
  border-color: transparent !important;
  border-radius: 0.5rem !important;
  color: #ffffff !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  opacity: 95%;
}

.hpc-req-more-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.hpc-req-more-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
}

.hpc-req-more-action {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  border-top: 1px solid #ffffff;
  padding-top: 0.75rem;
  width: 100%;
  color: #ffffff !important;
}

.hpc-arrow {
  transition: transform 0.25s ease;
}

.hpc-req-card:hover {
  transform: translateY(-3px) !important;
  background: var(--md-default-bg-color) !important;
  border-color: var(--md-primary-fg-color) !important;
  box-shadow: none !important;
}

.hpc-req-more-card:hover {
  transform: translateY(-3px) !important;
  background: var(--md-primary-fg-color) !important;
  filter: brightness(1.15) !important;
}

.hpc-requests-intro {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--hpc-accent-light);
  border-left: 3px solid var(--hpc-accent);
  border-radius: 0 var(--hpc-radius-sm) var(--hpc-radius-sm) 0;
  padding: 1rem 1.5rem;
  font-size: 15px;
  color: var(--hpc-text2);
  line-height: 1.85;
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.6s ease-out;
}

.hpc-requests-intro svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--hpc-accent2);
}

.hpc-req-card {
  box-sizing: border-box;
  background: var(--md-default-bg-color);
  border: solid;
  border-color: var(--md-primary-fg-color);
  border-radius: 0.5rem !important;
  padding: 1.2rem; 
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: fadeInUp 0.7s ease-out;
  opacity: 95%;
  height: 100%; 
}

.hpc-req-card:hover {
  transform: translateY(-3px) !important;
}

/* SVG card icon */
.hpc-req-emoji {
  color: var(--hpc-accent2);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.hpc-req-emoji svg {
  display: block;
}

.hpc-req-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--md-accent-fg-color);
}

.hpc-req-desc {
  font-size: 13px;
  color: var(--md-default-fg-color);
  line-height: 1.6;
  opacity: 0.8;
  flex: 1;
}

.hpc-req-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--md-primary-fg-color);
  margin-top: 0.6rem;
  letter-spacing: 0.02em;
}

@media (max-width: 1100px) {
  .req-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 650px) {
  .req-grid {
    grid-template-columns: 1fr !important; 
  }
}

/* EUROCC trainings video preview*/
.video-section-title {
  margin-top: 3rem;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease-out;
}

.video-section-title h2 {
  color: #ffffff !important; 
  mix-blend-mode: difference;
  font-weight: bold;
  font-size: 1.5rem;
  margin: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); 
  gap: 1.5rem;
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease-out;
}

.video-card {
  background: var(--md-default-bg-color);
  border: solid;
  border-color: var(--md-primary-fg-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  opacity: 95%;
}

.video-card:hover {
  transform: translateY(-3px);
}

.thumb-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; 
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}

.thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.video-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(23, 32, 40, 0.95); 
  padding: 1rem;
  display: block;       
  overflow-y: auto;        
  max-height: 100%;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-overlay::-webkit-scrollbar {
  width: 4px;
}
.video-overlay::-webkit-scrollbar-thumb {
  background: var(--md-primary-fg-color);
  border-radius: 4px;
}

.video-desc {
  color: white !important;
  font-size: 0.7rem !important;
  line-height: 1.4;
  text-align: center;
  margin: 0 !important;
}

.video-card:hover .video-overlay {
  opacity: 1;
}

.video-title {
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.75rem;
  color: var(--md-accent-fg-color);
  text-align: left;
}

.video-all-btn-card {
  background: var(--md-primary-fg-color) !important; 
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  text-decoration: none !important;
  transition: transform 0.3s ease, filter 0.3s ease; 
  cursor: pointer;
  opacity: 95%;
}

.video-all-btn-card:hover {
  transform: translateY(-3px);
  filter: brightness(1.15); 
}

.btn-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.video-all-btn-card .play-icon {
  font-size: 1.4rem;
  color: white !important; 
  transition: color 0.3s ease;
}

.video-all-btn-card h3 {
  font-size: 0.9rem !important;
  font-weight: 700;
  margin: 0 !important;
  color: white !important; 
}

.video-all-btn-card p {
  font-size: 0.65rem !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.85) !important; 
}

.video-all-btn-card h3 {
  font-size: 0.9rem !important;
  font-weight: 700;
  margin: 0 !important;
  color: var(--md-accent-fg-color);
  transition: color 0.3s ease;
}

.video-all-btn-card p {
  font-size: 0.65rem !important;
  margin: 0 !important;
  color: var(--md-accent-fg-color);
  opacity: 0.7;
  transition: color 0.3s ease;
}

.video-all-btn-card:hover h3,
.video-all-btn-card:hover p,
.video-all-btn-card:hover .play-icon {
  color: white !important;
  opacity: 1;
}

@media (max-width: 960px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr); 
  }
}

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

/*page reload animation*/
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/*page colours definition*/
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #7c4791fc;
  --md-accent-fg-color: black;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color:#9a62bbfc;
  --md-accent-fg-color: white;
}

/*homepage background*/
body#__homepage::before {
  content: "";
  position: fixed;
  top: 0;
  left:0;
  width: 100%;
  height: 65%; 
  background-image: url('../assets/docs_background.png');
  background-size: cover ;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  filter:blur(2px);
}

/*links colour definition*/
body:not(#__homepage) .md-typeset a {
  color: #2a7ae2;
}

body:not(#__homepage) .md-typeset a:hover {
  color: #1c56a6;
}