/* Allgemeine Styles */
:root {
    --primary-color: #4caf50;
    --secondary-color: #2c7a2e;
    --accent-color: #f8b400;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* Header & Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    max-height: 40px;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* Cards */
.card {
    border-radius: var(--border-radius);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
}

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

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

/* Carousel */
.carousel-item img {
    border-radius: var(--border-radius);
    object-fit: contain;
    background-color: #f8f9fa;
    height: 400px;
    width: 100%;
}

/* Formulare */
.form-control, .input-group-text {
    border-radius: var(--border-radius);
}

/* Pflanzenkarten */
.plant-card {
    height: 100%;
    transition: transform 0.2s;
}

.plant-card:hover {
    transform: translateY(-5px);
}

.plant-card img {
    height: 200px;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 8px;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

/* Bewertungen */
.rating-stars {
    color: #ffc107;
}

.star-label {
    cursor: pointer;
    display: inline-block;
    margin: 0 3px;
}

.star-label input {
    display: none;
}

/* Kommentarbereich */
.comment-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Kartenseite */
#plantMap {
    border-radius: var(--border-radius);
}

.custom-div-icon {
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

/* Admin-Bereich */
.admin-sidebar {
    height: calc(100vh - 56px);
    position: sticky;
    top: 56px;
    padding-top: 1rem;
    overflow-y: auto;
}

/* Mobile Anpassungen */
@media (max-width: 767.98px) {
    .carousel-item img {
        height: 250px;
    }
    
    .admin-sidebar {
        height: auto;
        position: static;
    }
    
    .hide-on-mobile {
        display: none;
    }
    
    #plantMap {
        height: 50vh !important;
    }
}

/* Pflanzenkarte Marker-Cluster */
.marker-cluster-small {
    background-color: rgba(76, 175, 80, 0.6);
}
.marker-cluster-small div {
    background-color: rgba(76, 175, 80, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(248, 180, 0, 0.6);
}
.marker-cluster-medium div {
    background-color: rgba(248, 180, 0, 0.8);
}

.marker-cluster-large {
    background-color: rgba(241, 128, 23, 0.6);
}
.marker-cluster-large div {
    background-color: rgba(241, 128, 23, 0.8);
}

/* Dropdown-Menüs */
.dropdown-menu {
    min-width: 12rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-item:active, 
.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.dropdown-toggle::after {
    margin-left: 0.5em;
    vertical-align: 0.15em;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

/* Animation f�r Upload-Bereiche */
.upload-drop-zone {
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.upload-drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(76, 175, 80, 0.1);
}

/* ============================================
   MOBILE DROPDOWN FIX - Hinzugefügt 2025-05-24
   ============================================ */

@media (max-width: 991px) {
    /* Bootstrap lg breakpoint - wenn Navbar kollabiert */
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        box-shadow: none;
    }
    
    .navbar-nav .dropdown-menu .dropdown-item {
        padding-left: 2rem;
        color: rgba(0,0,0,.55);
    }
    
    .navbar-nav .dropdown-menu .dropdown-item:hover {
        background-color: transparent;
        color: rgba(0,0,0,.7);
    }
    
    /* Entferne Dropdown-Pfeil auf Mobile */
    .navbar-nav .dropdown-toggle::after {
        display: none;
    }
    
    /* Mache Dropdown-Items auf Mobile immer sichtbar */
    .navbar-collapse .dropdown-menu {
        display: block !important;
    }
}

/* Touch-friendly Größen für alle Touch-Geräte */
@media (pointer: coarse) {
    .dropdown-toggle,
    .dropdown-item,
    .nav-link {
        min-height: 44px;
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
        display: flex;
        align-items: center;
    }
    
    /* Verhindere Doppel-Tap-Zoom auf iOS */
    .dropdown-toggle {
        touch-action: manipulation;
    }
}/* PWA Installation Banner Styles */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1050;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Update Notification */
.update-notification {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 1040;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ============================================
   BILDORIENTIERUNGS-FIX - Hinzugefügt 2025-06-23
   ============================================ */

/* EXIF-Orientierung für moderne Browser */
img {
    image-orientation: from-image;
}

/* Allgemeine Bildkorrekturen */
.card-img-top {
    width: 100%;
    height: 250px;
    object-fit: contain !important;
    object-position: center;
    background-color: #f8f9fa;
}

/* Galerie-spezifische Anpassungen */
.plant-grid .card-img-top,
.gallery-item img {
    height: 200px;
    padding: 8px;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
}

/* Einzelansicht */
.plant-detail-image,
.plant-image-main {
    max-height: 500px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* Thumbnails */
.thumbnail-image,
img.thumbnail,
.plant-submission-thumb {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 4px;
}

/* Upload-Vorschau */
#preview_image,
.upload-preview {
    max-height: 300px;
    max-width: 100%;
    object-fit: contain;
}

/* Mobile Optimierung für Bilder */
@media (max-width: 768px) {
    .card-img-top {
        height: 300px;
    }
    
    .plant-detail-image {
        max-height: 400px;
        width: 100%;
    }
    
    .carousel-item img {
        height: 300px;
    }
}

/* Bildrotations-Seite */
.rotate-image-container img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Fallback für ältere Browser */
@supports not (object-fit: contain) {
    .card-img-top,
    .plant-card img {
        height: auto;
        max-height: 250px;
    }
}