/**
 * HERBSTLICHES FRONTEND-STYLING - VERBESSERT
 * Mobile-First & Warm Colors
 * ✅ Zurück-Button jetzt gut sichtbar
 * ✅ WordPress-Footer ausgeblendet
 */

/* ========================================
   FARBPALETTE - HERBST / MARTINSMARKT
   ======================================== */
:root {
    /* Haupt-Herbstfarben */
    --autumn-orange: #d97634;
    --autumn-red: #c84630;
    --autumn-yellow: #f4a460;
    --autumn-brown: #8b4513;
    --autumn-gold: #daa520;
    
    /* Hintergrundfarben */
    --bg-cream: #fef9f3;
    --bg-light: #fff8f0;
    --bg-card: #ffffff;
    
    /* Akzentfarben */
    --accent-green: #7a9b5e;
    --accent-beige: #d2b48c;
    
    /* Text */
    --text-dark: #3e2723;
    --text-medium: #5d4037;
    --text-light: #795548;
    
    /* Status-Farben */
    --status-success: #7cb342;
    --status-warning: #f57c00;
    --status-info: #0288d1;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ========================================
   ✅ WORDPRESS FOOTER AUSBLENDEN
   ======================================== */
.site-footer,
#colophon,
footer.entry-footer,
.wp-block-post-template footer,
footer.site-footer {
    display: none !important;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */
.mm-frontend,
.mm-parent-view,
.mm-space-view {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

/* ========================================
   ✅ ZURÜCK-BUTTON - DEUTLICH SICHTBAR
   ======================================== */
.mm-back-button,
.mm-button-back,
a.mm-back-link,
.mm-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem !important;
    margin: 1rem 0 !important;
    background: linear-gradient(135deg, var(--autumn-orange), var(--autumn-red)) !important;
    color: white !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
    box-shadow: 0 4px 12px rgba(217, 118, 52, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.mm-back-button::before,
.mm-button-back::before,
.mm-btn-back::before {
    content: '←' !important;
    font-size: 1.4em !important;
    font-weight: bold !important;
}

.mm-back-button:hover,
.mm-button-back:hover,
a.mm-back-link:hover,
.mm-btn-back:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(217, 118, 52, 0.6) !important;
    background: linear-gradient(135deg, var(--autumn-red), var(--autumn-orange)) !important;
    color: white !important;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
.mm-frontend h1,
.mm-frontend h2,
.mm-frontend h3,
.mm-frontend h4 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.3;
}

.mm-frontend h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: var(--spacing-lg);
    color: var(--autumn-red);
}

.mm-frontend h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: var(--spacing-md);
    color: var(--autumn-orange);
    border-left: 4px solid var(--autumn-gold);
    padding-left: var(--spacing-md);
}

.mm-frontend h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: var(--spacing-sm);
    color: var(--autumn-brown);
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */
.mm-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-sm);
}

@media (min-width: 768px) {
    .mm-container {
        padding: var(--spacing-lg);
    }
}

/* ========================================
   CARD KOMPONENTEN
   ======================================== */
.mm-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mm-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 69, 19, 0.15);
}

@media (min-width: 768px) {
    .mm-card {
        padding: var(--spacing-lg);
    }
}

/* Card Header */
.mm-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--bg-light);
}

.mm-card-icon {
    font-size: 2rem;
    color: var(--autumn-orange);
}

.mm-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--autumn-brown);
    margin: 0;
}

/* ========================================
   SPACE OVERVIEW
   ======================================== */
.mm-space-header {
    background: linear-gradient(135deg, var(--autumn-orange), var(--autumn-red));
    color: white;
    padding: var(--spacing-lg) var(--spacing-md);
    border-radius: 12px;
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 4px 16px rgba(217, 118, 52, 0.3);
}

.mm-space-title {
    font-size: clamp(2rem, 6vw, 3rem);
    margin: 0 0 var(--spacing-sm) 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.mm-space-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    font-size: 1.1rem;
    opacity: 0.95;
}

.mm-space-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mm-space-meta-item::before {
    content: '📍';
    font-size: 1.2em;
}

.mm-space-meta-item:nth-child(2)::before {
    content: '📅';
}

.mm-space-meta-item:nth-child(3)::before {
    content: '🕐';
}

/* ========================================
   GRID LAYOUTS
   ======================================== */
.mm-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .mm-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mm-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   SCHICHTEN (SHIFTS)
   ======================================== */
.mm-shift-item {
    background: var(--bg-light);
    border-left: 4px solid var(--autumn-orange);
    padding: var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-sm);
    transition: all 0.2s;
}

.mm-shift-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
}

.mm-shift-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.mm-shift-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--autumn-brown);
    margin: 0;
}

.mm-shift-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
    font-weight: 600;
}

.mm-shift-time::before {
    content: '🕐';
}

.mm-shift-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.mm-shift-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.mm-shift-badge-open {
    background: linear-gradient(135deg, var(--autumn-yellow), var(--autumn-gold));
    color: var(--text-dark);
}

.mm-shift-badge-full {
    background: var(--accent-green);
    color: white;
}

/* ========================================
   MATERIAL & EQUIPMENT
   ======================================== */
