﻿p {
    margin: 0;
}

.container {
    display: flex;
    gap: 40px;
    margin-top: 20px;
    align-items: flex-start;
    max-width: 1520px;
}

.left-panel {
    flex: 1;
    justify-content: center; /* хоризонтално */
    align-items: center; /* вертикално */
    min-height: 100%;
}

.right-panel {
    width: 700px;
    top: 40px;
    position: sticky !important;
    align-self: flex-start;
}

.search-form {
    display: grid;
    flex-wrap: wrap;
    gap: 15px;
    background-color: #f9f9f9;
}

    .search-form label {
        display: block;
        font-weight: bold;
        margin-bottom: 5px;
    }

    .search-form input,
    .search-form select {
        width: 100%;
        padding: 8px;
        font-size: 14px;
        border: 1px solid #ccc;
        border-radius: 4px;
        border-color: #760e26;
        height: 38px;
    }

    .search-form button,
    .search-form .clear-button {
        padding: 10px 16px;
        font-size: 14px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
        width: 113px;
    }

    .search-form button {
        background-color: #760e26;
        color: white;
        border: 1px solid #ccc;
        border-color: #760e26;
    }

        .search-form button:hover {
            background-color: #670000;
            transition: all 0.3s ease;
        }

    .search-form .clear-button {
        background-color: white;
        color: #760e26;
        text-decoration: none;
        display: inline-block;
        text-align: center;
        border: 1px solid #ccc;
        border-color: #760e26;
    }

        .search-form .clear-button:hover {
            background-color: #ebebeb;
            transition: all 0.3s ease;
        }

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

    .form-row.first-line > div {
        flex: 1;
        min-width: 180px;
    }

    .form-row.second-line {
        align-items: flex-end;
        justify-content: space-between;
        flex-wrap: wrap;
    }

.speciality {
    width: 485px;
}

table {
    width: 100%;
    border-collapse: separate;
    margin-top: 20px;
    border-spacing: 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
}

    table th {
        background-color: #f2e5e5;
        color: #760e26;
        font-weight: 600;
        border-bottom: 1px solid #760e26;
        text-align: center;
        padding: 7px;
    }

    table tbody tr:nth-child(even) {
        background-color: white;
        text-align: center;
    }

    table tbody td {
        padding: 7px;
        border-bottom: 1px solid #ccc;
        text-align: center;
    }

#formError {
    margin-top: 10px;
    color: red;
}

#map {
    height: 500px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
}

h2, h3 {
    margin-top: 0;
    color: #760e26;
    font-weight: bold;
    text-shadow: 2px 2px 4px #fff;
}



#user-map {
    text-align: center;
}


.profile-link {
    color: #760e26;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
}

    .profile-link:hover {
        color: #670000;
        transition: all 0.3s ease;
    }

#map {
    height: 500px;
    width: 700px;
}

.leaflet-control-attribution .leaflet-attribution-flag {
    display: none !important;
}

@media (max-width: 1024px) {
    .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .search-form {
        width: 100%;
        max-width: 600px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .search-form label,
    .search-form input,
    .search-form select {
        width: 100%;
        color: #760e26;
    }

    .search-form button,
    .search-form .clear-button {
        width: 100%;
    }

    table {
        width: 100%;
        overflow-x: auto;
    }

    #map {
        width: 100%;
        height: 400px;
        margin-top: 20px;
    }

    .right-panel {
        width: 100%;
        position: static !important;
    }

    .left-panel {
        width: 100%;
    }

    .button-group {
        align-items: center;
        margin: 0 auto;
    }

   
}


