* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: playfair display, sans serif;
    max-width: 1600px;
}

.container {
    width: 90vw;
    margin: 0 auto;
}

.background {
    background-color: rgb(85, 33, 33, 0.862);
    background-size: cover;
    min-width: 100vw;
    height: auto;
    min-height: 100vh;
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: black;
}

ul {
    list-style: none;
}

h2 {
    text-transform: uppercase;
}

/* Navigation */

.flex-row-1 {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 20px 35px;
}


.menu li {
    display: inline-block;
    width: 100px;
    height: 30px;
    text-align: center;
    vertical-align: middle;
}
.menu li a {
    color: rgb(231, 221, 221);
}
.menu li:hover {
    background-color: rgb(104, 45, 45);
}
.dropdown ul {
    display: none;
    position: absolute;
    width: inherit;
    margin-top: 10px
}
.dropdown ul li {
    height: fit-content;
}
/* .dropdown ul:hover li{
    background-color: rgb (251,251,251);
} */

.menu li:hover ul {
    display: block;
    background-color: rgb(104, 45, 45);
}
.flex-row-1 .menu .dropdown li:hover{
    background-color: rgb(251, 251, 251);
    color: rgb(66, 19, 19) !important;
    vertical-align: middle
}
.flex-row-1 .menu .dropdown li:hover a{
    color: rgb(66, 19, 19) !important;
    vertical-align: middle
}

/* Navigation-end */

/* Upper-part-layout-start */
.upper-part-layout {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5608368347338936) 0%, rgba(0, 0, 0, 0.23870798319327735) 25%, rgba(0, 0, 0, 0.9221813725490196) 100%), url(./../images/landing-general-hands.jpg) no-repeat;
    background-size: cover;
    background-position: 70% 30%;
    padding: 0 0 10% 4.5%;
}

.upper-part-text {
    margin-left: 10%;
    color: rgb(231, 221, 221);
}

h1 {
    text-transform: uppercase;
    color: rgb(255, 254, 254);
    font-size: 2em;
}

#youth-house {
    font-size: 3em;
}

#location {
    text-transform: none;
}

#intro {
    text-transform: capitalize;
    font-weight: lighter;
    color: rgba(231, 221, 221, 0.899)
}

.yh-btn {
    display: flex;
    align-items: center;
    width: 30%;
    margin-top: 13px;
}

.yh-btn img {
    width: 50px;
}

.yh-btn h3 {
    font-size: 0.9rem;
    font-weight: lighter;
    font-family: Arial, Helvetica, sans-serif;
    color: white;
    display: inline;
    vertical-align: middle;
}
#link-to-news{
    width: 230px;
    background-color: rgb(83, 87, 58);
    padding: 1%;
    border-radius: 50px;
    text-align: center;
}

/* Upper-part-layout-end */

/* About us */
section.yh {
    width: 80%;
    margin: 0 auto;
}

.flex-row-3 {
    margin-top: -10vh;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    text-align: center;
    background-color: rgb(133, 54, 54);
    padding: 7%;
}

.who,
.goal,
.vision {
    width: calc(100%/3 - 1%);
    background-color: rgba(240, 255, 255, 0.903);
    border-radius: 10px;
}

.flex-row-3 p {
    padding: 3%;
    margin-left: 1%;
    line-height: 1.7rem;
    font-weight: 500;
    height: fit-content;
}

h3 {
    margin-bottom: 2vh;
    font-size: xx-large;
}

/* Gallery-Activities */
.gallery-small{
    display: none;
}

.gallery {
    display: grid;
    place-content: center;
    min-height: 70vh;
    background: #000000c3;
    border-radius: 10px;
    margin-top: 5vh;
    text-align: center;
    color: white;
}

.gallery h2 {
    z-index: 3;
}

.gallery .slider {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 1em;
    width: 100%;
    height: 300px;
    transition: all 400ms;
}

.gallery .slider:hover .box {
    filter: grayscale(100%) opacity(24%);
}

.pic-gal {
    width: 100%;
}

