/* General Styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}
/* Header Styles */
header {
    position: relative;
    color: white;
    text-align: center;
    background-image: url('../images/header_orienteering.berlin.jpg');
    background-size: cover;
    background-position: center 40%;
    height: 280px;
}

/* Overlay */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Ensure content is above the overlay */
header h1, .language-switcher, nav {
    position: relative;
    z-index: 2;
}

/* Adjust the header content positioning */
header h1 {
    margin: 0;
    padding: 150px 20px 0 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Navigation Styles */
nav {
    margin-top: 10px;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2; /* Ensure nav stays above the overlay */
}

nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

nav a:hover {
    text-decoration: underline;
}

/* Language Switcher Styles */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
}

.language-switcher button {
    background-color: rgba(255, 255, 255, 0.8);
    color: #004d00;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    margin-left: 5px;
}

.language-switcher button.active {
    background-color: #004d00;
    color: white;
}

/* Welcome Text */
#welcome-text {
    padding: 20px;
    text-align: center;
    background-color: #e6ffe6;
    font-size: 1.2em;
}

/* Section Styles */
section {
    padding: 20px;
}

h2 {
    margin-top: 40px;
    text-align: center;
}

/* Description Text */
.section-description {
    text-align: center;
    margin-bottom: 20px;
}

/* Additional Note */
.section-note {
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
    color: #555;
}

/* Tab Styles */
.tab-container {
    margin: 20px auto;
    max-width: 1200px;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-buttons button {
    background-color: #f1f1f1;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    margin: 0 5px;
}

.tab-buttons button.active {
    background-color: #004d00;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Map Container Styles */
.map-container {
    height: 600px;
    margin-bottom: 40px;
}

/* Media query for screens up to 768px wide (tablets and small desktops) */
@media (max-width: 768px) {
    .map-container {
        height: 400px;
    }
}

/* Media query for screens up to 480px wide (smartphones) */
@media (max-width: 480px) {
    .map-container {
        height: 300px;
    }
}


/* Table Styles */
.table-view {
    max-width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

th {
    cursor: pointer;
    background-color: #f9f9f9;
}

th.sort-asc::after {
    content: " ▲";
}

th.sort-desc::after {
    content: " ▼";
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.pagination button {
    background-color: #f1f1f1;
    border: none;
    padding: 8px 12px;
    margin: 0 2px;
    cursor: pointer;
}

.pagination button.active {
    background-color: #004d00;
    color: white;
}

.pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Image Styling in Table */
.table-image {
    max-width: 100px;
    height: auto;
}

/* Footer Styles */
footer {
    background-color: #004d00;
    color: white;
    padding: 20px;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: underline;
}

/* Responsive Styles */

/* Media query for screens up to 768px wide (tablets and small desktops) */
@media (max-width: 768px) {
    header {
        height: auto;
        padding-bottom: 20px;
    }

    header h1 {
        padding: 100px 20px 0 20px;
        font-size: 2em;
    }

    nav {
        position: relative;
        margin-top: 10px;
        bottom: auto;
        left: auto;
        transform: none;
        text-align: center;
        z-index: 2;
    }

    nav a {
        margin: 0 10px;
    }

    .language-switcher {
        top: 10px;
        right: 10px;
    }
}

/* Media query for screens up to 480px wide (smartphones) */
@media (max-width: 480px) {
    header h1 {
        padding: 80px 10px 0 10px;
        font-size: 1.5em;
    }

    nav a {
        display: block;
        margin: 10px 0;
        text-align: center;
    }

    .language-switcher button {
        padding: 5px;
        font-size: 14px;
    }
}

/* Modal Styles */
.modal {
  display: none; /* Versteckt standardmäßig */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5); /* Halbtransparentes Schwarz */
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  max-width: 600px;
  position: relative;
}

.close-button {
  background: none;
  border: none;
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
}

