.combat-drills {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.combat-drills h2 {
    font-size: 20pt;
    margin: 0;
}

.combat-drills h3 {
    font-size: 18pt;
}

.combat-drills h4 {
    margin: 0;
    font-weight: 700;
}

.combat-drills p {
    margin: 0;
    padding: 0;
    text-align: left !important;
    line-height: 1.6;
}

.drills-container {
    display: grid;
    gap: clamp(16px, 2vw, 24px);
    width: 100%;
    max-width: none;
    margin: 0 auto 32px;
    scroll-margin-top: 24px;
}

.drills-toc {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.drills-toc-title {
    margin: 0 0 16px;
    text-align: center;
}

.drills-toc-list {
    list-style: none;
    counter-reset: drills-toc;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 24px;
    margin: 0;
    padding: 0;
}

.drills-toc-list li {
    counter-increment: drills-toc;
}

.drills-toc-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.drills-toc-list a::before {
    content: counter(drills-toc);
    font-weight: 700;
    opacity: 0.7;
    min-width: 1.5em;
}

.drills-toc-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
}

.drills-toc-list a:hover,
.drills-toc-list a:focus-visible {
    background-color: rgba(125, 33, 40, 0.55);
    transform: translateX(4px);
}

@media screen and (min-width: 768px) {
    .drills-toc-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.drill-card {
    background-color: rgba(4, 5, 5, 0.55);
    border: 3px solid;
    border-radius: 12px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
    padding: clamp(20px, 3vw, 32px);
    width: 100%;
}

.drill-card--intro {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.drill-card--title {
    border: 3px solid #7d2128;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: clamp(20px, 3vw, 40px);
    text-align: left;
    padding: clamp(20px, 3vw, 32px);
}

.drill-title-main {
    flex: 2 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vw, 20px);
    justify-content: flex-start;
}

.drill-title-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(14px, 2vw, 22px);
}

.drill-title-head h2 {
    text-align: left;
}

.drill-icon {
    flex: 0 0 auto;
    width: clamp(72px, 10vw, 120px);
    height: auto;
    object-fit: contain;
}

.drill-photo {
    flex: 1 1 0;
    min-width: 0;
    align-self: flex-start;
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 3px solid #7d2128;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

@media screen and (max-width: 640px) {
    .drill-card--title {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .drill-title-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .drill-title-head h2 {
        text-align: center;
    }

    .drill-photo {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }
}

.drill-card--instructors-heading {
    text-align: center;
    padding: 0;
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.drill-card--description p {
    text-align: left;
}

/* Rozšířený popis výcviku uvnitř hlavní karty, pod názvem a vedle fotky.
   Doplňuje rozestupy mezi nadpisy a seznamy, protože .combat-drills p má margin: 0. */
.drill-title-details {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.5vw, 14px);
}

.combat-drills .drill-title-details h4 {
    margin: 0;
    color: #fff;
}

.drill-title-details ul {
    margin: 0;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.drill-title-details li {
    text-align: left;
    line-height: 1.6;
}

.drill-title-details code {
    font-size: 0.95em;
    padding: 1px 5px;
    border-radius: 4px;
    background-color: rgba(125, 33, 40, 0.35);
}

.drill-mortar-calc {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(125, 33, 40, 0.45);
}

.drill-mortar-calc__link {
    display: inline-block;
    margin-left: 6px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid #7d2128;
    padding-bottom: 1px;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.drill-mortar-calc__link::after {
    content: " →";
    color: #a02a33;
}

.drill-mortar-calc__link:hover,
.drill-mortar-calc__link:focus {
    color: #a02a33;
    border-color: #a02a33;
}

.drill-instructors {
    display: grid;
    grid-template-columns: repeat(auto-fit, 150px);
    gap: clamp(12px, 2vw, 20px);
    width: 100%;
    max-width: 1312px;
    margin: 20px auto 0;
    justify-content: center;
}

/* Karty instruktorů přebírají vzhled karet členů (.member-card v shared.css),
   aby byly konzistentní se stránkami Nábor/Kontakt. Zde jen přepisujeme
   zarovnání data připojení, protože .combat-drills p ho vynucuje vlevo. */
.drill-instructors[id] .member-card .member-join {
    margin: 4px 0 0;
    text-align: center !important;
}

.drill-instructors .member-name--long {
    font-size: clamp(12pt, 2vw, 20pt);
}

.combat-drills .drill-instructors-heading {
    margin: 0;
    text-align: center;
}

@media screen and (min-width: 768px) {
    .combat-drills h2 {
        font-size: 24pt;
    }

    .drill-card {
        padding: clamp(24px, 3vw, 36px);
    }
}

@media screen and (min-width: 1200px) {
    .combat-drills h2 {
        font-size: 32pt;
    }

    .combat-drills h3 {
        font-size: 24pt;
        padding-top: 20px;
    }

    .combat-drills h4 {
        font-size: 18pt;
    }

    .drills-container {
        gap: 20px;
    }

    .drill-instructors {
        grid-template-columns: repeat(auto-fit, 150px);
        gap: 16px;
    }
}

@media screen and (max-width: 1023px) {
    .drill-instructors {
        grid-template-columns: repeat(auto-fit, 150px);
    }
}

@media screen and (max-width: 640px) {
    .drill-instructors {
        grid-template-columns: repeat(auto-fit, 130px);
    }

    .drill-instructors[id] .member-card {
        width: 130px;
    }
}
