/*
Theme Name: Kadence Child
Theme URI: https://example.com/
Description: Дочерняя тема для Kadence
Author: lilika
Author URI: https://example.com/
Template: kadence
Version: 1.0
Text Domain: kadence-child
*/

/* ======= Дополнительные стили ======= */
@import url("../kadence/style.css");

/* Здесь можно писать свои стили */
.d-non-decktop {
  display: none;
}

/*Текстовый блок главная*/
.front-intro {
    background-color: #EDF2F7; /* светло-серый фон */
    padding: 60px 20px;
    text-align: center;
}

.front-intro .container {
    max-width: 1240px;
    margin: 0 auto;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #1A202C;
    line-height: 1.6;
}

.front-intro h1 {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 600;
}

.front-intro p {
    font-size: 18px;
    margin: 0;
}

/* ---------------------------
   Блок последних постов .latest-posts
   --------------------------- */
.latest-posts, .latest-posts1 {
    padding: 20px 20px;
}

.latest-posts .container {
    /*max-width: 1300px;*/
    margin: 0 auto;
}

.latest-posts h2 {
    text-align: left;
    font-size: 26px;
    margin-bottom: 40px;
    color: #222;
    font-weight: 600;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.post-card {
    background: #f8f8f8;
    border-radius: 10px;
    overflow: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

.post-card:hover {
    background: #002163; /* синий фон при наведении */
}

.post-card:hover .post-content,
.post-card:hover .post-content h3,
.post-card:hover .post-content .excerpt,
.post-card:hover .meta-left .author,
.post-card:hover .meta-left .degree-title,
.post-card:hover .meta-right {
    color: #fff; /* все элементы внутри белые */
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f2f2f2; /* чтобы не мигало при загрузке */
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.post-content {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-content h3 {
    font-size: 17px;
    margin-bottom: 10px;
    font-weight: 600;
}

.post-content .excerpt {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.post-content .meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-top: 1px solid #ddd;
    padding-top: 8px;
    gap: 10px;
}

.post-content .meta-left {
    display: flex;
    flex-direction: column;
    gap: 2px; /* расстояние между именем, степенью и званием */
}

.post-content .meta-left .author {
    font-weight: bold;
}

.post-content .meta-left .degree-title, .post-card .degree-title {
    font-size: 0.9em;
    color: #666;
}

.post-content .meta-right {
    font-size: 13px;
    color: #777;
    white-space: nowrap;
}

/* 📱 Адаптивность */

@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .d-non-decktop {
        display: block;
    }
}

@media (max-width: 900px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .post-thumb img {
        height: 180px;
    }
}
/*
.post-card,
.post-card:hover,
.post-card:focus {
  transform: none !important;
  box-shadow: none !important;
  transition: background 0.3s ease, color 0.3s ease !important;
}*/
.meta-container {
    display: flex;
    flex-direction: column;
    gap: 4px; /* небольшой отступ между верхним и нижним рядом */
}

.meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-bottom {
    width: 100%;
}

/* Дополнительно можно сделать адаптивно для мобильных */
@media (max-width: 500px) {
    .meta-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .meta-bottom {
        text-align: left;
    }
}
