/* ============================================================
   MTSZ Ranglista – Public page styles
   Matches triatlon.hu visual identity
   ============================================================ */

/* ---- Ranglista táblázat: sticky fejléc + sticky első 2 oszlop ---- */
.rankings-scroll {
    max-height: 75vh;
    overflow: auto;
}

/* Sticky fejlécsor */
.rankings-table .sticky-thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background-color: #212529; /* Bootstrap table-dark */
}

/* Sticky # oszlop */
.rankings-table .sticky-col-1 {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: #fff;
    box-shadow: 2px 0 4px rgba(0,0,0,0.08);
}

/* Sticky Név oszlop */
.rankings-table .sticky-col-2 {
    position: sticky;
    left: 50px;
    z-index: 2;
    background-color: #fff;
    box-shadow: 3px 0 6px rgba(0,0,0,0.1);
}

/* Fejlécben sticky oszlopok: kék háttér */
.rankings-table .sticky-thead .sticky-col-1,
.rankings-table .sticky-thead .sticky-col-2 {
    z-index: 4;
    background-color: #212529;
}

/* Hover állapot */
.rankings-table tbody tr:hover .sticky-col-1,
.rankings-table tbody tr:hover .sticky-col-2 {
    background-color: #f8f9fa;
}

/* ---- Body override ---- */
body.public-page {
    background-color: #ffffff;
    font-family: 'Ubuntu', 'Segoe UI', system-ui, sans-serif;
}

body.public-page main.container-fluid {
    max-width: 1400px;
    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ---- Shared container (topbar aligned to page content) ---- */
.pub-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
}

/* ---- Navbar inner container ---- */
.pub-navbar .pub-nav-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* ---- Top info bar ---- */
.pub-topbar {
    background-color: #2e3192;
    padding: 6px 0;
    font-size: 0.78rem;
    line-height: 1;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.pub-topbar .pub-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.pub-topbar-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.pub-topbar-left a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pub-topbar-left a:hover { color: #fff; }

.pub-topbar-sep {
    color: rgba(255,255,255,0.25);
    margin: 0 12px;
}

.pub-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pub-topbar-right a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s;
}

.pub-topbar-right a:hover { color: #fff; }

.pub-topbar-right a.pub-topbar-admin {
    color: rgba(255,255,255,0.35);
    font-size: 1rem;
    margin-left: 4px;
}

.pub-topbar-right a.pub-topbar-admin:hover {
    color: rgba(255,255,255,0.7);
}

/* ---- Main navigation bar ---- */
.pub-navbar {
    background-color: #2e3192 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.pub-navbar .navbar-brand {
    display: flex;
    align-items: center;
    padding: 12px 0;
    text-decoration: none;
}

.pub-navbar .navbar-brand img {
    height: 52px;
    width: auto;
    filter: none; /* colored logo */
}

/* ---- Mobile toggler ---- */
.pub-toggler {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
}

.pub-toggler-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.9);
    position: relative;
}

.pub-toggler-icon::before,
.pub-toggler-icon::after {
    content: '';
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.9);
    position: absolute;
    left: 0;
}

.pub-toggler-icon::before { top: -7px; }
.pub-toggler-icon::after  { top:  7px; }

/* ---- Nav collapse (desktop: flex row, mobile: hidden/shown) ---- */
.pub-nav-collapse {
    display: flex;
    align-items: center;
    flex: 1;
}

.pub-navbar .nav-link {
    color: rgba(255,255,255,0.92) !important;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 1.4rem 1.0rem !important;
    border-bottom: none;
    border-radius: 0;
    transition: none;
    text-decoration: none;
    display: block;
}

.pub-navbar .nav-link:hover {
    color: #ffffff !important;
    background-color: transparent;
}

.pub-navbar .nav-link.active {
    color: #ffffff !important;
    background-color: transparent;
}


/* ---- Page title (public) ---- */
body.public-page .page-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a237e;
}

/* ---- Filter card (public) ---- */
body.public-page .card {
    border-radius: 10px;
}

body.public-page .card-header {
    background-color: #fff;
    border-bottom: 2px solid #e8eaf6;
}

body.public-page .card-header h5,
body.public-page .card-header h6 {
    font-weight: 700;
    color: #1a237e;
}

/* ---- Public footer ---- */
.pub-footer {
    background-color: #2e3192;
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 0;
    margin-top: 3rem;
    font-size: 0.83rem;
    line-height: 1.65;
}


.pub-footer a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.15s;
}
.pub-footer a:hover { color: #fff; }

/* Logo */
.pub-footer .footer-logo-img {
    width: 130px !important;
    height: auto !important;
    display: block;
}

/* Store ikonok */
.pub-footer .footer-store-link {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.65);
    line-height: 1;
    transition: color 0.15s;
}
.pub-footer .footer-store-link:hover { color: #fff; }

/* Közép oszlop fejléc */
.pub-footer .footer-org-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
}

/* Jobb oszlop "ÁSZF" fejléc */
.pub-footer .footer-section-heading {
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.65rem;
}

/* ÁSZF / GDPR linkek – türkiz, mint triatlon.hu-n */
.pub-footer .footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pub-footer .footer-links-list li {
    margin-bottom: 0.45rem;
}
.pub-footer .footer-links-list a {
    color: #6dc8e8;
    font-size: 0.83rem;
}
.pub-footer .footer-links-list a:hover { color: #fff; }

/* Copyright sáv alul */
.pub-footer .footer-copyright {
    margin-top: 2.5rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.78rem;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .pub-toggler {
        display: block;
    }
    .pub-navbar {
        position: relative;
    }
    .pub-nav-collapse {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #2e3192;
        z-index: 1050;
        box-shadow: 0 6px 16px rgba(0,0,0,0.3);
        padding: 0.5rem 1.5rem 1rem;
    }
    .pub-nav-collapse.pub-open {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    .pub-navbar .navbar-nav {
        width: 100%;
        flex-direction: column;
    }
    .pub-navbar .nav-link {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
    }
    .pub-navbar .nav-link:last-child {
        border-bottom: none;
    }
    .pub-navbar .nav-link.active,
    .pub-navbar .nav-link:hover {
        background-color: transparent;
    }
    .pub-topbar-left,
    .pub-topbar-right {
        font-size: 0.72rem;
    }
}

@media (max-width: 576px) {
    .pub-topbar-sep,
    .pub-topbar-right {
        display: none;
    }
}
