/* Reset default styles for consistency */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles */
body {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(circle, rgba(0, 0, 0, 0.05) 0%, rgba(255, 255, 255, 1) 50%);
    color: #1a1a1a;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 2.5rem;
    width: 100%;
    margin-top: 1rem;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.625rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.625rem 0.9375rem;
    border-radius: 0.3125rem;
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1);
    max-width: 95%;
    margin: 0 auto;
    position: relative;
}

header img {
    max-width: 9.375rem;
    height: auto;
}

/* Navigation */
nav {
    flex-grow: 1;
    display: flex;
    justify-content: right;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.0rem; /* Reduzierter Gap-Wert, um mehr Platz zu sparen */
    justify-content: center;
}

nav ul li a {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.0625rem;
    color: #1a1a1a;
    padding: 0.25rem 0.375rem; /* Reduziertes Padding */
    transition: background 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

nav ul li a:hover,
nav ul li a:focus {
    background: #1a1a1a;
    color: #6c6;
    border-radius: 0.3125rem;
}

nav2 {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav2 ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.7rem; /* Reduzierter Gap-Wert, um mehr Platz zu sparen */
    justify-content: center;
}

nav2 ul li a {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.0625rem;
    color: #1a1a1a;
    padding: 0.25rem 0.375rem; /* Reduziertes Padding */
    transition: background 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

nav2 ul li a:hover,
nav2 ul li a:focus {
    background: #1a1a1a;
    color: #6c6;
    border-radius: 0.3125rem;
}

.close-btn,
.close-btnpop {
    position: absolute;
    top: 0.4375rem;
    right: 0.4375rem;
    width: 0.75rem;
    height: 0.75rem;
    cursor: pointer;
}

.close-btnpop {
    top: 1.375rem;
    right: 1.375rem;
}

/* Main content */
main {
    max-width: 95%;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.625rem;
    box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.1);
    flex-grow: 1;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: #d32f2f;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.125rem;
}

h2 {
    font-size: 1.8rem;
    font-weight: 400;
    text-align: center;
    color: #555;
    margin-bottom: 2.5rem;
}

.red {
    font-size: 1.8rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 1.25rem;
    color: #d32f2f;
}

h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #555;
    margin-top: 3.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.625rem;
    border-bottom: 0.125rem solid #555;
}

h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #555;
    margin-top: 2.5rem;
    margin-bottom: 0.9375rem;
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.25rem;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    color: #555;
    margin-top: 2.5rem;
    margin-bottom: 0.9375rem;
    text-align: center;
}

/* Lists */
ul {
    list-style: none;
    margin: 1.25rem 0;
}

ul li {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.9375rem;
    position: relative;
}

/* Images */
.image-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.about-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50%;
    margin: 0 auto;
}

.article-image,
.about-image {
    width: 100%;
    height: auto;
    border-radius: 0.625rem;
    box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.1);
    margin: 1.25rem 0;
    transition: transform 0.3s ease;
}

.article-image:hover,
.article-image:focus,
.about-image:hover,
.about-image:focus {
    transform: scale(1.02);
}

/* Grid layouts */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3.75rem;
    align-items: center;
}

.section-grid.reverse {
    direction: rtl;
}

.section-grid.reverse > * {
    direction: ltr;
}

.section-grid.full-width {
    grid-template-columns: 1fr;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
    gap: 1.25rem;
    margin: 0.625rem;
}

/* Captions */
.image-caption,
.advantages-caption,
.future-caption,
.about-caption {
    position: absolute;
    right: 0.625rem;
    bottom: 1.875rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0 0.25rem;
    font-size: 0.9rem;
    border-radius: 0.1875rem;
}

/* Tables */
table {
    width: 100%;
    max-width: 31.25rem;
    margin: 1.25rem auto;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1);
    border-radius: 0.3125rem;
}

th,
td {
    padding: 0.625rem 0.9375rem;
    text-align: left;
    font-size: 1rem;
    color: #1a1a1a;
}

th {
    background: #fff;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
}

td {
    border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.1);
}

/* Links */
a {
    color: #d32f2f;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: #6c6;
}

/* Footer */
footer {
    margin-top: auto;
    text-align: center;
    padding: 1.25rem 0;
    font-size: 0.9rem;
    color: #666;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.625rem; /* Reduzierter Gap-Wert für Footer-Navigation */
}

.footer-nav ul li a {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.0625rem;
    text-decoration: none;
    padding: 0.25rem 0.375rem; /* Reduziertes Padding */
    transition: color 0.3s ease;
}

.footer-nav ul li a:hover,
.footer-nav ul li a:focus {
    color: #6c6;
}

.effective-date {
    font-style: italic;
    color: #666;
    margin-top: 1.25rem;
}

/* Earth Gallery */
.earth-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 1.25rem 0;
}

.gallery-row {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
}

.image-wrapper {
    position: relative;
    width: calc(50% - 0.625rem);
}

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

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 1.25rem;
    border-radius: 0.625rem;
    width: 80%;
    max-width: 50rem;
    box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    top: 0.625rem;
    right: 1.25rem;
    color: #1a1a1a;
    font-size: 1.875rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #d32f2f;
}

.gallery-container {
    position: relative;
    text-align: center;
}

#galleryImage {
    max-width: 100%;
    height: auto;
    border-radius: 0.3125rem;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 1rem;
    margin-top: -1.375rem;
    color: white;
    font-weight: bold;
    font-size: 1.125rem;
    transition: background-color 0.3s ease;
    border-radius: 0 0.1875rem 0.1875rem 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.next {
    right: 0;
    border-radius: 0.1875rem 0 0 0.1875rem;
}

.prev:hover,
.prev:focus,
.next:hover,
.next:focus {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Responsive Design */
@media (max-width: 30rem) { /* 480px statt 768px */
    .section-grid,
    .section-grid.reverse {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .gallery-row {
        flex-direction: column;
    }

    .image-wrapper {
        width: 100%;
    }

    .about-image-container {
        width: 80%;
    }

    h1 { font-size: 2rem; }
    h2, .red { font-size: 1.5rem; }
    h3, h4 { font-size: 1.25rem; }
    p, ul li { font-size: 1rem; }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    .header-container {
        flex-direction: column;
    }

    header img {
        margin-bottom: 0.625rem;
    }

    nav ul li a,
    .footer-nav ul li a {
        font-size: 0.9rem; /* Kleinere Schriftgröße für Navigation */
    }
}

@media (max-width: 25rem) {
    .footer-nav ul {
        flex-direction: column;
        gap: 0.625rem;
    }
}