@keyframes dropDown {
    from {
        max-height: 0;
    }
    to {
        max-height: 500px; /* Set a maximum height based on your content */
    }
}

@keyframes dropUp {
    from {
        max-height: 500px; /* Set a maximum height based on your content */
    }
    to {
        max-height: 0;
    }
}

@keyframes rotateArrow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}

@keyframes rotateArrowReverse {
    from {
        transform: rotate(180deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px); /* Move the element down initially */
    }
    to {
        opacity: 1;
        transform: translateY(0); /* Move the element back to its original position */
    }
}

.newsPostsDiv{
    width: 80%;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.infoDiv {
    display: none;
    
    overflow: hidden;
    
    max-height: 0;
}

.infoDiv.active {
    max-height: 500px; /* Set a maximum height based on your content */
    display: block;
    animation: dropDown 0.5s ease-in-out forwards;
}

.infoDiv.notActive {
    max-height: 0;
    animation: dropUp 0.5s ease-in-out forwards;
    display: none;
    
}

/* Add a smooth transition for max-height property */
.infoDiv {
    transition: max-height 0.3s ease-in-out;
}

.infoDiv.active,
.infoDiv.notActive {
    display: block; /* Ensure content is visible when expanded */
}

.spacerDiv{
    width: 100%;
    height: 30px;
}

body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    margin: 0;
    color: #fff;
}

nav {
    height: 150px;
}

.mainDiv {
    width: 100%;
    min-height: 100vh;
}

.titleDiv {
    margin: 0 auto;
    margin-top: 80px;
    text-align: center;
    margin-bottom: 50px;
    width: 95%;
     animation: fadeIn 0.5s ease-in-out forwards;
}

.titleDiv h1 {
    font-size: 64px;
}

.titleDiv h3 {
    color: #CCCCCC;
}

#floated {
    max-width: 400px;
    float: right;
    width: 50%;
}

#floated img {
    width: 100%;
    height: auto;
    margin-left: 20px;
}

.blogPost {
    width: 80%;
    margin: 0 auto;
    overflow: hidden; /* Add this line to contain floated elements */
}

.blogPost h1, .blogPost h3 {
    margin: 0;
}

.blogPost h3 {
    font-weight: normal;
    font-size: 16px;
    margin-top: 5px;
    color: #CCCCCC;
}

.blogPost {
    margin-bottom: 20px;
}

.line-break {
    background-color: #4f4f4f;
    height: 2px;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 15px;
    margin-top: 5px;
}

.postTitleAndIconDiv {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.postTitleDiv {
    display: inline-block;
    width: 80%;
}

.postTitleDiv h3 {
    margin-top: 10px;
}

.shownDiv {
    margin-left: 20px;
    margin-right: 20px;
    
}
.shownDiv ion-icon {
    color: #CCCCCC;
    margin-top: 5px;
    font-size: 50px;
    float: right;
    cursor: pointer;
}

.shownDiv ion-icon:hover {
    color: #fff;
}

.shownDiv ion-icon.arrowDown {

    animation: rotateArrowReverse 0.5s forwards;
}

.shownDiv ion-icon.arrowUp {

    animation: rotateArrow 0.5s forwards;
    
}

.infoDiv p {
    color: #CCCCCC;
    line-height: 1.5;
}

.postDiv {
    /* ... existing styles ... */
    transition: background-color 0.1s ease-in-out;
}

.postDiv.opaque {
    background-color: #2a2a2a;
}

@media (max-width: 1100px) {
  
    .titleDiv h1{
        
        font-size: 48px;
    }
    
    
}

@media (max-width: 600px) {
    .shownDiv {
        margin: 0;
    }

    #floated {
        float: none;
        width: 100%;
        margin-right: auto;
        margin-left: auto;
        max-width: 400px;
        text-align: center;
        margin-bottom: 20px; /* Add margin to space it from the text below */
    }

    #floated img {
        margin: 0;
    }
}
