/* Soubor pro stylování prvků, které jsou specifické pro domovskou
stránku. */

.hpage-title {
    background-color: rgba(4, 5, 5, 0.82);
    border: 1px solid;
    border-radius: 16px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
    padding: 24px 32px;
    margin: 0 auto 32px;
    max-width: 820px;
    width: 100%;
    text-align: center;
}

.hcontact-chip {
    display: inline-block;
    background-color: rgba(4, 5, 5, 0.82);
    border: 1px solid;
    border-radius: 12px;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
    padding: 8px 26px;
    margin: 0 auto 16px;
    text-align: center;
}

.header-container{
    margin: 140px auto 20px;
    padding: 5px 8px;
    padding-bottom: 40px;
    text-align: center;
    width: 100%;
    border-radius: 50px;
}

.stats-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin: 24px 0 32px;
}

.stat-card {
    background-color: rgba(4, 5, 5, 0.60);
    border: 3px solid;
    border-radius: 12px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    min-height: 200px;
}

.stat-card img {
    width: 56px;
    height: 56px;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stat-tooltip {
    border-bottom: 1px dotted rgba(255, 255, 255, 0.75);
    cursor: help;
    display: inline-flex;
    justify-content: center;
    text-align: center;
    outline: none;
    position: relative;
}

.stat-tooltip::after {
    background: rgba(4, 5, 5, 0.96);
    border: 1px solid rgba(125, 33, 40, 0.75);
    border-radius: 8px;
    bottom: calc(100% + 10px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.4);
    color: #fff;
    content: attr(data-tooltip);
    font-size: 13px;
    font-weight: 600;
    left: 50%;
    line-height: 1.35;
    letter-spacing: normal;
    text-transform: none;
    max-width: min(320px, 82vw);
    opacity: 0;
    padding: 10px 12px;
    pointer-events: none;
    position: absolute;
    text-align: center;
    transform: translate(-50%, 4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    visibility: hidden;
    width: max-content;
    z-index: 5;
}

.stat-tooltip::before {
    border: 7px solid transparent;
    border-top-color: rgba(125, 33, 40, 0.75);
    bottom: calc(100% - 4px);
    content: "";
    left: 50%;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transform: translateX(-50%);
    transition: opacity 0.18s ease;
    visibility: hidden;
    z-index: 6;
}

.stat-tooltip:hover::after,
.stat-tooltip:hover::before,
.stat-tooltip:focus::after,
.stat-tooltip:focus::before {
    opacity: 1;
    visibility: visible;
}

.stat-tooltip:hover::after,
.stat-tooltip:focus::after {
    transform: translate(-50%, 0);
}

@media screen and (max-width: 480px) {
    .stat-tooltip::after {
        bottom: calc(100% + 8px);
        font-size: 12px;
        white-space: normal;
        width: min(260px, 78vw);
    }
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.number-animate {
    opacity: 1 !important;
}

.home-flex-points {
    display: grid;
    gap: 16px;
    margin: 24px 0;
}

.home-flex-points article {
    background-color: rgba(4, 5, 5, 0.68);
    border: 1px solid rgba(125, 33, 40, 0.55);
    border-radius: 12px;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32);
    display: flex;
    flex-direction: column;
    padding: 20px;
    text-align: left;
}

.home-flex-points .point-link {
    margin-top: auto;
    padding-top: 16px;
}

.point-link {
    text-decoration: none;
}

.point-link button {
    background-color: #7d2128;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    text-transform: uppercase;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.point-link button:hover {
    background-color: #5b5b5c;
    transform: translateY(-2px);
}

.home-flex-points h2 {
    border-bottom: 3px solid #7d2128;
    font-size: 18pt;
    margin-bottom: 10px;
    padding: 0 0 8px;
}

.home-flex-points p {
    font-size: 12pt;
    line-height: 1.55;
}

.video {
    aspect-ratio: 16 / 9;
    border: #7d2128 10px solid;
    display: block;
    height: auto;
    margin: 20px auto;
    max-width: none;
    width: 100%;
}

/* Ultrawide (21:9 a širší): 16/9 rámeček roztažený na celou šířku kontejneru
   je vyšší než obrazovka, takže se video nevejde. Na takto širokých
   viewportech ho proto omezíme podle výšky - šířku dopočítáme z 16/9, aby
   poměr stran zůstal zachovaný. Do 21:9 (běžné monitory, mobily) se nemění
   nic. */
@media screen and (min-aspect-ratio: 21 / 9) {
    .video {
        max-width: calc(85vh * 16 / 9);
    }
}

@media screen and (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }

    .home-flex-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media screen and (min-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(4, minmax(220px, 1fr));
    }

    #home-container{
        margin-top: 0;
    }

}

/* Upcoming Events Section */

#upcoming-events {
    margin: 48px 0 12px;
}

#upcoming-events h2 {
    margin-bottom: 24px;
}

#upcoming-events-container {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.upcoming-event-card {
    box-sizing: border-box;
    height: 100%;
    background-color: rgba(4, 5, 5, 0.78);
    border: 5px solid #7d2128;
    border-radius: 12px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upcoming-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.45);
}

.event-date {
    font-size: 18px;
    font-weight: 700;
    color: #c0414b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-time {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.event-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.event-title.training {
    color: #fff;
    border-left: 3px solid #ddd;
    padding-left: 12px;
}

