/* styles.css */

/* Allgemeine Stile */
body {
    background-color: #f8f9fa; /* Standard-Hintergrund, wird von Themen überschrieben */
}

/* Container-Breite anpassen */
.container {
    max-width: 2000px; /* Erhöht, um item1 (300px) + item2 (1400px) + item3 (300px) + gap (20px) zu ermöglichen */
}

/* Responsive Breakpoints für den Container */
@media (max-width: 2000px) {
    .container {
        max-width: 1600px;
    }
}

@media (max-width: 1600px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
}

.flex-container {
    display: flex;
    justify-content: center;
    align-items: stretch; /* Elemente werden gestreckt, um die gleiche Höhe zu haben */
    background-color: #f8f9fa;
    padding: 15px;
    gap: 10px;
}

.flex-container > div {
    background: white;
    border: none;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.item1 {
    flex-grow: 1;
    flex-shrink: 1;
    max-width: 300px;
}

.item2 {
    flex-grow: 4;
    flex-shrink: 1;
    max-width: 1400px; /* Erhöht von 1200px auf 1400px für 200px mehr Breite */
    display: flex; /* Flexbox für Zentrierung */
    flex-direction: column; /* Vertikale Anordnung von Text und screenshot-card */
    justify-content: center; /* Vertikal zentrieren */
    align-items: center; /* Horizontal zentrieren */
}

.item3 {
    flex-grow: 1;
    flex-shrink: 1;
    max-width: 300px;
}

/* Hover-Effekte für Feature-Karten */
.feature-card-top,
.feature-card-center,
.feature-card-bottom {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card-top:hover,
.feature-card-center:hover,
.feature-card-bottom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

/* Stile für Feature-Karten (ersetzen download.css Klassen) */
.feature-card-icon {
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 15px;
}

.feature-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.feature-card-text {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
}

.feature-card-btn {
    background: linear-gradient(to right, #28a745, #218838);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.feature-card-btn:hover {
    background: linear-gradient(to right, #218838, #1e7e34);
    color: white;
    text-decoration: none;
}

.page-content {
    background: white;
    padding: 30px;
    margin: 40px auto;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-content h1 {
    font-size: 2em;
    color: #0056b3;
    margin-bottom: 20px;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 10px;
}

.page-content h2 {
    font-size: 1.5em;
    color: #007bff;
    margin-top: 30px;
    border-bottom: 1px solid #007bff;
    padding-bottom: 5px;
}

.page-content h3 {
    font-size: 1.2em;
    color: #333;
    margin-top: 20px;
}

.page-content p,
.page-content ul {
    font-size: 1em;
    color: #333;
    margin-bottom: 20px;
}

.page-content ul {
    list-style: disc inside;
    padding-left: 20px;
}

.page-content a:hover {
    text-decoration: underline;
}

/* Navigation */
.navbar-brand .logo-img {
    width: 32px !important; /* Feste Breite statt 5vw */
    min-width: 24px;
    max-width: 32px !important;
    height: auto !important;
    max-height: 2rem !important;
    object-fit: contain !important;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.logo-img {
    height: 1em !important;
    width: auto !important;
}

.navbar-toggler-icon {
    background-image: url('../img/hamburger-icon.svg') !important;
    background-size: contain;
    width: 30px;
    height: 30px;
}

/* Sicherstellen, dass das Padding der Navbar konsistent ist */
.navbar .container {
    padding-left: 15px;
    padding-right: 15px;
}

/* Hero-Bereich */
.hero {
    padding: 0.5rem 0;
    background: #f8f9fa;
}

.hero-img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 600px !important;
    object-fit: contain !important;
    border-radius: 8px;
    display: block;
}

/* Karten */
.feature-card-top {
    min-height: 225px;
    margin-bottom: 2rem;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-card-center {
    min-height: 225px;
    margin-bottom: 2rem;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-card-bottom {
    min-height: 225px;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2rem;
    color: #007bff;
}

.screenshot-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

#feature-screenshot {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    z-index: 10; /* Stelle sicher, dass das Bild über anderen Elementen liegt */
}

#feature-screenshot:hover,
#feature-screenshot:focus {
    transform: scale(1.3); /* Vergrößere um 30% */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Subtiler Schatten */
}

#feature-screenshot.changing {
    opacity: 0;
}

.feature-card-top:active,
#why-fahrmituns:active {
    transform: scale(0.98); /* Leichter Zoom-Out-Effekt */
    transition: transform 0.1s;
}

#why-fahrmituns,
.feature-card-top[data-screenshot],
.feature-card-center[data-screenshot],
.feature-card-bottom[data-screenshot] {
    cursor: pointer;
    transition: color 0.2s;
}

#why-fahrmituns:hover,
.feature-card-top[data-screenshot]:hover {
    color: #007bff; /* Bootstrap Primary */
}

/* Tabellen */
.table td,
.table th {
    font-size: 16px;
    line-height: 2;
}

.shift-cell {
    cursor: pointer;
}

.shift-cell:hover {
    background-color: #e0e0e0 !important;
}

.holiday-name {
    text-align: center;
}

.inactive {
    background-color: #f0f0f0 !important;
}

.own-shift {
    font-weight: bold;
    color: #0015ff;
}

.table-container.double-column {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.table-container.double-column .table-half {
    flex: 1;
    min-width: 0;
}

.table-container.double-column .table-half table {
    width: 100%;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(0deg, #4CAF50, #8BC34A);
    border: 1px solid #8BC34A;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(0deg, #4CAF50, #7CB342);
    border-color: #8BC34A;
}

.btn-primary:active,
.btn-primary:focus {
    background: #4CAF50;
    border-color: #8BC34A;
    box-shadow: none;
}

.btn-secondary {
    background: linear-gradient(0deg, #6c757d, #adb5bd);
    border: 1px solid #adb5bd;
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(0deg, #6c757d, #9ea7af);
    border-color: #adb5bd;
}

.btn-secondary:active,
.btn-secondary:focus {
    background: #6c757d;
    border-color: #adb5bd;
    box-shadow: none;
}

.btn-sm {
    font-size: 14px;
    padding: 8px 12px;
}

.margin-bottom {
    margin-bottom: 20px;
}

/* Checkbox */
.form-check-input:checked {
    background-image: url('../img/checkmark.svg') !important;
}

/* Footer */
footer {
    background: #343a40;
    color: white;
    padding: 1rem 0;
}

/* Sonstige */
.alert {
    top: 20px;
    margin-bottom: 4rem;
    z-index: 1000;
    min-width: 300px;
}

.driver-select {
    position: absolute;
    z-index: 10;
    background: white;
    border: 1px solid #ccc;
}

/* Themen */

/* Standard-Thema */
body.theme-default {
    background-color: #f8f9fa;
}

body.theme-default .table tr.weekend td {
    background-color: #e6f0fa !important;
    border: 2px solid #007bff !important;
}

body.theme-default .table tr.holiday td {
    background-color: #ffe6e6 !important;
    border: 2px solid #dc3545 !important;
}

/* Hoher Kontrast */
body.theme-high-contrast {
    background-color: #fff;
}

body.theme-high-contrast .table tr.weekend td {
    background-color: #b3d7ff !important;
    border: 2px solid #0056b3 !important;
}

body.theme-high-contrast .table tr.holiday td {
    background-color: #ffcccc !important;
    border: 2px solid #cc0000 !important;
}

body.theme-high-contrast .table td,
body.theme-high-contrast .table th {
    color: #000;
    font-weight: bold;
}

body.theme-high-contrast .btn-primary {
    background: #000;
    border: 1px solid #000;
    color: #fff;
}

body.theme-high-contrast .btn-primary:hover {
    background: #333;
    border-color: #333;
}

body.theme-high-contrast .btn-primary:active,
body.theme-high-contrast .btn-primary:focus {
    background: #000;
    border-color: #000;
    box-shadow: none;
}

body.theme-high-contrast .btn-secondary {
    background: #555;
    border: 1px solid #555;
    color: #fff;
}

body.theme-high-contrast .btn-secondary:hover {
    background: #666;
    border-color: #666;
}

body.theme-high-contrast .btn-secondary:active,
body.theme-high-contrast .btn-secondary:focus {
    background: #555;
    border-color: #555;
    box-shadow: none;
}

/* Dunkler Modus */
body.theme-dark {
    background-color: #212529;
    color: #e0e0e0;
}

body.theme-dark .table {
    background-color: #2c3034;
    color: #e0e0e0;
}

body.theme-dark .table tr.weekend td {
    background-color: #1a5c7d !important;
    border: 2px solid #1a5c7d !important;
}

body.theme-dark .table tr.holiday td {
    background-color: #7d1a1a !important;
    border: 2px solid #7d1a1a !important;
}

body.theme-dark .table td,
body.theme-dark .table th {
    color: #e0e0e0;
    border-color: #444;
}

body.theme-dark .btn-primary {
    background: linear-gradient(0deg, #2c6e31, #5a9d5f);
    border: 1px solid #5a9d5f;
    color: #fff;
}

body.theme-dark .btn-primary:hover {
    background: linear-gradient(0deg, #2c6e31, #4a8d4f);
    border-color: #5a9d5f;
}

body.theme-dark .btn-primary:active,
body.theme-dark .btn-primary:focus {
    background: #2c6e31;
    border-color: #5a9d5f;
    box-shadow: none;
}

body.theme-dark .btn-secondary {
    background: linear-gradient(0deg, #4a4e51, #7a7e81);
    border: 1px solid #7a7e81;
    color: #fff;
}

body.theme-dark .btn-secondary:hover {
    background: linear-gradient(0deg, #4a4e51, #6a6e71);
    border-color: #7a7e81;
}

body.theme-dark .btn-secondary:active,
body.theme-dark .btn-secondary:focus {
    background: #4a4e51;
    border-color: #7a7e81;
    box-shadow: none;
}

body.theme-dark .shift-cell:hover {
    background-color: #3a3e42 !important;
}

body.theme-dark .inactive {
    background-color: #3a3e42 !important;
}

body.theme-dark .own-shift {
    color: #66b0ff;
}

body.theme-dark .driver-select {
    background: #2c3034;
    color: #e0e0e0;
    border-color: #444;
}

body.theme-dark .page-content {
    background: #2c3034;
    box-shadow: 0 2px 8px rgba(255,255,255,0.1);
}

body.theme-dark .page-content h1 {
    color: #66b0ff;
    border-bottom-color: #66b0ff;
}

body.theme-dark .page-content h2 {
    color: #80c1ff;
    border-bottom-color: #80c1ff;
}

body.theme-dark .page-content h3 {
    color: #e0e0e0;
}

body.theme-dark .page-content p,
body.theme-dark .page-content ul {
    color: #e0e0e0;
}

/* Responsive Design */

/* Für Bildschirme ab 800px (Desktop) */
@media (min-width: 800px) {
    .table-container.double-column {
        display: flex;
        justify-content: space-between;
        gap: 20px;
    }

    .table-container.double-column .table-half {
        flex: 1;
        min-width: 0;
    }

    .table-container.double-column .table-half table {
        width: 100%;
    }
}

/* Für Bildschirme bis 991px (Tablet und Mobilgeräte) */
@media (max-width: 991px) {
    .flex-container {
        flex-direction: column;
        align-items: stretch; /* Stretching bleibt auch auf kleineren Bildschirmen */
    }

    .item1, .item2, .item3 {
        max-width: 100%;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .hero-img {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 300px !important;
    }

    .navbar-brand .logo-img {
        width: 24px !important; /* Kleinere Breite für kleinere Bildschirme */
        min-width: 20px;
        max-width: 24px !important;
        max-height: 1.5rem !important;
    }

    .item2 {
        height: auto; /* Auf kleineren Bildschirmen Höhe auto, da gestapelt */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    #feature-screenshot:hover,
    #feature-screenshot:focus {
        transform: scale(1.2); /* Kleinere Skalierung für Mobilgeräte */
    }
}

/* Klassen für about.php */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.rounded {
    border-radius: 0.375rem !important;
}

/* Fix für das Logo in about.php */
.col-md-4 img.img-fluid {
    width: 100%;
    height: auto;
    object-fit: contain;
}