/* JUDr. Petr Zima — základ, komponenty, následně responzivní pravidla. */
:root {
    --navy: #122c37;
    --deep: #0c222c;
    --gold: #c7a571;
    --ink: #1a3039;
    --gray: #58666b;
    --line: #dce2e4;
    --paper: #f4f6f6;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 28px;
}

body {
    margin: 0;
    font: 16px/1.65 Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: #fff;
}

a {
    color: inherit;
    text-underline-offset: 5px;
}

button, input, textarea, select {
    font: inherit;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1, h2, h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
    line-height: 1.12;
}

h1 {
    font-size: clamp(2.6rem, 4.7vw, 4.5rem);
    letter-spacing: -.04em;
}

h2 {
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    letter-spacing: -.035em;
    margin-bottom: 24px;
}

h3 {
    font-size: 1.55rem;
}

p {
    margin-bottom: 20px;
}

.wrap {
    width: min(1200px, calc(100% - 96px));
    margin: auto;
}

.eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .15em;
    margin-bottom: 24px;
}

.intro {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--gray);
}

.skip {
    position: fixed;
    top: -100px;
    background: #fff;
    padding: 16px;
    z-index: 20;
}

.skip:focus {
    top: 0;
}

:focus-visible {
    outline: 3px solid #b6853e;
    outline-offset: 4px;
}

/* Záhlaví a navigace */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 112px;
    gap: 24px;
}

.brand {
    display: block;
    flex-shrink: 0;
}

.brand img {
    display: block;
    width: 250px;
    height: auto;
}

#nav {
    display: flex;
    gap: 22px;
    align-items: center;
}

#nav a {
    font-size: .83rem;
    text-decoration: none;
    white-space: nowrap;
    padding-block: 8px;
}

#nav a:hover, #nav a[aria-current] {
    color: #987442;
}

#nav .nav-contact {
    padding: 10px 17px;
    border: 1px solid var(--line);
}

.menu {
    display: none;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 9px 13px;
    cursor: pointer;
}

/* Tlačítka */
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    min-height: 52px;
    border: 1px solid var(--ink);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
}

.gold {
    background: var(--gold);
    color: var(--deep);
    border-color: var(--gold);
}

.outline {
    background: transparent;
}

.button:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.text-link {
    display: inline-flex;
    gap: 20px;
    font-size: .88rem;
    font-weight: 700;
}

.back {
    margin-bottom: 50px;
    padding: 11px 22px;
    min-height: 44px;
}

/* Úvodní blok a právní symbol */
.hero {
    background: var(--navy);
    color: white;
    padding-top: 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    grid-template-areas: "copy art" "actions art";
    align-items: center;
    gap: 0 76px;
}

.hero-copy {
    grid-area: copy;
}

.hero h1 {
    margin-bottom: 30px;
}

.hero h1 em {
    color: var(--gold);
    font-style: normal;
}

.hero .intro {
    max-width: 500px;
    color: #c5d0d4;
}

.actions {
    grid-area: actions;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 36px;
}

.actions .button {
    width: 230px;
    padding-inline: 12px;
}

.hero .outline {
    border-color: #899ca5;
    color: #fff;
}

