/* =================== ÜLDISED =================== */
body {
    font-family: Arial;
    padding: 20px;
}

h2 {
    font-size: 28px;
    margin: 50px 0 15px;
    font-weight: 700;
}

h2 a {
    color: #1581e6ff;
    text-decoration: underline;
}
h2 a:hover {
    color: #f13bf1ff;
    text-decoration: underline;
}

.clear {
    clear: both;
    margin-bottom: 30px;
}

/* =================== PILTIDE GALERII =================== */
.gallery-item {
    width: 210px;
    height: 170px;
    margin: 10px;
    float: left;
    text-align: center;
    font-size: 13px;
}

.gallery-item img {
    max-width: 100%;
    max-height: 170px;
    object-fit: contain;
    border: 1px solid #ccc;
    background: #fff;
}

.filename {
    margin-top: 5px;
    color: #333;
    word-wrap: break-word;
}

/* ==================== FAILID ERALDI RIBANA ==================== */
.other-grid {
    margin-top: 15px;
    padding: 10px;
    background: #f7f7f7;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 70%;
}

/* Klikitav failikast (PDF/ZIP/DWG jne) */
.other-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 14px;
    background:#ffffff;
    border-radius: 4px;
    border:1px solid #ddd;
    color:#333;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    cursor:pointer;
    white-space: nowrap;
}

/* Hover efekt */
.other-item:hover {
    background:#e9f3ff;
    transform: translateY(-1px);
}

/* Ikoon */
.file-icon {
    font-size: 20px;
}

/* Failinimi */
.file-name {
    font-size: 12px;
    color:#333;
    word-break: break-word;
}
/* Hover efekt */
.other-item:hover {
    background:#e9f3ff;
    transform: translateY(-1px);
}

/* Ikoon failinime ees */
.file-icon {
    font-size: 20px;
}

/* Failinimi */
.file-name {
    word-break: break-word;
    font-size: 12px;
    color:#333;
}

/* =================== LIGHTBOX =================== */
#lb-overlay {
    position: fixed;
    top:0;left:0;right:0;bottom:0;
    background: rgba(0,0,0,.9);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

#lb-overlay .nav {
    cursor:pointer;
    color:white;
    font-size:42px;
    padding:20px;
    user-select:none;
}

.lb-container img {
    max-height:90vh;
    max-width:90vw;
    display:block;
}

#lb-video {
    max-height:90vh;
    max-width:90vw;
    display:none;
    background:#000;
}

.lb-hint {
    color:white;
    text-align:center;
    margin-top:6px;
    font-size:14px;
    opacity:0.8;
}

#lb-img {
    background-color: white;
}

.lb-container {
    background-color: white;
    padding: 10px; /* Valikuline: jätab pildi ümber väikse valge raami */
    border-radius: 5px; /* Valikuline: teeb nurgad pehmemaks */
}