/*
 * EduOrgSite — стили поверх Bootstrap 5.
 * Цвета и шрифты темы меняются через переменные --bs-* и --edu-*.
 */
:root {
    --edu-accent: var(--bs-primary);
    --edu-hero-bg: var(--bs-tertiary-bg);
    --edu-nav-bg: var(--bs-primary);
    --edu-logo-size: 88px;
    /* Ширина строки с организационно-правовой формой под названием */
    --edu-brand-form-width: 30rem;
}

/* Шапка: логотип, название, форма; справа контакты */
.edu-header-top {
    background: var(--bs-body-bg);
}

.edu-brand {
    color: var(--bs-body-color);
}

.edu-logo {
    width: var(--edu-logo-size);
    height: var(--edu-logo-size);
    object-fit: contain;
}

.edu-brand-name {
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
    font-weight: 700;
    line-height: 1.2;
}

.edu-brand-form {
    font-size: .95rem;
    line-height: 1.3;
    color: var(--bs-secondary-color);
    max-width: var(--edu-brand-form-width);
    /* Длинная форма переносится на строки примерно равной длины */
    text-wrap: balance;
}

.edu-header-contacts li {
    display: flex;
    gap: .5rem;
    align-items: baseline;
    line-height: 1.6;
}

.edu-header-contacts a {
    color: var(--bs-body-color);
    text-decoration: none;
}

.edu-header-contacts a:hover {
    color: var(--edu-accent);
}

.edu-header-contacts {
    font-size: 1.0625rem;
}

.edu-icon {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    fill: var(--edu-accent);
    align-self: center;
}

/* Меню под шапкой */
.edu-nav {
    background: var(--edu-nav-bg);
}

.edu-nav .nav-link {
    font-size: 1.0625rem;
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.edu-nav .nav-link.active {
    font-weight: 600;
}

/* На телефоне шапка компактнее */
@media (max-width: 767.98px) {
    :root {
        --edu-logo-size: 64px;
    }
}

.edu-dropdown {
    max-width: min(90vw, 28rem);
}

.edu-dropdown .dropdown-item {
    white-space: normal;
}

@media (min-width: 768px) {
    .edu-header-contacts {
        text-align: right;
    }

    .edu-header-contacts li {
        justify-content: flex-end;
    }
}

.edu-hero {
    background: var(--edu-hero-bg);
}

.edu-footer {
    background: var(--bs-tertiary-bg);
}

.edu-sveden-table th {
    font-weight: 500;
    background: var(--bs-tertiary-bg);
}

.edu-sveden-table .edu-col-num {
    width: 5rem;
}

.edu-sveden-nav .list-group-item {
    line-height: 1.3;
}

.edu-card .card-img-top {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.edu-avatar {
    width: 64px;
    height: 64px;
    object-fit: cover;
}

/* Новость и фоторепортаж */
.edu-news-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.edu-gallery-item {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}

.edu-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s;
}

.edu-gallery-item:hover img,
.edu-gallery-item:focus-visible img {
    transform: scale(1.04);
}

.edu-gallery-modal .carousel-item img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.edu-gallery-caption {
    padding: .75rem 1rem 1rem;
    text-align: center;
    font-size: .95rem;
}

@media (prefers-reduced-motion: reduce) {
    .edu-gallery-item img {
        transition: none;
    }
}

/* pdoPage выводит пустой список, если страница одна */
.pagination:empty {
    display: none;
}

/* Поле-ловушка для ботов в формах */
.edu-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.edu-contacts dt {
    font-weight: 500;
    color: var(--bs-secondary-color);
    font-size: .875rem;
}

/* Карта из конструктора Яндекса или 2ГИС: по ширине колонки */
.edu-map {
    min-height: 320px;
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    background: var(--bs-tertiary-bg);
}

.edu-map iframe,
.edu-map > ymaps,
.edu-map > div {
    width: 100% !important;
    max-width: 100%;
}

.edu-requisites th {
    font-weight: 500;
    color: var(--bs-secondary-color);
    width: 45%;
}

.edu-requisites td {
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.edu-program-facts dt {
    font-weight: 500;
    color: var(--bs-secondary-color);
    font-size: .875rem;
}
