/* =================================== */
/*          ФИНАЛЬНЫЙ STYLES.CSS         */
/* =================================== */

/* --- Базовые стили --- */
body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    /* Объединенный padding: 70px сверху (для шапки), 10px по бокам, 20px снизу */
    padding: 70px 10px 20px 10px; 
    line-height: 1.6;
    background: #f9f9f9;
    box-sizing: border-box; 
}
hr {background: #f9f9f9; }
/* --- Типографика --- */
h1 {
    color: #242424; 
    font-size: 30px;  
    letter-spacing: -0.3px; 
    line-height: 30px;
}
h2 {
    color: #2e2e2e; 
    letter-spacing: -0.7px; 
    line-height: 24px; 
    margin-top: 20px;
    font-size: 26px; 
}
.top {
    color: #242424; 
    font-size: 22px;  
    letter-spacing: -0.3px; 
    line-height: 30px; 
    text-align: center;
}
p { 
    margin-bottom: 1em;  
}
ul {
    margin: 1em 0;    
    padding-left: 20px;  
}
li { 
    margin-bottom: 0.5em;  
}
blockquote {
    background: #f2f2f2;
    margin: 10px; 
    padding: 20px;
    border-left: 10px solid #580000; 
    text-align: left; 
    border-top-right-radius: 20px;
    border-bottom-right-radius: 10px;
}

/* --- Компоненты --- */
.news-item {
    min-height: 120px;  
    background: #fff;    
    padding: 15px;    
    margin-bottom: 20px;    
    border-radius: 6px;    
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);  
}
.news-item h2 {   
    margin-top: 0;  
}
.news-item a {    
    color: #8b0000;    
    text-decoration: none;  
}
.news-item a:hover { 
    text-decoration: underline;  
}
.news-item img,
article img,
.img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
}
#loading {    
    text-align: center;    
    font-weight: bold;    
    margin: 20px 0;    
    display: none;  
}
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 999;
    border: none;
    outline: none;
    background-color: #555;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    transition: opacity 0.3s, visibility 0.3s;
}
#scrollToTopBtn:hover {
    background-color: #333;
}

/* --- Шапка и Подвал (Десктоп) --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    /* Фон с прозрачностью внизу */
    background-color: /* #8B0000*/ #4169E1;
    background: linear-gradient(to bottom, #4169E1 70%, rgba(65, 105, 225, 1); 100%);
    padding: 10px 0;
    color: white;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.site-footer {
    width: 100%;
    background-color: #4169E1;
    padding: 20px 0;
    color: white;
    margin-top: 50px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.15);
}
.header-container, .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    height: 50px;
    width: auto;
    display: block;
}
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}
.main-nav li {
    margin-left: 25px;
}
.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: opacity 0.3s;
}
.main-nav a:hover {
    opacity: 0.8;
    text-decoration: underline;
}
.site-footer p {
    margin: 0;
    font-size: 14px;
}
.site-footer a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}
.site-footer a:hover {
    text-decoration: underline;
}
/* "Гамбургер" по умолчанию скрыт на больших экранах */
.hamburger-menu {
    display: none;
}


/* =================================== */
/*          МОБИЛЬНАЯ АДАПТАЦИЯ        */
/* =================================== */
@media (max-width: 768px) {
    /* Основной контент на всю ширину */
    body {
        max-width: 100%;
    }

    /* Адаптация шапки */
    .main-nav {
        display: none; 
        position: absolute;
        top: 70px; /* Высота шапки */
        left: 0;
        width: 90%;
        background-color: #4169E1;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
         border-radius: 10px;
    
    }
    .mobile-nav-open .main-nav {
        display: flex;
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }
    .main-nav li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .main-nav a {
        padding: 15px;
        display: block;
    }

    /* Показываем и стилизуем "гамбургер" */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 101;
    }
    .hamburger-menu span {
        width: 30px;
        height: 3px;
        background-color: white;
        border-radius: 5px;
        transition: all 0.3s linear;
    }
    
    /* Анимация иконки в "крестик" */
    .mobile-nav-open .hamburger-menu span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-nav-open .hamburger-menu span:nth-child(2) {
        opacity: 0;
    }
    .mobile-nav-open .hamburger-menu span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

