/* ==========================================================================
   ci2026.css (Vollständig korrigiert für Desktop & Mobil)
   ========================================================================== */

/* BASIS */
body {
    font-family: "Segoe UI", Roboto, sans-serif;
    margin: 0;
    background: #f5f5f5;
    font-size: 16px;
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
}

/* WRAPPER */
.wrapper {
    max-width: 1000px;
    margin: auto;
    padding: 20px;
}

/* HEADER */
.header {
    background-color: #00008A; /* Dunkelblau */
    color: white;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1000px;
    margin: auto;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo-container {
    background-color: white;   /* Die weiße Bühne */
    padding: 5px 15px;         /* Abstand um das Logo herum */
    border-radius: 4px;        /* Leicht abgerundete Ecken */
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container img {
    height: 40px;              /* Einheitliche Höhe für das Logo */
    display: block;
    width: auto;
}

/* NAVIGATION & LINKS */
.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    text-decoration: none;
    color: white !important; /* Wichtig für Kontrast auf Blau */
    font-weight: 600;
    font-size: 11pt;
}

.nav a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.header-links {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: #e0e0e0;
}

.header-links a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.2s;
}

.header-links a:hover {
    color: #2196F3 !important;
    text-decoration: underline;
}

/* HAMBURGER (Mobile) */
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

/* PRODUKTE */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border-left: 5px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 33px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.card-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* INDIVIDUELLE PRODUKTFARBEN */
#Diamond_tab { border-left-color: #2196F3; }
#Match_tab { border-left-color: #4CAF50; }
#Endeavour_tab { border-left-color: #f44336; }

/* CONTENT */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.news-item-diamond {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #2196F3;
}

.news-item-endeavour {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #f44336;
}

.news-item-match {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #4CAF50;
}

.news-item {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 4px solid darkblue;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 30px;
    background: #222;
    color: white;
    margin-top: 40px;
}

.footer a {
    color: #ccc;
}

/* SLIDER */
.gallery-container {
    position: relative;
    max-width: 1000px;
    margin: 40px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #fff;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.slide img {
    max-height: 200px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.slide-caption {
    font-size: 1.2rem;
    color: #333;
    font-weight: 500;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 138, 0.7);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 18px;
    z-index: 10;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: rgba(0, 0, 138, 1);
}

.prev { left: 10px; }
.next { right: 10px; }

.slider-dots {
    text-align: center;
    padding: 10px;
    background: #fff;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #00008A;
}

/* --- PRODUCT PAGE LAYOUT (DESKTOP DEFAULT) --- */
.product-hero {
    text-align: center;
    padding: 10px 10px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.product-main-logo {
    max-height: 120px;
    margin-bottom: 15px;
}

.product-hero h1 {
    font-size: 1.5rem;
    color: #00008A;
    margin: 0;
    font-weight: 500;
}

/* Dreispaltiges Standard-Layout für Desktop PCs */
.product-layout-grid {
    display: grid;
    grid-template-columns: 220px 2fr 1fr;
    gap: 25px;
    align-items: start;
}

/* Zweispaltiges Layout für alternative Inhaltsseiten (z.B. Download-Seiten) auf Desktop PCs */
.product-layout-grid.alternative-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 25px;
    align-items: start;
}

/* Sidebar Styling */
.product-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-block {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.sidebar-block h3 {
    margin-top: 0;
    font-size: 1rem;
    border-bottom: 2px solid #00008A;
    padding-bottom: 5px;
    color: #333;
}

.sidebar-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-block ul li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.sidebar-block ul li a {
    color: #00008A;
    text-decoration: none;
}

.sidebar-block ul li a:hover {
    text-decoration: underline;
}

.sidebar-block.highlight {
    background: #ecf3f9;
    border: 1px solid #d0e0f0;
}

.action-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px !important;
}

.btn-order, .btn-download {
    display: block;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem !important;
    text-decoration: none !important;
}

