/* -------------------- PDF SECTION -------------------- */
#pdf-section {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

#pdf-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

/* -------------------- PDF BUTTONS -------------------- */
.pdf-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.pdf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.pdf-buttons button {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    background: #2b7cff;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.pdf-buttons button:hover { 
    background: #1d5fd3; 
}

#competition-content {
  margin-bottom: 1.5em;
}

#competition-content u {
  text-decoration: underline;
  cursor: pointer;
}

.mark-link {
  text-decoration: none;
  color: inherit;
}

.mark-link mark {
  background: #fff3b0;
  border-radius: 4px;
  padding: 0.1em;
  display: inline-block;  /* aby margin fungoval */
  margin: 0 0.2em 0.3em 0; /* medzera medzi mark horizontálne aj vertikálne */
  vertical-align: baseline; /* vyrovnávanie riadkov */
}

@media (prefers-color-scheme: dark) {
  .mark-link mark {
    background: rgba(255, 198, 99,0.7);
  }
}

/* -------------------- DOWNLOAD BUTTONS -------------------- */
.download-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    background: #34c759;
    color: white;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.download-btn:hover { 
    background: #28a745; 
}

/* -------------------- PDF CONTAINER -------------------- */

#pdf-container {
    width: 100%;
    max-width: 900px;
    max-height: 80vh;
    margin: 0 auto 2rem auto;
    border: 2px solid #ccc;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
}

#pdf-container canvas {
    display: block;
    margin: 1rem 0;
    width: auto;
    height: auto;
    max-width: 80%;
}

#pdf-section p {
  margin-bottom: 0.7em;
}

@media (max-width: 768px) {
    #pdf-container {
        max-height: 80vh;
    }
    #pdf-container canvas {
        max-width: 110%;
    }
}
    
/* -------------------- Galéria -------------------- */
.gallery {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    width: 100%;
    text-align: center;
}

.gallery .gallery-item {
    width: 400px;
    max-width: 90%;
    aspect-ratio: 1.06/1;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.4s ease;
    flex-shrink: 0;
}

.gallery .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

/* -------------------- Lightbox -------------------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 999;
    flex-direction: column;
    touch-action: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 36px;
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
}

.close:hover {
    background: rgba(0,0,0,0.5);
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 992px) {
    .pdf-buttons {gap: 1rem;}
    .pdf-buttons button { font-size: 14px; padding: 12px 24px;}
    .download-btn { font-size: 14px; padding: 10px 20px; }
}

@media (max-width: 659px) {
    .pdf-item { gap: 0.5rem; width: 100%; }
    .pdf-buttons { flex-direction: column; gap: 0.6rem; }
    .pdf-buttons button, .download-btn { width: 90%; text-align: center; }
}
