@import url('./constants.css');

.news-container {
    display: flex;
    flex-direction: row;
    margin-top: 5%;
}

.news-container .news-content {
    width: 50%;
    display: flex;
    flex-direction: column;
    padding: 68px 200px;
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.6s forwards;
}

.news-container .news-content .top-info {
    display: flex;
    flex-direction: column;
}

.news-container .news-content .top-info .news-title {
    font-family: "Poppins", serif;
    font-size: 40px;
    font-weight: 700;
    color: var(--grey-color);
    margin-bottom: 10px;
}

.news-container .news-content .top-info .news-date {
    font-family: "Poppins", serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--grey-color);
}

.news-container .news-content .news-description {
    font-family: "Poppins", serif;
    font-size: 18px;
    font-weight: 400;
    color: rgba(68, 67, 68, 0.76);
    margin-top: 20px;
    width: 100%;
    text-align: justify;
}

.news-container .news-img {
    display: flex;
    flex-direction: column;
    width: 50%;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.6s forwards;
    margin-left: 20px;

}

.img-shadow {
    margin-top: 60px;
    width: 300px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--grey-color);
    filter: blur(12px);
}

@keyframes upDown {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.divider {
    margin: 40px 0;
    height: 10px;
    background-color: var(--success-color);
}

/*SLİDER*/

.slider-container {
    position: relative;
    /*max-width: 1200px;*/
    overflow:hidden;
    margin-left: auto;
    margin-right: auto;

}

.slider {
    display: flex;
    justify-content: space-around;
    align-items: center;
    transition: transform 0.5s ease-in-out;
}

.slider-item {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 25%;
    transform: scale(0.8);
    transition: transform 0.5s, opacity 0.5s;
}

.slider-buttons {
    padding: 0 200px;
    margin-bottom: 40px;
    height: 60px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: end;
}

.slider-btn {
    transform: translateY(-50%);
    background-color: var(--orange-color);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    height: 50px;
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

.fa-solid, .fas {
    font-size: 1.4rem;
}

.right-btn {
    transform: rotate(90deg);
}

.left-btn {
    transform: rotate(-90deg);
}

.slider-btn:hover {
        background-color: #bf360c;
}

.slider-item.active {
    transform: scale(1);
    opacity: 1;
}

.slider-item.neighbor {
    transform: scale(0.9);
    opacity: 0.7;
}

.slider-title {
    margin-bottom: 3rem;
    text-align: center;
    font-family: "Poppins", serif;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 2rem;
}

/* İkonlar */

.animated-icon {
    z-index: 0;
    position: absolute;
    animation: float 8s infinite ease-in-out;
    width: 100px;

}

.background-icons img:nth-of-type(1) {
    width: 100px;
    top: 0%;
    left: 0;
}

.background-icons img:nth-of-type(2) {
    top: 65%;
    left: -2%;
    max-height: 100px;
}
.background-icons img:nth-of-type(3) {
    top: 10%;
    left: 96%;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(-15deg);
    }
    50% {
        transform: translateY(-20px) rotate(-15deg);
    }
    100% {
        transform: translateY(0) rotate(-15deg);
    }
}
/**/

.main-container {
    height: calc(100vh - 120px);
    display: grid;
    place-items: center;
    overflow: hidden;
    margin-bottom: -5vh;
}

main {
    position: relative;
    width: 100%;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.item {
    image-rendering: auto;
    background-repeat: no-repeat;
    width: 200px;
    height: 300px;
    list-style-type: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    background-position: center;
    background-size: cover;
    border-radius: 20px;
    box-shadow: 0 20px 30px rgba(255,255,255,0.3) inset;
    transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s;

    &:nth-child(1), &:nth-child(2) {
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        transform: none;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
    }

    &:nth-child(3) { left: 50%; }
    &:nth-child(4) { left: calc(50% + 220px); }
    &:nth-child(5) { left: calc(50% + 440px); }
    &:nth-child(6) { left: calc(50% + 660px); opacity: 0; }
}
.item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.item:nth-of-type(2)::before {
    opacity: 1;
}
.content {
    z-index: 5;
    width: min(30vw,1000px);
    position: absolute;
    top: 54%;
    left: 3rem;
    transform: translateY(-50%);
    color: var(--white-color);
    font-family: "Poppins", serif;
    font-size: 1.5rem;
    text-shadow: 0 3px 8px rgba(0,0,0,0.5);
    opacity: 0;
    display: none;

    & .title {
        font-family: "Poppins", serif;
        font-weight: 700;
        font-size: 2rem;
        text-transform: uppercase;
    }

    & .description {
        line-height: 1.7;
        margin: 1rem 0 1.5rem;
        font-size: 1.2rem;
    }

    & button {
        width: fit-content;
        background-color: rgba(0,0,0,0.1);
        color: white;
        border: 2px solid white;
        border-radius: 0.25rem;
        padding: 0.75rem;
        cursor: pointer;
    }
}

.item:nth-of-type(2) .content {
    display: block;
    animation: show 0.75s ease-in-out 0.3s forwards;
}

@keyframes show {
    0% {
        filter: blur(5px);
        transform: translateY(calc(-50% + 75px));
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

.nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    user-select: none;

    & .btn {
        background-color: var(--lightGrey-color);
        color: var(--primary-color);
        border: 2px solid var(--primary-color);
        margin: 0 0.25rem;
        padding: 0.75rem;
        border-radius: 50%;
        cursor: pointer;

        &:hover {
            background-color: rgba(255,255,255,0.3);
        }
    }
}

@media (width > 650px) and (width < 900px) {
    .content {
        & .title        { font-size: 1rem; }
        & .description  { font-size: 0.7rem; }
        & button        { font-size: 0.7rem; }
    }
    .item {
        width: 160px;
        height: 270px;

        &:nth-child(3) { left: 50%; }
        &:nth-child(4) { left: calc(50% + 170px); }
        &:nth-child(5) { left: calc(50% + 340px); }
        &:nth-child(6) { left: calc(50% + 510px); opacity: 0; }
    }
}

@media (width < 650px) {
    .content {
        & .title        { font-size: 0.9rem; }
        & .description  { font-size: 0.65rem; }
        & button        { font-size: 0.7rem; }
    }
    .item {
        width: 130px;
        height: 220px;

        &:nth-child(3) { left: 50%; }
        &:nth-child(4) { left: calc(50% + 140px); }
        &:nth-child(5) { left: calc(50% + 280px); }
        &:nth-child(6) { left: calc(50% + 420px); opacity: 0; }
    }
}

.news-container .news-img img {
    width: 400px;
    max-height: 450px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}

@media (min-width: 993px) {
    .news-container .news-img img {
        animation: upDown 5s ease-in-out infinite;
    }
}



@media (max-width: 1250px) {
    .news-container .news-content {
        padding: 50px 100px;
    }
    .news-container .news-content .top-info .news-title{
        font-size: 30px
    }
    .news-img img{
        width:300px;
    }
    .news-container .news-content .news-description{font-size:15px;}
}

@media (max-width: 992px) {
    .news-container .news-content{width:100%;}
    .news-img{display:none!important;}
    .news-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .news-container .news-content,
    .news-container .news-img {
        width: 90%;
        padding: 0;
        margin: 0;
    }

    .news-container .news-content {
        transform: none;
        opacity: 1;
        animation: none;
    }

    .news-container .news-img {
        transform: none;
        opacity: 1;
        animation: none;
        margin-top: 20px;
    }

    .news-container .news-content .news-description {
        width: 100%;
        font-size: 16px;
    }

    .news-container .news-img img {
        width: 300px;
        max-height: 350px;
    }

    .slider-buttons {
        padding: 0 50px;
    }
}

@media (max-width: 576px) {
    .news-container .news-content .news-title {
        font-size: 28px;
    }

    .news-container .news-content .news-description {
        font-size: 14px;
    }

    .news-container .news-img img {
        width: 250px;
        max-height: 300px;
    }

    .slider-buttons {
        padding: 0 30px;
    }
}
