/*
Theme Name: Vilitex
Theme URI: https://tdweb.com.ua/
Author: Roman Khrystev
Author URI: https://tdweb.com.ua/
Description: Digital Marketing
Tags: blog, one-column, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready
Version: 1
Requires at least: 5.0
Tested up to: 5.5
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwenty
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/ 
@keyframes fadeIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
        visibility: hidden;
    }
    to {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
}

.gallery > a,
.gallery-item {
    animation: fadeIn 0.3s ease-out forwards;
    visibility: hidden; /* Скрываем до анимации */
}

.gallery > a:nth-child(1) { animation-delay: 0.1s; }
.gallery > a:nth-child(2) { animation-delay: 0.2s; }
.gallery > a:nth-child(3) { animation-delay: 0.3s; }
.gallery > a:nth-child(4) { animation-delay: 0.4s; }
.gallery > a:nth-child(5) { animation-delay: 0.5s; }
.gallery > a:nth-child(6) { animation-delay: 0.6s; }
.gallery > a:nth-child(7) { animation-delay: 0.7s; }
.gallery > a:nth-child(8) { animation-delay: 0.8s; }
.gallery > a:nth-child(9) { animation-delay: 0.9s; }
.gallery > a:nth-child(10) { animation-delay: 1s; }
.gallery > a:nth-child(11) { animation-delay: 1.1s; }
.gallery > a:nth-child(12) { animation-delay: 1.2s; }
.gallery > a:nth-child(13) { animation-delay: 1.3s; }
.gallery > a:nth-child(14) { animation-delay: 1.4s; }
.gallery > a:nth-child(15) { animation-delay: 1.5s; }
.gallery > a:nth-child(16) { animation-delay: 1.6s; }
.gallery > a:nth-child(17) { animation-delay: 1.7s; }
.gallery > a:nth-child(18) { animation-delay: 1.8s; }
.gallery > a:nth-child(19) { animation-delay: 1.9s; }
.gallery > a:nth-child(20) { animation-delay: 2s; }
.gallery > a:nth-child(21) { animation-delay: 2.1s; }
.gallery > a:nth-child(22) { animation-delay: 2.2s; }
.gallery > a:nth-child(23) { animation-delay: 2.3s; }
.gallery > a:nth-child(24) { animation-delay: 2.4s; }
.gallery > a:nth-child(25) { animation-delay: 2.5s; }
.gallery > a:nth-child(26) { animation-delay: 2.6s; }
.gallery > a:nth-child(27) { animation-delay: 2.7s; }
.gallery > a:nth-child(28) { animation-delay: 2.8s; }
.gallery > a:nth-child(29) { animation-delay: 2.9s; }
.gallery > a:nth-child(30) { animation-delay: 3s; }
/* Для первых 30 элементов задаем поочередную задержку */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1s; }
.gallery-item:nth-child(11) { animation-delay: 1.1s; }
.gallery-item:nth-child(12) { animation-delay: 1.2s; }
.gallery-item:nth-child(13) { animation-delay: 1.3s; }
.gallery-item:nth-child(14) { animation-delay: 1.4s; }
.gallery-item:nth-child(15) { animation-delay: 1.5s; }
.gallery-item:nth-child(16) { animation-delay: 1.6s; }
.gallery-item:nth-child(17) { animation-delay: 1.7s; }
.gallery-item:nth-child(18) { animation-delay: 1.8s; }
.gallery-item:nth-child(19) { animation-delay: 1.9s; }
.gallery-item:nth-child(20) { animation-delay: 2s; }
.gallery-item:nth-child(21) { animation-delay: 2.1s; }
.gallery-item:nth-child(22) { animation-delay: 2.2s; }
.gallery-item:nth-child(23) { animation-delay: 2.3s; }
.gallery-item:nth-child(24) { animation-delay: 2.4s; }
.gallery-item:nth-child(25) { animation-delay: 2.5s; }
.gallery-item:nth-child(26) { animation-delay: 2.6s; }
.gallery-item:nth-child(27) { animation-delay: 2.7s; }
.gallery-item:nth-child(28) { animation-delay: 2.8s; }
.gallery-item:nth-child(29) { animation-delay: 2.9s; }
.gallery-item:nth-child(30) { animation-delay: 3s; }

/* Остальные элементы сразу видимы */
.gallery-item:nth-child(n+31) {
    animation-delay: 0s;
    visibility: visible;
    transform: translateX(0);
    opacity: 1;
} 

#gallery-1 .gallery-item {
    float: none;
    width: 100%;
    margin: 0;
}

.loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -36px;
    width: 72px;
    height: 72px;
    border: 3px dotted var(--green);
    border-style: solid solid dotted dotted;
    border-radius: 50%; 
    box-sizing: border-box;
    animation: rotation 2s linear infinite;
    z-index: 222;
  } 
      
  .loader::before {
    content: '';  
    box-sizing: border-box;
    position: absolute;
    left: 50%; 
    top: 50%; 
    margin: -24px;
    border: 2px dotted var(--green);
    border-style: solid dotted solid dotted;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    animation: rotationBack 2.5s linear infinite;
    transform-origin: center center;
  }
  
  .form {
    position: relative;
  }
  
  .form-success {
    position: absolute;
    background-color: rgba(255,255,255,.7);
    background-image: url('./assets/images/vilitex/done.png');
    background-size: 50px;
    background-position: 50%;
    background-repeat: no-repeat;
    z-index: 20;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    display: none;
  }
  
  .form-success.active {
    display: flex;
  }
      
  @keyframes rotation {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  } 
  @keyframes rotationBack {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(-360deg);
    }
  } 
