/* Styl blízký dia.gov.cz – hlavní zelená #368537 */

:root {
    --primary: rgb(32, 115, 21);
    /* DIA green */
    --secondary: #f2f6fa;
    --text: #1a1a1a;
    --sidebar-width: 260px;
}

/* latin-ext */
@font-face {
    font-family: 'Roboto Web';
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 100%;
    font-display: swap;
    src: url(/fonts/Roboto-Regular-LatinExt.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Roboto Web';
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 100%;
    font-display: swap;
    src: url(/fonts/Roboto-Regular-Latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'Roboto Web';
    font-style: italic;
    font-weight: 100 900;
    font-stretch: 100%;
    font-display: swap;
    src: url(/fonts/Roboto-Italic-LatinExt.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Roboto Web';
    font-style: italic;
    font-weight: 100 900;
    font-stretch: 100%;
    font-display: swap;
    src: url(/fonts/Roboto-Italic-Latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html {
    font-family: "Roboto", "Roboto Web", "Noto Sans", sans-serif;
    line-height: 150%;
    color: var(--text);
}

body {
    padding:0;
    margin:0;
    position: relative;
    min-height: 100vh;
    background: #f5f5f5;
}

body > header > div, body > footer > div, body > main > div,
body#project-page > div.content {
    margin: 0 auto;
    max-width: 75rem;
}

main, header, footer {
    box-sizing: border-box;
    padding: 0 clamp(1rem, 4vw, 3rem);
}

.content {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr auto;
}

.compact-paragraphs p {
    margin: 0;
}

ol.headings > li::marker, ol.headings > li > p:first-child {
    font-weight: bold;
}


.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    overflow: visible;
    background: #fff;
    color: var(--text);
    padding: 1rem;
    z-index: 1000;
}

body.single-column {
    display: block;
    min-height: 100vh;
}

main a,
main a:visited {
  color: rgb(32, 115, 21);
  text-decoration: underline;
}

main a:hover,
main a:active {
  color: rgb(32, 115, 21);
  text-decoration: none;
}

address {
    font-style: normal;
}

/* ===== Popup / informační banner ===== */
.popup {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  z-index: 2000;

  max-width: 600px;    /* omezení maximální šířky */
  width: 90%;          /* procentuální šířka pro větší popup */
  box-sizing: border-box;
}

/* Popup se zobrazí, když má aria-hidden=false */
.popup[aria-hidden="false"] {
  display: block;
}

.popup .popup-content {
  background-color: #368537;
  color: white;
  padding: 16px;
  border-radius: 12px;
  position: relative; /* nutné pro absolutní pozici křížku */
  box-sizing: border-box;
}

.popup .popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  cursor: pointer;
  line-height: 1;
}

.popup .popup-close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Hypertextový odkaz uvnitř informačního popupu */
.popup .popup-content a {
    color: white;                 /* barva textu */
    text-decoration: underline;   /* zachová podtržení */
    background-color: #368537;    /* stejné jako pozadí popupu */
    padding: 0 0.1em;             /* lehce zvětší klikací oblast */
    border-radius: 2px;
    transition: background 0.2s;  /* jemný hover efekt */
}

.popup .popup-content a:hover {
    background-color: rgba(255,255,255,0.2); /* jemné zvýraznění při hover */
}

/* ===== Download ikona ===== */
.download-btn {
  position: fixed;
  top: 70px;
  background: #FFFFFF;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.3s;
  text-decoration: none;
  z-index: 2100;  /* nad category-popup (má 2000) */
  right: max(5px, calc((100vw - 80rem) / 2 + 5px));
}

h2 .download-btn-guard {
    display: inline-block;
    width: 22px;
    height: 22px;
    float: right;
}

.download-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.download-btn:hover {
  background: #FFFFFF;
}

/* ===== Top bar ===== */
body > header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 103px;
    background: #ffffff;
    color: #2E2D2C;
    z-index: 1000;
}

body > header > div {
    display: flex;
    height: 100%;
    margin: 0 auto;
}

body > header h1 {
    display: flex;
    box-sizing: border-box;
    height: 100%;
    margin: 0;
    padding: 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

body > header h1 img {
    height: 100%;
}

body > header h1 a {
    text-decoration: none;
    color: inherit;
}


.logo {
    display: flex;
    align-items: center;
    color: #2E2D2C;
}

.logo svg {
    width: 100%;
    height: 36px;
    margin: 10px 12px;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    margin-right: 12px;
    /* mobile only */
}

.hamburger svg {
    width: 28px;
    height: 28px;
    stroke: #2E2D2C;
}

.hamburger:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== Footer ===== */
footer {
    font-size: 0.9rem;
    color: white;
    background: #2E2D2C;
}

footer p, footer h3, footer a {
    color: inherit;
}

footer a {
    text-decoration: underline;
}

footer > div {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 3rem; /* udělat obsah patičky užší */
    box-sizing: border-box;
}

/* řádky patičky */
footer > div > section,
footer > div > div {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 3rem;
    justify-content: space-around;
}

/* bloky uvnitř řádku */
footer > div .footer-block {
    flex: 1;
    min-width: 250px;
}

footer .footer-contacts .footer-logo {
    display: flex;
    justify-content: flex-start; /* zarovnání doleva */
    align-items: flex-start;
    gap: 1rem;
    margin: 0.5rem 0;
}

footer .footer-contacts .footer-logo svg,
footer .footer-contacts .footer-logo img {
    width: 120px;   /* šířka loga */
    height: 100%;   /* výška loga */
    object-fit: contain; /* zachování proporcí u obrázků */
}

footer .footer-contacts .footer-logo .logo-text {
    display: none;
}

footer .footer-contacts .footer-social {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

footer .footer-project {
    display: block;
}

footer .footer-project > div {
    display: flex;
    gap: 1rem;
    align-items: center;
}
footer .footer-project .logos {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
    gap: 16px;
}

footer .footer-project .footer-block:nth-of-type(1) {
    flex: 1.35;
}

footer .footer-project .footer-block:nth-of-type(2) {
    flex: 1;
    @media(min-width: 768px) {
        min-width: 30em;
    }
}

footer .footer-project .logos img {
    max-height: 50px;
    object-fit: contain;
}

footer .footer-project p {
    margin: 0;
}

footer .footer-project p+p {
    margin-top: 1ex;
}

footer .footer-bottom p {
    font-size: 0.8rem;
    border-top: 1px solid #ffffff;
    padding-top: 1rem;
}

/* ===== Banner ===== */
.hero-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(107px, 15%, 8em);
  margin: 2rem auto;
  max-width: 1200px;
  background-color: #F0F0F0; /* podbarvení banneru */
  border-radius: 16px;       /* zakulacené rohy */
  overflow: hidden;           /* aby obsah zůstal uvnitř zaoblení */
}

.hero-image {
  flex: 1 1 300px;
  min-height: 200px;
  text-align: center;
}

.hero-image img {
  width: 100%;
  height: 100%;
  max-width: 450px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-text {
  flex: 1 1 300px;
  padding: 2rem 0;
}

.hero-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero-text p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-weight: bold;
}




.btn-primary,
.btn-primary a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: #207315 !important; /* zelená */
  color: #ffffff !important;            /* bílý text */
  border-radius: 6px;
  text-decoration: none;
}

.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: #207315 !important; /* zelená */
  color: #ffffff !important;            /* bílý text */
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.btn-tertiary {
  display: inline-flex;               /* pro zarovnání ikony a textu */
  align-items: center;
  gap: 0.5rem;                        /* mezera mezi ikonou a textem */
  padding: 0.75rem 1.5rem;            /* stejné jako btn-primary */
  font-size: 1rem;                    /* stejné jako btn-primary */
  font-weight: 600;
  border-radius: 6px;                 /* stejné jako btn-primary */
  background-color: #ffffff;          /* bílé pozadí */
  color: #207315;                     /* zelený text */
  border: 2px solid #207315;          /* zelený rámeček */
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-tertiary img {
  height: 20px;
  width: 20px;
  display: block;
}

.btn-tertiary:hover {
  background-color: #207315;          /* inverze na hover */
  color: #ffffff;
}

.btn-tertiary:hover img {
  filter: brightness(0) invert(1);    /* ikona zbělá */
}


/* ===== Sidebar ===== */
#sidebar {
    background: var(--secondary);
    border-right: 1px solid #d9e2ec;
    overflow-y: visible;   /* ať se nezalamuje uvnitř */
    padding: 103px 0 1rem;
    /* for fixed topbar */
    position: relative;
    top: 0;
    transition: transform 0.3s ease;
    grid-row: 2;
    grid-column: 1;
    max-width: 260px;
    box-sizing: border-box;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav a {
    display: block;
    padding: 0.75rem 1.75rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.95rem;
}

nav a:hover,
nav a:focus,
nav a.active {
    background: var(--primary);
    color: #fff;
}

nav ul ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
}

nav ul ul a {
    padding-left: 2.75rem;
}

.category-toggle {
    width: 100%;
    text-align: left;
    background: var(--secondary-dark, #f0f0f0);
    border: none;
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
}

.category-toggle:hover,
.category-toggle:focus {
    background: var(--primary);
    color: #fff;
}

/* Šipky */
.category-toggle .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 15px; /* odsazení šipky od textu */
}

.category-toggle[aria-expanded="true"] .arrow {
    transform: rotate(90deg);
}

nav ul li:last-child {
    padding-bottom: 1rem;
}

/* ===== Main content ===== */
main {
    padding-top: 127px;  /* offset for header */
    padding-bottom: 3rem;
    overflow-y: auto;
    background: #f5f5f5;
}

body#project-page main {
    grid-row: 2;
    grid-column: 2;
}