.legal-art {
    grid-area: art;
    aspect-ratio: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid #586c75;
    padding: 30px;
    background: linear-gradient(140deg, #213e49, #0c222c);
}

.art-caption {
    position: relative;
    z-index: 1;
    font-size: .66rem;
    letter-spacing: .17em;
    text-align: center;
}

.paragraph {
    position: absolute;
    inset: -11% 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 400 370px/1 Georgia, serif;
    color: var(--gold);
    opacity: .88;
    transform: rotate(-12deg);
}

.art-bottom {
    position: relative;
    z-index: 1;
    font: 1.8rem/1.2 Georgia, serif;
    text-align: center;
    text-shadow: 0 1px 5px var(--deep);
}

.art-bottom span {
    display: block;
    margin-top: 12px;
    font: .68rem/1.5 Arial, sans-serif;
    letter-spacing: .3em;
}

.hero-foot {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding-block: 22px;
    border-top: 1px solid #465c66;
    font-size: .75rem;
    color: #c5d0d4;
}

.hero-foot span::before {
    content: "§";
    color: var(--gold);
    font: 1.2rem/1 Georgia, serif;
    margin-right: 8px;
}

.hero-foot span:nth-child(2) {
    text-align: center;
}

.hero-foot span:last-child {
    text-align: right;
}

/* Společná struktura sekcí a oblastí práva */
.section {
    padding-block: 76px;
}

.section-title {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 80px;
    align-items: end;
    margin-bottom: 40px;
}

.section-title h2 {
    margin-bottom: 0;
}

.section-title > p {
    color: var(--gray);
    margin-bottom: 4px;
    max-width: 460px;
}

.section-link {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

.soft-section {
    background: var(--paper);
}

.services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 44px;
}

.services details {
    border-top: 1px solid var(--line);
    padding-block: 25px;
}

summary {
    cursor: pointer;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

.services summary {
    padding-right: 32px;
    position: relative;
}

.services h3 {
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.service-intro {
    margin-bottom: 0;
    font-size: .92rem;
    color: var(--gray);
}

.plus {
    position: absolute;
    right: 0;
    top: 0;
    font: 28px/1 Georgia, serif;
    color: #aa8350;
}

details[open] > summary .plus {
    transform: rotate(45deg);
}

.detail {
    padding-top: 20px;
    font-size: .92rem;
}

.detail ul {
    padding-left: 20px;
    margin: 0;
}

.detail li + li {
    margin-top: 6px;
}

/* Profil */
.profile {
    padding-block: 70px;
    background: var(--paper);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
}

.profile-note {
    color: var(--gray);
}

.lawyer {
    background: #fff;
    padding: 32px;
    border: 1px solid var(--line);
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 26px;
}

.monogram {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 72px;
    height: 72px;
    background: var(--navy);
    color: var(--gold);
    font: 1.7rem Georgia, serif;
}

.lawyer-heading h3 {
    margin: 0 0 8px;
}

.lawyer-heading .eyebrow {
    margin: 0;
    font-size: .66rem;
}

.lawyer > p {
    color: var(--gray);
    font-size: .94rem;
}

.profile-history {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 18px;
}

.profile-history summary {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: .88rem;
}

.profile-history .prose {
    margin-top: 20px;
}

.lawyer .text-link {
    margin-top: 24px;
}

/* Aktuality, blog a samostatný článek */
.story-list {
    border-top: 1px solid var(--line);
}

.story {
    border: 1px solid var(--line);
    border-top: 0;
    background: white;
}

.story:nth-child(even) {
    background: #f8f9f9;
}

.story summary {
    position: relative;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 20px;
    padding: 25px 58px 25px 25px;
}

.story-date {
    font-size: .74rem;
    color: #7b6545;
    padding-top: 5px;
}

.story-title {
    display: block;
    font: 1.45rem/1.25 Georgia, serif;
}

.story-excerpt {
    display: block;
    color: var(--gray);
    font-size: .88rem;
    margin-top: 12px;
}

.story .plus {
    right: 22px;
    top: 28px;
}

.story[open] .story-excerpt {
    display: none;
}

.story[open] {
    border-left: 3px solid var(--gold);
}

.story-body {
    margin-left: 157px;
    padding: 0 42px 30px 0;
}

.prose {
    font-size: .96rem;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose h3 {
    margin: 28px 0 18px;
    font-size: 1.5rem;
}

.prose ul {
    padding-left: 22px;
}

.prose a {
    color: #76572f;
}

.listing-head {
    margin: 0 0 42px;
    max-width: 760px;
}

.listing-head h1 {
    margin-bottom: 24px;
}

.listing-head .intro {
    margin: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 36px;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--line);
    text-decoration: none;
}

.pagination [aria-current] {
    background: var(--navy);
    color: white;
}

.article-page {
    max-width: 960px;
}

.article-page h1 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    overflow-wrap: anywhere;
}

.article-body {
    max-width: 780px;
    margin-top: 38px;
}

/* Knihy a bibliografie */
.books {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.books article {
    position: relative;
    overflow: hidden;
    min-height: 310px;
    padding: 32px;
    background: var(--navy);
    color: #fff;
}

.books article:nth-child(2) {
    background: #1e3944;
}

.books h3 {
    position: relative;
    z-index: 1;
    line-height: 1.2;
    margin: 30px 0 24px;
}

.books p {
    position: relative;
    z-index: 1;
    font-size: .83rem;
    color: #ccd5d8;
}

.books .eyebrow {
    color: var(--gold);
    font-size: .65rem;
}

.book-symbol {
    position: absolute;
    right: -6px;
    bottom: -37px;
    font: 280px/1 Georgia, serif;
    transform: rotate(-12deg);
    color: var(--gold);
    opacity: .12;
}

.category-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.category-nav a {
    border: 1px solid var(--line);
    padding: 11px 18px;
    text-decoration: none;
    font-size: .85rem;
}

.category-nav a:hover {
    border-color: var(--gold);
}

.bibliography-section + .bibliography-section {
    margin-top: 60px;
}

.bibliography-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 26px;
}

.bibliography-title h2 {
    font-size: 2rem;
    margin-bottom: 0;
}

.bibliography-title > span {
    font-size: .75rem;
    color: var(--gray);
    white-space: nowrap;
}

.publication-list {
    border-top: 1px solid var(--line);
}

.publication {
    display: grid;
    grid-template-columns: 85px 1fr;
    gap: 25px;
    padding: 25px;
    border-bottom: 1px solid var(--line);
}

.publication:nth-child(odd) {
    background: var(--paper);
}

.publication-year {
    font: 1.35rem Georgia, serif;
    color: #8a693c;
}

.publication h3 {
    font: .98rem/1.65 Arial, sans-serif;
    margin: 0;
}

.publication-link {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    margin-top: 12px;
}

/* Kontakt a zápatí */
.contact {
    background: var(--deep);
    color: #fff;
    padding-block: 70px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
}

.contact-intro > p:last-child {
    color: #bcc9ce;
    margin: 0;
}

.contact-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.contact-item .eyebrow, .billing > .eyebrow {
    color: var(--gold);
    margin-bottom: 16px;
}

.contact-item > a {
    font-size: 1.05rem;
}

.contact-item > p:not(.eyebrow) {
    margin-bottom: 12px;
    font-size: .94rem;
}

.address {
    grid-column: 1 / -1;
}

.contact-item .map-link {
    font-size: .78rem;
    color: #cbd6db;
}

.billing {
    grid-column: 1 / -1;
    border-top: 1px solid #465c66;
    padding-top: 25px;
}

.billing-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 24px;
    font-size: .82rem;
    color: #cbd6db;
}

.billing-grid p {
    margin: 0;
}

.billing-grid strong {
    color: #fff;
}

.site-footer {
    background: #081b23;
    color: #bcc9ce;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-block: 22px;
    font-size: .71rem;
}

.back-to-top {
    text-decoration: none;
}

.back-to-top:hover {
    text-decoration: underline;
}

/* Tablet: kompaktní navigace a vyvážené rozložení */
@media (max-width: 1100px) {
    .wrap {
        width: calc(100% - 64px);
    }

    .header {
        min-height: 98px;
        position: relative;
    }

    .brand img {
        width: 235px;
    }

    .menu {
        display: block;
    }

    #nav {
        display: none;
        position: absolute;
        top: 100%;
        left: -32px;
        right: -32px;
        padding: 22px 32px;
        background: white;
        border-bottom: 1px solid var(--line);
        z-index: 10;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    #nav.open {
        display: flex;
    }

    #nav a {
        padding: 10px 0;
        font-size: .95rem;
    }

    #nav .nav-contact {
        border: 0;
        padding: 10px 0;
    }

    .hero-grid {
        gap: 0 40px;
    }

    .legal-art {
        padding: 22px;
    }

    .paragraph {
        font-size: 300px;
    }

    .art-bottom {
        font-size: 1.5rem;
    }

    .actions {
        gap: 14px;
    }

    .actions .button {
        width: 50%;
        font-size: .78rem;
    }

    .section-title, .profile-grid, .contact-grid {
        gap: 44px;
    }

    .books article {
        padding: 26px;
    }

    .contact-item > a {
        font-size: .95rem;
    }

}

