body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
}

.site-background {
    position: fixed;
    inset: 0;
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.bg {
    background-image: url('/grav/user/themes/fm/images/background.png');
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px;
}

/* HEADER */
.header {
    background: #9b0000;
    color: white;
}

.header-inner {
    display: flex;
    justify-content: center;
    height: 60px;
}

.logo a {
    color: white;
    font-weight: bold;
    font-size: 1.125rem;
    text-decoration: none;
}

/* --- Navigation --- */
.nav-list {
    list-style: none;
    margin: 20px 0 0 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.nav-item a {
    color: white;
    font-weight: bold;
    font-size: 1.0rem;
    text-decoration: none;
    text-transform: uppercase;
}

.nav-item.active a, .nav-item a:hover {
    color: #676767;
}

/* CONTENT */
main {
    background-color: #fff;
    padding: 35px;
    margin-top: 25px;
    border: 1px solid #ddd;
}

.header-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

h1, h2, h3, h4, h5, h6 {
    color: #9b0000;
}

h1 {
    font-size: 3.0rem;
    border-bottom: 2px solid #9b0000;
    padding-bottom: 10px;
}

h2 {
    font-size: 2.0rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: #2a5d9f;
}

/* BLOG */
.post {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.meta {
    font-size: 12px;
    color: #777;
}

.archive-year {
    margin-bottom: 8px;
}

.lecture-entry h3 {
    margin: 0px;
}

.lecture-details p {
    margin-top: 0px;
}

.lecture-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.lecture-thumb {
    border: 1px solid var(--fm-border);
    padding: 3px;
    background: #fff;
    transition: transform 0.2s;
    display: block;
}

.lecture-thumb:hover {
    transform: scale(1.05);
    border-color: var(--fm-blue);
}

.lecture-img-link {
    display: inline-block;
}

/* Modal Hintergrund */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

/* Das Bild im Modal */
.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Schließen-Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.modal-close:hover {
    color: var(--fm-blue);
}

/* Animation */
.modal-content {
    animation-name: zoom;
    animation-duration: 0.4s;
}

@keyframes zoom {
    from {transform: scale(0.7); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* FOOTER */
.footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    border-top: 1px solid #ddd;
    background: #fafafa;
}

/* Button wie einen Link aussehen lassen */
.footer-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #2a5d9f;
    font-family: inherit;
    font-size: 0.75rem; /* Passend zum restlichen Footer */
    cursor: pointer;
    text-decoration: underline;
}

.footer-link-btn:hover {
    color: var(--fm-blue);
    text-decoration: underline;
}

/* BACK TO TOP */
#back-to-top {
    display: none; /* Standardmäßig unsichtbar */
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #9b0000;
    color: white;
    cursor: pointer;
    padding: 6px 16px 12px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: opacity 0.3s, background-color 0.3s;
}

#back-to-top:hover {
    background-color: #003d7a; /* Etwas dunkleres Blau beim Hover */
}

/* MOBILE */
@media (max-width: 768px) {
    .header-inner {
		flex-direction: column;
		height: auto;
		padding: 10px 0;
		}

    .nav a {
    	margin: 5px 10px;
    }

    main {
    	padding: 20px;
    }

    .footer-link-btn {
    	display: block;
    	margin: 10px auto;
    }

    #back-to-top {
        bottom: 15px;
        left: 15px;
        padding: 8px 12px;
    }

}