/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #3D2914 0%, #3D2914 70%, #1B4332 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Navigation */
.navigation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.nav-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-color: white;
}

/* Main Content */
.main-content {
    background: #e8dcc6;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    min-height: 600px;
}

/* Special styling for Grundriss page - remove outer frame */
.main-content.grundriss-page {
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

.room-section {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.5s ease;
}

/* Spezifisches Padding für Grundriss-Seite */
#grundriss.room-section {
    padding: 0;
}

/* Beschreibung Section */
#beschreibung.room-section {
    background: linear-gradient(135deg, #f5f1eb 0%, #ede4d3 50%, #e8dcc6 100%);
    padding: 2rem;
    min-height: 100vh;
}

.description-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 15px 35px rgba(139, 115, 85, 0.15);
    backdrop-filter: blur(10px);
}

.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid #d4af37;
}

.description-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #8b7355;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(139, 115, 85, 0.1);
}

.description-content {
    line-height: 1.8;
}

.description-text {
    font-size: 1.2rem;
    color: #5d4e37;
}

.description-paragraph {
    margin-bottom: 2rem;
    text-align: justify;
    font-weight: 400;
    line-height: 1.9;
}

.description-highlight-box {
    background: linear-gradient(135deg, #d4af37, #f4e4bc);
    padding: 2rem;
    border-radius: 20px;
    border-left: 5px solid #8b7355;
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.25);
    margin-top: 2rem;
}

.highlight-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #4a3728;
    margin: 0 0 1.5rem 0;
    text-align: center;
    border-bottom: 2px solid #8b7355;
    padding-bottom: 0.5rem;
}

.description-paragraph.highlight {
    background: rgba(255, 255, 255, 0.3);
    padding: 1.2rem;
    border-radius: 12px;
    font-weight: 500;
    color: #4a3728;
    margin-bottom: 1rem;
    border: 1px solid rgba(139, 115, 85, 0.2);
}

.description-paragraph.highlight:last-child {
    margin-bottom: 0;
}

.description-paragraph.highlight strong {
    color: #2d1810;
    font-weight: 600;
}

.room-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grundriss Section */
.grundriss-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.grundriss-wrapper {
    position: relative;
    max-width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.grundriss-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 1200px;
}

.room-overlay {
    position: absolute;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: overlayFadeIn 1s ease 0.5s forwards;
}

@keyframes overlayFadeIn {
    to { opacity: 1; }
}

.room-overlay:hover {
    background: transparent;
    transform: scale(1.05);
}

.room-label {
    color: transparent;
    font-weight: 600;
    font-size: 0.8rem;
    text-shadow: none;
    text-align: center;
    padding: 3px 6px;
    background: transparent;
    border-radius: 3px;
    border: none;
}

/* Room Headers */
.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.room-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
}

.back-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px 15px 15px;
    font-weight: 500;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: none;
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: transparent;
    opacity: 0.7;
}

.lightbox-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.lightbox-counter {
    color: rgba(255,255,255,0.7);
    margin-top: 0.5rem;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .navigation {
        gap: 0.5rem;
    }

    .nav-row {
        gap: 0.5rem;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .room-section {
        padding: 1rem;
    }

    /* Spezifisches Padding für Grundriss auf mobilen Geräten */
    #grundriss.room-section {
        padding: 0;
    }

    /* Beschreibung responsive */
    #beschreibung.room-section {
        padding: 1rem;
    }

    .description-container {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }

    .description-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .description-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .description-text {
        font-size: 1.1rem;
    }

    .description-paragraph {
        margin-bottom: 1.5rem;
        text-align: left;
    }

    .description-highlight-box {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    .highlight-title {
        font-size: 1.2rem;
    }

    .description-paragraph.highlight {
        padding: 1rem;
    }
    
    .room-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .room-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .room-label {
        font-size: 0.7rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-btn {
        flex: 1;
        min-width: 120px;
    }
}
