/* ================================================================
   KRITISCHE MOBILE BACKGROUND FIXES - KEIN GRAU!
   ================================================================ */
html {
    background: rgb(250, 243, 231) !important;
    background-color: rgb(250, 243, 231) !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

body {
    background: rgb(250, 243, 231) !important;
    background-color: rgb(250, 243, 231) !important;
    width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Container absolut absichern - NIEMALS GRAU */
.container {
    background: rgb(250, 243, 231) !important;
    background-color: rgb(250, 243, 231) !important;
    width: 100% !important;
    min-height: 100vh !important;
}

/* ================================================================
   ANTI-GRAU NOTFALL-REGELN - SIDEBAR NIEMALS GRAU!
   ================================================================ */
   
/* Alle möglichen Sidebar Zustände abfangen */
.sidebar,
.sidebar.open,
.sidebar.active,
.sidebar:hover,
.sidebar:focus,
.sidebar:active,
.sidebar[style],
.sidebar[class] {
    background: rgb(250, 243, 231) !important;
    background-color: rgb(250, 243, 231) !important;
    backdrop-filter: none !important;
}

/* Mobile Sidebar absolut absichern - KEIN OVERLAY */
@media (max-width: 768px) {
    html, body {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
        overflow-x: hidden !important;
    }
    
    .container {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
    }
    
    .main-content {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
        width: 100% !important;
    }
    
    /* SIDEBAR - Garantiert beige, niemals grau */
    .sidebar {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
        backdrop-filter: none !important;
        box-shadow: 2px 0 8px rgba(191, 151, 97, 0.15) !important;
    }
    
    /* KEIN Overlay, KEIN ::before, KEIN ::after */
    .sidebar::before,
    .sidebar::after,
    .sidebar-overlay,
    .mobile-overlay {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
}
    .sidebar {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
        backdrop-filter: none !important;
    }
    
    .sidebar.open {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
        backdrop-filter: none !important;
    }
    
    /* Für kleine Bildschirme */
    .sidebar[style*="left: 0"],
    .sidebar[style*="transform: translateX(0)"] {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
        backdrop-filter: none !important;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .mobile-menu-btn,
    .cookie-banner,
    .name-tags {
        display: none !important;
    }
    
    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .team-photo img {
        max-height: 400px;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}

body {
    background: rgb(250, 243, 231) !important;
    background-color: rgb(250, 243, 231) !important;
    width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Container absolut absichern */
.container {
    background: rgb(250, 243, 231) !important;
    background-color: rgb(250, 243, 231) !important;
    width: 100% !important;
    min-height: 100vh !important;
}

/* ALLE SIDEBAR VARIANTEN - NIEMALS GRAU! */
.sidebar {
    background: rgb(250, 243, 231) !important;
    background-color: rgb(250, 243, 231) !important;
    backdrop-filter: none !important;
}

.sidebar.open,
.sidebar.active,
.sidebar:hover,
.sidebar:focus {
    background: rgb(250, 243, 231) !important;
    background-color: rgb(250, 243, 231) !important;
    backdrop-filter: none !important;
}

/* Mobile Sidebar absolut absichern */
@media (max-width: 768px) {
    html, body {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
        overflow-x: hidden !important;
    }
    
    .container {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
    }
    
    .sidebar,
    .sidebar.open,
    .sidebar.active,
    .sidebar:hover,
    .sidebar:focus {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
        backdrop-filter: none !important;
    }
    
    .main-content {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
        width: 100% !important;
    }
}

/* Mobile Sidebar Farbe absichern */
@media (max-width: 768px) {
    .sidebar {
        background: rgb(250, 243, 231) !important;
    }
}

/* Mobile Cookie Banner Optimierung */
@media (max-width: 768px) {
    .cookie-banner {
        background: rgba(250, 243, 231, 0.98) !important;
        z-index: 9999 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .cookie-btn {
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        z-index: 10000 !important;
        pointer-events: all !important;
        position: relative !important;
    }
}

/* Extra kleine Bildschirme - NOTFALL-REGEL */
@media (max-width: 480px) {
    .cookie-banner {
        padding: 30px 20px !important;
        max-height: 350px !important;
        background: rgb(250, 243, 231) !important;
        border-top: 4px solid rgb(191, 151, 97) !important;
    }
    
    .cookie-btn {
        min-width: 160px !important;
        max-width: 250px !important;
        padding: 25px 35px !important;
        font-size: 20px !important;
        min-height: 70px !important;
        font-weight: 800 !important;
        border: 4px solid !important;
        margin: 5px !important;
    }
    
    .cookie-buttons {
        gap: 30px !important;
        margin-top: 20px !important;
    }
    
    .cookie-text h3 {
        font-size: 22px !important;
        margin-bottom: 15px !important;
    }
    
    .cookie-text p {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 10px !important;
    }
}

/* ================================================================
   UMFASSENDE RESPONSIVE OPTIMIERUNG - ALLE GERÄTE
   ================================================================ */

/* ================================================================
   PERFEKTES MOBILE MENU - ALLE BILDSCHIRMGRÖSSEN + RICHTIGE FARBE
   ================================================================ */
   
/* Mobile Sidebar - Funktioniert für ALLE Handys */
@media (max-width: 768px) {
    /* HTML und Body Background sicherstellen */
    html, body {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
    }
    
    /* Container Background */
    .container {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
    }
    
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
        backdrop-filter: none !important;
        z-index: 9999 !important;
        transition: all 0.3s ease !important;
        transform: translateX(-100%) !important;
        overflow-y: auto !important;
        padding: 20px !important;
        box-sizing: border-box !important;
        border-right: 2px solid rgba(191, 151, 97, 0.3) !important;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2) !important;
    }
    
    .sidebar.open {
        left: 0 !important;
        transform: translateX(0) !important;
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
    }
    
    /* Alle Sidebar-States mit Background */
    .sidebar,
    .sidebar.open,
    .sidebar.active,
    .sidebar:hover {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
    }
    
    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
        padding-top: 60px !important;
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
    }
    
    /* Logo für alle kleinen Bildschirme */
    .logo-section {
        text-align: center !important;
        margin: 15px 0 25px 0 !important;
        padding: 10px !important;
    }
    
    .sidebar-logo {
        max-width: 160px !important;
        width: 80% !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto !important;
        object-fit: contain !important;
    }
    
    /* Navigation für alle */
    .nav-menu {
        list-style: none !important;
        padding: 0 !important;
        margin: 25px 0 !important;
    }
    
    .nav-item {
        margin: 3px 0 !important;
        width: 100% !important;
    }
    
    .nav-item a {
        display: flex !important;
        align-items: center !important;
        padding: 12px 15px !important;
        font-size: 16px !important;
        text-decoration: none !important;
        color: rgb(191, 151, 97) !important;
        background: rgba(191, 151, 97, 0.1) !important;
        border-radius: 6px !important;
        text-align: left !important;
        font-weight: 500 !important;
        transition: all 0.2s ease !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
    }
    
    .nav-item a:hover,
    .nav-item.active a {
        background: rgba(191, 151, 97, 0.2) !important;
        color: rgb(160, 120, 75) !important;
        transform: translateX(3px) !important;
    }
    
    .nav-item .arrow {
        margin-left: auto !important;
        font-size: 12px !important;
    }
    
    .phone {
        font-size: 12px !important;
        margin: 10px 0 !important;
        text-align: center !important;
    }
    
    .footer-info {
        font-size: 10px !important;
        text-align: center !important;
        margin-top: 25px !important;
        padding: 10px !important;
        line-height: 1.4 !important;
        color: rgb(120, 120, 120) !important;
    }
    
    .footer-info a {
        color: rgb(191, 151, 97) !important;
        text-decoration: none !important;
    }
}

/* Extra kleine Handys (unter 400px) - ULTRA WICHTIG */
@media (max-width: 400px) {
    /* SIDEBAR ABSOLUT SICHER */
    .sidebar {
        width: 100vw !important;
        max-width: 100vw !important;
        left: -100vw !important;
        transform: translateX(-100vw) !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }
    
    .sidebar.open {
        left: 0 !important;
        transform: translateX(0) !important;
    }
    
    /* LOGO ULTRA KOMPAKT */
    .logo-section {
        margin: 10px 0 20px 0 !important;
        padding: 5px !important;
    }
    
    .sidebar-logo {
        max-width: 120px !important;
        width: 60% !important;
    }
    
    /* NAVIGATION EXTRA KOMPAKT */
    .nav-menu {
        margin: 20px 0 !important;
    }
    
    .nav-item {
        margin: 2px 0 !important;
    }
    
    .nav-item a {
        padding: 8px 10px !important;
        font-size: 14px !important;
        min-height: 40px !important;
        border-radius: 5px !important;
    }
    
    /* PHONE KLEINER */
    .phone {
        font-size: 11px !important;
        margin: 8px 0 !important;
    }
    
    /* FOOTER KOMPAKTER */
    .footer-info {
        font-size: 9px !important;
        margin-top: 20px !important;
        padding: 8px !important;
        line-height: 1.3 !important;
    }
    
    /* MAIN CONTENT ANPASSUNG */
    .main-content {
        padding-top: 55px !important;
    }
}

/* Ultra kleine Handys (unter 350px) - iPhone SE 1. Generation */
@media (max-width: 350px) {
    /* BUTTON ANPASSUNG */
    #main-mobile-btn {
        top: 10px !important;
        left: 10px !important;
        padding: 8px 12px !important;
        font-size: 14px !important;
    }
    
    /* SIDEBAR NOCH KOMPAKTER */
    .sidebar {
        padding: 12px !important;
    }
    
    /* LOGO MINIMAL */
    .logo-section {
        margin: 5px 0 15px 0 !important;
        padding: 3px !important;
    }
    
    .sidebar-logo {
        max-width: 100px !important;
        width: 50% !important;
    }
    
    /* NAVIGATION ULTRA KOMPAKT */
    .nav-menu {
        margin: 15px 0 !important;
    }
    
    .nav-item a {
        padding: 6px 8px !important;
        font-size: 13px !important;
        min-height: 36px !important;
    }
    
    /* PHONE MINIMAL */
    .phone {
        font-size: 10px !important;
        margin: 6px 0 !important;
    }
    
    /* FOOTER MINIMAL */
    .footer-info {
        font-size: 8px !important;
        margin-top: 15px !important;
        padding: 6px !important;
    }
    
    /* MAIN CONTENT */
    .main-content {
        padding-top: 50px !important;
    }
}

/* Desktop - Normales Layout ab 769px */
@media (min-width: 769px) {
    #main-mobile-btn {
        display: none !important;
    }
    
    .sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 240px !important;
        height: 100vh !important;
        background: rgb(250, 243, 231) !important;
        z-index: 100 !important;
        transform: none !important;
        transition: none !important;
        overflow-y: auto !important;
        padding: 30px 20px !important;
        border-right: 1px solid rgba(191, 151, 97, 0.15) !important;
        box-shadow: none !important;
    }
    
    .main-content {
        width: calc(100% - 240px) !important;
        margin-left: 240px !important;
        padding-top: 0 !important;
    }
}

