:root{
  /* Violet theme */
  --main_color-1:#6d28d9;   /* header/footer */
  --main_color-2:#5b21b6;   /* nav */
  --main_color-3:#7c3aed;   /* accents (optional) */

  /* neutrals */
  --text:#1d232a;
  --muted:#5b6672;
  --bg:#ffffff;
  --card:#f7f5ff;
  --border:#e7defa;
}

*{ box-sizing: border-box; }

/* никога да няма хоризонтален overflow на whole page */
html, body{
  max-width: 100%;
  overflow-x: hidden;
}

body{
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

/*  всички изображения да са responsive */
img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* CONTAINER */
.container{
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}


/* HEADER */
header{
  background-color: var(--main_color-1);
  color: #fff;
}

header .container{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* Logo */
.logo{
  width: 500px;      /* desktop target size */
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* Heading */
.heading{
  text-align: center;
  margin: 0;
  color: #fff;
  text-shadow:
          0 3px 6px rgba(0, 0, 0, 0.5),
          0 8px 16px rgba(0, 0, 0, 0.4),
          0 0 14px rgba(124, 58, 237, 0.55);

  /* да се пренася на нов ред и да не прелива */
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Translate button */
#translateButton{
  background: #ffffff;
  color: var(--main_color-1);
  border: 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, opacity .2s ease;
  max-width: 100%;
}

#translateButton:hover{ opacity: .92; }
#translateButton:active{ transform: scale(0.98); }

/* NAV */
nav{
  background-color: var(--main_color-2);
  color: #fff;
}

nav .container{
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* links */
nav a{
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  display: inline-block;
  border-radius: 999px;
  transition: background-color .2s ease, color .2s ease;

  /*  ако някой текст стане дълъг */
  overflow-wrap: anywhere;
  word-break: break-word;
}

nav a{
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; /* тестово */
}


nav a:not(.active):hover{
  background-color: rgba(255,255,255,0.18);
}


/* active link */
nav .active{
  background-color: #ffffff;
  color: var(--main_color-1);
  font-weight: 700;
}

/* ===== Responsive collapsible nav ===== */
.nav-wrap{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-toggle{
  display: none; /* hidden on desktop */
  width: 100%;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.nav-links{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* MAIN CONTENT */
h4{
  margin: 18px 0 10px;
  font-size: 18px;
}

/*  всички текстове да могат да се пренасят */
p, li, h3, h4{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Work program blocks */
.work-program p{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 0;
}

.work-program ul{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px 10px 26px;
  margin-top: -6px;
  margin-bottom: 14px;

  /* да не надува ширината */
  max-width: 100%;
}

.work-program li{
  margin: 6px 0;
}

/* ===== Schedule table responsive improvements ===== */
.table-scroll{
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

/* таблицата да е "max-content", за да скролва вътре */
.schedule-table{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;              /* равни колони, по-красиво */
}

/* cells */
.schedule-table th,
.schedule-table td{
  border: 1px solid #dddddd;
  text-align: center;
  padding: 10px 8px;
  font-size: 13px;
  white-space: nowrap; /* за таблицата е ОК */
}

.schedule-table th{
  background-color: #f2f2f2;
}

/* highlight */
.highlight{
  background: #e7e3ff;
}

/* sticky first column */
.schedule-table th:first-child,
.schedule-table td:first-child{
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  font-weight: 700;
}

/* sticky header row */
.schedule-table thead th{
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f2f2f2;
}

/* FOOTER */
footer{
  background-color: var(--main_color-1);
  color: #fff;
  padding: 22px 0;
  text-align: center;
  margin-top: auto;
}

.footer-content{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-section{
  flex: 1;
  min-width: 240px;

  /*  да не избутва */
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.logoFooter{
  width: min(360px, 90%);
  height: auto;
  margin: 18px auto 0;
}

footer .copyright{
  text-align: center;
}

/* Bibliography look (ако го ползваш на други страници) */
ol{
  margin: 10px 0 22px;
  padding-left: 22px;
}

ol li{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0;
}

ol li strong{ font-weight: 700; }
ol li em{ color: var(--muted); }

/* Link badges */
ol li a{
  color: var(--main_color-1);
  text-decoration: none;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 4px 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e3e7ee;
  line-height: 1.3;
  margin-top: 8px;

  /* да не излиза, да се реже с ... ако е прекалено дълго */
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

ol li a:hover{
  border-color: rgba(12,108,180,0.35);
  background: #fbfdff;
}

/* Default badge */
ol li a::before{
  content: "LINK";
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #1d232a;
  flex: 0 0 auto;
}

/* DOI badge */
ol li a[href*="doi.org"]::before{
  content: "DOI";
  background: rgba(12,108,180,0.12);
  color: #0c6cb4;
  border: 1px solid rgba(12,108,180,0.25);
}

/* PDF badge */
ol li a[href$=".pdf"]::before{
  content: "PDF";
  background: rgba(52,122,188,0.14);
  color: #1d232a;
  border: 1px solid rgba(52,122,188,0.25);
}

/* ===== Responsive ===== */
@media (max-width: 768px){
  .container{ padding: 14px; }

  h3{
    font-size: 20px;
    line-height: 1.25;
    margin: 14px 0 10px;
  }

  h4{
    font-size: 17px;
    margin: 16px 0 10px;
  }

  .footer-content{
    flex-direction: column;
  }

  /* collapsible nav */
  .nav-toggle{ display: block; }

  .nav-links{
    display: none;
    flex-direction: column;
    gap: 6px;
  }

  .nav-links.is-open{ display: flex; }

  .nav-links a{
    width: 100%;
    text-align: center;
    border-radius: 12px;
  }
}

@media (max-width: 480px){
  .container{ padding: 12px; }

  .logo{
    width: 90%;
    max-width: 320px;
  }

  .heading{
    font-size: 15px;
    line-height: 1.25;
  }

  #translateButton{
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 768px){
  /* sticky в таблица + overflow auto = често прави overflow на телефон */
  .schedule-table th:first-child,
  .schedule-table td:first-child,
  .schedule-table thead th{
    position: static !important;
  }

  /* на мобилен не ни трябва min-width 880 да бута layout-а */
  .schedule-table{
    min-width: 760px; /* пак ще скролва, но по-малко агресивно */
  }
}

/* ===== Contacts (compact & soft grid) ===== */
.contact-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  max-width: 820px;
}

/* ред */
.contact-row{
  display: grid;
  grid-template-columns: 140px 1fr; /* ⬅ по-тясна колона */
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(109,40,217,0.18);
}

.contact-row:last-child{
  border-bottom: 0;
}

/* лейбъл – по-тих, като секция */
.contact-label{
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  opacity: 0.7;
  line-height: 1.35;
}

/* стойност – водещият текст */
.contact-value{
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* линкове */
.contact-link{
  color: var(--main_color-1);
  text-decoration: none;
  font-weight: 700;
}

.contact-link:hover{
  text-decoration: underline;
}

.contact-emails{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.contact-emails .dot{
  opacity: 0.45;
}

/* Mobile: естествено става вертикално */
@media (max-width: 600px){
  .contact-row{
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contact-label{
    font-size: 12.5px;
    opacity: 0.65;
  }
}
.lang-flag-only img{
  width: 28px;
  height: auto;
  cursor: pointer;
  transition: transform .15s ease;
}

.lang-flag-only img:hover{
  transform: scale(1.08);
}
.content1.soon{
  text-align: center;
  margin-top: 40px;

  font-size: 18px;
  font-style: italic;
  color: var(--muted);
}
