/* Mobile-specific styles for screen widths up to 1024px */
/* This file contains styles that override the desktop styles for mobile devices */

@media (max-width: 1024px) {
    /* Prevent horizontal scrolling on mobile */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    /* Ensure containers don't exceed viewport width */
    .container {
        max-width: 100vw;
        padding: 0 15px;
    }
    
    /* Center the Specials links on mobile */
    .availability-info h4 {
        text-align: center;
    }
    
    
    
    .apartment-title {
        font-size: 1.4rem; /* Slightly smaller title */
        margin-bottom: 10px;
    }
    
    .apartment-specs {
        margin-bottom: 0px;
    }
    
    .apartment-features ul {
        font-size: 0.9rem; /* Smaller list text */
        line-height: 1.4;
    }
    
    .apartment-features li {
        margin-bottom: 0px; /* Tighter spacing */
    }
    
    /* Compact slider buttons */
    .slider-btn {
        width: 35px; /* Smaller buttons */
        height: 35px;
    }
    
    .slider-btn span, .slider-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Make slider container less padded for wider cards */
    .apartment-slider {
        padding: 0 0 40px; /* No side padding for full width */
    }
    
    /* Also for event sliders */
    .slider-container {
        padding: 0 0 20px;
    }
    
    /* Specifically for event sliders to ensure full width */
    .events-slider-container .slider-container {
        padding: 0 0 20px;
        max-width: 100vw;
    }
    
    /* Also ensure apartment slider containers fit */
    .apartment-slider {
        max-width: 100vw;
    }
    
    /* Hide slider buttons on mobile (swipe to navigate) */
    .slider-btn {
        display: none !important;
    }
    
    /* Adjust event sliders for mobile */
    .events-slider-container {
        margin-bottom: 20px;
        overflow: hidden; /* Prevent overflow */
    }
    
    .events-slider-container .slider-track {
        display: flex;
        align-items: stretch;
        width: 100%;
    }
    
    .events-slider-container .slider-track .event-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .events-season-title {
        font-size: 1.8rem; /* Smaller season titles */
    }
    
    .events-season-intro {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Make event cards more compact */
    .event-card {
        padding: 15px;
        max-width: 100vw;
        box-sizing: border-box;
        width: 100%;
    }
    
    .event-card img {
        max-width: 100%;
        height: auto;
    }
    
    .event-card h4 {
        font-size: 1.2rem;
    }
    
    .event-card p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Reduce section padding on mobile */
    .apartments, .rooms-section, .events-section {
        padding: 60px 15px; /* Less padding */
    }
    
    /* Adjust hero and other sections */
    .hero {
        /* Increase vertical space so the brown background appears longer on mobile */
        padding: 120px 15px 140px;
        min-height: 520px;
    }
    
    .hero-title {
        font-size: 2rem; /* Smaller on mobile */
    }
    
    /* Fix navbar for mobile - keep it visible at top on scroll */
    :root {
        --nav-offset: 70px; /* smaller nav offset on mobile */
    }
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 10000;
    }
    body {
        padding-top: var(--nav-offset);
    }
    /* Fallback used by JS when menu wasn't becoming visible */
    .mobile-force-sticky .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10000;
    }
    .mobile-force-sticky body {
        padding-top: var(--nav-offset);
    }

    .navbar .container {
        padding: 0 15px;
    }
    
    .nav-brand img {
        max-height: 60px; /* Slightly smaller logo */
    }
    
    /* Make cookie banner more compact on mobile */
    .cookie-banner {
        left: 10px;
        right: 10px;
        padding: 15px 12px;
        font-size: 0.9rem;
    }
    
    .cookie-banner .cb-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Make section titles smaller on mobile */
    .section-title {
        font-size: 1.8rem;
        margin: 20px 0 15px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Make service cards fit on mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        justify-items: center;
    }
    
    .service-card {
        padding: 0px;
        width: 100%;
        max-width: 400px;
    }
    
    .service-card img {
        height: 200px;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }

    /* Hauptbild in Ferienwohnung/Zimmer auf Mobilgeräten immer ganz anzeigen (Update) */
    .main-image {
        width: 80%;
        max-width: 320px;
        height: auto;
        max-height: 260px;
        min-height: 120px;
        margin: 0px auto 0px auto;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f9f6f2;
        border-radius: 10px;
        overflow: hidden;
    }
    .main-image img {
        width: 90%;
        height: auto;
        max-width: 90%;
        max-height: 90%;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        background: #f9f6f2;
    }

    /* Mobile-Optimierung für Preisliste.html */
    #price-table {
        width: 100%;
        max-width: 100vw;
        overflow-x: auto;
        margin: 0 auto 18px auto;
        font-size: 0.95rem;
        box-sizing: border-box;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.04);
        padding: 6px 0 6px 0;
    }
    #price-table table {
        width: 100%;
        border-collapse: collapse;
        box-sizing: border-box;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
    }
    #price-table th, #price-table td {
        padding: 6px 4px;
        text-align: left;
        font-size: 0.95rem;
        word-break: break-word;
        border-bottom: 1px solid #eee;
    }
    #price-table th {
        background: #f7f3ed;
        color: #8B6F47;
        font-weight: 600;
        font-size: 1.05rem;
        border-bottom: 2px solid #e0d6c8;
    }
    #price-table tr:last-child td {
        border-bottom: none;
    }
    #price-table tr:nth-child(even) {
        background: #faf7f2;
    }
    #price-table tr:nth-child(odd) {
        background: #fff;
    }
    #price-notes {
        font-size: 0.93rem;
        padding: 0 2px;
    }
    .section-title {
        font-size: 1.2rem;
    }

    /* Stacked Table für Preisliste auf kleinen Bildschirmen */
    @media (max-width: 600px) {
        #price-table table, #price-table thead, #price-table tbody, #price-table th, #price-table td, #price-table tr {
            display: block;
            width: 100%;
        }
        #price-table thead {
            display: none;
        }
        #price-table tr {
            margin-bottom: 18px;
            border-radius: 10px;
            box-shadow: 0 1px 6px rgba(0,0,0,0.04);
            background: #fff;
            padding: 8px 0 8px 0;
        }
        #price-table td {
            border: none;
            border-bottom: 1px solid #eee;
            position: relative;
            padding-left: 48%;
            min-height: 32px;
            font-size: 1rem;
        }
        #price-table td:last-child {
            border-bottom: none;
        }
        #price-table td:before {
            position: absolute;
            top: 0;
            left: 8px;
            width: 44%;
            white-space: pre-wrap;
            font-weight: 600;
            color: #8B6F47;
            content: attr(data-label);
            font-size: 0.97em;
        }
    }
}
@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        left: 0;
        top: var(--nav-offset);
        width: 100%;
        position: fixed;
        background: var(--white);
        z-index: 10001;
        box-shadow: 0 10px 27px var(--shadow);
        padding: 20px 0;
    }
}