/* ================================================================
   EXTRA MOBILE FIXES FÜR LOGO UND LAYOUT
   ================================================================ */
@media (max-width: 768px) {
    /* Logo absolut sicherstellen */
    .logo-section {
        width: 100% !important;
        overflow: visible !important;
        text-align: center !important;
        padding: 15px 10px !important;
        margin: 10px 0 20px 0 !important;
        background: rgb(250, 243, 231) !important;
        box-sizing: border-box !important;
    }
    
    .sidebar-logo {
        max-width: 200px !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
        object-position: center !important;
        display: block !important;
        margin: 0 auto !important;
        /* NOTFALL: Falls das Logo immer noch abgeschnitten ist */
        transform: scale(0.8) !important;
        transform-origin: center !important;
    }
    
    /* Sidebar noch breiter machen für Logo */
    .sidebar {
        width: 95vw !important;
        max-width: 380px !important;
    }
    
    /* Seitliche Grau-Bereiche verhindern */
    html, body, .container {
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        background: rgb(250, 243, 231) !important;
    }
    
    .main-content {
        width: 100vw !important;
        max-width: 100vw !important;
        background: rgb(250, 243, 231) !important;
    }
    
    /* Sidebar Background absolut sicherstellen */
    .sidebar,
    .sidebar.open,
    .sidebar.active {
        background: rgb(250, 243, 231) !important;
        background-color: rgb(250, 243, 231) !important;
    }
}