body#project-page .content section {
    scroll-margin-top: 127px;
    display: none;
    /* show only selected */
}

body#project-page .content section.active {
    display: block;
}

h2 {
    margin-top: 0;
    font-size: 1.7rem;
    line-height: 120%;
    color: var(--primary);
}

h3 {
    margin-top: 0;
    font-size: 1.25rem;
    line-height: 120%;
    color: var(--primary);
}

/* ===== Use-case detail styling ===== */
.meta {
    list-style: none;
    margin: 0 0 1.5rem 0;
    padding: 1rem;
    font-size: 0.9rem;
    color: #555;
    background: #f0f0f0;
    border-radius: 12px;
}

.meta li {
    list-style: none;
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.meta li:last-child {
    margin-bottom: 0;
}

.meta .icon {
    margin-right: 0.4rem;
    font-size: 1.1rem;
}

.table-meta {
  border-collapse: collapse;
  margin-bottom: 1em; /* odsazení od dalšího obsahu */
  background-color: #f9f9f9; /* zachování podbarvení */
}

.table-meta td, .table-meta th {
  border: none;          /* žádné rámečky */
  padding: 0.3em 0.5em;  /* mezera uvnitř buněk */
  vertical-align: top;   /* aby text s ikonou byl nahoře */
}

.table-meta.card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;       /* mezera mezi řádky */
  flex: 1 1 200px;    /* možnost škálování */
  background: #f0f0f0;
  border-radius: 12px;
  padding: 1rem;
}

