/* ============================================================
   Tipsport Press Cup – custom CSS (Bootstrap 5 overrides)
   Barvy: primary #ff7800 | dark #4c4c4c | text #757575
   ============================================================ */

:root {
    --pc-orange:   #ff7800;
    --pc-orange2:  #ff6100;
    --pc-dark:     #4c4c4c;
    --pc-gray:     #757575;
    --pc-lightbg:  #f5f5f5;
    --pc-border:   #e0e0e0;
    --pc-blue:     #4064b8;
}

/* ---- Globální ---- */
body {
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 0.92rem;
    color: var(--pc-dark);
    background: #e8e8e8;
}

/* ---- Navbar ---- */
.navbar-presscup {
    background: #fff;
    border-bottom: 3px solid var(--pc-orange);
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.navbar-presscup .navbar-brand img {
    max-height: 38px;
}

.navbar-presscup .navbar-brand span {
    color: var(--pc-dark);
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.2;
}

.navbar-presscup .nav-link {
    color: var(--pc-dark) !important;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: .35rem .6rem !important;
    border-left: 3px solid transparent;
    transition: all .15s;
}

.navbar-presscup .nav-link:hover,
.navbar-presscup .nav-link.active {
    color: #fff !important;
    background: var(--pc-dark);
    border-left-color: var(--pc-orange);
}

/* ---- Hero inner – nadpis vlevo, záložky vpravo ---- */
.pc-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ---- Subnav záložky vpravo v hero ---- */
.pc-subnav-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: flex-end;
}

.pc-subnav-tabs a {
    display: inline-block;
    background: rgba(255,255,255,.12);
    color: #ddd;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    padding: .35rem 1rem;
    border-radius: 3px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: all .12s;
}

.pc-subnav-tabs a:hover {
    background: rgba(255,255,255,.25);
    color: #fff;
    border-bottom-color: var(--pc-orange);
}

.pc-subnav-tabs a.active {
    background: var(--pc-orange);
    color: #fff;
    border-bottom-color: #c55a00;
}

@media (max-width: 576px) {
    .pc-hero-inner { flex-direction: column; align-items: flex-start; }
    .pc-subnav-tabs { justify-content: flex-start; }
}

.navbar-toggler {
    border-color: var(--pc-orange);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ff7800' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---- Hero / hlavička stránky ---- */
.pc-hero {
    background: linear-gradient(135deg, var(--pc-dark) 0%, #2a2a2a 100%);
    color: #fff;
    padding: 2.5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.pc-hero::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 350px;
    height: 350px;
    background: var(--pc-orange);
    opacity: .07;
    border-radius: 50%;
}

.pc-hero h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pc-orange);
    margin: 0;
}

.pc-hero p {
    color: #ccc;
    margin: .3rem 0 0;
    font-size: .9rem;
}

/* ---- Infobox (datum, místo…) ---- */
.pc-infobox {
    background: var(--pc-orange);
    color: #fff;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    font-size: .85rem;
}

.pc-infobox strong {
    display: inline-block;
    min-width: 130px;
}

/* ---- Vítězi box ---- */
.pc-winners {
    background: #fff;
    border: 1px solid var(--pc-border);
    border-top: 3px solid var(--pc-blue);
    border-radius: 6px;
    padding: 1rem 1.2rem;
    font-size: .87rem;
}

.pc-winners h4 {
    color: var(--pc-blue);
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: .6rem;
}

/* ---- Menu sidebar (desktop) ---- */
.pc-sidebar-menu .list-group-item {
    border-left: 4px solid #ccc;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--pc-dark);
    padding: .5rem .8rem;
    margin-bottom: 2px;
    border-radius: 0 !important;
    transition: all .15s;
}

.pc-sidebar-menu .list-group-item:hover,
.pc-sidebar-menu .list-group-item.active {
    background: var(--pc-dark);
    color: #fff;
    border-left-color: var(--pc-orange);
}

/* ---- Hlavní obsah ---- */
.pc-content {
    background: #fff;
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.pc-content h2 {
    color: var(--pc-orange);
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid var(--pc-border);
    padding-bottom: .4rem;
    margin-bottom: 1rem;
}

.pc-content h3 {
    color: var(--pc-dark);
    font-size: .95rem;
    font-weight: 700;
    margin-top: 1.2rem;
}

.pc-content p {
    color: var(--pc-gray);
    text-align: justify;
    line-height: 1.6;
}

.pc-content a {
    color: var(--pc-orange);
    text-decoration: none;
}

.pc-content a:hover {
    color: #000;
}

/* ---- Výsledky – přepínač roků ---- */
.pc-year-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: 1rem;
}