.btn-order { background: #f44336; color: #fff !important; }
.btn-download { background: #4CAF50; color: #fff !important; }
.btn-order:hover, .btn-download:hover { opacity: 0.9; }

.small-text { font-size: 0.8rem; color: #666; margin: 8px 0 0 0; }

.legacy-support details {
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.legacy-support summary {
    cursor: pointer;
    font-weight: 600;
    color: #555;
}

/* Main Content Area */
.main-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.lead-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #222;
}

.screenshot-container {
    text-align: center;
    margin: 25px 0;
    background: #fafafa;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
}

.screenshot-container img {
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 100%;
}

.screenshot-container .caption {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 8px;
}

.feature-highlight {
    background: #fffdeb;
    border-left: 4px solid #ff9800;
    padding: 15px;
    margin-top: 20px;
    border-radius: 0 6px 6px 0;
}

.feature-highlight h4 { margin-top: 0; color: #e65100; }

/* News Spalte */
.product-news h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #333;
}

.news-card {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.news-card.diamond-accent { border-left: 4px solid SkyBlue; }
.news-card.match-accent { border-left: 4px solid #4CAF50; }
.news-card.endeavour-accent { border-left: 4px solid Crimson; }

.news-date {
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
}

.news-card h4 { margin: 5px 0; color: #111; }
.news-card p { margin: 0; }
.archive-link { font-size: 0.9rem; color: #00008A; font-weight: bold; }

/* Download Boxen & Tabellen */
.download-package-box {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.download-package-box h3 {
    margin-top: 0;
    color: #00008A;
}

pre {
    background: #222;
    color: #fff;
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: Consolas, Monaco, monospace;
}

.download-section-group {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.download-section-group h3 {
    color: #333;
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.inline-btn {
    display: inline-block !important;
    width: auto !important;
    padding: 10px 20px !important;
    margin-top: 10px;
}

.secondary-btn { background-color: #78909C !important; }
.dark-btn { background-color: #00008A !important; }

.highlight-box {
    border-left: 4px solid #00008A !important;
    background-color: #f7f9fc;
}

.download-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0 25px 0;
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.download-table th {
    background-color: #00008A;
    color: white;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
}
.download-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
}
.download-table tr:nth-child(even) td { background-color: #f9f9f9; }
.download-table td.highlight-cell { background-color: #ffffcc; }
.download-table a { color: #00008A; font-weight: 500; text-decoration: none; }
.download-table a:hover { text-decoration: underline; }

.instruction-block {
    background-color: #f5f5f5;
    padding: 15px;
    border-left: 4px solid #00008A;
    border-radius: 0 6px 6px 0;
    margin: 15px 0;
}
pre code {
    display: block;
    background: #222;
    color: #fff;
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: Consolas, Monaco, monospace;
    margin: 10px 0;
}

/* ==========================================================================
   Fix für die Desktop-Ansicht (Verhindert das Aufblähen der rechten Spalte)
   ========================================================================== */

/* 1. Erlaubt den Grid-Inhalten auf dem Desktop, sich strikt an die Spaltenbreite (1fr) zu halten */
.product-layout-grid > * {
    min-width: 0;
}

/* 2. Sorgt dafür, dass die Tabelle die Spaltenbreite respektiert und lange Links umbrechen */
.download-table {
    table-layout: fixed; /* Zwingt die Tabelle in die Schranken der Spaltenbreite */
    width: 100%;
}

/* 3. Erlaubt langen Dateinamen-Links, sich bei Platzmangel auch auf dem Desktop aufzuteilen */
.download-table td a {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* ==========================================================================
   ZENTRALE RESPONSIVE VIEWPORTS (Ganz am Ende für Mobilgeräte & Tablets)
   ========================================================================== */
@media (max-width: 768px) {
    /* Header & Navigation Mobil */
    .menu-toggle {
        display: block;
    }
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        gap: 10px;
    }
    .nav.active {
        display: flex;
    }
    .header-links {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
    }
    .content-grid {
        grid-template-columns: 1fr;
    }

    /* Produkt- & Download-Grids Mobil auf 1 Spalte zwingen */
    .product-layout-grid,
    .product-layout-grid.alternative-layout {
        grid-template-columns: 1fr !important;
    }
    .product-sidebar {
        order: 2; /* Sidebar rutscht unter den Hauptinhalt */
    }
    .product-main-content {
        order: 1; /* Hauptinhalt steht ganz oben */
    }
    .product-news {
        order: 3; /* News-Spalte rutscht ganz nach unten */
    }
    .download-table {
        display: block;
        overflow-x: auto; /* Tabellen mobil scrollbar machen */
    }

    /* 1. Zwingt Grid-Inhalte dazu, nicht die Displaybreite zu sprengen */
    .product-layout-grid > * {
        min-width: 0;
    }

   .download-table, 
    .download-table thead, 
    .download-table tbody, 
    .download-table th, 
    .download-table td, 
    .download-table tr { 
        display: block; 
        width: 100%;
    }

    /* Versteckt die Kopfzeile (Platform, File, etc.), da unlesbar nebeneinander */
    .download-table thead {
        display: none; 
    }

    /* Jede Zeile wird zu einer optischen Karte */
    .download-table tr {
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        padding: 10px;
        background: #fff;
    }

    .download-table td {
        text-align: left !important;
        border-bottom: 1px solid #eee;
        padding: 6px 0;
    }

    .download-table td:last-child {
        border-bottom: none;
    }
}
