* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

#blogs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    align-items: center;
    justify-content: center;
}

/* blogs heading */
#blogs h1 {
    color: #EAC308;
    font-size: 3.4rem;
    margin: 3rem 3rem 0rem 0rem;
    text-align: center;
}

/* Blogs container and its contents */
.blogCont {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.blogCont .preve {
    cursor: pointer;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    cursor: pointer;
    color: #EAC308;
    padding: 4px;
    font-size: 2rem;
    z-index: 1;
}

.blogCont .nexts {
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    cursor: pointer;
    color: #EAC308;
    padding: 10px;
    font-size: 2rem;
    z-index: 1;
}

#blogs .blogsContainer {
    display: flex;
    padding: 1rem 3rem;
    gap: 1rem;
    position: relative;
    transition: transform 0.5s ease;
    width: 100%;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s ease;
}

#blogs .blogsContainer .blog:nth-child(n+4) {
    display: none;
}

#blogs .blogsContainer .blog {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
    border-radius: .50rem;
    background-color: #bda662;
    align-items: center;
    width: 100%;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Fade out animation */
.fade-out {
    opacity: 1;
}

/* Slide in animation */
.slide-in {
    transform: translateX(-100%);
}

#blogs .blogsContainer .blog .blogImage {
    width: 100%;
    overflow: hidden;
    border-radius: 1rem;
    height: 12rem;
}

#blogs .blogsContainer .blog .blogImage img {
    width: 100%;
    object-fit: cover;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}

#blogs .blogsContainer .slider {
    position: absolute;
    right: 0;
    top: 50%;
    cursor: pointer;
    width: 10%;
}

/* The contents of blog */
#blogs .blogsContainer .blog h2 {
    font-size: 1.2rem;
    /* margin: 1rem 0rem 0rem 1rem; */
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    background-color: #2965f1;
    padding: 1rem;
    width: 100%;
    text-align: center;
}

#blogs .blogsContainer .blog .description {
    font-size: .89rem;
    margin: 0rem 1rem 0rem 1rem;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

#blogs .blogsContainer .blog a {
    width: 100%;
    display: flex;
    justify-content: center;
    text-decoration: none;
}

/* blogs button */
#blogs .blogsContainer .blog button {
    color: #fff;
    background-color: #EAC308;
    font-size: 1rem;
    border: none;
    width: 50%;
    margin: 0rem 0rem 1rem 0rem;
    padding: .70rem 0rem .70rem 0rem;
    border-radius: .50rem;
    cursor: pointer;
    transition: .5s;
}

#blogs .blogsContainer .blog button:active {
    scale: .4;
}

#blogs .blogsContainer .blog button:hover {
    scale: 1.2;
    background-color: #2965f1;
    font-size: 1.4rem;
    font-weight: 700;
}

.preve {
    color: #000;
    position: absolute;
    left: 5%;
    top: 50%;
    cursor: pointer;
    background-color: #ffffff;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.4rem;
    transition: .5s;
}

.preve:hover {
    scale: 1.3;
    background-color: #EAB308;
    color: #fff;
}

.preve:active {
    scale: .4;
    background-color: #EAB308;
    color: #fff;
}

.nexts {
    color: #000;
    position: absolute;
    right: 5%;
    top: 50%;
    cursor: pointer;
    background-color: #fbfbfb;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.4rem;
    transition: .5s;
}

.nexts:hover {
    scale: 1.3;
    background-color: #EAB308;
    color: #fff;
}

.nexts:active {
    scale: .4;
    background-color: #EAB308;
    color: #fff;
}


@media (max-width: 640px) {
    #blogs {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    #blogs h1 {
        color: #EAC308;
        font-size: 3rem;
        margin: 3rem 3rem 0rem 0rem;
        text-align: center;
    }

    #blogs .blogsContainer {
        display: grid;
        grid-template-columns: 1fr;
        padding: 1rem 1rem 1rem 1rem;
        gap: 1rem;
        position: relative;
        align-items: center;
        justify-content: center;
    }

    #blogs .blogsContainer .blog {
        display: none;
    }

    #blogs .blogsContainer .blog:first-child {
        display: flex;
    }
}

@media (max-width: 414px) {
    #blogs {
        min-height: 85vh;
    }
}

/* loader */
.blogsLoader {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 120px;
    height: 120px;
    margin: -76px 0 0 -76px;
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
  }
  
  @-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Add animation to "page content" */
  .animate-bottom {
    position: relative;
    -webkit-animation-name: animatebottom;
    -webkit-animation-duration: 1s;
    animation-name: animatebottom;
    animation-duration: 1s
  }
  
  @-webkit-keyframes animatebottom {
    from { bottom:-100px; opacity:0 } 
    to { bottom:0px; opacity:1 }
  }
  
  @keyframes animatebottom { 
    from{ bottom:-100px; opacity:0 } 
    to{ bottom:0; opacity:1 }
  }
  
  #myDiv {
    display: none;
    text-align: center;
  }
