/* ==========================================================================
   Monteur.de – Mobile-First Stylesheet
   Breakpoints: 480px (sm), 768px (md), 1024px (lg)
   ========================================================================== */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif; color: #333; line-height: 1.6; background: #f8f9fa; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ==========================================================================
   Utility Classes (extracted from inline styles)
   ========================================================================== */
.flex-row { display: flex; gap: 0.5rem; }
.flex-row-1rem { display: flex; gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.w-full { width: 100%; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.text-muted { color: #6b7280; }
.text-sm { font-size: 0.85rem; }

/* ==========================================================================
   Buttons – touch-friendly min 44px tap target
   ========================================================================== */
.btn { display: inline-block; padding: 0.75rem 1.4rem; border-radius: 6px; font-size: 0.95rem; font-weight: 500; border: none; cursor: pointer; transition: background 0.2s; text-decoration: none; min-height: 44px; line-height: 1.4; text-align: center; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; text-decoration: none; }
.btn-secondary { background: #f59e0b; color: #fff; }
.btn-secondary:hover { background: #d97706; text-decoration: none; }
.btn-outline { background: transparent; border: 2px solid #2563eb; color: #2563eb; }
.btn-outline:hover { background: #2563eb; color: #fff; }
.btn-sm { padding: 0.5rem 0.8rem; font-size: 0.85rem; min-height: 44px; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; text-decoration: none; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 0.8rem 0; position: relative; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.5rem; font-weight: 700; color: #1e3a5f; }
.logo:hover { text-decoration: none; }

/* Mobile nav toggle */
.nav-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #374151; position: relative; transition: background 0.2s; }
.nav-toggle span::before,
.nav-toggle span::after { content: ''; position: absolute; left: 0; width: 24px; height: 2px; background: #374151; transition: transform 0.2s; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle.active span { background: transparent; }
.nav-toggle.active span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.active span::after { top: 0; transform: rotate(-45deg); }

/* Mobile navigation */
.main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e5e7eb; padding: 1rem; gap: 0.5rem; z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.main-nav.open { display: flex; }
.main-nav a { color: #4b5563; font-size: 1rem; padding: 0.6rem 0; min-height: 44px; display: flex; align-items: center; }
.main-nav a:hover { color: #2563eb; text-decoration: none; }
.lang-switcher { display: flex; gap: 0.3rem; padding-top: 0.5rem; border-top: 1px solid #e5e7eb; margin-top: 0.5rem; }
.lang-switcher a { font-size: 0.9rem; padding: 0.5rem 0.6rem; border-radius: 3px; color: #6b7280; min-height: 44px; display: flex; align-items: center; }
.lang-switcher a.active { background: #2563eb; color: #fff; }

/* Desktop nav (md+) */
@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .main-nav { display: flex; flex-direction: row; position: static; background: none; border: none; padding: 0; gap: 1.2rem; align-items: center; box-shadow: none; }
    .main-nav a { font-size: 0.95rem; padding: 0.3rem 0; min-height: auto; }
    .lang-switcher { padding-top: 0; border-top: none; margin-top: 0; margin-left: 0.5rem; padding-left: 0.8rem; border-left: 1px solid #d1d5db; }
    .lang-switcher a { font-size: 0.8rem; padding: 0.2rem 0.4rem; min-height: auto; }
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert { padding: 0.8rem 1rem; border-radius: 6px; margin: 1rem 0; font-size: 0.95rem; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero { background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%); color: #fff; padding: 2.5rem 0 2rem; text-align: center; }
.hero h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.hero-subtitle { font-size: 1rem; opacity: 0.9; margin-bottom: 1.5rem; }

@media (min-width: 480px) {
    .hero { padding: 3rem 0 2.5rem; }
    .hero h1 { font-size: 1.8rem; }
}
@media (min-width: 768px) {
    .hero { padding: 4rem 0 3rem; }
    .hero h1 { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.1rem; margin-bottom: 2rem; }
}

/* ==========================================================================
   Search Form
   ========================================================================== */
.search-form { max-width: 900px; margin: 0 auto; }
.search-fields { display: flex; flex-direction: column; gap: 0.5rem; background: #fff; padding: 0.5rem; border-radius: 10px; }
.search-fields input { width: 100%; padding: 0.7rem 1rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.95rem; min-height: 44px; }
.search-fields input:focus { outline: none; border-color: #2563eb; }
.search-guests { max-width: 100%; }
.btn-search { flex-shrink: 0; }

@media (min-width: 768px) {
    .search-fields { flex-direction: row; }
    .search-fields input { flex: 1; }
    .search-guests { max-width: 100px; }
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.why-us { padding: 2rem 0; background: #fff; }
.why-us h2 { text-align: center; margin-bottom: 1.5rem; color: #1e3a5f; }
.features-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.feature { text-align: center; padding: 1.5rem; }
.feature h3 { color: #2563eb; margin-bottom: 0.5rem; }

@media (min-width: 480px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .why-us { padding: 3rem 0; }
    .why-us h2 { margin-bottom: 2rem; }
    .features-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
}

/* ==========================================================================
   CTA Landlord
   ========================================================================== */
.cta-landlord { padding: 2rem 0; text-align: center; background: #f0f4ff; }
.cta-landlord h2 { color: #1e3a5f; margin-bottom: 0.5rem; }
.cta-landlord p { margin-bottom: 1.5rem; color: #4b5563; }
.cta-landlord-note { margin-top: 1rem; color: #1e3a5f; font-size: 0.95rem; }

@media (min-width: 768px) {
    .cta-landlord { padding: 3rem 0; }
}

/* ==========================================================================
   Error Pages
   ========================================================================== */
.error-page { padding: 3rem 0; text-align: center; }
.error-page h1 { font-size: 3rem; color: #d1d5db; }
.error-page p { margin: 1rem 0 2rem; color: #6b7280; }

@media (min-width: 768px) {
    .error-page { padding: 5rem 0; }
    .error-page h1 { font-size: 4rem; }
}

/* ==========================================================================
   Static Pages
   ========================================================================== */
.static-page { padding: 1.5rem 0; }
.static-page h1 { margin-bottom: 1.5rem; color: #1e3a5f; }

@media (min-width: 768px) {
    .static-page { padding: 2rem 0; }
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-weight: 500; color: #374151; font-size: 0.95rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.7rem 0.8rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 1rem; min-height: 44px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-group .error { color: #dc2626; font-size: 0.85rem; margin-top: 0.2rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.form-check input { width: auto; min-height: auto; }
.form-card { max-width: 500px; margin: 2rem auto; background: #fff; padding: 1.5rem; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.form-card h1 { margin-bottom: 1.5rem; font-size: 1.5rem; color: #1e3a5f; }
.form-footer { margin-top: 1rem; text-align: center; font-size: 0.9rem; color: #6b7280; }
.form-hint { margin-bottom: 1rem; color: #6b7280; }

/* Responsive form rows */
.form-row { display: flex; flex-direction: column; gap: 0; }
@media (min-width: 480px) {
    .form-row { flex-direction: row; gap: 1rem; }
}

@media (min-width: 768px) {
    .form-card { padding: 2rem; }
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumb { padding: 0.8rem 0; font-size: 0.9rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before { content: '\203A'; margin-right: 0.3rem; color: #9ca3af; }
.breadcrumb a { color: #6b7280; }
.breadcrumb a:hover { color: #2563eb; }
.breadcrumb .current { color: #374151; }

/* ==========================================================================
   Search Page
   ========================================================================== */
.search-page { padding: 1rem 0; }
.search-layout { display: flex; flex-direction: column; gap: 1.5rem; padding: 1rem 0; }
.search-sidebar { width: 100%; }
.search-sidebar h3 { margin-bottom: 1rem; }
.search-results { flex: 1; }
.results-count { color: #6b7280; margin-bottom: 1rem; }
.results-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.result-card { display: block; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); color: #333; text-decoration: none; transition: transform 0.15s; }
.result-card:hover { transform: translateY(-2px); text-decoration: none; }
.result-image { width: 100%; height: 180px; object-fit: cover; background: #e5e7eb; }
.result-noimg { display: flex; align-items: center; justify-content: center; }
.result-info { padding: 1rem; }
.result-info h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.result-city { color: #6b7280; font-size: 0.9rem; }
.result-price { font-weight: 600; color: #2563eb; margin-top: 0.3rem; }
.result-guests { font-size: 0.85rem; color: #9ca3af; }
.pagination { display: flex; gap: 0.3rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination a { padding: 0.5rem 0.8rem; border: 1px solid #d1d5db; border-radius: 4px; color: #374151; min-height: 44px; display: flex; align-items: center; }
.pagination a.active { background: #2563eb; color: #fff; border-color: #2563eb; }

.search-filter-check { margin-bottom: 0.5rem; }

@media (min-width: 480px) {
    .results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .search-layout { flex-direction: row; gap: 2rem; padding: 2rem 0; }
    .search-sidebar { width: 260px; flex-shrink: 0; }
}
@media (min-width: 1024px) {
    .results-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

/* ==========================================================================
   Property Detail Page
   ========================================================================== */
.property-page { padding: 1.5rem 0; }
.gallery { display: flex; gap: 0.5rem; overflow-x: auto; margin-bottom: 1.5rem; border-radius: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
.gallery img { height: 250px; min-width: 80vw; object-fit: cover; border-radius: 8px; scroll-snap-align: start; }
.gallery-dots { display: flex; justify-content: center; gap: 0.4rem; margin-top: 0.5rem; margin-bottom: 1rem; }
.gallery-dot { width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; border: none; cursor: pointer; padding: 0; }
.gallery-dot.active { background: #2563eb; }

.property-layout { display: flex; flex-direction: column; gap: 1.5rem; }
.property-main { flex: 1; }
.property-main h1 { font-size: 1.4rem; color: #1e3a5f; }
.property-location { color: #6b7280; margin-bottom: 1rem; }
.property-meta { display: flex; flex-wrap: wrap; gap: 0.8rem; padding: 1rem 0; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; margin-bottom: 1.5rem; font-size: 0.95rem; color: #4b5563; }
.prop-section { margin-bottom: 2rem; }
.prop-section h2 { font-size: 1.2rem; color: #1e3a5f; margin-bottom: 0.8rem; }
.amenity-list { display: grid; grid-template-columns: 1fr; gap: 0.6rem 1.5rem; list-style: none; }
.amenity-list li { display: flex; align-items: center; gap: 0.7rem; }
.amenity-icon { width: 22px; height: 22px; flex-shrink: 0; color: #2563eb; }
.property-sidebar { width: 100%; }
.price-card, .inquiry-card, .landlord-card { background: #fff; padding: 1.5rem; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 1rem; }
.price-main { font-size: 1.8rem; font-weight: 700; color: #2563eb; }
.price-main small { font-size: 0.9rem; font-weight: 400; color: #6b7280; }
.price-alt { font-size: 1rem; color: #374151; margin-top: 0.3rem; }
.price-extra { font-size: 0.9rem; color: #6b7280; margin-top: 0.2rem; }
.inquiry-card h3, .landlord-card h3 { margin-bottom: 1rem; color: #1e3a5f; }

.inquiry-dates { display: flex; gap: 0.5rem; }
.inquiry-dates .form-group { flex: 1; }

@media (min-width: 480px) {
    .amenity-list { grid-template-columns: repeat(2, 1fr); }
    .gallery img { min-width: 60vw; }
}
@media (min-width: 768px) {
    .property-page { padding: 2rem 0; }
    .property-layout { flex-direction: row; gap: 2rem; }
    .property-sidebar { width: 350px; flex-shrink: 0; }
    .property-main h1 { font-size: 1.8rem; }
    .gallery img { height: 350px; min-width: auto; }
    .gallery-dots { display: none; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #1e3a5f; color: #94a3b8; padding: 2rem 0; margin-top: 3rem; text-align: center; font-size: 0.9rem; }
.footer-links { margin-bottom: 0.8rem; }
.footer-links a { color: #94a3b8; margin: 0 0.8rem; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: #fff; }

/* ==========================================================================
   Auth Pages
   ========================================================================== */
.auth-page { padding: 1rem 0; }

/* ==========================================================================
   Backoffice Header
   ========================================================================== */
.backoffice-header { background: #1e3a5f; }
.backoffice-header .logo { color: #fff; }
.backoffice-header .main-nav a { color: #94a3b8; }
.backoffice-header .main-nav a:hover { color: #fff; }

/* Backoffice images */
.bo-images { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.bo-images img { height: 100px; border-radius: 4px; }

/* ==========================================================================
   Home: Allgäu towns and new listings
   ========================================================================== */
.home-cities, .home-listings { padding: 2rem 0; }
.home-cities h2, .home-listings h2 { margin-bottom: 1rem; }
.city-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.city-tile { position: relative; display: block; height: 130px; border-radius: 8px; overflow: hidden; background: #1e3a5f; color: #fff; text-decoration: none; }
.city-tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: opacity 0.15s; }
.city-tile:hover { text-decoration: none; }
.city-tile:hover img { opacity: 0.9; }
.city-tile-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.6rem 0.8rem; background: linear-gradient(transparent, rgba(0,0,0,0.65)); display: flex; flex-direction: column; }
.city-tile-label strong { font-size: 1.05rem; }
.city-tile-label small { font-size: 0.8rem; opacity: 0.9; }
.home-show-all { margin-top: 1.5rem; text-align: center; }
.price-notes { font-size: 0.8rem; color: #6b7280; line-height: 1.4; }
@media (min-width: 768px) {
    .city-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .city-tile { height: 160px; }
}
@media (min-width: 1024px) {
    .city-grid { grid-template-columns: repeat(4, 1fr); }
}
.main-nav a.btn-primary, .main-nav a.btn-primary:hover { color: #fff; }
