/* Basis-Styling mit Variablen */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #ffffff;
    --text-color: #333333;
    --accent-color: #e74c3c;
    --footer-bg: #f4f4f4;
    --footer-text: #333333;
    --link-color: #3498db;
    --link-hover: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem;
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.site-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    max-height: 40px;
    width: auto;
    display: block;
}

.logo-link {
    display: inline-block;
    line-height: 0;
}

#menu-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

#menu-toggle i {
    font-size: 1.5rem;
}

nav#menu {
    max-width: 100%;
    box-sizing: border-box;
}

nav#menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    max-width: 100%;
}

nav#menu ul li {
    margin: 0 1rem;
    position: relative;
}

nav#menu ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

nav#menu ul li a:hover, nav#menu ul li a.active {
    color: var(--link-hover);
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--secondary-color);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.nav-dropdown-content a, .nav-dropdown-content span {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.nav-dropdown-content a:hover {
    background-color: var(--link-hover);
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

main {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

section, .section, .hero {
    margin-bottom: 2rem;
}

.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    background-size: cover;
    background-position: center;
    background-color: var(--primary-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero h2, .hero div, .hero a {
    position: relative;
    z-index: 2;
}

.hero img, .section img, .apartment img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    margin: 1rem 0;
}

picture img {
    max-width: 100%;
    height: auto;
}

.cta {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

.cta:hover {
    background-color: var(--link-hover);
}

.form-section {
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.booking-box {
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.form-section form {
    display: grid;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    background: var(--secondary-color);
    color: white;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background: var(--link-hover);
}

.success, .error {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.success {
    background: #dff0d8;
    color: #3c763d;
}

.error {
    background: #f2dede;
    color: #a94442;
}

.error li {
    margin: 0.5rem 0;
}

.apartments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.apartment {
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem;
    border-radius: 8px;
}

.apartment-details {
    margin: 2rem 0;
}

.apartment-details .slider {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.apartment-details .slider img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.apartment-details .slider img.active {
    display: block;
}

.apartment-details .prev, .apartment-details .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    font-size: 1.2rem;
    z-index: 10;
}

.apartment-details .prev {
    left: 0;
}

.apartment-details .next {
    right: 0;
}

.contact-details {
    margin: 2rem 0;
}

footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 1rem;
    width: 100%;
    margin-top: auto;
}

footer a {
    color: var(--link-color);
    text-decoration: none;
}

footer a:hover {
    color: var(--link-hover);
}

.slider {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.slider img {
    display: none;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.slider img.active {
    display: block;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    font-size: 1.2rem;
    z-index: 10;
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

@media (min-width: 768px) {
    #menu-toggle {
        display: none;
    }
    nav#menu {
        display: block;
        background: none;
        padding: 0;
    }
    nav#menu ul {
        display: flex;
        gap: 1rem;
        justify-content: flex-end;
    }
    nav#menu ul li {
        margin: 0;
    }
    header {
        flex-wrap: nowrap;
    }
    .form-section form {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-group:nth-child(5) {
        grid-column: span 2;
    }
    .submit-btn {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    #menu-toggle {
        display: block;
    }
    nav#menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--secondary-color);
        z-index: 999;
        box-sizing: border-box;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    nav#menu.show {
        display: block;
    }
    nav#menu ul {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }
    nav#menu ul li {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
    .nav-dropdown-content {
        display: none;
        position: static;
        background-color: var(--secondary-color);
        box-shadow: none;
        padding-left: 1rem;
        max-width: 100%;
    }
    .nav-dropdown-content.show {
        display: block;
    }
    .hero {
        min-height: 60vh;
    }
    .slider img {
        max-height: 50vh;
    }
    .header-container {
        flex-direction: row;
        align-items: center;
    }
    header h1 {
        font-size: 1.2rem;
    }
    .site-logo {
        max-height: 30px;
    }
}

@media (max-width: 480px) {
    .prev, .next {
        padding: 0.3rem 0.6rem;
        font-size: 1rem;
    }
    main {
        padding: 1rem;
    }
    header h1 {
        font-size: 1rem;
    }
    .site-logo {
        max-height: 24px;
    }
}