body, html {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: hidden;
}

.section {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    scroll-snap-align: start;
    background: white;
}

.section h2 {
    margin-top: 10px;
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
    font-size: 1.5em;
}

#screenwriter h2 {
    position: absolute;
    bottom: 70%;
    width: 100%;
    text-align: center;
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
    font-size: 1.5em;
}

.background,
.documentary-bg,
.scriptdoctor-bg,
.contacts-bg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.background {
    width: 100%;
    padding: 0 7%;
    display: table;
    margin: 0;
    max-width: none;
    background-repeat:no-repeat;
    background-size:cover;
    background-image: url('images/main.jpg');
}

.documentary-bg {
    width: 100%;
    padding: 0 7%;
    display: table;
    margin: 0;
    max-width: none;
    background-repeat:no-repeat;
    background-size:cover;
    background-image: url('images/35.jpg');
    opacity: 0.3;
}

.scriptdoctor-bg {
    width: 100%;
    padding: 0 7%;
    display: table;
    margin: 0;
    max-width: none;
    background-repeat:no-repeat;
    background-size:cover;
    background-image: url('images/36.jpg');
    opacity: 0.3;
}

.contacts-bg {
    width: 100%;
    padding: 0 7%;
    display: table;
    margin: 0;
    max-width: none;
    background-repeat:no-repeat;
    background-size:cover;
    background-image: url('images/37.jpg');
    opacity: 0.3;
}

h1, h2 {
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
}

.typing-text p {
    display: inline-block;
    color: white;
    border-right: .15em solid orange;
    white-space: nowrap;
    overflow: hidden;
    font-size: 1em;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: orange }
}

.scroll-down-arrow {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: url('images/scroll-arrow.svg') no-repeat center center;
    background-size: contain;
    cursor: pointer;
}

.gallery img {
    height: 250px;
    margin: 5px;
    transition: opacity 0.3s ease;
}

.gallery img:hover {
    opacity: 0.7;
}

.videos iframe {
    width: 280px;
    height: 160px;
    margin: 5px;
}

.swiper-container {
    width: 80%;
    height: auto;
    margin-top: 25px;
}

.swiper-slide {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    perspective: 1000px;
}

.swiper-slide .poster-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.swiper-slide:hover .poster-inner,
.swiper-slide:focus .poster-inner {
    transform: rotateY(180deg);
}

.poster-front, .poster-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.poster-front {
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    font-weight: bold;
    font-size: 1em;
}

.poster-back {
    background-color: white;
    color: black;
    transform: rotateY(180deg);
    font-weight: normal;
    font-size: 1em;
}

.swiper-slide img {
    width: auto;
    height: 300px;
    object-fit: cover;
    margin-bottom: 5px;
}

.swiper-slide p {
    margin-top: 5px;
    font-weight: normal;
}

.swiper-button-next, .swiper-button-prev {
    color: black;
}

.swiper-button-next {
    right: -10px;
}

.swiper-button-prev {
    left: -10px;
}

.swiper-pagination {
    display: none;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 12.5px auto;
}

.card {
    width: 125px;
    height: 125px;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card:hover .card-inner,
.card:focus .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-front {
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    font-weight: bold;
    font-size: 0.8em;
}

.card-back {
    background-color: white;
    color: black;
    transform: rotateY(180deg);
    font-weight: normal;
    font-size: 0.8em;
}

.testimonial {
    font-style: italic;
}

.bio-content {
    display: flex;
    align-items: center;
}

.bio-content img {
    height: 350px;
    margin-right: 10px;
}

.narrow-text {
    max-width: 950px;
    margin: 0 auto;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 20;
    overflow: auto;
}

.popup-content {
    background: white;
    padding: 20px;
    text-align: left;
    max-width: 800px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.popup-content iframe {
    width: 100%;
    height: 300px;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

