/*Нопка вверх*/
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: gold;
    color: #333;
    border: none;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}


/* Лайтбокс */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  text-align: center;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  border: 3px solid white;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.close-btn {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 45px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover {
  color: gold;
}

/* PDF Lightbox Styles */
.pdf-lightbox {
    display: none;
    position: fixed;
    z-index: 1001; /* Выше чем у обычного лайтбокса */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    text-align: center;
}

.pdf-content {
    display: block;
    width: 90%;
    height: 80vh;
    margin: auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    border: 3px solid white;
    border-radius: 8px;
    background: white;
}

.pdf-close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1002;
}

.pdf-close-btn:hover {
    color: gold;
}

.pdf-actions {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
}

.pdf-action-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
}

.pdf-action-btn:hover {
    background: #45a049;
}


/*lazy load*/
img.lazy {
        opacity: 0;
        transition: opacity 0.3s;
    }
    img.lazy.loaded {
        opacity: 1;
    }