/* ==========================================================================
   1. ЗМІННІ ТА БАЗОВІ НАЛАШТУВАННЯ
   ========================================================================== */

:root {
  --primary-bg: #f7f7f7;
  --dark-bg: #222;
  --black-bg: #111;

  --accent-blue: #009ad7;
  --accent-red: #ff474f;
  --accent-orange: #e67e22;
  --accent-purple: #9b287e;
  --accent-yellow: #ffd401;
  --accent-teal: #01c1ad;

  --text-main: #222;
  --text-white: #fff;

  --transition: 0.3s ease;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-main);
  line-height: 1.6;
}

h1, h2, h3 {
  margin-top: 0;
}

h2 {
  text-align: center;
  margin-bottom: 30px;
}

section {
  scroll-margin-top: 60px;
  padding: 50px 10%;
}

/* ==========================================================================
   2. НАВІГАЦІЯ
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--black-bg);
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  padding: 25px 10%;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--text-white);
  text-decoration: none;
  font-weight: bold;
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--accent-teal);
}

/* ==========================================================================
   3. ФІКСОВАНІ КНОПКИ
   ========================================================================== */

.lang-switch,
#topBtn {
  position: fixed;
  width: 60px;
  height: 45px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 6px;
  border: none;

  cursor: pointer;
  text-decoration: none;
  font-weight: bold;

  transition: var(--transition);
  z-index: 1000;
}

.lang-switch {
  top: 100px;
  right: 30px;
  background: var(--accent-blue);
  color: var(--text-white);
  font-size: 14px;
}

#topBtn {
  bottom: 30px;
  right: 30px;
  background: var(--accent-yellow);
  color: var(--text-white);
  font-size: 18px;
}

.lang-switch:hover,
#topBtn:hover {
  background: #000;
  color: #fff;
}

/* ==========================================================================
   4. HERO СЕКЦІЯ
   ========================================================================== */

.hero {
  background-image: url("../19276.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  height: 100vh;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  position: relative;
  padding: 0 10%;
}

.hero-text {
  max-width: 700px;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  text-shadow: 1px 1px 3px rgba(255,255,255,0.5);
}

.fade-transition {
  position: absolute;
  bottom: 0;
  left: 0;

  width: 100%;
  height: 150px;

  background: linear-gradient(to bottom, transparent, var(--primary-bg));
  pointer-events: none;
}

/* ==========================================================================
   5. КНОПКИ
   ========================================================================== */

.btn {
  background: var(--accent-red);
  color: var(--text-white);

  padding: 12px 25px;

  border-radius: 5px;
  text-decoration: none;
  display: inline-block;

  border: none;
  cursor: pointer;

  transition: var(--transition);
}

.btn:hover {
  background: #000;
  color: #fff;
}

/* ==========================================================================
   6. ПОСИЛАННЯ
   ========================================================================== */

.invite-link,
.editors-list a,
.organizer a,
.archive-column ul li a,
.file-link {
  color: #000;
  text-decoration: underline;
  font-weight: bold;
  transition: var(--transition);
}

.invite-link:hover,
.editors-list a:hover,
.organizer a:hover,
.archive-column ul li a:hover,
.file-link:hover {
  color: var(--accent-blue);
}

/* ==========================================================================
   7. СЕКЦІЇ КОНТЕНТУ
   ========================================================================== */

.about {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.about h2 {
  text-align: left;
}

.about-left {
  flex: 2;
}

.about-right {
  flex: 1;
  min-width: 300px;
}

.about-right ul {
  list-style: disc;
  padding-left: 20px;
}

/* ==========================================================================
   8. ІСТОРІЯ
   ========================================================================== */

.history {
  background: var(--primary-bg);
}

.timeline {
  border-left: 3px solid var(--accent-purple);
  margin: 40px 0;
  padding-left: 20px;

  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline-year {
  font-weight: bold;
  color: var(--accent-purple);
}

.timeline-content {
  background: #fff;
  padding: 14px;
  border-radius: 6px;
  font-size: 1.1rem;
}

/* ==========================================================================
   9. ОРГАНІЗАТОРИ
   ========================================================================== */

.organizers-grid {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}

.organizer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 250px;
}

.organizer img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin-bottom: 15px;
}

/* ==========================================================================
   10. АРХІВ
   ========================================================================== */

.archive-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  text-align: center;
}