.pc-year-tabs a {
    background: var(--pc-lightbg);
    border: 1px solid var(--pc-border);
    color: var(--pc-dark);
    padding: .2rem .6rem;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .15s;
}

.pc-year-tabs a:hover,
.pc-year-tabs a.active {
    background: var(--pc-orange);
    border-color: var(--pc-orange);
    color: #fff;
}

/* ---- Výsledky – obsah ---- */
.pc-results-content {
    font-family: 'Courier New', Courier, monospace;
    font-size: .82rem;
    color: var(--pc-gray);
    white-space: pre-wrap;
    background: var(--pc-lightbg);
    border: 1px solid var(--pc-border);
    border-radius: 4px;
    padding: 1rem;
    line-height: 1.5;
}

/* ---- Galerie ---- */
.pc-gallery-header {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.pc-gallery-count {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--pc-gray);
    background: var(--pc-lightbg);
    border: 1px solid var(--pc-border);
    border-radius: 20px;
    padding: .2rem .7rem;
}

.pc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: .5rem;
}

.pc-gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    aspect-ratio: 4 / 3;
    background: var(--pc-dark);
    text-decoration: none;
    animation: galleryIn .35s ease both;
    animation-delay: calc(var(--i, 0) * 35ms);
}

@keyframes galleryIn {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}

.pc-gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.pc-gallery-item:hover img {
    transform: scale(1.08);
}

.pc-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.72) 0%,
        rgba(0,0,0,.15) 55%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease;
}

.pc-gallery-item:hover .pc-gallery-overlay {
    opacity: 1;
}

/* Zoom ikona – CSS only */
.pc-gallery-zoom {
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transform: scale(.7);
    transition: transform .25s ease;
}

.pc-gallery-zoom::before,
.pc-gallery-zoom::after {
    content: '';
    position: absolute;
    background: rgba(255,255,255,.85);
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pc-gallery-zoom::before { width: 14px; height: 2px; }
.pc-gallery-zoom::after  { width: 2px;  height: 14px; }

.pc-gallery-item:hover .pc-gallery-zoom {
    transform: scale(1);
}

.pc-gallery-caption {
    position: absolute;
    bottom: .55rem;
    left: .55rem;
    right: .55rem;
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,.9);
    line-height: 1.3;
    transform: translateY(5px);
    transition: transform .25s ease;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pc-gallery-item:hover .pc-gallery-caption {
    transform: translateY(0);
}

/* ---- Účastníci – tabulka ---- */
.pc-players-table {
    font-size: .85rem;
}

.pc-players-table thead th {
    background: var(--pc-dark);
    color: #fff;
    border: none;
    font-weight: 600;
}

.pc-players-table tbody tr:hover {
    background: #fff8f3;
}

/* ---- Sponzoři ---- */
.pc-sponsors {
    background: #fff;
    border-top: 2px solid var(--pc-border);
    padding: 2rem 0;
}

.pc-sponsors h2 {
    color: var(--pc-gray);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.pc-sponsor-group h3 {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    border-bottom: 1px dotted var(--pc-border);
    padding-bottom: .3rem;
    margin-bottom: .8rem;
    padding-left: 1.5rem;
    background: url('img/shift.gif') no-repeat left center;
}

.pc-sponsor-logo {
    max-height: 55px;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter .2s;
}

.pc-sponsor-logo:hover {
    filter: grayscale(0%);
}

/* ---- Footer ---- */
.pc-footer {
    background: var(--pc-dark);
    color: #d2d2d2;
    font-size: .75rem;
    text-align: right;
    padding: .8rem 1.5rem;
}

.pc-footer a {
    color: #eaeaea;
    text-decoration: none;
}

.pc-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ---- Admin – přihlášení ---- */
.pc-login-card {
    max-width: 400px;
    margin: 5rem auto;
}

/* ---- Utility ---- */
.text-orange { color: var(--pc-orange) !important; }
.bg-orange   { background-color: var(--pc-orange) !important; }
.border-orange { border-color: var(--pc-orange) !important; }

.btn-orange,
.pc-content .btn-orange,
a.btn-orange {
    background: var(--pc-orange);
    color: #fff !important;
    border: none;
}
.btn-orange:hover,
.pc-content .btn-orange:hover,
a.btn-orange:hover {
    background: var(--pc-orange2);
    color: #fff !important;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .pc-hero h1 { font-size: 1.3rem; }
    .pc-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .pc-content { padding: 1rem; }
}
