:root {
    --primary-color: #2d62bd;
    --secondary-color: #0080ff;
    --background-color: white;
    --text-color: black;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --gold-shadow: rgba(243, 208, 8, 0.5);
    --border-radius: 20px;
    --gap: 30px;
    --image-size: 150px;
    --image-size-small: 100px;
    --font-size-small: 0.9rem;
    --font-size-medium: 1.2rem;
    --font-size-large: 2.4rem;
}

/* Общие стили для карточек */
.main-block {
    margin: 0 auto;
    max-width: 710px;
    box-shadow: 0 0 10px var(--gold-shadow) !important;
}

.blocks-staff {
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: var(--gap);
    margin: 35px auto;
    max-width: 1200px;
}

.blocks-staff .block-staff,
.director-block-staff {
    border-radius: var(--border-radius);
    padding: var(--gap);
    display: flex;
    align-items: center;
    gap: var(--gap);
    box-shadow: 0 0 10px var(--shadow-color);
    background-color: var(--background-color);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blocks-staff .block-staff:hover,
.director-block-staff:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.block-staff img,
.director-block-staff img {
    width: var(--image-size);
    height: var(--image-size);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 15px var(--shadow-color);
}

.block-staff h1,
.director-block-staff h1 {
    margin: 0;
    font-size: var(--font-size-medium);
    color: var(--primary-color);
}

.block-staff p,
.director-block-staff p {
    font-size: var(--font-size-small);
    color: var(--text-color);
}

/* Стили для отдельной записи преподавателя */
.one-post-staff {
    max-width: 90%;
    margin: 20px auto;
    padding: var(--gap);
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: 0 0 10px var(--shadow-color);
}

.one-post-staff a {
    color: var(--primary-color);
    text-decoration: underline;
}

.one-post-staff a:hover {
    color: var(--secondary-color);
}

.entry-header-teacher {
    display: flex;
    align-items: center;
    gap: var(--gap);
    margin-bottom: var(--gap);
}

.entry-image img {
    width: 290px;
    height: 360px;
    border-radius: 10px;
    object-fit: cover;
}

.entry-info {
    display: flex;
    flex-direction: column;
}

.entry-title-teacher {
    font-size: var(--font-size-large);
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.entry-position,
.entry-degree,
.entry-title-rank,
.entry-contact {
    margin: 3px 0;
}

.entry-content,
.entry-bio {
    line-height: 1.5;
    font-size: 1.2rem;
    text-align: justify;
    margin-top: var(--gap);
}

.entry-bio {
    text-indent: 1.5em;
}

.btn-teachers {
    display: inline-block;
    font-size: var(--font-size-medium);
    font-weight: bold;
    margin-top: 15px;
    color: var(--secondary-color);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.btn-teachers:hover {
    transform: translateX(-10px);
}

/* Медиа-запросы для адаптации */
@media screen and (max-width: 768px) {
    .blocks-staff {
        grid-template-columns: repeat(1, minmax(250px, 1fr));
    }

    .entry-header {
        flex-direction: column;
        text-align: center;
    }

    .entry-image img {
        width: 180px;
        height: 180px;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --image-size: var(--image-size-small);
        --font-size-small: 0.8rem;
        --font-size-medium: 1rem;
        --font-size-large: 1.5rem;
    }

    .blocks-staff a,
    .director-block-staff {
        flex-direction: column;
        text-align: center;
    }

    .blocks-staff a img,
    .director-block-staff img {
        width: var(--image-size-small);
        height: var(--image-size-small);
    }

    .btn-teachers {
        font-size: var(--font-size-small);
    }

    .entry-content,
    .entry-bio {
        font-size: var(--font-size-small);
    }
}