/*
    Dezente Farbpalette für die Flohmarkt-Website
    - Neutraler Hintergrund
    - Zurückhaltendes Blau-Grau
    - Gedecktes Rot für Akzente
*/

body {
    font-family: Arial, sans-serif;
    background: #f7f7f5;
    /* sehr helles Beige */
    margin: 0;
    padding: 0;
}

div {
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
}

/* Navigationsleiste */
.main-nav {
    background-color: #2f3e46;
    /* dezentes Dunkelgrau-Blau */
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.nav-logo {
    flex-shrink: 0;
    margin-right: 1rem;
}

.nav-logo a {
    display: block;
    padding: 0;
}

.nav-logo img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
    flex: 1;
}

.main-nav li {
    margin: 0.3rem;
    position: relative;
}

.main-nav a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.responsive-table th {
    width: auto;
}


/* Responsiv */
@media (max-width: 600px) {
    .main-nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .nav-logo {
        margin-bottom: 1rem;
        align-self: center;
    }

    .nav-logo img {
        height: 40px;
        max-width: 180px;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .main-nav a {
        width: 100%;
        text-align: left;
    }
}

/* Container */
.container {
    position: relative;
    max-width: 1200px;
    margin: 2rem auto;
    background: #fdfdfd;
    /* dezentes Weiß */
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Home page logo */
.home-logo {
    text-align: center;
    margin: 0 auto 2rem auto;
    max-width: 600px;
}

.home-logo img {
    width: 100%;
    height: auto;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
    .home-logo {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }
}

.container>* {
    position: relative;
    z-index: 1;
}

/* Typografie */
h1 {
    font-size: 1.8rem;
    color: #2f3e46;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.4rem;
    color: #2f3e46;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.2rem;
    color: #2f3e46;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

p {
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

.highlight {
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.address {
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    margin-top: 2rem;
    font-size: 0.9rem;
}

.site-footer {
    background-color: #2f3e46;
    color: #eee;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    margin-top: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #eee;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Logos */
.logos {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.logos img {
    max-height: 15vw;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 600px) {
    .logos {
        flex-direction: column;
        align-items: flex-start;
    }

    .logos img {
        max-height: 25vw;
    }

    .lower-logo {
        max-height: 15vw !important;
    }
}

/* Links */
a {
    text-decoration: none;
    color: #8b2f2f;
    /* gedecktes Rot */
}

a:hover {
    text-decoration: underline;
    color: #a64545;
}

.link {
    display: block;
    text-align: center;
    font-size: 1.1rem;
    margin-top: 2rem;
    font-weight: bold;
    color: #8b2f2f;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Tabelle */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
    margin: 0 auto 5rem auto;
    display: block;
    overflow-x: auto;
}

.responsive-table th,
.responsive-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.responsive-table th {
    background-color: #f1f1f1;
    font-weight: 600;
    color: #222;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #ddd;
}

.responsive-table tbody tr:hover {
    background-color: #f5f5f5;
    transition: background 0.2s ease-in-out;
}

@media (max-width: 600px) {

    .responsive-table th,
    .responsive-table td {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* Submenü */
.main-nav .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2f3e46;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 180px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.main-nav .submenu li a {
    padding: 0.6rem 1.2rem;
    color: white;
    background-color: #2f3e46;
    font-weight: 400;
}

.main-nav .submenu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (min-width: 601px) {
    .main-nav li:hover>.submenu {
        display: block;
    }
}

@media (max-width: 600px) {
    .main-nav .submenu {
        display: block; /* Always show submenu on mobile */
        position: static;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.05);
    }

    /* Hide the parent label on mobile to only show direct city links */
    .main-nav .has-submenu > a {
        display: none;
    }

    .main-nav .submenu li a {
        padding-left: 2rem;
    }

    .main-nav .has-submenu.open>.submenu {
        display: block;
    }
}

/* Galerie */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-gallery img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.03);
}

.image-gallery .wide {
    grid-column: span 2;
    justify-self: center;
}

/* Unterstützer */
.logos-supporters {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 10px;
    margin-top: 20px;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #333;
    max-width: 150px;
}

.logo-item img {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: 5px;
}

.logo-item span {
    font-size: 0.9em;
}

/* Home page responsive layout: image right on desktop, first on mobile */
.home-flex {
    display: flex;
    flex-direction: column;
    /* mobile: stack */
    align-items: center;
    gap: 2rem;
}

.home-flex .home-logo {
    flex: 0 0 250px;
    max-width: 250px;
    width: 100%;
    text-align: center;
    order: -1;
    /* mobile: show image first */
}

.home-flex .home-logo img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.home-flex .home-content {
    flex: 1;
    min-width: 0;
}

@media (min-width: 768px) {
    .home-flex {
        flex-direction: row;
        /* desktop: side-by-side */
        align-items: flex-start;
        justify-content: center;
    }

    .home-flex .home-logo {
        margin-left: 2rem;
        margin-bottom: 0;
        order: 2;
        /* desktop: image on right */
    }

    .home-flex .home-content {
        max-width: 600px;
        order: 1;
        /* desktop: text on left */
    }
}

/* Modern Form Styles */
.form-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.form-header h1 {
    font-size: 2rem;
    color: #2f3e46;
    margin-bottom: 1rem;
}

.intro-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

.anmeldung-form {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2f3e46;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.required {
    color: #8b2f2f;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #2f3e46;
    box-shadow: 0 0 0 3px rgba(47, 62, 70, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.field-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background-color: #f7f9fa;
    border-left: 3px solid #2f3e46;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.info-icon {
    font-style: normal;
    margin-right: 0.25rem;
}

.public-badge,
.private-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.25rem;
    width: fit-content;
}

.public-badge {
    background-color: #e3f2fd;
    color: #1565c0;
}

.private-badge {
    background-color: #f3e5f5;
    color: #6a1b9a;
}

.form-submit {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.submit-button {
    background-color: #8b2f2f;
    color: white;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.submit-button:hover {
    background-color: #a64545;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.required-note {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Responsive form layout - two columns on larger screens */
@media (min-width: 768px) {
    .anmeldung-form {
        max-width: 1000px;
        grid-template-columns: 1fr 1fr;
    }

    .form-header {
        max-width: 1000px;
    }

    /* Make submit button span full width */
    .form-submit {
        grid-column: 1 / -1;
    }
}

/* Mobile optimization */
@media (max-width: 767px) {
    .form-header h1 {
        font-size: 1.6rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .anmeldung-form {
        gap: 1.5rem;
    }

    .submit-button {
        width: 100%;
        padding: 0.875rem 2rem;
    }
}

/* Map description card */
.map-description {
    margin: 1rem 0 1.5rem 0;
    padding: 1rem 1.25rem;
    background: #f7f9fa;
    border-left: 4px solid #2f3e46;
    border-radius: 6px;
    color: #333;
}

/* Registration count badge - Classical counter style */
.registration-count {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(to bottom, #2f3e46 0%, #1a2529 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

.registration-count::before {
    content: '📊';
    font-size: 1.5rem;
    animation: iconPulse 2s ease-in-out infinite;
}

.registration-count::after {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    right: -2px;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@media (max-width: 600px) {
    .registration-count {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }

    .registration-count::before {
        font-size: 1.3rem;
    }
}