/*
Theme Name: Европейская Партия Россиян
Theme URI: https://example.org/
Author: EPR Web Team
Description: Тема для сайта политической партии «Европейская Партия Россиян». Главная страница с блоками миссии, программы, новостей и мероприятий, форма вступления, настройки в Customizer.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: epr
*/

:root {
  --blue: #12326b;
  --blue-dark: #0b2149;
  --blue-light: #e8eef8;
  --accent: #c8102e;
  --gold: #e0b43c;
  --text: #1b2333;
  --muted: #5b6577;
  --bg: #ffffff;
  --line: #dde3ee;
  --radius: 8px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--blue-dark); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 999; }

/* Flag stripe */
.flag-stripe { height: 6px; background: linear-gradient(90deg, var(--blue) 0 33.3%, #fff 33.3% 66.6%, var(--accent) 66.6%); border-bottom: 1px solid var(--line); }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .8rem 0; }
.site-branding { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.site-branding img { max-height: 54px; width: auto; }
.site-title { font-size: 1.15rem; font-weight: 800; color: var(--blue-dark); letter-spacing: .01em; line-height: 1.1; margin: 0; }
.site-tagline { font-size: .78rem; color: var(--muted); margin: 0; }
.main-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; align-items: center; }
.main-nav a { text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--blue); border-bottom-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .45rem .7rem; font-size: 1rem; cursor: pointer; }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: #fff; padding: .8rem 1.6rem; border-radius: var(--radius); text-decoration: none; font-weight: 700; border: 2px solid var(--accent); cursor: pointer; font-size: 1rem; transition: .15s; }
.btn:hover { background: #a60c25; border-color: #a60c25; color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: var(--blue-dark); border-color: #fff; }
.btn-blue { background: var(--blue); border-color: var(--blue); }
.btn-blue:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

/* Hero */
.hero { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); color: #fff; padding: 5rem 0 5.5rem; position: relative; overflow: hidden; }
.hero.has-image { background-size: cover; background-position: center; }
.hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(11,33,73,.92), rgba(18,50,107,.75)); }
.hero .container { position: relative; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p { font-size: 1.2rem; max-width: 56ch; opacity: .93; margin-bottom: 2rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-stars { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); width: 360px; height: 360px; opacity: .12; pointer-events: none; }

/* Sections */
.section { padding: 4.5rem 0; }
.section.alt { background: var(--blue-light); }
.section-head { max-width: 62ch; margin-bottom: 2.2rem; }
.section-head .eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.card .num { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; margin-bottom: 1rem; }
.card p { margin: 0; color: var(--muted); }

.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card .thumb { aspect-ratio: 16/9; background: var(--blue-light); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.post-card h3 a { text-decoration: none; color: var(--blue-dark); }
.post-card h3 a:hover { color: var(--accent); }
.meta { font-size: .85rem; color: var(--muted); }
.more { margin-top: auto; font-weight: 700; text-decoration: none; }

/* Events */
.event { display: flex; gap: 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; align-items: flex-start; }
.event-date { flex: 0 0 74px; text-align: center; background: var(--blue); color: #fff; border-radius: var(--radius); padding: .6rem .3rem; line-height: 1.1; }
.event-date .d { font-size: 1.8rem; font-weight: 800; display: block; }
.event-date .m { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.event h3 { margin-bottom: .2rem; font-size: 1.1rem; }
.event h3 a { text-decoration: none; }

/* CTA */
.cta { background: var(--accent); color: #fff; padding: 3.5rem 0; text-align: center; }
.cta h2 { color: #fff; }
.cta .btn { background: #fff; color: var(--accent); border-color: #fff; }
.cta .btn:hover { background: var(--blue-dark); color: #fff; border-color: var(--blue-dark); }

/* Content */
.page-header { background: var(--blue-light); padding: 3rem 0; border-bottom: 1px solid var(--line); }
.page-header h1 { margin: 0; }
.content-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; padding: 3rem 0 4rem; }
.content-wrap.no-sidebar { grid-template-columns: minmax(0, 780px); justify-content: center; }
.entry-content > * { max-width: 100%; }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote { border-left: 4px solid var(--accent); margin: 1.5rem 0; padding: .3rem 0 .3rem 1.2rem; color: var(--muted); font-style: italic; }
.entry-thumb { margin-bottom: 1.5rem; }
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 1.05rem; border-bottom: 2px solid var(--accent); padding-bottom: .4rem; display: inline-block; }
.widget ul { padding-left: 1.1rem; }
.pagination { display: flex; gap: .5rem; justify-content: center; margin: 2.5rem 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .45rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Forms */
.epr-form { display: grid; gap: 1rem; max-width: 620px; }
.epr-form label { font-weight: 600; display: block; margin-bottom: .25rem; }
.epr-form input[type=text], .epr-form input[type=email], .epr-form input[type=tel], .epr-form select, .epr-form textarea,
.search-form input[type=search] { width: 100%; padding: .7rem .9rem; border: 1px solid #b9c3d6; border-radius: var(--radius); font: inherit; background: #fff; }
.epr-form input:focus, .epr-form textarea:focus, .epr-form select:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.epr-form .hp { position: absolute; left: -9999px; }
.epr-form .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.notice { padding: 1rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-weight: 600; }
.notice.ok { background: #e6f5ea; color: #14602b; border: 1px solid #b7e2c3; }
.notice.err { background: #fdeaea; color: #8a1226; border: 1px solid #f3bcc4; }

/* Footer */
.site-footer { background: var(--blue-dark); color: #cdd6ea; padding: 3.5rem 0 1.5rem; }
.site-footer a { color: #fff; }
.site-footer h3, .site-footer .widget-title { color: #fff; border-color: var(--gold); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 2rem; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.2rem; font-size: .88rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; }
.socials { display: flex; gap: .8rem; flex-wrap: wrap; }
.socials a { text-decoration: none; border: 1px solid rgba(255,255,255,.3); padding: .3rem .8rem; border-radius: 20px; font-size: .88rem; }
.socials a:hover { background: #fff; color: var(--blue-dark); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 1rem; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .content-wrap { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 0; }
  .section { padding: 3rem 0; }
}
