/* assets/css/style.css */
:root {
    --primary: #2c3e50;
    --accent: #d4a373; /* Бежево-золотой */
    --accent-hover: #b58b5e;
    --bg-light: #fdfbf7; /* Очень светлый теплый фон */
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.06);
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; color: var(--primary); font-weight: 700; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar { background: var(--white); padding: 15px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: bold; }
.logo span { color: var(--accent); }
.nav-btn { background: var(--primary); color: var(--white); padding: 8px 20px; border-radius: 30px; font-size: 0.9rem; font-weight: 600; }
.nav-btn:hover { background: var(--accent); }
.back-link { font-weight: 600; color: var(--text-light); }
.back-link:hover { color: var(--accent); }

/* Hero */
.hero { text-align: center; padding: 100px 20px; background: linear-gradient(to bottom, #fff 0%, var(--bg-light) 100%); }
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.2; }
.hero p { color: var(--text-light); font-size: 1.3rem; max-width: 700px; margin: 0 auto; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 40px; margin: 60px 0; }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.4s ease, box-shadow 0.4s ease; opacity: 0; transform: translateY(30px); }
.card.visible { opacity: 1; transform: translateY(0); }
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.card-image { height: 240px; background-size: cover; background-position: center; transition: transform 0.5s ease; }
.card:hover .card-image { transform: scale(1.05); }
.card-body { padding: 30px; }
.card-date { font-size: 0.8rem; color: #999; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 10px; }
.card h2 { font-size: 1.5rem; margin: 10px 0; line-height: 1.3; }
.read-more { color: var(--accent); font-weight: 600; margin-top: 20px; display: inline-block; border-bottom: 2px solid transparent; }
.read-more:hover { border-bottom-color: var(--accent); }

/* Article Page */
.article-header { height: 60vh; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; color: white; position: relative; }
.article-header h1 { font-size: 3rem; text-shadow: 0 4px 20px rgba(0,0,0,0.6); max-width: 900px; margin: 0 auto; }
.meta { margin-top: 20px; font-size: 1.1rem; opacity: 0.9; }

.article-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 60px; margin-top: 80px; margin-bottom: 80px; }
.content { font-size: 1.2rem; color: #444; line-height: 1.8; }
.content h2 { margin-top: 50px; margin-bottom: 25px; font-size: 2rem; }
.content h3 { margin-top: 30px; margin-bottom: 15px; font-size: 1.5rem; }
.content p { margin-bottom: 20px; }
.content ul { margin-bottom: 20px; padding-left: 20px; }
.content li { margin-bottom: 10px; }
.content img { width: 100%; border-radius: var(--radius); margin: 40px 0; box-shadow: var(--shadow); }

/* Sidebar */
.sidebar { position: sticky; top: 100px; height: fit-content; }
.author-card { background: var(--white); padding: 30px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.03); }
.author-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 20px; border: 4px solid var(--accent); padding: 3px; background: white; }
.btn-sidebar { display: block; background: var(--accent); color: white; padding: 15px; border-radius: 8px; font-weight: 600; text-align: center; transition: 0.3s; }
.btn-sidebar:hover { background: var(--accent-hover); transform: scale(1.02); }

/* Footer */
.footer { text-align: center; padding: 50px 0; border-top: 1px solid #eee; color: var(--text-light); font-size: 0.9rem; margin-top: auto; background: white; }

/* Loader */
.loader { text-align: center; padding: 40px; opacity: 0; transition: opacity 0.3s; }
.loader.show { opacity: 1; }
.spinner { width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid var(--accent); border-radius: 50%; margin: 0 auto 15px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Animations */
.fade-in { animation: fadeIn 1.2s ease forwards; opacity: 0; }
.fade-in-up { animation: fadeInUp 1s ease forwards; opacity: 0; transform: translateY(20px); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 900px) {
    .article-layout { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .article-header h1 { font-size: 2rem; }
    .sidebar { position: static; margin-top: 50px; }
}