.table-meta.card th {
  text-align: left;
  font-size: 0.95rem;
  color: var(--primary);
}

.main-content p {
    text-align: justify;
}

.highlight {
    background: #f9f9f9;
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.highlight p {
  margin: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.5rem 1rem;
    margin-bottom: 2rem;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 1rem;
}

.info-grid dt {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary);
}

.info-grid dd {
    margin: 0 0 1rem 0;
}

/* Upravené ul uvnitř info-grid pro zelené čtverečky pouze na odrážce */
.info-grid ul {
    padding-inline-start: 0; /* zrušíme odsazení defaultního ul */
    list-style: none; /* vypne defaultní odrážky */
}

.info-grid ul li {
    position: relative;
    padding-left: 1.4em; /* prostor pro čtvereček */
    color: #000; /* text vždy černý */
    display: block; /* blokové zarovnání pro víceryádkový text */
}

.info-grid ul li::before {
    content: "●"; /* plné kolečko */
    position: absolute;
    left: 0;
    top: 0.45em; /* necháváme tvůj původní posun dolů */
    color: #368537; /* zelené kolečko */
    font-size: 0.75em; /* menší velikost čtverečku */
    line-height: 1;
    pointer-events: none;
}

.info-grid dd:last-of-type {
    margin-bottom: 0;
}

.bottom-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.bottom-cards .card {
    flex: 1 1 200px;
    background: #f0f0f0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bottom-cards .card strong {
    font-size: 0.95rem;
    color: var(--primary);
}

/* Kontejner s filtry nad tabulkou */
#filtr-container {
    display: flex;
    flex-wrap: wrap;    /* nezalamovat */
    gap: 1.5em;            /* mezery mezi jednotlivými filtry */
    margin-bottom: 1.5em; /* odsazení od tabulky */
    align-items: center;
    justify-content: flex-start; /* zarovnat doleva */
}

#filtr-container > div {
    display: flex;
    flex: 1;
    align-items: baseline;
    justify-content: flex-start;
}

/* Každý filtr (label + prvek) vedle sebe */
#filtr-container label {
    margin-right: 1ex;
    font-weight: 600;
    white-space: nowrap;  /* aby se label nezalamoval */
    color: #1a1a1a;
}

#filtr-container input,
#filtr-container select {
    flex: 1;
    max-width: 20em;
    padding: 0.5em 0.75em;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    color: inherit; /* Apple workaround */
}

/* Zvýraznění po focusu (v barvách DIA) */
#filtr-container input:focus,
#filtr-container select:focus {
    border-color: #368537;
    outline: none;
    box-shadow: 0 0 0 2px rgba(54,133,55,0.2);
}