.event-title.regular {
    color: #ffffff;
    border-left: 3px solid #7d2128;
    padding-left: 12px;
}

.event-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.event-link:hover .upcoming-event-card {
    background-color: rgba(4, 5, 5, 0.92);
}

@media screen and (max-width: 768px) {
    #upcoming-events-container {
        grid-template-columns: 1fr;
    }

    .upcoming-event-card {
        padding: 16px;
    }

    .event-title {
        font-size: 14px;
    }

    .event-date {
        font-size: 16px;
    }

    .event-time {
        font-size: 13px;
    }
}

/* Quick Info Pannels */

.QIP{
    max-width: 100%;
    min-width: 0;
}

.QIP .first-panel, .QIP .second-panel, .QIP .third-panel{
    background-color: rgba(4, 5, 5, 0.60);
    border: 3px solid;
    border-radius: 12px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
    margin: 20px 0;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 20px clamp(16px, 5vw, 24px);
    width: 100%;
}

.QIP .first-panel > p,
.QIP .second-panel > p,
.QIP .third-panel > p,
.QIP .day-lists,
.QIP ul{
    max-width: 100%;
}

.QIP .first-panel > p,
.QIP .second-panel > p,
.QIP .third-panel > p{
    margin-inline: auto;
}

.QIP p a{
    color: #7d2128;
    text-decoration: none;
}

.QIP .panel-footer{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.QIP .panel-footer ul{
    padding: 6px 0;
    margin: 0;
}

.QIP .panel-footer p{
    margin: 0;
}

.QIP .day-lists ul{
    padding: 4px 0;
    margin: 0;
}

.QIP .day-lists .panel-subhead{
    margin: 18px 0 4px;
}

.QIP .panel-subhead{
    font-weight: bold;
    line-height: 1.35;
}

.QIP .point-link{
    display: inline-block;
    margin-top: 12px;
}

.QIP img{
    width: 150px;
    height: auto;
}

.QIP ul{
    padding: 10px 0;
}

.QIP li{
    list-style-type: none;
    font-size: 10pt;
    font-weight: bold;
    line-height: 1.45;
}

@media screen and (max-width: 480px) {
    .QIP .first-panel,
    .QIP .second-panel,
    .QIP .third-panel {
        padding-inline: clamp(16px, 5vw, 22px);
    }

    .QIP h2 {
        font-size: clamp(1.3rem, 7vw, 1.65rem);
        line-height: 1.2;
        padding-top: 22px;
    }

    .QIP p {
        font-size: clamp(0.95rem, 4.5vw, 1rem);
        line-height: 1.55;
    }

    .QIP li {
        font-size: clamp(0.88rem, 4vw, 1rem);
    }

    .QIP img {
        max-width: min(150px, 46vw);
    }
}

@media screen and (min-width: 1200px) {
.QIP{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 40px;
    row-gap: 0;
    align-items: start;
}
.QIP .first-panel, .QIP .second-panel, .QIP .third-panel{
    /* Each panel is a subgrid spanning the 5 shared rows
       (image, heading, intro, bullets, footer) so that those rows
       line up across all three columns. */
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 5;
    width: auto;
    margin: 0;
    padding: 20px;
}

.QIP img{
    align-self: center;
    justify-self: center;
}

.QIP ul{
    align-self: start;
}

.QIP ul li{
    font-size: 14pt;
    padding: 3px 0;
}

}

/* Social Media Feed = SMF */

.social-feed {
    margin: 48px 0 12px;
}

.social-feed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    width: 100%;
}

.social-col {
    display: flex;
    flex-direction: column;
    background-color: rgba(4, 5, 5, 0.60);
    border: 3px solid #7d2128;
    border-radius: 12px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
    padding: 20px;
}

.social-col[hidden] {
    display: none;
}

.social-col-title {
    border-bottom: 3px solid #7d2128;
    font-size: 16pt;
    margin: 0 0 16px;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-col-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.social-col-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
}

.social-col-youtube .social-col-link:hover {
    color: #ff0000;
}

.social-col-instagram .social-col-link:hover {
    color: #e4405f;
}

.social-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 1 auto;
}

.social-card {
    display: flex;
    gap: 14px;
    align-items: center;
    background-color: rgba(4, 5, 5, 0.78);
    border: 1px solid rgba(125, 33, 40, 0.55);
    border-radius: 10px;
    padding: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.social-card:hover {
    transform: translateY(-3px);
    background-color: rgba(4, 5, 5, 0.92);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.4);
}

.social-card-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 128px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background-color: #111;
}

.social-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.social-card-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background-color: rgba(125, 33, 40, 0.92);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.social-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.social-card-source {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #c0414b;
}

.social-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.social-feed-empty {
    font-size: 13px;
    color: #fff;
    font-style: italic;
    padding: 6px 2px;
}

.social-feed-more {
    display: block;
    margin: 24px auto 12px;
    text-align: center;
    font-size: 12pt;
}

.social-feed-more-btn {
    background-color: #7d2128;
    color: #fff;
    display: block;
    width: fit-content;
    margin: 0 auto;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-feed-more-btn:hover {
    background-color: #9a2932;
    transform: translateY(-2px);
}

@media screen and (min-width: 1024px) {
    .social-feed-grid {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
}

/* Only YouTube present (Instagram disabled): single full-width column. The
   two-class selector wins over the media-query rule above regardless of order. */
.social-feed-grid.social-feed-grid--single {
    grid-template-columns: 1fr;
}
