/* ==========================================
   VLASTNÍ STYLY - NOVÁ VES
   ========================================== */

/* Definice hlavních barev z loga */
:root {
    --brand-dark: #2A2454; /* Temně modro-fialová z vašeho loga */
    --brand-gradient: linear-gradient(135deg, #ffc107 0%, #e21e80 100%);
    --white: #ffffff;
    --ruzova: #e1005e;
    --tmavemodra: #1d1f40;   
}

/* Typografie */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #4a4a4a; /* Jemnější šedá pro čtení */
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--brand-dark);
}

.text-brand-dark {
    color: var(--brand-dark) !important;
}

.text-brand-white {
    color: #ffffff !important;
}


/* Grafický přechod (žlutá do růžové) */
.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Proužek nahoře */
.top-stripe {
    height: 6px;
    width: 100%;
    background: #db2825;
background: linear-gradient(90deg, rgba(219, 40, 37, 1) 0%, rgba(153, 224, 247, 1) 50%, rgba(0, 66, 247, 1) 100%);
}

.top-stripe-nav {
    height: 1px;
    width: 100%;
    background: #db2825;
background: linear-gradient(90deg, rgba(219, 40, 37, 1) 0%, rgba(153, 224, 247, 1) 50%, rgba(0, 66, 247, 1) 100%);
}

.bg-blue {
background-color: #2A2454;
}

.hero-bg {
    position: relative;
    background-image: url('../assets/kandidati.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(42, 36, 84, 0.95) -100%, rgba(42, 36, 84, 0.6) 50%, transparent 100%); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* Tento z-index drží text bezpečně NAD tmavým filtrem */
}

/* Tlačítka */
.btn-gradient {
    background: var(--brand-gradient);
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(226, 30, 128, 0.3);
    color: #ffffff;
}

.btn-outline-dark {
    background: var(--brand-dark);
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-outline-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(226, 30, 128, 0.3);
    color: #ffffff;
}

.btn-outline-dark2 {
    background: #ffffff;
    color: var(--brand-dark) !important;
    border: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-outline-dark2:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 16px rgba(226, 30, 128, 0.3);
    background: #ffffff;
    color: var(--brand-dark) !important;
}

/* Karty (Naše práce) s profi stínem */
.pro-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 1rem;
    padding: 2.5rem;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.pro-card:hover {
    box-shadow: 0 15px 30px rgba(42, 36, 84, 0.08); /* Stín v barvě loga */
    border-color: #2A2454;
    transform: translateY(-5px);
}

/* Iframe obal pro dotazník */
.iframe-wrapper {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

/* Responzivní Google Form */
.google-form {
    width: 100%;
    border: none;
    height: 1200px; /* Výchozí výška pro mobily */
}

@media (min-width: 768px) {
    .google-form {
        height: 1000px; /* Výška pro tablety a PC */
    }
} /* TATO ZÁVORKA ZPŮSOBOVALA CHYBU V MINULÉM KÓDU */

/* --- HERNÍ KONTEJNER --- */
#game-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto; 
    aspect-ratio: 1 / 1;
    background-color: #e9eafe; /* Jemně fialkové pozadí hry */
    border: 4px solid var(--brand-dark);
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.hud {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: none;
    justify-content: space-between;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--brand-dark);
    pointer-events: none;
    z-index: 5;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

#start-screen, #game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    text-align: center;
}

#start-screen {
    background-color: rgba(42, 36, 84, 0.85); /* Tmavý průhledný překryv (barva loga) */
    justify-content: center;
    z-index: 10;
}

#game-over-screen {
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 20;
    display: none;
    justify-content: flex-start;
    padding: 30px 20px;
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 480px; /* Ideální výška pro fotku i text */
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,1);
}

/* Karta se otočí při najetí myší (na PC) nebo kliknutí (na mobilu) */
.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden; 
}

.flip-card-front {
    background-color: #fff;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Jméno na přední straně fotky */
.flip-card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(42, 36, 84, 0.95), transparent);
    color: white;
    padding: 60px 20px 20px 20px;
    text-align: left;
}

.flip-card-name h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
}

.flip-card-name p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.flip-card-back {
    background-color: var(--white);
    color: var(--brand-dark);
    transform: rotateY(180deg);
    padding: 25px;
    overflow-y: auto; 
    display: flex;
    flex-direction: column;
}

.flip-card-back h4 {
    color: var(--brand-dark); /* Pirátská/Bílinská žlutá na nadpisy */
    font-size: 1rem;
    font-weight: 700;
    margin-top: 15px;
    margin-bottom: 5px;
}

.flip-card-back p {
    color: var(--brand-dark);
    font-size: 0.9rem;
    margin-bottom: 3px;
    line-height: 1.4;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Úprava posuvníku uvnitř karty */
.flip-card-back::-webkit-scrollbar {
    width: 6px;
}
.flip-card-back::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.program-item {
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.program-item:hover {
    border-color: var(--brand-dark);
    box-shadow: 0 8px 25px rgba(42, 36, 84, 0.08) !important;
}

.program-toggle {
    cursor: pointer;
    transition: color 0.2s ease;
}

.program-toggle:hover {
    color: #e0014d !important;
}

.program-toggle:focus {
    outline: none;
}

/* Animace šipky */
.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.toggle-iconKor {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}


.toggle-icon.rotate {
    transform: rotate(180deg);
}

/* Jemné podbarvení při rozbalení */
.program-content {
    border-top: 1px dashed #eaeaea;
    background-color: #fcfcfc;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.multichoice-container {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    padding: 15px;
    text-align: left;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #4a4a4a;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 4px;
    transform: scale(1.3);
    accent-color: var(--brand-dark); /* Bílinská tmavá */
}

.news-ticker-wrapper {
    background-color: #2A2454; /* Tmavě modrá z vaší palety */
    color: #fff;
    padding: 10px 0;
    overflow: hidden; /* Skryje text, když vyjede mimo obrazovku */
    white-space: nowrap; /* Zakáže zalamování na další řádky */
    position: relative;
    width: 100%;
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); /* Lehký stín pod lištou */
}

/* Vnitřní kontejner, který reálně "jede" */
.news-ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%; /* Na začátku odsadí text až za pravý okraj obrazovky */
    animation: ticker 25s linear infinite; /* 25s je rychlost (čím víc, tím pomaleji) */
}

/* Zastavení animace, když na ni uživatel najede myší (aby si to mohl přečíst) */
.news-ticker-content:hover {
    animation-play-state: paused; 
}

/* Samotná animace - posun přesně o 100% délky textu doleva */
@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Vzhled jednotlivých zpráv za sebou */
.news-ticker-item {
    display: inline-block;
    margin-right: 60px; /* Mezera mezi jednotlivými nadpisy */
}

/* Odkaz v liště */
.news-ticker-item a {
    color: #fff;
    text-decoration: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.news-ticker-item a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Červeno-růžový štítek "AKTUÁLNĚ" */
.news-badge {
    background: linear-gradient(90deg, rgba(219, 40, 37, 1) 0%, rgba(153, 224, 247, 1) 50%, rgba(0, 66, 247, 1) 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-right: 12px;
    vertical-align: middle;
}