.archive-column h3 {
  color: var(--accent-purple);
  border-bottom: 2px solid var(--accent-purple);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.archive-column ul {
  list-style: none;
  padding: 0;
}

.archive-column li {
  margin-bottom: 10px;
}

/* ==========================================================================
   11. ВИМОГИ
   ========================================================================== */

.requirements {
  text-align: center;
}

.req-container p {
  max-width: 800px;
  margin: 0 auto 30px;
}

.req-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* ==========================================================================
   12. ГАЛЕРЕЯ
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 8px;
  height: 200px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  cursor: pointer;
  transition: transform 0.4s ease;
  will-change: transform;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ==========================================================================
   13. МОДАЛЬНІ ВІКНА
   ========================================================================== */

.modal {
  display: none;

  position: fixed;
  inset: 0;

  background: rgba(0,0,0,0.6);

  align-items: center;
  justify-content: center;

  z-index: 2000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  max-width: 400px;
  text-align: center;
}

/* ==========================================================================
   14. LIGHTBOX
   ========================================================================== */

.gallery-modal {
  background: rgba(0,0,0,0.9);
}

.gallery-modal .modal-content {
  background: none;
  box-shadow: none;
  max-width: 90%;
}

.modal-img {
  display: block;
  margin: auto;

  max-width: 80%;
  max-height: 80vh;

  border-radius: 5px;
  animation: zoomIn 0.3s forwards;
}

@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-gallery {
  position: absolute;
  top: 20px;
  right: 35px;

  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* ==========================================================================
   15. ФОНИ
   ========================================================================== */

.about,
.seminar,
.history,
.archive-section,
.gallery {
  background: var(--primary-bg);
}

.dates,
.committee,
.organizers,
.requirements {
  background: #fff;
}

/* ==========================================================================
   16. КОМІТЕТ
   ========================================================================== */

.committee ul {
  columns: 2;
  column-gap: 40px;
  list-style: disc;
  padding-left: 25px;
}

/* ==========================================================================
   17. КОНТАКТИ
   ========================================================================== */

.contacts {
  background: var(--dark-bg);
  color: #fff;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 20px;
  margin-top: 20px;
}

.contact-box {
  background: #333;
  padding: 15px;
  border-radius: 5px;
}

.footer {
  background: var(--black-bg);
  color: #fff;
  text-align: center;
  padding: 20px;
}

.burger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 998;
}

.menu-overlay.active {
  display: block;
}

/* ==========================================================================
   18. АДАПТИВНІСТЬ (MOBILE FIRST)
   ========================================================================== */

@media (max-width: 768px) {
  h1, h2, h3 { 
    margin-top: 0; 
    text-align: center; 
  }

  body {
    font-size: 20px;
  }

  h1 {
    font-size: 34px;
  }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 22px;
    }

    p, li, a, span {
        font-size: 17px;
    }

    button {
        font-size: 18px;
    }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .invite-link {
    display: block;
    margin-top: 15px;
    text-align: center;
  }

  .about h2 {
  text-align: center;
  }

  .btn { 
    display: block;
    margin: 0 auto;
    width: fit-content;
  }
 
  section {
    padding: 40px 5%;
  }

  .burger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 180px;
    height: 100vh;
    background: var(--black-bg);
    flex-direction: column;
    padding: 80px 30px;
    transition: 0.4s ease;
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  .hero h1 {
    font-size: 1.8rem; 
    text-align: center;
  }

  .about {
    flex-direction: column;
    gap: 30px;
  }

  .committee ul {
    columns: 1;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lang-switch {
    top: auto;
    bottom: 85px;
    right: 20px;
  }
  
  #topBtn {
    right: 20px;
    bottom: 25px;
  }
}

@media (max-width: 480px) {
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .organizer img {
    width: 140px;
    height: 140px;
  }
}