body {
    margin: 0;
    font-family: Nunito, sans-serif;
}

body .content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

body a {
    color: #0a2463;
    text-decoration: none;
}

body a:hover {
    color: #3e92cc;
}

body .container p {
    font-size: 1.5rem;
    margin: 5px 0 5px 5px;
    padding: 0 0 0 auto;
    line-height: 1.6em;
}

body .container span {
    height: 15px;
    padding: 20px 5px 10px 0;
}

body .container h1 {
    font-family: 'Audiowide', 'Sans', cursive;
    padding: 0 0 15px 0;
    font-size: 3.7rem;
}

body .container h2 {
    font-family: 'Audiowide', 'Sans', cursive;
    color: rgb(0, 0, 0);
    font-size: 1rem;
    padding-bottom: 5px;
}

body .container h3 {
    color: rgb(32, 32, 32);
    font-size: 0.9rem;
    margin: 0;
}

body .container {
    display: flex;
    width: 100%;
    max-width: 1591px;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    align-items: stretch;
}

hr.style1 {
    border: none;
    height: 1px;
    background: #cacaca;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0.2rem 0 0.3rem;
}

.column {
    padding: 20px 0 20px 0;
    background-color: transparent;
    flex-grow: 1;
    flex-basis: 0;
    display: flex;
    flex-direction: column;
}

.column-div {
    padding: 15px;
    box-sizing: border-box;
    margin: 10px 0;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: rgba(255, 255, 255, 0.85);
    flex-grow: 1;
    min-height: 210px;
}

.column-div-contact-card {
    max-height: 210px;
}

.left-column {
    flex-basis: 426px;
    margin-left: 20px;
    margin-right: 10px;
    min-width: 426px;
}

.headline {
    margin: 10px 0 5px;
    line-height: 1.2;
}

#date-time-widget {
    flex-grow: 0;
    min-height: auto;
    padding: 8px;
    margin: 1px 0;
}

.widget-item {
    margin: 0;
    font-size: 0.75rem;
    color: rgb(32, 32, 32);
    height: auto;
    padding: 0 !important;
    line-height: 1.2;
}

.widget-item-error {
    margin: 0;
    font-size: 0.8rem;
    color: rgb(101, 0, 233);
    height: auto;
    padding: 0 !important;
    font-style: italic;
    line-height: 1.2;
}

#contact-form {
    flex-grow: 0;
    min-height: 0;
    margin-top: 5px;
    margin-bottom: 5px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, margin 0.5s ease-in-out;
    opacity: 1;
}

#contact-form.hidden {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

#contact-form .form-group {
    margin-bottom: 5px;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #b4b4b4;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
}

#contact-form textarea {
    height: 100px;
    resize: vertical;
}

#contact-form button {
    background-color: #0a2463;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

#contact-form button:hover {
    background-color: #3e92cc;
}

#contact-form button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#formStatus {
    margin-top: 10px;
    font-size: 0.9rem;
}

.success-message {
    color: #2e7d32;
}

.error-message {
    color: #d32f2f;
}

#contactToggle {
    cursor: pointer;
    transition: color 0.3s;
}

#contactToggle:hover {
    color: #3e92cc;
}

#contactToggle.active {
    color: #3e92cc;
}

#date-time-widget {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

#publications-widget li {
    margin-bottom: 20px;
}

#cloud-news-feed p, #projects-widget p, #publications-widget p {
    color: rgb(32, 32, 32);
    font-size: 0.8rem;
    font-style: normal; /* Prevent italicization from user agent stylesheet */
}

#cloud-news-feed ul, #projects-widget ul, #publications-widget ul {
    list-style-type: none;
    padding: 10px;
}

.middle-column {
    flex-basis: 426px;
    margin-left: 10px;
    margin-right: 10px;
    min-width: 426px;
}

.project-header {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.project-icon {
    width: 22px;
    height: 22px;
    font-size: 22px;
    color: #0a2463;
    margin-right: 16px;
}

.project-title {
    width: 320px;
}

#projects-widget li {
    margin-bottom: 20px;
}

.right-column {
    flex-basis: 426px;
    margin-left: 10px;
    margin-right: 20px;
    min-width: 426px;
}

#cloud-news-feed p.cloud-news-feed-date {
    color: rgb(37, 37, 37);
    font-size: 0.65rem;
    margin-bottom: 1px;
}

#cloud-news-feed li {
    margin-bottom: 15px;
}

.read-article {
    font-style: italic;
}

/* Responsive styles */
@media (max-width: 966px) {
    body .container {
        width: 99%;
        flex-direction: column;
        align-items: center;
    }

    body .container h1 {
        font-family: 'Audiowide', 'Sans', cursive;
        padding: 0 0 15px 0;
        font-size: 3rem;
    }

    .mx-auto {
        margin-left: auto;
        margin-right: auto;
    }

    .column {
        padding: 10px 0;
        flex: none;
    }

    .left-column,
    .middle-column,
    .right-column {
        width: 96%;
        min-width: 350px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .column-div {
        margin: 10px 0;
        min-height: auto;
    }

    .screen-height-top  {
        margin-top: 0px;
        padding-top: 0px;
    }

    .screen-height-bottom {
        margin-bottom: 0px;
        padding-bottom: 0px;
    }

    .screen-height-bottom-last {
        margin-bottom: 20px;
        padding-bottom: 0px;
    }

    #contact-form {
        margin-top: 5px;
        margin-bottom: 5px;
        min-height: auto;
    }

    #date-time-widget {
        margin: 1px 0;
        min-height: auto;
        padding: 8px;
    }

    .publication-title,
    .project-title {
        width: 100%; /* Full width on mobile for readability */
    }

    .project-icon {
        width: 18px;
        height: 18px;
        font-size: 18px;
        margin: 0 16px 5px auto;
    }

    #publications-widget li {
        margin-bottom: 10px;
    }
    
    #cloud-news-feed p, #projects-widget p, #publications-widget p {
        color: rgb(32, 32, 32);
        font-size: 0.8rem;
        font-style: normal; /* Prevent italicization from user agent stylesheet */
    }
    
    #cloud-news-feed ul, #projects-widget ul, #publications-widget ul {
        list-style-type: none;
        padding: 10px;
    }
}

/* Responsive styles */
@media (max-width: 375px) {
    body .container {
        width: 99%;
        flex-direction: column;
        align-items: center;
    }

    body .container h1 {
        font-family: 'Audiowide', 'Sans', cursive;
        padding: 0 0 15px 0;
        font-size: 3rem;
    }

    .mx-auto {
        margin-left: auto;
        margin-right: auto;
    }

    .column {
        padding: 10px 0;
        flex: none;
    }

    .left-column,
    .middle-column,
    .right-column {
        width: 96%;
        min-width: 350px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .column-div {
        margin: 10px 0;
        min-height: auto;
    }

    .screen-height-top  {
        margin-top: 0px;
        padding-top: 0px;
    }

    .screen-height-bottom {
        margin-bottom: 0px;
        padding-bottom: 0px;
    }

    .screen-height-bottom-last {
        margin-bottom: 20px;
        padding-bottom: 0px;
    }
}