/**
 * SmartHomeConsulting
 * Name: Arthur Peter Lorenzen
 * Adresse: Bachtelstrasse 68, 8342 Wernetshausen, Schweiz
 * Telefon: +41 44 938 07 15
 * E-Mail: info@smarthomeconsulting.ch
 * web: www.smarthomeconsulting.ch
 */

/* 1. Frontend-spezifische Stile für die Projektübersicht */

/* 1.1 Login-Bereich */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-title {
    margin-bottom: 20px;
    color: #8b0000;
    text-align: center;
    font-size: 1.8rem;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.login-form input:focus {
    border-color: #8b0000;
    box-shadow: 0 0 3px rgba(139, 0, 0, 0.3);
    outline: none;
}

.login-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px !important;
    font-size: 16px !important;
}

.login-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* 1.2 Benutzerinfo und Logout im Mobilmenü */
.user-info {
    padding: 15px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.user-info p {
    margin-bottom: 15px;
    color: #333;
    font-size: 0.95rem;
}

.user-info strong {
    color: #8b0000;
    font-size: 1.1rem;
}

.logout-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #8b0000;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #a00000;
    text-decoration: none;
    color: white;
}

/* 1.3 Projektsektion */
.project-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-section .section-title {
    text-align: center;
    margin-bottom: 30px;
    color: #8b0000;
    font-size: 1.8rem;
    position: relative;
}

.project-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 100px;
    height: 3px;
    background-color: #8b0000;
    transform: translateX(-50%);
}

.no-projects {
    text-align: center;
    padding: 50px;
    background-color: #f5f5f5;
    border-radius: 5px;
    color: #666;
    font-size: 1.2rem;
}

/* 1.4 Projekt-Grid und Karten */
.project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.project-card {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    height: 100%;
    border: 1px solid #eee;
}

.project-card:hover, .project-card.hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.project-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-label {
    background-color: #8b0000;
    color: white;
    font-size: 20px;
    font-weight: bold;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.project-info {
    flex-grow: 1;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.project-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.5;
}

.project-action {
    padding: 15px 20px;
    background-color: #f5f5f5;
    text-align: center;
    border-top: 1px solid #eee;
}

.action-btn {
    display: inline-block;
    background-color: #8b0000;
    color: white;
    padding: 10px 20px;
    font-weight: normal;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.action-btn:hover {
    background-color: #a00000;
    text-decoration: none;
    color: white;
}

/* 1.5 Projekt-Thumbnail */
.project-thumbnail {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-thumbnail-fallback {
    background-color: #f5f5f5;
    background-image: none !important;
}

/* 1.6 Container und Header-Styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background-color: #8b0000;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.logo-container {
    display: flex;
    align-items: center;
}

.header-logo {
    max-height: 40px;
    margin-right: 15px;
}

.header-title {
    font-size: 1.4rem;
    font-weight: bold;
}

/* 1.7 Hamburger-Menü und Mobile-Navigation */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 101;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-overlay.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background-color: white;
    z-index: 102;
    transition: right 0.3s;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    background-color: #8b0000;
    color: white;
}

.mobile-menu-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

/* 1.8 Footer */
.footer {
    background-color: #333;
    color: white;
    padding: 15px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    margin: 0;
}

.footer a {
    color: #fff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 1.9 Allgemeine Button-Klasse */
.btn {
    display: inline-block;
    background-color: #8b0000;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: normal;
    text-align: center;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #a00000;
    text-decoration: none;
    color: white;
}

/* 1.10 Hauptinhaltsbereich */
.main-content {
    flex: 1;
    padding: 20px 0;
    margin-top: 70px; /* Platz für den fixen Header */
}

/* 2. Responsive Anpassungen */

/* 2.1 Tablet Breakpoint */
@media (max-width: 992px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 2.2 Mobile Landscape Breakpoint */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .project-section {
        padding: 15px;
    }
    
    .project-label {
        width: 60px;
        height: 60px;
        font-size: 18px;
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .login-container {
        margin: 30px 15px;
        max-width: none;
    }
}

/* 2.3 Mobile Portrait Breakpoint */
@media (max-width: 480px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        max-width: none;
    }
    
    .project-section .section-title {
        font-size: 1.5rem;
    }
    
    .project-section .section-title::after {
        width: 80px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}
/* Hintergrundbild für die gesamte Seite */
body {
    background-image: url('../images/background/background.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Container mit leichter Transparenz für bessere Lesbarkeit */
.container {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Fallback für ältere Browser, die keine rgba unterstützen */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .container {
        background-color: #ffffff;
    }
}

/* 1.1 Hintergrundbild für die gesamte Seite */
body {
    background-image: url('images/background/background.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* 1.2 Container mit leichter Transparenz für besseren Hintergrundeffekt */
.container {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

/* 1.3 Welcome-Screen mit überlagerndem Hintergrund */
.welcome-screen {
    /* Der Welcome-Screen hat eine höhere Priorität für sein eigenes Hintergrundbild */
    background-color: rgba(0, 0, 0, 0.85) !important;
}

/* 1.4 Verbesserte Header-Transparenz */
.header {
    background-color: rgba(139, 0, 0, 0.95);
}

/* 1.5 Footer-Anpassung für bessere Lesbarkeit */
.footer {
    background-color: rgba(240, 240, 240, 0.9);
}

/* 2. Responsive Anpassungen */

/* 2.1 Tablet-Ansicht */
@media (max-width: 992px) {
    body {
        background-position: center top;
    }
}

/* 2.2 Mobile-Ansicht */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
    
    .container {
        background-color: rgba(255, 255, 255, 0.98);
    }
    
    .header {
        background-color: rgb(139, 0, 0);
    }
}

/* 2.3 Kleine Mobilgeräte */
@media (max-width: 480px) {
    body {
        background-size: auto 100%;
    }
    
    .container {
        background-color: rgba(255, 255, 255, 0.99);
    }
}