/* Mobil: dvě tlačítka vedle sebe, dvousloupcový kontakt */
@media (max-width: 700px) {
    .wrap {
        width: calc(100% - 36px);
    }

    .header {
        min-height: 88px;
        gap: 14px;
    }

    .brand img {
        width: min(205px, calc(100vw - 130px));
    }

    .menu {
        font-size: .8rem;
        padding: 9px 11px;
    }

    #nav {
        left: -18px;
        right: -18px;
        padding-inline: 18px;
    }

    .hero {
        padding-top: 42px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "copy" "art" "actions";
        gap: 34px;
    }

    .hero h1 {
        font-size: clamp(2.65rem, 9.4vw, 4rem);
    }

    .hero .intro {
        font-size: .95rem;
    }

    .actions {
        margin-top: 0;
        gap: 12px;
        justify-content: center;
    }

    .actions .button {
        width: calc(50% - 6px);
        max-width: 230px;
        min-height: 56px;
        font-size: .75rem;
        padding-inline: 8px;
    }

    .legal-art {
        width: min(100%, 380px);
        justify-self: center;
    }

    .paragraph {
        font-size: 330px;
    }

    .art-caption {
        font-size: .6rem;
    }

    .art-bottom {
        font-size: 1.6rem;
    }

    .hero-foot {
        margin-top: 34px;
        font-size: .62rem;
        gap: 12px;
        line-height: 1.5;
    }

    .section {
        padding-block: 48px;
    }

    .section-title {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 30px;
    }

    .section-title > p {
        margin: 0;
        font-size: .94rem;
    }

    .services {
        grid-template-columns: 1fr;
    }

    .services h3 {
        font-size: 1.4rem;
    }

    .services details {
        padding-block: 24px;
    }

    .profile, .contact {
        padding-block: 48px;
    }

    .profile-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .lawyer {
        padding: 24px;
    }

    .profile-top {
        gap: 16px;
    }

    .monogram {
        flex-basis: 58px;
        height: 58px;
    }

    .lawyer-heading h3 {
        font-size: 1.45rem;
    }

    .section-link {
        justify-content: center;
    }

    .story summary {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 21px 48px 21px 20px;
    }

    .story-date {
        padding-top: 0;
        font-size: .7rem;
    }

    .story-title {
        font-size: 1.3rem;
    }

    .story-excerpt {
        font-size: .83rem;
        margin-top: 12px;
    }

    .story .plus {
        right: 17px;
        top: 23px;
    }

    .story-body {
        margin-left: 0;
        padding: 0 20px 24px;
    }

    .prose {
        font-size: .91rem;
    }

    .books {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .books article {
        min-height: 230px;
    }

    .books h3 {
        margin-top: 20px;
    }

    .back {
        margin-bottom: 36px;
    }

    .listing-head {
        margin-bottom: 30px;
    }

    .listing-head h1 {
        font-size: 2.7rem;
    }

    .category-nav {
        gap: 8px;
        margin-bottom: 36px;
    }

    .category-nav a {
        font-size: .75rem;
        padding: 9px 13px;
    }

    .bibliography-title {
        gap: 12px;
    }

    .bibliography-title h2 {
        font-size: 1.6rem;
    }

    .publication {
        grid-template-columns: 49px 1fr;
        padding: 20px 13px;
        gap: 12px;
    }

    .publication-year {
        font-size: 1.15rem;
    }

    .publication h3 {
        font-size: .89rem;
    }

    .contact-data {
        grid-template-columns: 1fr 1fr;
        gap: 24px 16px;
    }

    .contact-item > a {
        font-size: .83rem;
        overflow-wrap: anywhere;
    }

    .contact-item .eyebrow, .billing > .eyebrow {
        font-size: .63rem;
    }

    .contact-item > p:not(.eyebrow) {
        font-size: .83rem;
    }

    .billing-grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 14px;
        font-size: .73rem;
    }

    .footer {
        gap: 12px;
        font-size: .63rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

}

