        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--bg);
            color: var(--text);
            margin: 0;
            padding: 40px 20px;
        }

        .container { max-width: 1200px; margin: 0 auto; }
        h1 { text-align: center; color: var(--primary); margin-bottom: 5px; }
        .subtitle { text-align: center; color: #666; margin-bottom: 40px; }
        
        /* Horní navigační lišta */
        .top-nav {
            background: white;
            padding: 10px 30px;
            display: flex;
            justify-content: space-between; /* Rozestup mezi domů a info */
            align-items: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            position: sticky;
            top: 0;
            z-index: 500;
        }

        .nav-left { display: flex; align-items: center; }

        .nav-title {
            margin-left: 20px;
            font-weight: 800;
            color: var(--primary); /* Název sekce v barvě předmětu */
            font-size: 1.2em;
            text-transform: uppercase;
            letter-spacing: 1px;
            border-left: 2px solid #eee;
            padding-left: 20px;
        }

        .nav-info {
            color: #888;
            font-size: 0.85em;
            font-weight: 600;
            background: #f0f2f5;
            padding: 5px 12px;
            border-radius: 20px;
        }

        .btn-back {
            text-decoration: none;
            color: var(--primary);
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 15px;
            border-radius: 8px;
            background: #e8f0fe;
            transition: 0.3s;
            font-size: 0.9em;
        }

        .btn-back:hover {
            background: var(--primary);
            color: white;
        }

        .nav-title {
            margin-left: 20px;
            font-weight: bold;
            color: #555;
            border-left: 2px solid #ddd;
            padding-left: 20px;
        }

        /* Mřížka karet */
        #projectGrid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
            gap: 25px;
        }

        /* Karta */
        .project-card {
            background: white;
            border-radius: 15px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: transform 0.2s;
        }
        .project-card:hover { transform: translateY(-5px); }

        /* Hlavní náhledový obrázek */
        .main-preview-img {
            width: 100%;
            height: 190px;
            object-fit: cover;
            background: #eee;
            border-bottom: 1px solid #eee;
        }

        /* Sekce s textem */
        .project-header { padding: 20px; flex-grow: 1; }
        
        .title-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 12px;
        }

        .project-title { font-size: 1.25em; margin: 0; color: var(--primary); line-height: 1.2; }

        /* Kroužky (Badges) */
        .badge-container { display: flex; gap: 5px; flex-shrink: 0; }
        .badge {
            width: 26px; height: 26px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            color: white; font-weight: bold; font-size: 13px;
            cursor: help; position: relative;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        /* Tooltip (Bublina) */
        .badge:hover::after {
            content: attr(data-title);
            position: absolute; bottom: 35px; left: 50%; transform: translateX(-50%);
            background: #333; color: white; padding: 5px 12px;
            border-radius: 6px; font-size: 11px; white-space: nowrap; z-index: 100;
        }
        .badge:hover::before {
            content: ''; position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
            border: 7px solid transparent; border-top-color: #333; z-index: 100;
        }

        .badge-V { background-color: var(--color-V); }
        .badge-P { background-color: var(--color-P); }
        .badge-S { background-color: var(--color-S); }
        .badge-Z { background-color: var(--color-Z); }

        .project-desc { color: #555; font-size: 0.9em; line-height: 1.5; margin: 0; }

        /* Galerie miniatur */
        .gallery-label { font-size: 0.7em; color: #999; text-transform: uppercase; padding: 0 20px 5px; font-weight: bold; }
        .image-bar { display: flex; gap: 8px; padding: 0 20px 20px; flex-wrap: wrap; }
        .thumb {
            width: 48px; height: 48px; object-fit: cover; border-radius: 6px;
            cursor: zoom-in; border: 1px solid #ddd; transition: border-color 0.2s;
        }
        .thumb:hover { border-color: var(--primary); }

        /* Tlačítka */
        .button-bar {
            display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px;
            padding: 15px; background: #fafafa; border-top: 1px solid #eee;
        }
        .btn {
            padding: 10px 2px; border-radius: 8px; text-decoration: none;
            font-size: 0.75em; font-weight: bold; text-align: center; transition: filter 0.2s;
        }
        .btn:hover { filter: brightness(0.9); }
        .btn-zadani { background: #e8f0fe; color: var(--primary); border: 1px solid #c2d7fa; }
        .btn-data { background: #e6f4ea; color: var(--success); border: 1px solid #c6e7d1; }
        .btn-download { background: var(--primary); color: white; }

        /* Náhledové okno */
        #preview-popover {
            position: fixed; width: 550px; height: 400px; background: white;
            border: 3px solid var(--primary); border-radius: 12px; display: none;
            z-index: 1000; pointer-events: none; box-shadow: 0 15px 40px rgba(0,0,0,0.3);
            overflow: hidden;
        }
        #preview-popover iframe { width: 100%; height: 100%; border: none; }

        /* Lightbox */
        #lightbox {
            position: fixed; inset: 0; background: rgba(0,0,0,0.9);
            display: none; justify-content: center; align-items: center;
            z-index: 2000; cursor: zoom-out;
        }
        #lightbox img { max-width: 90%; max-height: 90%; border: 2px solid white; border-radius: 4px; }/* CSS Document */