/* ==========================================================================
   1. БАЗОВЫЕ СТИЛИ (структура, сетки, основные теги)
   ========================================================================== */

/* --- ОБЩИЕ СТИЛИ --- */
.container {
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

main {
    padding: 2.5rem 0;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

/* --- КОНТЕНТ ИЗ РЕДАКТОРА --- */
.rendered-content img,
.rendered-content iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border-radius: 5px;
}

.rendered-content blockquote.quote {
    margin: 1em 0;
    padding: 10px 15px;
    border-left: 4px solid var(--border-color);
    background-color: var(--bg-main);
    border-radius: 4px;
    color: var(--text-secondary);
}

.rendered-content blockquote.quote i {
    margin-right: 8px;
    color: var(--text-secondary);
}

.rendered-content .emoji-large {
    font-size: 1.5em;
    vertical-align: middle;
    line-height: 1;
}

/* --- СЕТКИ --- */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.all-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.video-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.diaries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    padding-top: 20px;
}

/* --- ПОДВАЛ --- */
.site-footer {
    background: var(--bg-header);
    color: var(--text-secondary);
    text-align: center;
    margin-top: 2rem;
    padding: 1rem 0;
    font-size: 0.9em;
}
