:root {
    --brand-blue: #0b3d91;
    --brand-light: #f4f6f9;
    --brand-dark: #1a202c;
    --brand-accent: #38b2ac;
    --text-main: #2d3748;
    --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, sans-serif; }
body { background: var(--brand-light); color: var(--text-main); display: flex; flex-direction: column; min-height: 100vh; }

/* Header & Nav */
header { background: var(--brand-blue); color: white; padding: 1rem 0; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.header-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.logo { display: flex; align-items: center; gap: 15px; text-decoration: none; color: white; font-weight: bold; font-size: 1.4rem; }

nav a { color: rgba(255,255,255,0.8); text-decoration: none; margin: 0 10px; font-size: 0.95rem; transition: color 0.2s; }
nav a:hover, nav a.active { color: white; border-bottom: 2px solid var(--brand-accent); padding-bottom: 2px; }

/* Language Switcher */
.lang-switcher .lang-btn { background: transparent; border: 1px solid rgba(255,255,255,0.5); color: white; padding: 4px 8px; cursor: pointer; border-radius: 4px; margin-left: 5px; }
.lang-switcher .lang-btn.active { background: var(--brand-accent); border-color: var(--brand-accent); }

/* Анимация атома (в логотипе) */
.atom-anim { position: relative; width: 30px; height: 30px; }
.electron { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 2px solid var(--brand-accent); border-radius: 50%; opacity: 0.7; }
.electron:nth-child(1) { animation: spin1 3s linear infinite; }
.electron:nth-child(2) { animation: spin2 3s linear infinite; transform: rotate(60deg); }
.electron:nth-child(3) { animation: spin3 3s linear infinite; transform: rotate(120deg); }
@keyframes spin1 { 100% { transform: rotate(360deg) scaleY(0.3); } }
@keyframes spin2 { 100% { transform: rotate(420deg) scaleY(0.3); } }
@keyframes spin3 { 100% { transform: rotate(480deg) scaleY(0.3); } }

/* Main Layouts */
main { flex: 1; max-width: 1200px; margin: 0 auto; padding: 40px 20px; width: 100%; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; background: white; padding: 40px; border-radius: var(--radius); box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 40px; }
.hero h1 { font-size: 2.5rem; color: var(--brand-dark); margin-bottom: 15px; }

/* Утилиты для контентных страниц */
.page-container { background: white; padding: 40px; border-radius: var(--radius); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.page-container h1 { margin-bottom: 25px; border-bottom: 2px solid var(--brand-light); padding-bottom: 10px; }
.content-box { margin-bottom: 20px; line-height: 1.6; }
.content-box p { margin-bottom: 15px; }
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.responsive-img { width: 100%; height: auto; border-radius: var(--radius); margin-top: 20px; }
.pub-list li { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #eee; list-style-type: none; }
.map-placeholder { background: #e2e8f0; height: 300px; display: flex; justify-content: center; align-items: center; border-radius: var(--radius); color: #718096; margin-top: 20px; font-weight: bold; }

/* Login Form */
.login-wrapper { background: var(--brand-light); padding: 30px; border-radius: var(--radius); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 8px; }
.form-group input { width: 100%; padding: 12px; border: 1px solid #cbd5e0; border-radius: 4px; }
.btn-primary { background: var(--brand-blue); color: white; border: none; padding: 12px 20px; width: 100%; font-size: 1rem; border-radius: 4px; cursor: pointer; transition: background 0.3s; }
.btn-primary:hover { background: var(--brand-accent); }
.forgot-link { display: block; text-align: center; margin-top: 15px; font-size: 0.9rem; color: var(--brand-blue); text-decoration: none; }
.alert { padding: 10px; border-radius: 4px; margin-top: 15px; font-size: 0.9rem; background: #c6f6d5; color: #22543d; text-align: center; }
.hidden { display: none !important; }

/* Features Cards */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: white; padding: 25px; border-radius: var(--radius); box-shadow: 0 2px 4px rgba(0,0,0,0.05); border-top: 4px solid var(--brand-accent); }
.card h3 { margin-bottom: 10px; color: var(--brand-dark); }

/* Footer */
footer { background: var(--brand-dark); color: #a0aec0; padding: 40px 20px 20px; margin-top: auto; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-bottom: 1px solid #4a5568; padding-bottom: 20px; }
.footer-grid h4 { color: white; margin-bottom: 15px; }
.footer-grid a { color: #a0aec0; text-decoration: none; line-height: 1.8; }
.footer-grid a:hover { color: white; }
.footer-bottom { text-align: center; padding-top: 20px; font-size: 0.85rem; }

/* Chat Widget */
.chat-widget { position: fixed; bottom: 20px; right: 20px; width: 320px; background: white; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); overflow: hidden; display: flex; flex-direction: column; transition: height 0.3s ease; height: 400px; z-index: 1000; }
.chat-widget.minimized { height: 45px; }
.chat-head { background: var(--brand-blue); color: white; padding: 12px 15px; font-weight: bold; cursor: pointer; display: flex; align-items: center; }
.status-dot { width: 10px; height: 10px; background: #48bb78; border-radius: 50%; margin-right: 10px; display: inline-block; }
.chat-window { display: flex; flex-direction: column; flex: 1; }
.chat-history { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; background: #f7fafc; }
.msg { padding: 8px 12px; border-radius: 12px; max-width: 85%; }
.msg.system { background: #e2e8f0; color: #4a5568; align-self: flex-start; border-bottom-left-radius: 2px; }
.msg.user { background: var(--brand-blue); color: white; align-self: flex-end; border-bottom-right-radius: 2px; }
.chat-input-area { display: flex; padding: 10px; border-top: 1px solid #e2e8f0; background: white; }
.chat-input-area input { flex: 1; padding: 8px; border: 1px solid #cbd5e0; border-radius: 4px; outline: none; }
.chat-input-area button { background: var(--brand-accent); color: white; border: none; padding: 0 15px; margin-left: 8px; border-radius: 4px; cursor: pointer; font-weight: bold; }

@media (max-width: 768px) {
    .hero, .features, .footer-grid, .grid-2-col { grid-template-columns: 1fr; }
    .header-container { flex-direction: column; gap: 15px; }
}
