:root {
    --primary-color: #2d5a27;
    --primary-hover: #1e3d1b;
    --bg-color: #f4f7f6;
    --text-color: #333;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.hero-section {
    width: 100%;
    height: 60vh;
    background: #e0e0e0 url('https://www.haus-herfurth.de/Haus-Herfurth-2007-07-01.jpg') no-repeat center center;
    background-size: cover;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px;
}

@media (max-width: 600px) {
    .container { padding: 20px 10px; }
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 1.8rem;
    margin: 0 0 10px;
}

header p {
    color: #666;
    margin: 0 0 6px;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.tab {
    padding: 12px 18px;
    background: #eef1ee;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    color: #555;
    transition: background-color 0.15s, color 0.15s;
    text-decoration: none;
    display: inline-block;
}

.tab:hover { background: #dde3dd; }

.tab.active {
    background: white;
    color: var(--primary-color);
    border: 2px solid #ddd;
    border-bottom: 2px solid white;
    margin-bottom: -2px;
}

/* Apartment panel */
.apartment {
    background: white;
    border-radius: 0 14px 14px 14px;
    padding: 28px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.apartment-panel { display: none; }
.apartment-panel.active { display: block; }

.apartment h2 {
    font-size: 1.3rem;
    margin: 0 0 4px;
    color: var(--primary-color);
}

.apartment h3 {
    font-size: 1.05rem;
    color: var(--primary-color);
    margin: 24px 0 8px;
}

.apartment-meta {
    color: #888;
    font-size: 0.9rem;
    margin: 0 0 22px;
}

.apartment p, .apartment ul {
    line-height: 1.55;
}

.apartment ul {
    padding-left: 20px;
}

.apartment-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
    border: 2px solid transparent;
    font-family: inherit;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); }

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover { background-color: var(--primary-color); color: white; }

.fotos-section { margin-bottom: 28px; }

/* Foto-Galerie */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.gallery a {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
    cursor: zoom-in;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.gallery a:hover img { transform: scale(1.05); }

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 6px;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: zoom-out;
    padding: 20px;
}

.lightbox.open { display: flex; }

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 6px 30px rgba(0,0,0,0.6);
    border-radius: 4px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.3); }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Contact */
.contact-section {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-contact {
    background-color: white;
    color: var(--text-color);
    border-color: #ddd;
    font-size: 1rem;
    padding: 14px 32px;
}

.btn-contact:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Phone dialog */
.phone-dialog {
    border: none;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    max-width: 360px;
    width: 90%;
}

.phone-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.phone-dialog-content {
    padding: 28px 24px 20px;
    text-align: center;
}

.phone-dialog-content h3 {
    margin: 0 0 8px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.phone-dialog-content p {
    margin: 0 0 16px;
    color: #666;
    font-size: 0.9rem;
}

.phone-number {
    display: block;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 18px 0;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.phone-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
}

/* Ausstattungsmerkmale */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px 30px;
    margin: 12px 0 8px;
}

.features-group h4 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin: 0 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e0e0e0;
}

.features-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-group li {
    position: relative;
    padding: 3px 0 3px 22px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.features-group li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--primary-color);
    font-weight: bold;
}

/* Related apartments */
.related {
    background: white;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 40px;
    border: 1px solid #e0e0e0;
}

.related h3 {
    margin: 0 0 16px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.related ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.related a {
    display: inline-block;
    padding: 10px 16px;
    background: #eef1ee;
    color: var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.related a:hover { background: #dde3dd; }

/* Impressum */
#impressum {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    text-align: left;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    line-height: 1.5;
}

#impressum h2 {
    font-size: 1rem;
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.close-btn {
    display: block;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
}

footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.8rem;
    color: #999;
}

footer a {
    color: #666;
    text-decoration: underline;
    cursor: pointer;
}
