/* ── ТНМУ — Глобальні стилі ── */

/* Hero на всю ширину */
.category-content-wrapper {
    overflow-x: visible !important;
}
.category-content {
    max-width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
}
body { overflow-x: hidden; }

/* Картки і контент — обмежуємо ширину окремо */
.tnmu-grid,
.tnmu-section__title,
.tnmu-section {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
}

/* Хедер ТНМУ */
.page-header {
    background: linear-gradient(135deg, #001f5c 0%, #003087 100%) !important;
    border-bottom: 3px solid #c8922a !important;
}
#global-menu.global-menu {
    background: #002470 !important;
}
#global-menu.global-menu a,
#global-menu.global-menu button {
    color: rgba(255,255,255,0.82) !important;
}
#global-menu.global-menu a:hover,
#global-menu.global-menu button:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.10) !important;
}

/* Футер */
#footer {
    background: #001f5c !important;
    border-top: 3px solid #c8922a !important;
}

/* Кнопки */
.i-button.highlight {
    background: #003087 !important;
    border-color: #001f5c !important;
}

/* Виправляємо ширину карток */
.tnmu-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 900px) {
    .tnmu-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
    .tnmu-grid { grid-template-columns: 1fr !important; }
}

/* Логотип білий */
.page-header #header-logo img,
.page-header img.header-logo {
    filter: brightness(0) invert(1) !important;
}

/* Hero - центруємо контент */
.tnmu-hero {
    padding-left: 40px !important;
    padding-right: 40px !important;
}
.tnmu-hero__inner {
    justify-content: center !important;
    max-width: 900px !important;
    margin: 0 auto !important;
}

/* Прибираємо зайві відступи з секцій */
.tnmu-section__title,
.tnmu-grid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Hero - коло зліва від тексту */
.tnmu-hero__inner {
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
}
.tnmu-hero__crest {
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
}

/* Картки майбутніх — якщо одна, не розтягувати */
.tnmu-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Збільшуємо висоту мініатюри картки */
.tnmu-card__thumb {
    height: 160px !important;
}
.tnmu-card__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}
/* Заглушка з ініціалами теж більша */
.tnmu-card__ph {
    font-size: 48px !important;
}

/* ── АДАПТИВНІСТЬ ── */
@media (max-width: 1024px) {
    .tnmu-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    /* Одна колонка */
    .tnmu-grid {
        grid-template-columns: 1fr !important;
        padding: 0 12px !important;
    }

    /* Hero менший на мобільному */
    .tnmu-hero {
        padding: 24px 16px !important;
    }
    .tnmu-hero__inner {
        flex-direction: column !important;
        gap: 16px !important;
        text-align: center !important;
    }
    .tnmu-hero__crest {
        width: 60px !important;
        height: 60px !important;
        font-size: 11px !important;
    }
    .tnmu-hero__title {
        font-size: 18px !important;
    }
    .tnmu-hero__sup {
        font-size: 10px !important;
    }
    .tnmu-hero__tags {
        justify-content: center !important;
    }
    .tnmu-hero__tag {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    /* Секції */
    .tnmu-section__title {
        font-size: 16px !important;
        padding: 0 12px !important;
    }

    /* Картки */
    .tnmu-card__thumb {
        height: 140px !important;
    }

    /* Хедер на мобільному */
    .page-header {
        padding: 0 12px !important;
    }
    #header-logo div {
        display: none !important;
    }
}

@media (max-width: 400px) {
    .tnmu-hero__title {
        font-size: 16px !important;
    }
    .tnmu-hero__tags {
        gap: 5px !important;
    }
}

/* На мобільному — завжди 1 картка */
@media (max-width: 700px) {
    .tnmu-grid {
        grid-template-columns: 1fr !important;
    }
}