/* Für sehr kleine Bildschirme (iPhone SE, etc.) */
@media (max-width: 375px) {
    .sidebar {
        width: 98vw !important;
        max-width: 360px !important;
    }
    
    .sidebar-logo {
        max-width: 180px !important;
        width: 95% !important;
        /* EXTRA SKALIERUNG für kleine Bildschirme */
        transform: scale(0.7) !important;
    }
    
    /* NOTFALL: Text-Logo als Fallback */
    .logo-section::after {
        content: 'FOTOART.AT';
        display: block;
        font-family: 'Playfair Display', serif;
        font-size: 24px;
        font-weight: 700;
        color: rgb(191, 151, 97);
        text-align: center;
        margin-top: 10px;
        letter-spacing: 2px;
    }
    
    .mobile-menu-btn {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }
}

/* ================================================================
   ULTRA WIDE SCREENS (1920px+) - 4K Monitors
   ================================================================ */
@media (min-width: 1920px) {
    .sidebar {
        width: 280px;
        padding: 40px 30px;
    }
    
    .main-content {
        width: calc(100% - 280px);
        margin-left: 280px;
    }
    
    .sidebar-logo {
        max-width: 200px;
    }
    
    .phone {
        font-size: 16px;
    }
    
    .nav-item a {
        font-size: 20px;
        padding: 20px 25px;
    }
    
    .footer-info {
        font-size: 14px;
    }
    
    .hero-section {
        padding: 60px 50px;
        min-height: 80vh;
    }
    
    .team-photo img {
        height: 600px;
    }
    
    .name-tag {
        font-size: 16px;
        padding: 10px 18px;
    }
    
    .team-button {
        min-width: 400px;
        padding: 25px 50px;
        font-size: 22px;
    }
    
    .team-members-section {
        padding: 80px 50px;
    }
    
    .team-members-section h2 {
        font-size: 42px;
    }
    
    .team-members-section p {
        font-size: 22px;
    }
    
    .team-grid {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
    }
    
    .team-member-card {
        padding: 35px 30px;
    }
    
    .team-member-card .member-photo {
        width: 150px;
        height: 150px;
    }
    
    .team-member-card h3 {
        font-size: 26px;
    }
    
    .home-contact-cta {
        padding: 90px 50px;
    }
    
    .home-contact-cta h2 {
        font-size: 40px;
    }
    
    .home-contact-cta p {
        font-size: 24px;
    }
    
    .cta-button {
        max-width: 300px;
        padding: 25px 40px;
        font-size: 20px;
    }
}

/* ================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ================================================================ */
@media (hover: none) and (pointer: coarse) {
    /* Touch-friendly button sizes */
    .nav-item a {
        min-height: 44px;
        display: flex;
        align-items: center;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .team-button {
        min-height: 50px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .cta-button {
        min-height: 50px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .cookie-btn {
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .mobile-menu-btn {
        min-height: 44px;
        min-width: 44px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Alle Links und Buttons touch-optimiert */
    a, button, .clickable {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Remove hover effects on touch devices */
    .name-tag:hover,
    .team-member-card:hover,
    .team-button:hover,
    .cta-button:hover {
        transform: none;
    }
}

/* ================================================================
   ACCESSIBILITY IMPROVEMENTS
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sidebar {
        background: #000;
    }
    
    .name-tag {
        background: #000;
        border: 2px solid #fff;
    }
    
    .team-button {
        border-width: 3px;
    }
    
    .cta-button {
        border: 2px solid rgb(191, 151, 97);
    }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
    .sidebar,
    .mobile-menu-btn,
    .cookie-banner,
    .name-tags {
        display: none !important;
    }
    
    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .team-photo img {
        max-height: 400px;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}