/* ===== Mobile ===== */
/* malá hlavička na mobilu, bez ohledu na orientaci portrait, landscape */
@media (max-width: 768px), (max-height:  768px) {
    body > header {
        height: 56px;
    }

    #sidebar {
        padding-top: 56px;
    }

    main {
        padding-top: 80px;
    }

    body#project-page .content section {
        scroll-margin-top: 80px;
    }
}

@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
    }


  .hero-banner {
    background-color: #f0f0f0; /* příklad */
    text-align: center;
  }

  .hero-banner .hero-image img {
      max-width: 500px;
  }

    /* Sidebar chování */
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--sidebar-width);
        max-height: calc(100vh - var(--footer-height, 60px)); /* nedosahuje na footer */
        overflow-y: auto; /* umožní scroll uvnitř sidebaru */
        transform: translateX(-100%);
        z-index: 999;
        transition: transform 0.3s ease;
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #sidebar .arrow {        /* nebo konkrétní třída šipky */
        display: inline-block;
        vertical-align: middle;
        margin-left: 0.5em;
        width: 1em;
        height: auto;
    }

    footer .footer-project div {
        flex-direction: column;
    }

    footer .footer-project div.footer-block.logos {
        flex-direction: column;
    }

    footer .footer-project .logos img {
        max-width: 120px;
    }

    .logo svg {
        margin: 0px;
    }

    .hamburger {
        display: block !important;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1000; /* aby bylo nad ostatním */
    }

    .hamburger svg {
        width: 28px;
        height: 28px;
        stroke: #2E2D2C;
    }

    /* Ikony */
    .icon,
    body > header .icon-wrapper,
    body > header svg {
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .info-grid {
        display: block;
        padding: 16px;
    }

    .info-grid dt {
        margin-top: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .info-grid dt:first-of-type {
        margin-top: 0;
    }

    .info-grid dd {
        margin-bottom: 1rem;
    }

    .info-grid dd:last-of-type {
        margin-bottom: 0;
    }

    /* === Mobilní centrování sekundárního tlačítka (tvrdé přepsání) === */
    .hero-text { 
      text-align: center;
    }

    .btn-secondary,
    .btn-secondary a {
      display: block !important;
      margin: 0.5rem auto 0 !important;
      width: fit-content;
      text-align: center;
      float: none !important;
    }

    .btn-group,
    .btn-row {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center !important;
      gap: 0.5rem;
    }

    #filtr-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    #filtr-container label {
        min-width: 8em;
    }

    #filtr-container > div,
    #filtr-container > div select,
    #filtr-container > div input {
        width: 100%;
    }

    #table-overview td:first-child {
        font-size: 100%;
    }
    #table-overview td {
        font-size: 80%;
        padding-right: 6px;
        padding-left: 6px;
    }
}

/* ===== Category popup ===== */
.category-popup {
    position: fixed;
    inset: 0;
    display: none; /* skrytý zpočátku */
    align-items: center;   /* vertikální střed */
    justify-content: center; /* horizontální střed */
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    padding-bottom: 0; /* odstraníme spodní odsazení */
    box-sizing: border-box;
}

.category-popup[aria-hidden="false"] {
    display: flex; /* ← zobrazíme popup jen když má aria-hidden="false" */
}

.category-popup .popup-content {
    background: #fff;
    padding: 1.5rem;
    max-width: 600px;  /* sjednoceno s běžným popupem */
    width: 90%;        /* procentuální šířka pro větší popup */
    margin: 0 1rem;    /* centrum horizontálně */
    border-radius: 12px;
    position: relative;
    text-align: center;
    box-sizing: border-box;
}

.category-popup .popup-close {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #000;
}

.category-popup .popup-close:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.category-popup h3 {
    margin-top: 0;
}

#usecase-list .subcategory {
    display: block;
}

#usecase-list .category-toggle[aria-expanded|="false"]+.subcategory {
    display: none;
}

#table-overview-container {
    margin: 2em auto;
}

/* Styl pro tabulku */
 table {
     border-collapse: collapse;
     table-layout: fixed; /* Zajistí pevné rozložení sloupců */
     width: 100%; /* Nebo jiná pevná/maximální šířka */
     margin: 0 auto;
}
table tr[data-show="false"] {
    display: none;
}

table tr:nth-child(odd of [data-show="true"]) {
    background-color: #f9f9f9;
}

table tr:nth-child(even of [data-show="true"]) {
    background-color: #ffffff;
}

/* Záhlaví */
table th, table td {
    padding: 0.8em;
    text-align: left;
    border-bottom: 1px solid #ccc;
}

table#table-overview tr > * {
   width: 25%;
}

table#table-overview tr > *:first-child {
    width: 50%;
}