.mm-material-list,
.mm-equipment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mm-material-item,
.mm-equipment-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all 0.2s;
}

.mm-material-item:hover,
.mm-equipment-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
}

.mm-item-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.mm-item-content {
    flex: 1;
    min-width: 0;
}

.mm-item-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.3rem 0;
}

.mm-item-details {
    font-size: 0.9rem;
    color: var(--text-light);
}

.mm-item-status {
    flex-shrink: 0;
    text-align: right;
}

.mm-status-label {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.mm-status-open {
    background: linear-gradient(135deg, var(--autumn-yellow), var(--autumn-gold));
    color: var(--text-dark);
}

.mm-status-claimed {
    background: var(--accent-green);
    color: white;
}

.mm-status-partial {
    background: var(--status-warning);
    color: white;
}

/* Priority Indicators */
.mm-priority-high::before {
    content: '🔴';
    margin-right: 0.3rem;
}

.mm-priority-medium::before {
    content: '🟡';
    margin-right: 0.3rem;
}

.mm-priority-low::before {
    content: '🟢';
    margin-right: 0.3rem;
}

/* ========================================
   BUTTONS
   ======================================== */
.mm-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    justify-content: center;
}

.mm-button-primary {
    background: linear-gradient(135deg, var(--autumn-orange), var(--autumn-red));
    color: white;
    box-shadow: 0 2px 8px rgba(217, 118, 52, 0.3);
}

.mm-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(217, 118, 52, 0.4);
}

.mm-button-secondary {
    background: var(--accent-beige);
    color: var(--text-dark);
}

.mm-button-secondary:hover {
    background: var(--autumn-gold);
    color: white;
}

.mm-button-success {
    background: var(--accent-green);
    color: white;
}

.mm-button-success:hover {
    background: #689f38;
}

.mm-button-outline {
    background: transparent;
    border: 2px solid var(--autumn-orange);
    color: var(--autumn-orange);
}

.mm-button-outline:hover {
    background: var(--autumn-orange);
    color: white;
}

/* Button Sizes */
.mm-button-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.mm-button-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.mm-button-block {
    width: 100%;
    display: flex;
}

/* ========================================
   FORMS
   ======================================== */
.mm-form-group {
    margin-bottom: var(--spacing-md);
}

.mm-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.mm-input,
.mm-textarea,
.mm-select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--accent-beige);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.mm-input:focus,
.mm-textarea:focus,
.mm-select:focus {
    outline: none;
    border-color: var(--autumn-orange);
    box-shadow: 0 0 0 3px rgba(217, 118, 52, 0.1);
}

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

/* ========================================
   ALERTS & NOTIFICATIONS
   ======================================== */
.mm-alert {
    padding: var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
    border-left: 4px solid;
}

.mm-alert-success {
    background: #f1f8e9;
    border-color: var(--status-success);
    color: #33691e;
}

.mm-alert-warning {
    background: #fff3e0;
    border-color: var(--status-warning);
    color: #e65100;
}

.mm-alert-info {
    background: #e3f2fd;
    border-color: var(--status-info);
    color: #01579b;
}

/* ========================================
   GALLERY / MEDIEN
   ======================================== */
.mm-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

@media (max-width: 767px) {
    .mm-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--spacing-sm);
    }
}

.mm-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
    transition: all 0.2s;
}

.mm-gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(139, 69, 19, 0.2);
}

.mm-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* ========================================
   TIMELINE
   ======================================== */
.mm-timeline {
    position: relative;
    padding-left: var(--spacing-lg);
}

.mm-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--autumn-orange), var(--autumn-red));
}

.mm-timeline-item {
    position: relative;
    padding-bottom: var(--spacing-lg);
}

.mm-timeline-item::before {
    content: '';
    position: absolute;
    left: -calc(var(--spacing-lg) + 8px);
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--autumn-gold);
    border: 3px solid var(--bg-cream);
}

.mm-timeline-date {
    font-weight: 700;
    color: var(--autumn-orange);
    margin-bottom: 0.5rem;
}

.mm-timeline-content {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */
.mm-loading {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-light);
}

.mm-loading::before {
    content: '🍂';
    display: block;
    font-size: 3rem;
    animation: fall 2s ease-in-out infinite;
    margin-bottom: var(--spacing-sm);
}

@keyframes fall {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(10px) rotate(10deg); }
}

.mm-empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-light);
}

.mm-empty-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
.mm-hide-mobile {
    display: none !important;
}

@media (min-width: 768px) {
    .mm-hide-mobile {
        display: block !important;
    }
    
    .mm-hide-desktop {
        display: none !important;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.mm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
*:focus-visible {
    outline: 3px solid var(--autumn-orange);
    outline-offset: 2px;
}

/* ========================================
   HERBST-DEKORATION
   ======================================== */
.mm-autumn-decoration {
    position: relative;
    overflow: hidden;
}

.mm-autumn-decoration::before {
    content: '🍁 🍂 🍃';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    font-size: 2rem;
    text-align: center;
    opacity: 0.1;
    pointer-events: none;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .mm-button,
    .mm-form,
    .mm-navigation,
    .mm-back-button {
        display: none !important;
    }
    
    .mm-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}