/* Карусель */
.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 40px auto;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    background: radial-gradient(circle at center, #e0e0e0b0 0%, #585858ad 100%);
    height: auto;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .carousel-title {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 24px;
    z-index: 10;
    background: linear-gradient(to right, rgba(0,0,0,0.3), rgba(0,0,0,0));
    padding: 10px 20px;
  }
  
  .track {
    display: flex;
    transition: transform 0.6s cubic-bezier(.4,0,.2,1);
    align-items: center;
  }
  
  .slide {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.3;
    transition: opacity 0.4s;
    min-height: 300px;
  }
  
  .slide img.horizontal {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
  }
  .slide img.vertical {
    width: auto;
    height: 80vh;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
  }

  .slide.active {
    opacity: 1;
  }
  
  .slide img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    background: #222;
    border-radius: 8px;
    padding: 0;
  }
  
  .slide-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 18px;
    z-index: 10;
  }
  
  .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s;
  }
  
  .arrow:hover {
    background: #0078ff;
    transform: translateY(-50%) scale(1.1);
  }
  
  .arrow.prev { left: 20px; }
  .arrow.next { right: 20px; }

  .arrow.prev:hover 
  { 
      left: 20px;
      color:white; 
  }
  .arrow.next:hover 
  { 
      right: 20px;
      color:white; 
  }
  
  .info-button {
    font-weight: 800;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 15;
    background: rgba(255,255,255,0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 20px;
  }

  .info-button:hover {
    background: #0078ff;
    color: white;
    animation: normal;
  }
  
  .info-menu {
    display: none;
    position: absolute;
    top: 70px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    z-index: 20;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  }
  
  .close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em 1.5em;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #0078ff 0%, #86bfff 100%);
    border: none;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(255, 95, 109, 0.15);
    cursor: pointer;
    outline: none;
    transition: 
      background 0.3s cubic-bezier(.4,0,.2,1),
      transform 0.2s cubic-bezier(.4,0,.2,1),
      box-shadow 0.2s cubic-bezier(.4,0,.2,1);
    letter-spacing: 0.05em;
  }
  
  .close-btn:hover, .close-btn:focus {
    background: linear-gradient(90deg, #2d8fff 0%, #7ebaff 100%);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 16px rgba(255, 95, 109, 0.18);
  }
  
  .close-btn:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(255, 95, 109, 0.10);
  }
  
  @media (max-width: 768px) {
    .carousel-container {
      height: 400px;
      margin: 20px;
    }
    
    .slide img {
      padding: 20px;
    }
    
    .arrow {
      width: 40px;
      height: 40px;
      font-size: 20px;
    }
  }
  
  .lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    transition: opacity 0.25s;
  }
  
  .lightbox-overlay.active {
    display: flex;
    animation: fadeIn 0.3s;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  
  .lightbox-img {
    z-index: 10000000;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    background: #222;
    object-fit: contain;
  }
  
  .lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 48px;
    color: #fff;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.2s;
    user-select: none;
  }
  .lightbox-close:hover { color: #0078ff; }
