

html, body {
    height: 100%; /* Устанавливаем высоту в 100% */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
}
 
body {
background-color:#f5f6f8;
}

main {
    flex: 1; /* Это позволяет main занять всю доступную высоту */
    margin-left: 200px;
    margin-right: 200px;
    margin-bottom: 50px;
    margin-top: 50px;
}



/* Шапка и навигация */

header {
    background: #fff;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.1);
    border-bottom: 1px solid rgba(108, 92, 231, 0.08);
    width: 100%;
}

nav {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: #2d3436;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    transition: width 0.3s ease;
    border-radius: 2px;
}

nav a:hover {
    color: #6c5ce7;
}

nav a:hover::before {
    width: 80%;
}

.nav-p {
    display: none;
    }
    
/* Футер */

footer {
    text-align: center;
    padding: 15px 0;
    background: #6c5ce7;
    color: rgba(255, 255, 255, 0.9);
}

.disclaimer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-top: 10px;
}



/* Заголовок */
h1 {
    font-size: 42px;
    font-weight: 900;
    /*font-weight: bold;*/
    color: #2d3436;
    text-align: left;
    margin-top: 0px;
    margin-bottom: 30px;
}

h1 {
    position: relative; /* нужно для позиционирования псевдоэлемента */
}

h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    border-radius: 2px;
}




h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3436;
    text-align: left;
    margin-top: 20px;
    margin-bottom: 20px;
}

p {
    font-size: 18px;
    text-align: left;
}

li {
    font-size: 18px;
    text-align: left;
}


/* Разделитель */
.article-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(108, 92, 231, 0.2), transparent);
    margin: 3rem 0;
    border: none;
}


/* Кнопки в конце статьи */
.buttons-article-container {
    display: flex;
    gap: 1.25rem;
    margin-top: 3rem;
}

.other-articles,
.articles-to-about {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    padding: 1rem 1.75rem;
    font-size: 1rem;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.other-articles {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: #fff;
}

.articles-to-about {
    background: #fff;
    color: #2d3436;
    border: 2px solid rgba(108, 92, 231, 0.2);
}

.other-articles:hover,
.articles-to-about:hover {
    transform: translateY(-2px);
}

.other-articles:hover {
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
}

.articles-to-about:hover {
    border-color: #6c5ce7;
    background: rgba(108, 92, 231, 0.05);
}

/* Список статей */
.articles {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: left;
}

.articles ul {
    list-style: none;
    padding: 0;
}

.articles li {
    background: #fff;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.articles li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: 0.5s;
}

.articles li a {
    text-decoration: none;
    color: #007bff;
    font-size: 18px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.articles li a:hover {
    color: #ff9800;
    transition: 0.5s;
}



/* Стили для карточек */
.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 70px;
}

.article-card {
    background: #FFF;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-decoration: none;
    color: black;
    transition: transform 0.2s ease-in-out;
}

.article-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 40px rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.2);
}

.article-card:hover::before {
    opacity: 1;
}

.article-card:hover img {
    transform: scale(1.05);
    transition: 0.5s;
}

.article-title:hover {
    color: #6c5ce7;
    transition: 0.5s;
}

.articles-container .article-card img {
    width: 100%;
    height: 180px;
    max-width: 100%;
    object-fit: cover !important;
}

.article-content {
    padding: 15px;
    text-align: center;
}

.article-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
}

.article-meta {
    font-size: 14px;
    color: gray;
}

/* Категории */
.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
    padding: 0 1rem;
}

.category-card {
    background: #fff;
    padding: 1.75rem;
    border-radius: 16px;
    color: #2d3436;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(108, 92, 231, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    text-align: center;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(108, 92, 231, 0.1), rgba(162, 155, 254, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(108, 92, 231, 0.15);
    border-color: transparent;
    color: #6c5ce7;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover::after {
    transform: scaleX(1);
}

.misc-category {
    background: linear-gradient(45deg, rgba(108, 92, 231, 0.05), rgba(162, 155, 254, 0.05));
    border: 1px solid rgba(108, 92, 231, 0.15);
}

/* Адаптивность для категорий */
@media (max-width: 768px) {
    .categories-container {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.25rem;
        margin: 2rem 0;
    }

    .category-card {
        padding: 1.5rem;
        font-size: 1rem;
        min-height: 100px;
    }
}

@media (max-width: 480px) {
    .categories-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.5rem 0;
        padding: 0 0.5rem;
    }

    .category-card {
        padding: 1.25rem;
        font-size: 0.95rem;
        min-height: 90px;
    }
}

/* Обложки внутри статьи */
.cover-article {
      width: auto;
      height: auto;
      max-width: 50%;
      margin-bottom:20px;
    }

img {
      width: auto;
      height: auto;
      max-width: 100%;
      object-fit: contain;  
    }
  
  



    /* ------------------АДАПТИВНОСТЬ ----------------------------- */

@media (max-width: 1024px) {
    
    main {
    margin-left: 60px;
    margin-right: 60px;
    margin-bottom: 50px;
    margin-top: 40px;
}
    nav a  {
    font-size: 14px;
    }
    
    nav {
    gap: 1rem;
    }
    
    .nav-p {
    display: none;
    }
    
    .articles {
        max-width: 90%;
    }

    .categories-container {
        justify-content: center;
    }

    .category-card {
        min-width: 160px;
        font-size: 14px;
    }
    
    .cover-article {
        width: auto;
        height: auto;
        max-width: 70% !important;
    }
    
    img {
      width: auto;
      height: auto;
      max-width: 70%;
      object-fit: contain;  
    }
    
}

    /* ----------------------------- */

@media (max-width: 768px) {
    
    main {
        margin-left: 30px;
        margin-right: 30px;
        margin-bottom: 50px;
        margin-top: 20px;
    }
    
    body {
        margin: 0; /* Если на мобильных шапка меньше */
    }
    
/*     header nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    header nav a {
        padding: 8px 12px;
        font-size: 14px;
    }
*/
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 20px;
    }
    
    p {
    font-size: 16px;
    text-align: left;
    }

    li {
    font-size: 16px;
    text-align: left;
    }

    .articles {
        max-width: 95%;
        padding: 10px;
    }

    .articles li {
        padding: 10px;
    }

    .articles li a {
        font-size: 16px;
    }

    footer {
        font-size: 12px;
    }
    
    .cover-article {
          width: auto;
          height: auto;
          max-width: 100% !important;
    }
    
    img {
      width: auto;
      height: auto;
      max-width: 100%;
      object-fit: contain;  
    }
 
}

    /* ----------------------------- */
    
@media (max-width: 480px) {
  
    main {
        margin-left: 20px;
        margin-right: 20px;
        margin-bottom: 50px;
        margin-top: 20px;
    }
    
    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    p {
    font-size: 15px;
    text-align: left;
    }

    li {
    font-size: 15px;
    text-align: left;
    }

    .articles li a {
        font-size: 15px;
    }

    /* Уменьшаем размеры карточек */
    .category-card {
        font-size: 12px;
        padding: 5px 10px;
    }

    .articles-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        margin-bottom: 50px;
    }

    .article-card {
        font-size: 14px;
    }
    
    .cover-article {
      width: auto;
      height: auto;
      max-width: 100% !important;
    }
    
    img {
      width: auto;
      height: auto;
      max-width: 100%;
      object-fit: contain;  
    }
 
}

    /* ------------------------КОНЕЦ АДАПТИВНОСТИ --------------------------- */

    

