pmi-site/static/css/custom.css

390 lines
8.2 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* background*/
body {
margin: 0;
padding: 0;
background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
position: relative;
min-height: 100vh;
}
body::before {
content: '';
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
z-index: -1;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpath d='M0 0 L50 50 M50 0 L0 50' stroke='%23003366' stroke-width='0.5' opacity='0.08'/%3E%3Ccircle cx='25' cy='25' r='1.5' fill='%23003366' opacity='0.12'/%3E%3C/svg%3E");
background-size: 50px 50px;
transform: rotate(20deg);
}
/* ------------------------------------------------------------------ */
/* Плавные анимации и переходы */
/* Плавное появление элементов */
header, main, footer {
animation: fadeIn 0.6s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
/* Плавные переходы для ссылок и кнопок */
a, .pdf-link, nav a {
transition: all 0.3s ease;
}
/* Эффект при наведении на карточки сотрудников */
.person {
transition: transform 0.2s, box-shadow 0.2s;
}
.person:hover {
transform: translateY(-3px);
box-shadow: 0 4px 12px rgba(0, 51, 102, 0.15);
}
/* ------------------------------------------------------------------ */
/* Анимированный заголовок с формулами */
.header-formula {
font-family: 'Times New Roman', serif;
font-size: 1.2em;
color: #003366;
opacity: 0.7;
margin-top: 10px;
animation: typeFormula 3s ease-in-out;
}
@keyframes typeFormula {
0%, 100% { opacity: 0.5; }
50% { opacity: 1; }
}
/* ------------------------------------------------------------------ */
/* Улучшенная навигация с "хлебными крошками" */
.breadcrumbs {
padding: 10px 0;
margin-bottom: 20px;
font-size: 0.9em;
color: #666;
}
.breadcrumbs a {
color: #003366;
text-decoration: none;
}
.breadcrumbs a:hover {
text-decoration: underline;
}
.breadcrumbs span {
color: #888;
}
/* ------------------------------------------------------------------ */
/* Ограничение максимального размера всех изображений */
main img {
max-width: 100%;
height: auto;
display: block;
margin: 20px auto;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* Специальные классы для управления размером */
.img-left {
float: left;
max-width: 300px;
margin: 0 20px 20px 0;
}
.img-right {
float: right;
max-width: 300px;
margin: 0 0 20px 20px;
}
.img-center {
max-width: 500px;
margin: 20px auto;
}
.img-thumbnail {
max-width: 150px;
border: 2px solid #ddd;
}
/* -Галерея с lightbox
Для просмотра изображений в полном размере:*/
.gallery {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
margin: 20px 0;
}
.gallery img {
width: 100%;
height: 200px;
object-fit: cover;
border-radius: 8px;
cursor: pointer;
transition: transform 0.3s;
}
.gallery img:hover {
transform: scale(1.05);
}
/* Lightbox */
.lightbox {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.9);
z-index: 1000;
justify-content: center;
align-items: center;
}
.lightbox img {
max-width: 90%;
max-height: 90%;
border-radius: 8px;
}
.lightbox:target {
display: flex;
}
/* ------------------------------------------------------------------ */
/* Красивые карточки для новостей */
.news-list {
list-style: none;
padding: 0;
margin: 20px 0;
}
.news-card {
background: white;
border-radius: 8px;
padding: 25px;
margin: 20px 0;
box-shadow: 0 2px 8px rgba(0, 51, 102, 0.08);
border-left: 4px solid #003366;
transition: all 0.3s ease;
animation: fadeIn 0.5s ease-out;
}
.news-card:hover {
transform: translateX(5px) translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 51, 102, 0.15);
}
.news-card h2 {
margin-top: 0;
color: #003366;
font-size: 1.4em;
border-bottom: none;
padding-bottom: 0;
}
.news-card h2 a {
color: #003366;
text-decoration: none;
}
.news-card h2 a:hover {
color: #0055a4;
}
.news-date {
color: #666;
font-size: 0.9em;
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 8px;
}
.news-date::before {
content: "📅";
}
.news-excerpt {
color: #444;
line-height: 1.7;
}
.news-read-more {
display: inline-block;
margin-top: 15px;
color: #003366;
font-weight: bold;
text-decoration: none;
transition: color 0.2s;
}
.news-read-more:hover {
color: #0055a4;
text-decoration: underline;
}
.news-read-more::after {
content: " →";
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ------------------------------------------------------------------ */
/* Мобильная адаптация */
@media (max-width: 768px) {
body {
padding: 10px;
}
nav {
display: flex;
flex-direction: column;
gap: 10px;
}
nav a {
margin-right: 0;
padding: 10px;
background: rgba(0, 51, 102, 0.05);
border-radius: 5px;
}
main {
padding: 15px;
}
h1 {
font-size: 1.5em;
}
h2 {
font-size: 1.3em;
}
}
/* ------------------------------------------------------------------ */
/* Календарь событий, раздел с ближайшими мероприятиями: */
.events-list {
margin: 20px 0;
}
.event-item {
display: flex;
gap: 20px;
padding: 15px;
margin: 10px 0;
background: #f9f9f9;
border-radius: 8px;
border-left: 4px solid #003366;
}
.event-date {
background: #003366;
color: white;
padding: 10px;
border-radius: 5px;
text-align: center;
min-width: 60px;
}
.event-day {
font-size: 1.8em;
font-weight: bold;
display: block;
}
.event-month {
font-size: 0.8em;
text-transform: uppercase;
}
/* ------------------------------------------------------------------ */
/* Статистика института */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 20px;
margin: 30px 0;
}
.stat-card {
background: linear-gradient(135deg, #003366, #004080);
color: white;
padding: 25px;
border-radius: 10px;
text-align: center;
box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}
.stat-number {
font-size: 2.5em;
font-weight: bold;
margin-bottom: 10px;
}
.stat-label {
font-size: 0.9em;
opacity: 0.9;
}
/* ------------------------------------------------------------------ */
/* Тёмная тема (переключатель) */
body.dark-mode {
background: linear-gradient(135deg, #1a1f2e 0%, #2d3748 100%);
color: #e2e8f0;
}
body.dark-mode::before {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpath d='M0 0 L50 50 M50 0 L0 50' stroke='%234a5568' stroke-width='0.5' opacity='0.15'/%3E%3Ccircle cx='25' cy='25' r='1.5' fill='%234a5568' opacity='0.2'/%3E%3C/svg%3E");
}
body.dark-mode header,
body.dark-mode main {
background: rgba(45, 55, 72, 0.95);
color: #e2e8f0;
}
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
color: #63b3ed;
}
body.dark-mode a {
color: #90cdf4;
}
/* Кнопка переключения темы */
.theme-toggle {
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
border-radius: 50%;
background: #003366;
color: white;
border: none;
cursor: pointer;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
font-size: 24px;
transition: transform 0.3s;
}
.theme-toggle:hover {
transform: scale(1.1);
}