.box {
    position: relative;
    background: var(--img) center center;
    background-size: cover;
    transition: all 400ms;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery .slider .box:hover {
    filter: grayscale(0%) opacity(100%);
}

.gallery .slider:has(.box-1:hover) {
    grid-template-columns: 3fr 1fr 1fr 1fr 1fr;
}

.gallery .slider:has(.box-2:hover) {
    grid-template-columns: 1fr 3fr 1fr 1fr 1fr;
}

.gallery .slider:has(.box-3:hover) {
    grid-template-columns: 1fr 1fr 3fr 1fr 1fr;
}

.gallery .slider:has(.box-4:hover) {
    grid-template-columns: 1fr 1fr 1fr 3fr 1fr;
}

.gallery .slider:has(.box-5:hover) {
    grid-template-columns: 1fr 1fr 1fr 1fr 3fr;
}

.gallery .box:nth-child(odd) {
    transform: translateY(-16px);
}

.gallery .box:nth-child(even) {
    transform: translateY(16px);
}

.box::after {
    content: attr(data-text);
    position: absolute;
    bottom: 20px;
    background: #000;
    color: #fff;
    padding: 10px 10px 10px 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    transform: translateY(60px);
    opacity: 0;
    transition: all 400ms;
}

.box:hover::after {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 400ms;
}
/* Programs-start */
.programs, .news{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin: 2% auto;
}
#yh-details h2, #news h2{
    margin: 2% auto;
    text-align: center;
}
.yh-classes, .news-blocks{
    width: 100%;
    min-width: 50%;
    height: 550px;
    overflow: hidden;
}
.programs .block-img, .news .block-img{
    background-size: cover;
    background-position: 50% 50%;
}
.programs .info, .news .info{
    padding: 2%;
    background-color: rgba(240, 240, 229, 0.848);
    min-width: 50%;
}
.info p{
    font-size: 1rem;
    line-height: 25px;
    overflow: hidden;
    overflow-wrap: break-word;
}
.programs .info span.smaller-text{
    font-size: 0.85rem;
    line-height: normal;
}
#happy{
    background-image: url(./../images/yh-chinese-talking.jpg);
}
#events{
    background-image: url(./../images/yh-events4.JPG);
}
#english{
    background-image: url(./../images/yh-english3.jpg);
}
#cooking{
    background-image: url(./../images/yh-cooking.jpg);
}
#training{
    background-image: url(./../images/yh.jpg);
}
#news-img{
    background-image: url(./../images/news3.jpg);
}
.inbox-img{
    display: block;
    margin: 2% auto;
    width: 400px;
}
/* Gallery-Facilities */
.gallery-2 {
    display: grid;
    place-content: center;
    min-height: 70vh;
    background: #000000c3;
    border-radius: 10px;
    margin-top: 5vh;
    text-align: center;
    color: white;
}

.gallery-2 h2 {
    z-index: 3;
}

section.gallery-2 .slider {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: auto;
    gap: 1em;
    width: 100%;
    height: 70%;
    transition: all 400ms;
}

section.gallery-2 .pic-gal {
    width: 100%;
}

.box {
    position: relative;
    background: var(--img) center center;
    background-size: cover;
    transition: all 400ms;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-2 .box::after {
    content: attr(data-text);
    position: absolute;
    bottom: 20px;
    background: #000;
    color: #fff;
    padding: 10px 10px 10px 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    transform: translateY(60px);
    opacity: 0;
    transition: all 400ms;
}

.gallery-2 .box:hover::after {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 400ms;
}

.clearfix {
    clear: both;
}
#video{
    text-align: center;
}
.video-reports{
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
}
.reports{
    width: calc(100%/2);
}
.reports video{
    width: 100%;
    height: 400px;
    object-fit: cover;
    border: rgb(43, 38, 38) 5px solid;
}
/* Footer */

