/* --- Цветовая палитра РАНХиГС --- */
:root {
    --ranepa-burgundy: #8B1A1A;
    --ranepa-dark-burgundy: #3D0A0A;
    --ranepa-gold: #CFA840;
    --text-dark: #1A1A1A;
    --text-grey: #444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'PT Sans', sans-serif;
    background: linear-gradient(180deg, var(--ranepa-burgundy) 0%, var(--ranepa-dark-burgundy) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }

/* --- Контейнер для основного блока --- */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* --- Шапка (Header) --- */
header {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 30px;
    padding: 20px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    border-bottom: 4px solid var(--ranepa-burgundy);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img { width: 100px; height: auto; }

.logo-placeholder {
    width: 100px; height: 100px;
    border: 2px dashed var(--ranepa-burgundy);
    display: flex; align-items: center; justify-content: center;
    color: var(--ranepa-burgundy); font-size: 12px; text-align: center;
    padding: 5px; background: rgba(255, 255, 255, 0.5);
}

.journal-title h1 {
    font-family: 'PT Serif', serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--ranepa-burgundy);
    text-transform: uppercase;
    line-height: 1.2;
}

.header-menu {
    display: flex; flex-direction: column; align-items: flex-end; gap: 15px;
}

.top-nav { display: flex; gap: 10px; }
.top-nav a { padding: 8px 15px; color: var(--ranepa-burgundy); font-weight: 700; font-size: 14px; }
.top-nav a:hover { color: var(--ranepa-gold); }

.auth-buttons { display: flex; gap: 10px; }
.auth-btn {
    padding: 6px 20px; border: 1px solid var(--ranepa-burgundy); border-radius: 4px;
    color: var(--ranepa-burgundy); font-size: 14px; font-weight: 700;
    background: rgba(255, 255, 255, 0.6);
}
.auth-btn:hover { background: var(--ranepa-burgundy); color: white; }

/* --- Героический блок (О журнале) --- */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border-radius: 16px;
    border: 1px solid rgba(207, 168, 64, 0.2);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-text { flex: 1; min-width: 300px; }
.hero-subtitle { font-size: 18px; color: var(--ranepa-burgundy); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.hero-title { font-family: 'PT Serif', serif; font-size: 38px; margin: 10px 0 20px 0; color: var(--ranepa-burgundy); line-height: 1.2; }
.hero-desc { font-size: 16px; color: var(--text-grey); margin-bottom: 30px; }

.btn-primary {
    display: inline-block; background-color: var(--ranepa-burgundy); color: white;
    padding: 12px 30px; border-radius: 4px; font-weight: 700;
    border: 2px solid var(--ranepa-burgundy);
}
.btn-primary:hover { background-color: #6B1414; }

.hero-image-block {
    flex: 0 0 400px; height: 300px; 
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    overflow: hidden; border: 0px solid rgba(139, 26, 26, 0.1);
}
.hero-image-block img { width: auto; height: 100%; object-fit: contain; max-width: 100%; display: block; margin: 0 auto; }

/* --- Блок рубрик --- */
.rubrics-section { padding-bottom: 40px; }
.section-title {
    font-family: 'PT Serif', serif; font-size: 28px; margin-bottom: 30px;
    color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    border-bottom: 2px solid var(--ranepa-gold); display: inline-block; padding-bottom: 5px;
}
.rubric-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.rubric-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: block;
}
.rubric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    border-color: var(--ranepa-gold);
}
.rubric-img-wrap {
    height: 140px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.rubric-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rubric-title {
    padding: 15px;
    text-align: center;
    font-weight: 700;
    color: var(--ranepa-burgundy);
    font-size: 16px;
}

/* --- Подвал (Footer) --- */
footer {
    max-width: 1200px; /* Не растягивать на весь экран */
    margin: 0 auto;    /* Выровнять по центру */
    padding: 30px 20px;
    border-top: 3px solid var(--ranepa-gold);
    background: rgba(255, 255, 255, 0.95);
    text-align: center;
    font-size: 14px;
    color: var(--text-grey);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    width: 100%;       /* Будет занимать 100% от 1200px */
    box-sizing: border-box;
}
footer a { color: var(--ranepa-burgundy); font-weight: 700; }
footer a:hover { text-decoration: underline; color: var(--ranepa-gold); }
/* --- Адаптивность для мобильных устройств --- */
@media (max-width: 850px) {
    .header-wrapper { flex-direction: column; align-items: stretch; }
    .header-menu { align-items: flex-start; }
    .top-nav, .auth-buttons { flex-wrap: wrap; }
    .hero-section { flex-direction: column-reverse; padding: 20px; }
    .hero-image-block { flex-basis: 100%; height: 200px; width: 100%; }
    .rubric-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .rubric-grid { grid-template-columns: 1fr; }
}

/* Стили для полей форм */
.form-group input {
    font-family: 'PT Sans', sans-serif;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    border-color: var(--ranepa-burgundy) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.15);
}

.form-group input::placeholder {
    color: #999;
}

/* Класс для квадратных блоков (вход, регистрация) */
.auth-block {
    max-width: 450px !important;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px !important;
    margin: 0 auto !important;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: none;
}