/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    padding: 0; /*  Убрал padding с body, чтобы header и footer прилегали к краям */
}

/* Стили для header */
header {
    background-color: #333;
    color: #fff;
    margin-bottom: 20px; /*  Уменьшил padding */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .container .logo {
    float: left; /* Выравнивание по левому краю */
    max-width: 100px;
    max-height: 100px;
    margin: 10px 0 10px 20px;
}

header h1 {
    margin: 0; /*  Убрал отступ снизу у h1 в header */
    font-size: 1.5em; /*  Уменьшил размер шрифта */
}

header nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    margin-right: 20px;
}

header nav a:hover {
    text-decoration: underline;
}

div img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* Стили для main */
main {
    padding: 0;
    margin: 0;
    flex: 1;
}

/* Стили для footer */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 10px 10px 0;
    font-size: 0.8em;
    margin-top: 20px;

}

.container {
    max-width: 800px; /* Уменьшил ширину для лучшего вида в одну колонку */
    width: min(800px, 100%);
    margin: 0 auto;
}

.container h1 {
    text-align: center;
    width: auto;
}

/*  Стили для enterprise-list и enterprise-card (как в предыдущем ответе) */
.enterprise-list {
    display: flex;
    flex-direction: column; /* Располагаем элементы вертикально */

}

.enterprise-card {
    background-color: #fff;
    margin: 10px;
    padding: 20px 20px 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.enterprise-card:hover {
    transform: scale(1.02);
}

.enterprise-card h2 {
    color: #1db018;
    margin-bottom: 10px;
}

.enterprise-card p {
    margin-bottom: 10px;
}

.enterprise-card a {
    display: inline-block;
    background-color: #1db018;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.enterprise-card a:hover {
    background-color: #14790f; /*немного затемнил цвет при наведении*/
}

.twogis-button {
    display: inline-block;
    background-color: #1db018;
    font-size: 1em;
    color: #fff;
    padding: 15px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: rgba(0, 0, 0, 0);
}

.twogis-button:hover {
    background-color: #14790f;
}

.pop-up {
    position: fixed;
    top: -100vh; left: 0;
    width: 100%; height: 100%;
    transition: top 0ms ease-in-out 300ms;
}

.pop-up .overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 100ms ease-in-out 200ms;
}

.pop-up .content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 800px;
    background: #fff;
    border-radius: 25px;
    opacity: 0;
    box-shadow: 0 2px 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 300ms ease-in-out;
}

.pop-up .content .main-content {
    padding: 0 25px 25px 25px;
    overflow: auto;
}

.pop-up .content .photo-block {
    opacity: 0;
    height: 0;
    max-width: 100%;
    max-height: 40vh;
    display: flex;
    justify-content: center;
    overflow: hidden;
    border-radius: 25px 25px 0 0;
}

.pop-up .content .photo-block img {
    height: 100%; width: 100%;
    overflow: hidden;
}

.pop-up .content h2 {
    margin: 10px 0;
    font-size: 25px;
    color: #111;
    text-align: center;
}

.pop-up .content p {
    margin: 15px 0;
    color: #222;
    font-size: 16px;
}

.pop-up .content .controls {
    display: flex;
    justify-content: space-between;
    margin: 10px 0 0;
}

.pop-up .content .controls button {
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 15px;
    border-radius: 20px;
    cursor: pointer;
}

.pop-up .content .controls .close-btn {
    background: transparent;
    color: #1db018;
}

.pop-up.active {
    top: 0;
    transition: top 0ms ease-in-out 0ms;
}

.pop-up.active .overlay {
    opacity: 1;
    transition: all 300ms ease-in-out;
}

.pop-up.active .content {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.pop-up .content .photo-block.active {
    opacity: 1;
    height: 100%;
}