footer .flex-row-4 {
    display: flex;
    justify-content: space-evenly;
    background-color: rgb(105, 105, 105);
    color: white;
    padding: 10px;
    margin-top: 10px;
    border-top-style: solid;
    border-top-color: black;
    z-index: 3;
}
/* Breakpoints */
@media screen and (min-device-width:768px) and (max-device-width:1024px) {
    body {
        height: 248.5vh;
    }

    .container {
        height: fit-content;
    }

    .upper-part-text {
        margin-left: 5%;
    }

    #youth-house {
        font-size: 2.5em;
    }

    .flex-row-3 {
        _margin-top: -5vh;
        width: 110%;
        margin: -5vh auto 0 -3.5vw;
    }

    .who,
    .goal,
    .vision {
        width: calc(100%/3 - 0.5%);
        padding: 5%}

    h3 {
        margin-bottom: 0vh;
        font-size: 1em;
    }

    .gallery {
        min-height: 15vh;
        margin: 2vh auto 0 -3.5vw;
        place-content: flex-start;
        width: 110%;
    }

    .gallery-2 {
        margin-top: 2vh;
        place-content: flex-start;
        min-height: 39vh;
    }

    .section.gallery-2 .slider {
        gap: 0.5em;
    }
}
/* TABLET */
@media screen and (min-device-width:498px) and (max-device-width: 768px) {
    .flex-row-3 {
        flex-direction: column;
        justify-content: center;
        width: 110%;
        margin-top: -5vh;
        margin-left: -5%;
    }
    .who,
    .goal,
    .vision {
        width: 120%;
        margin-bottom: 3px;
    }
    .flex-row-3 h3 {
        font-size: 1.5em;
        margin: 0;
    }
    #yh-details{
        width: 610px;
        margin-left: -5%;
    }
    .yh-classes, .news-blocks {
        height: 350px;
    }
    .yh-classes.info p{
        font-size: 0.7em;
    }
    .yh-classes.info h2{
        font-size: 1.2em;
    }
    .yh-classes.info img{
        display: none;
    }
    .programs .info span.smaller-text{
        font-size: 0.7rem;
    }
    /* Trying new layout */
    .programs, .news{
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        margin: 2% auto;
    }
    #yh-details h2, #news h2{
        margin: 2% auto;
        text-align: center;
    }
    .yh-classes, .news-blocks{
        width: 100%;
        min-width: 50%;
        height: 550px;
        overflow: hidden;
    }
    .programs .block-img, .news .block-img{
        background-size: cover;
        background-position: 50% 50%;
    }
    .programs .info, .news .info{
        padding: 2%;
        background-color: rgba(240, 240, 229, 0.848);
        min-width: 50%;
    }
    .info p{
        font-size: 1rem;
        line-height: 25px;
        overflow: hidden;
        overflow-wrap: break-word;
    }
    .programs .info span.smaller-text{
        font-size: 0.85rem;
        line-height: normal;
    }
    /* New layout finish */
    .video-reports{
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 120%;
        margin-left: -10%;
    }
    .reports{
        width: calc(120%/2);
    }
    .reports video{
        height: 300px;
    }
    .flex-row-4 p{
        text-align: center;
        font-size: 0.8em;
    }
    footer .flex-row-4{
        padding: 4px;
    }
}
/* SMARTPHONE */
@media screen and (min-device-width:320px) and (max-device-width:498px) {
    .flex-row-1 {
        padding: 20px 15px
    }
    .menu li {
        width: 60px;
    }
    .menu li a {
        font-size: 0.8em
    }
    #youth-house {
        font-size: 2.5em
    }
    h1 {
        font-size: 0.9em
    }
    #location {
        font-size: 0.8em
    }
    .upper-part-layout {
        padding: 0 0 10% 0
    }
    .yh-btn h3 {
        font-size: 0.7em
    }
    .yh-btn img {
        width: 40px
    }
    #link-to-news{
        width: 150px;
        padding: 1% 1% 2% 1%;
        margin-bottom: 1%;
    }
    #link-to-news a{
        font-size: 0.7em;
    }
    .flex-row-3 {
        flex-direction: column;
        justify-content: center;
        width: 120%;
        margin-top: -5vh;
        margin-left: -10%;
    }
    .who, .goal, .vision {
        width: 100%;
        height: 40vh;
        margin-bottom: 5px;
    }
    .flex-row-3 h3 {
        font-size: 1.2em;
        margin: 0;
    }
    .flex-row-3 p {
        font-size: 0.85em;
        line-height: 1.4em;
        vertical-align: middle;
    }
    .gallery, .gallery-2 {
        display: none;
    }
    .gallery-small {
        display: block;
        margin-top: 5vh;
        color: white;
        text-align: center;
        background-color: rgb(133, 54, 54)
    }
    .gallery-small .activities {
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        align-items: center;
    }
    .gallery-small .activities .photo, .activ-text{
        width: calc(100%/3 - 6px);
    }
    .activ-text{
        margin-bottom: 4px;
    }
    .gallery-small .activities .photo img {
    width: 100%;
    }
    h2 {
    font-size: 0.8em;
    margin-bottom: 1vh;
    color: rgba(255, 250, 250, 0.971);
    }
    .activities p{
        text-align: center;
        font-size: 0.3em;
        text-transform: capitalize;
    }
    #gallery-small{
        position: relative;
        overflow: hidden;
        text-align: center;
        width: 85vw;
        height: 40vh;
        margin-left: -10%;
    }
    .gallery-holder{
        display: grid;
        grid-template-columns: repeat(6, 100%);
        height: 100%;
        width: 100%;
        animation: slider 40s ease-in-out infinite alternate;
    }
    #slider-img-1{
        background-image: url(./../images/gallery1s.jpg);
        background-position: center;
    }
    #slider-img-2{
        background-image: url(./../images/gallery2s.jpg);
        background-position: center;
    }
    #slider-img-3{
        background-image: url(./../images/gallery3s.jpg);
        background-position: center;
    }
    #slider-img-4{
        background-image: url(./../images/gallery4s.jpg);
        background-position: center;
    }
    #slider-img-5{
        background-image: url(./../images/gallery5s.jpg);
        background-position: center;
    }
    #slider-img-6{
        background-image: url(./../images/gallery6s.jpg);
        background-position: center;
    }
    .button-holder .button{
        background-color: white;
        width: 10px;
        height: 10px;
        border-radius: 10px;
        display: inline-block;
        margin: .4rem;
    }
    .button-holder{
        position: absolute;
        left: 28%;
        bottom: 0%;
    }
    .button:hover{
        box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.655);
    }
    @keyframes slider{
        0%{transform:translateX(0%)}; 
        10%{transform:translateX(-100%);} 
        20%{transform:translateX(-100%);} 
        30%{transform:translateX(-200%);} 
        40%{transform:translateX(-200%);} 
        50%{transform:translateX(-300%);} 
        60%{transform:translateX(-300%);} 
        70%{transform:translateX(-400%);} 
        80%{transform:translateX(-500%);} 
        90%{transform:translateX(-500%);} 
        100%{transform:translateX(-600%);} 
    }
    h2 {
    font-size: 0.8em;
    margin-bottom: 1vh;
    color: rgba(255, 250, 250, 0.971);
    }
    /* Edition-start */
    .programs, .news{
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        margin: 2% auto;
    }
    #yh-details h2, #news h2{
        margin: 2% auto;
        text-align: center;
    }
    .yh-classes, .news-blocks{
        width: 100%;
        min-width: 50%;
        height: 30vh;
        overflow: hidden;
    }
    .programs .block-img, .news .block-img{
        background-size: cover;
        background-position: 50% 50%;
    }
    .programs .info, .news .info{
        padding: 2%;
        background-color: rgba(240, 240, 229, 0.848);
        min-width: 50%;
    }
    #cooking{
        background-image: url(./../images/yh-cooking1.jpg);
    }
    #english{
        background-image: url(./../images/smaller/yh-english2s.jpg);
    }
    #training{
        background-image: url(./../images/smaller/lectures1s.jpg);
    }
    /* Edition-end */
    #yh-details{
        width: 110%;
        margin-left: -5%;
    }
    .yh-classes.info p{
        font-size: 0.5em;
        line-height: 1.5em;
    }
    .yh-classes.info h2, .news-blocks h2{
        font-size: 0.7em;
        color: black;
    }
    .yh-classes.info img{
        display: none;
    }
    .programs .info span.smaller-text{
        font-size: 0.5rem;
        line-height: 1.5em;
    }
    #happy{
        background-image: url(./../images/smaller/yh-happy-ch-engs.jpg);
    }
    .video-reports{
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        width: 120%;
        margin-left: -10%;
    }
    .reports{
        width: 90%;
    }
    .reports video{
        height: 200px;
    }
    .flex-row-4 p{
        text-align: center;
        font-size: 0.3em;
    }
    footer .flex-row-4{
        padding: 4px;
    }
}