@font-face {
    font-family: "SansSerif";
    src: url("media/sansserif.ttf");
}

/* Windows 95 стиль */
body {
    font-family: 'SansSerif', sans-serif;
    background-color: #007577; /* Classic Win95 teal */
    margin: 0;
    padding: 0;
    color: #000;
    line-height: 1.4;
}

/* Окно сайта (имитация рабочего стола) */
body > * {
    max-width: 1000px;
    margin: 20px auto;
    background: #c0c0c0;
    border: 2px solid #000;
    align-content: center;
    box-shadow: 
        2px 2px 0 #fff, 
        -2px -2px 0 #808080,
        2px -2px 0 #dfdfdf,
        -2px 2px 0 #808080;
    padding: 4px;
}

/* Заголовок (синяя полоса Win95) */
header {
    background: #000080;
    color: white;
    align-self: center;
    padding: 6px 10px;
    margin: -4px -4px 0 -4px;
    border-bottom: 2px solid #000;
}

header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

/* Навигация (кнопки Win95) */
nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: flex;
    gap: 5px;
}

nav ul li a {
    display: inline-block;
    padding: 6px 12px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    text-decoration: none;
    color: #000;
    font-size: 14px;
}

nav ul li a:hover {
    background: #dfdfdf;
}

nav ul li a:active {
    border-color: #808080 #fff #fff #808080;
}

/* Основное содержимое (белый фон с серой рамкой) */
main {
    background: #fff;
    border: 2px solid #808080;
    margin: 10px;
    padding: 10px;
}

section {
    margin-bottom: 20px;
}

h2 {
    font-size: 16px;
    margin: 0 0 10px 0;
    color: #000080;
    font-weight: bold;
}

p {
    margin: 0 0 10px 0;
    font-size: 14px;
}

/* Подвал (серая полоса) */
footer {
    background: #c0c0c0;
    padding: 6px 10px;
    border-top: 2px solid #808080;
    font-size: 12px;
    text-align: center;
}

/* Списки в стиле Win95 */
ul {
    padding-left: 20px;
    margin: 10px 0;
}

ul li {
    margin-bottom: 5px;
}

/* Эффект "нажатой кнопки" */
.button-pressed {
    border-color: #808080 #fff #fff #808080 !important;
    position: relative;
    top: 1px;
    left: 1px;
}

/* Стили для галереи документов */
.win95-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    padding: 10px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    margin: 15px 0;
}

.win95-document {
    background: #c0c0c0;
    cursor: pointer;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    padding: 4%;
    text-align: center;
    transition: all 0.3s;
}

/*.win95-document:hover {
    background: #dfdfdf;
    transform: scale(2.0);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}*/

.win95-document a {
    text-decoration: none;
    color: #000;
    display: block;
}

.win95-document img {
    width: 90%;
    height: 100%;
    object-fit: contain;
    border: 1px solid #808080;
    background: white;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.win95-document:hover {
    background: #dfdfdf;
    transform: scale(1.1);

    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.win95-document span {
    display: block;
    font-size: 12px;
    word-break: break-word;
    /*background: #c0c0c0;*/
    padding: 3px;
    /*border: 1px solid #808080;*/
}

/* Стили для галереи документов */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: none;
    background-color: rgba(0, 0, 0, 0.0); /* Прозрачный фон */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: none;
    z-index: 9999;
}

.overlay.hidden {
    display: none;
}

.popup {
    position: relative;
    background: none; /* Убираем фон */
    border: 2px solid #000;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.popup img {
    max-width: 100%;
    max-height: 80vh;
    margin-bottom: 10px;
    border: none; /* Убираем границу */
}


.close-btn, .download-btn {
    position: absolute;
    top: 5px;
    background: #c0c0c0;
    border: 2px solid #fff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    font-family: "SansSerif", sans-serif;
    font-size: 13px;
    padding: 2px 8px;
    cursor: pointer;
    text-decoration: none;
    color: black;
}

.close-btn {
    right: 5px;
    top: 4px;
    height: 27px;
}


.close-btn {
    right: 5px;
    top: 4px;
    height: 27px;
}

.download-btn {
    right: 40px;
}

.map
{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    margin: 15px 0;
}

.map img
{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
}


/* Центрирование основного контента */
body > * {
    box-sizing: border-box;
}

main, header, footer {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .win95-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .popup img {
        max-height: 50vh;
    }
}