@media (max-width: 768px) {
    h3 {
        font-size: 18px;
    }

    .container {
        flex-direction: column;
        flex-wrap: wrap;
        padding: 0 10px;
    }

    .found-text {
        margin-left:105px;
    }

    .search-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

        .search-form label {
            font-size: 14px;
        }

        .search-form input,
        .search-form select {
            font-size: 14px;
            padding: 6px;
        }

    .form-row.first-line,
    .form-row.second-line {
        flex-direction: column;
        gap: 12px;
    }

    .speciality {
        width: 100%;
    }

    .search-form button,
    .search-form .clear-button {
        width: 100%;
        font-size: 14px;
    }

    table {
        font-size: 14px;
    }

    #map {
        height: 300px;
        width: 100%;
    }

    .map-wrapper {
        position: static;
        top: auto;
        margin-bottom: 20px;
    }
}

.login-reminder {
    background: #fff;
    padding: 1em;
    margin-bottom: 10px;
    border-radius: 8px;
    color: #760e26;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column; 
    align-items: center; 
    gap: 2em;
}

    .login-reminder a,
    .login-reminder p {
        display: inline-block;
        vertical-align: middle;
        margin: 0;
    }

    .login-reminder:hover {
        box-shadow: 0 4px 6px 2px rgba(0, 0, 0, 0.1);
        color: #760e26;
    }

@media (max-width: 740px) {
    .login-reminder {
        left: 50% !important;
        max-width: calc(100% - 20px);
        white-space: normal;
    }
}

.login-link {
    color: #760e26;
    font-weight: 600;
}

    .login-link:focus {
        outline: none;
    }

    .login-link:hover {
        color: #760e26;
    }

.found-text {
    font-weight: bold;
    color: #760e26;
}

.form-row.first-line label,
.form-row.second-line label {
    color: #760e26;
}

.not-logged-message {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    height: 100%; 
    text-align: center; 
}

.btn-primary {
    background-color: #760e26;
    color: white;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 10px;
}

    .btn-primary:hover {
        background-color: white;
        color: #760e26;
        border: 2px solid #760e26;
        box-shadow: 0 0 10px #760e26;
    }

    .btn-primary:focus, btn-primary:active {
        outline: none;
        box-shadow: none;
        border: 2px solid #800000;
        background-color: white;
        color: #760e26;
    }

@media (min-width: 820px) and (max-width: 1180px) {

    .search-form {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .form-row.first-line,
    .form-row.second-line {
        display: flex;
        justify-content: center;
        gap: 25px;
        width: 100%;
        flex-wrap: wrap;
    }

        .form-row.second-line .speciality {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            max-width: 320px; 
        }

            .form-row.second-line .speciality input {
                width: 100%;
                max-width: 320px; 
                text-align: center;
                padding: 8px 12px;
                border: 2px solid #760e26;
                border-radius: 8px;
                color: #760e26;
            }

    .button-group {
        display: flex;
        justify-content: center;
        gap: 15px;
        width: 100%;
        margin-top: 10px;
        margin-left:0px;
    }

    .search-form button,
    .search-form .clear-button {
        width: 45%;
        max-width: 200px;
    }

    .speciality {
        margin-right:500px;
    }

    .found-text {
        margin-left:385px;
    }

}

@media (min-width: 768px) and (max-width: 819px) {
    .search-form {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 280px;
        max-width: 600px;
        margin: 0 auto;
    }

    .form-row.first-line,
    .form-row.second-line {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        width: 100%;
    }

        .form-row.second-line .speciality {
            width: 100%;
            max-width: 280px;
            text-align: center;
        }

            .form-row.second-line .speciality input {
                width: 100%;
                padding: 8px 12px;
                border: 2px solid #760e26;
                border-radius: 8px;
                color: #760e26;
            }

    .button-group {
        display: flex;
        justify-content: center;
        gap: 15px;
        width: 150px;
        margin-top: 10px;
        margin-left:70px;
    }

    .found-text {
        margin: 0 auto;
        text-align: center;
    }

    .speciality {
        margin-right:500px;
    }

    .speciality label {
        margin-left:-90px;
    }

/*    @media (min-width: 820px) and (max-width: 1180px) {
        .found-text {
            position: relative;
            right:70px;
            margin-top: 15px;
            text-align: left;
        }
    }*/



}