/* Obrázky patří do rozbaleného textu; odkaz zachovává původní rozlišení. */
.article-images {
    display: grid;
    gap: 24px;
    margin-top: 28px;
}

.article-images figure {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    background: #fff;
}

.image-enlarge {
    display: block;
    width: fit-content;
    max-width: 100%;
    text-decoration: none;
}

.article-images img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
}

.image-enlarge > span {
    display: block;
    margin-top: 12px;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: underline;
}

.article-images figcaption {
    margin-top: 12px;
    color: var(--gray);
    font-size: .83rem;
}

@media (max-width: 700px) {
    .article-images figure {
        padding: 12px;
    }

    .article-images img {
        max-height: 300px;
    }

}

/* Listing headings share a row with the prominent return action. */
.listing-top {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 42px;
}

.listing-top .listing-head {
    flex: 1;
    margin-bottom: 0;
}

.listing-top .back {
    flex-shrink: 0;
    margin: 0 0 0 auto;
}

.back {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.back:hover {
    background: #fff;
    border-color: var(--navy);
    color: var(--navy);
}

.case-story summary {
    grid-template-columns: 1fr;
}

.case-story .story-body {
    margin-left: 25px;
}

.publication-link + .publication-link {
    margin-left: 18px;
}

/* Originals stay in a modal viewer; scans can be viewed at native size. */
button.image-enlarge {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: zoom-in;
}

.lightbox-open {
    overflow: hidden;
}

.image-lightbox {
    width: min(1100px, 94vw);
    max-width: 94vw;
    max-height: 94dvh;
    padding: 0;
    border: 0;
    background: #fff;
    color: var(--ink);
}

.image-lightbox::backdrop {
    background: rgb(0 0 0 / 80%);
}

.lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
}

.lightbox-toolbar button {
    cursor: pointer;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    padding: 8px 14px;
    font: inherit;
}

.lightbox-toolbar .lightbox-close {
    font-size: 30px;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
}

.lightbox-scroll {
    overflow: auto;
    max-height: calc(94dvh - 140px);
    padding: 16px;
}

.lightbox-scroll img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(94dvh - 175px);
    margin: auto;
    object-fit: contain;
}

.is-zoomed .lightbox-scroll img {
    max-width: none;
    max-height: none;
    margin: 0;
}

.lightbox-caption {
    margin: 0;
    padding: 10px 16px;
    font-size: .9rem;
}

@media (max-width: 640px) {
    .listing-top {
        gap: 16px;
        margin-bottom: 30px;
    }

    .listing-top .back {
        padding: 10px 13px;
    }

    .case-story .story-body {
        margin-left: 0;
    }

    .publication-link {
        display: block;
    }

    .publication-link + .publication-link {
        margin-left: 0;
    }

    .lightbox-scroll {
        padding: 8px;
    }

}
