html, body {
    background: linear-gradient(rgb(119, 151, 179), rgb(35, 35, 58));
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

  
#video-header {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    left: 0;
    top: 0;
}
  

video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 0;
}
  

.overlay-content {
    position: absolute;
    top: 80%;          
    left: 50%;        
    transform: translate(-50%, -50%);
    width: 100%;      
    z-index: 1;
    color: white;
    font-size: 130%;
    text-align: center;
    padding: 0 20px;
    
}

.overlay-content h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.2;
    margin: 0 0 0.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

.overlay-content img {
    transform: translate(0%, 100%);
    width:  clamp(2vw, 3.5vw, 5vw) !important;
    height: clamp(2vh, 3.5vh, 5vh) !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,3));
}

/*-------------------------------------------------------------------------------------*/

#main-container {
    position: relative;
    width: 100vw;
    min-height: 120vh;
    height: auto;
    overflow: hidden; 
    z-index: 0; 
    margin-top: 0; 
    box-sizing: border-box;
  }
  

#intro {
    position: absolute;
    top: 45%; 
    width: 65%;
    height: auto; 
    min-height: 500px; 
    padding: 1.5rem 2vw; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(34, 34, 34, 0.65);
    border-radius: 6px;
    z-index: 1;
    font-family: Garamond, serif;
}

#intro p {
    color: white;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    padding: 0 1rem; 
    hyphens: auto; 
    margin: 0 auto; 
    max-width: 90%; 
    text-align: justify; 
}

#intro p::first-letter {
    font-size: 1.5em;
    float: left;
    line-height: 0.7;
    margin: 0.15em 0.15em 0 0;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#intro a {
    position: relative; 
    display: block; 
    text-align: right;

    right: auto;
    margin: 3rem auto 0; 
    width: fit-content; 
    transition: all 0.3s ease; 
    color: white;
    font-size: clamp(1.2rem, 3.5vw, 2.4rem);
    text-decoration: none;
}

#intro a:hover {
    transform: scale(1.05);
    color: rgb(184, 61, 61);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.4);
    font-size: clamp(1.5rem, 3.7vw, 2.6rem);
}


.scrolling-mask {
    position: absolute;
    width: 100%;
    height: 100%;
}

.row {
    width: 100%;
    margin: 5rem auto;
    height: 32vh;
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 3%,
        rgba(0, 0, 0, 1) 25%,
        rgba(0, 0, 0, 1) 75%,
        rgba(0, 0, 0, 0) 97%
    );
}


@keyframes scrollLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-125vw); }
}

@keyframes scrollRight {
    from { transform: translateX(0); }
    to { transform: translateX(125vw); }
}


.img-block {
    position: absolute;
    width: 11vw;
    height: 32vh;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    animation-duration: 45s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
    backface-visibility: hidden;
}


.row1 .img-block,
.row3 .img-block {
    animation-name: scrollLeft;
    left: 100%;
}

.row2 .img-block {
    animation-name: scrollRight;
    left: -25vw;
}


.img-block {
    animation-delay: calc(45s / 7 * (var(--i) - 1) * -1);
}


  
@media (max-width: 768px) {
    video {
        width: 100%;
        height: 100dvh;
    }
    
    .overlay-content {
        width: 90% !important;
        top: 65% !important;
    }

    .overlay-content h1 {
        font-size: clamp(2rem, 8vw, 3.5rem) !important;
    }

    .img-block {
        width: 40vw !important;
        height: 15vh !important;
    }
   
    .row {
        margin: 4rem auto;
    }

    .row2 .img-block {
        left: -45vw;
    }

    @keyframes scrollLeft {
        from { transform: translateX(0); }
        to { transform: translateX(-145vw); }
    }

    @keyframes scrollRight {
        from { transform: translateX(0); }
        to { transform: translateX(145vw); }
    }
}
