/* Епилепсия.бг – облик 2026 (26.11.2026). Цветовете и снимката са от стария дизайн. */
:root {
  --blue: #1a86c8;
  --blue-dark: #0f6aa6;
  --blue-light: #e8f4fc;
  --sky: #4aaee8;
  --green: #8cc63f;
  --green-dark: #6ea52a;
  --orange: #f39324;
  --text: #3d4650;
  --muted: #6b7782;
  --line: #dbe7f0;
  --bg: #f6fafd;
  --card: #fff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(16, 92, 140, .08);
  --head: "Nunito", "Trebuchet MS", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.7 "Open Sans", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); color: var(--blue-dark); line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin: 0 0 .8em; font-weight: 800; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; z-index: 100; background: #fff; padding: 8px 12px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- глава ---------- */
.site-header {
  background: linear-gradient(180deg, #4ab0ea 0%, #2b98da 100%);
  color: #fff;
  position: relative;
  z-index: 20;
}
.header-row { display: flex; align-items: center; gap: 20px; min-height: 82px; }
.logo { display: block; line-height: 0; flex: 0 0 auto; }
.logo img { width: 240px; mix-blend-mode: normal; border-radius: 6px; }
.top-links { margin-left: auto; display: flex; gap: 6px; }
.top-links a {
  color: #fff; font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.top-links a:hover, .top-links a.is-active { background: rgba(255, 255, 255, .2); text-decoration: none; }

.main-nav { background: #fff; box-shadow: 0 2px 12px rgba(16, 92, 140, .1); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav li { flex: 1 1 0; }
.main-nav ul a {
  display: flex; align-items: center; justify-content: center; text-align: center; height: 100%;
  padding: 14px 10px; font-family: var(--head); font-weight: 700; font-size: .98rem; line-height: 1.25;
  color: var(--blue-dark); border-bottom: 3px solid transparent;
}
.main-nav ul a:hover { background: var(--blue-light); text-decoration: none; }
.main-nav ul a.is-active { border-bottom-color: var(--green); color: var(--blue); }
.main-nav__extra { display: none; }
.menu-toggle { display: none; }

/* ---------- лента с девиза на вътрешните страници ---------- */
.page-band { background: linear-gradient(90deg, #eaf6fd 0%, #fff 60%); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-band__in { display: flex; align-items: center; justify-content: space-between; height: 120px; }
.page-band__pic { height: 150px; width: auto; align-self: flex-start; margin-right: -20px; object-fit: cover; object-position: right top; }
.tagline { font-family: var(--head); font-weight: 600; color: var(--green-dark); font-size: 1.6rem; margin: 0; line-height: 1.2; }
.tagline--big { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); margin-bottom: .5em; }

.breadcrumb { font-size: .88rem; color: var(--muted); padding-top: 16px; padding-bottom: 4px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.breadcrumb a { color: var(--muted); }

/* ---------- начална ---------- */
.hero { background: linear-gradient(180deg, #fff 0%, #eef7fd 100%); border-bottom: 1px solid var(--line); }
.hero__in { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; padding-top: 40px; }
.hero h1 { font-size: 1.5rem; color: var(--text); font-weight: 700; margin-bottom: .6em; }
.welcome { color: var(--text); padding-bottom: 30px; }
.welcome p { margin: 0 0 .35em; }
.welcome br { display: none; }
.welcome p:empty { display: none; }
.hero__pic { align-self: end; justify-self: end; width: 100%; max-width: 576px; }

.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: -28px; position: relative; }
.section-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px;
  font-family: var(--head); font-weight: 700; color: var(--blue-dark); line-height: 1.3; border: 1px solid var(--line);
  transition: transform .15s ease, box-shadow .15s ease;
}
.section-card i { font-style: normal; color: var(--green-dark); font-size: 1.2rem; }
.section-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(16, 92, 140, .14); }

.home-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin: 36px auto 50px; align-items: start; }
.box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 22px 22px; border: 1px solid var(--line); overflow: hidden; }
.box__title {
  margin: 0 -22px 18px; padding: 14px 22px; font-size: 1.25rem; color: #fff; font-weight: 700;
  background: var(--green);
}
.box__title a { color: #fff; }
.box--forum .box__title { background: #a08a8a; }
.box--ask .box__title { background: var(--orange); }
.news-item { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.news-item h3 { font-size: 1.05rem; margin: 2px 0 6px; }
.news-item p { margin: 0; font-size: .92rem; }
time { font-size: .82rem; color: var(--muted); }
.more { font-weight: 600; font-size: .92rem; }
.forum-list { list-style: none; margin: 0; padding: 0; }
.forum-list li { padding: 8px 0 8px 18px; border-bottom: 1px solid var(--line); position: relative; font-size: .95rem; line-height: 1.45; }
.forum-list li::before { content: ""; position: absolute; left: 2px; top: 15px; border: 5px solid transparent; border-left-color: var(--sky); }
.forum-list a { color: var(--text); }

/* ---------- форма ---------- */
.ask-form .field { margin-bottom: 12px; }
.ask-form label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 4px; }
.ask-form input, .ask-form textarea {
  width: 100%; font: inherit; font-size: .95rem; padding: 9px 12px; border: 1px solid #b9d6ea; border-radius: 10px; background: #fbfdff;
}
.ask-form input:focus, .ask-form textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(26, 134, 200, .18); }
.ask-form .has-err input, .ask-form .has-err textarea { border-color: #d64545; }
.ask-form small { color: #c33; font-size: .82rem; }
.ask-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ep-altcha { --altcha-max-width: 100%; --altcha-border-radius: 10px; --altcha-color-border: #b9d6ea; }
.btn {
  display: inline-block; font: 700 1rem var(--head); color: #fff; background: var(--blue); border: 0; border-radius: 999px;
  padding: 11px 30px; cursor: pointer;
}
.btn:hover { background: var(--blue-dark); }
.note { padding: 10px 14px; border-radius: 10px; font-size: .92rem; }
.note--ok { background: #eaf6dc; color: #3c6614; }
.note--err { background: #fde8e8; color: #9b1c1c; }

/* ---------- вътрешни страници ---------- */
.layout { padding-top: 20px; padding-bottom: 60px; }
.layout--side { display: grid; grid-template-columns: 290px 1fr; gap: 36px; align-items: start; }
.layout--contacts { display: grid; grid-template-columns: 1fr 380px; gap: 36px; align-items: start; }
.page-text { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 36px 36px; border: 1px solid var(--line); min-width: 0; }
.page-text p { margin: 0 0 1em; }
.page-text h2 { font-size: 1.35rem; margin: 1.4em 0 .5em; }
.page-text h3 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
.page-text ul, .page-text ol { padding-left: 1.3em; }
.page-text table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.page-text td, .page-text th { border: 1px solid var(--line); padding: 6px 10px; }
.page-text iframe { max-width: 100%; }
.page-pic { float: right; width: 260px; margin: 0 0 16px 24px; border-radius: 10px; }
.page-text .date { display: block; margin-bottom: 4px; }
.lead { margin-bottom: 1.4em; }
.back { margin-top: 2em; clear: both; }

.side-nav { background: linear-gradient(180deg, #a5d44f 0%, #86bd34 100%); border-radius: var(--radius); padding: 18px 16px 20px; box-shadow: var(--shadow); position: sticky; top: 16px; }
.side-nav h2 { margin: 0 0 10px; padding: 0 6px 10px; font-size: 1.3rem; border-bottom: 1px solid rgba(255, 255, 255, .45); }
.side-nav h2 a { color: #fff; font-size: inherit; padding: 0; font-weight: 800; }
.side-nav h2 a:hover { background: none; text-decoration: underline; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav ul ul { display: none; padding-left: 12px; margin: 2px 0 6px; border-left: 2px solid rgba(255, 255, 255, .5); }
.side-nav li.is-open > ul { display: block; }
.side-nav a { display: block; padding: 6px 10px; color: #fff; font-weight: 600; font-size: .93rem; line-height: 1.35; border-radius: 8px; }
.side-nav a:hover { background: rgba(255, 255, 255, .18); text-decoration: none; }
.side-nav a.is-active { background: #fff; color: var(--green-dark); }

.child-cards { list-style: none; padding: 0 !important; margin: 1.5em 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; clear: both; }
.child-cards a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--blue-light); font-family: var(--head); font-weight: 700; color: var(--blue-dark); }
.child-cards a:hover { border-color: var(--blue); text-decoration: none; }

.news-list { display: grid; gap: 18px; }
.news-card { display: flex; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.news-card h2 { margin: 2px 0 6px; font-size: 1.2rem; }
.news-card p { margin: 0 0 6px; }
.news-card__pic { flex: 0 0 120px; }
.news-card__pic img { border-radius: 10px; }
.pager { display: flex; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }
.pager span { background: var(--blue); color: #fff; border-color: var(--blue); }

.sitemap ul { list-style: none; padding-left: 0; }
.sitemap ul ul { padding-left: 22px; border-left: 2px solid var(--line); margin: 4px 0 8px 6px; }
.sitemap > ul > li { margin-bottom: 10px; }
.sitemap > ul > li > a { font-family: var(--head); font-weight: 700; font-size: 1.1rem; }

/* ---------- долна част ---------- */
.site-footer { background: #0f5f93; color: #d6e9f6; font-size: .9rem; }
.footer-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; padding-top: 34px; padding-bottom: 24px; }
.footer-logo { border-radius: 6px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-content: flex-start; }
.site-footer a { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 18px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .84rem; }

/* ---------- таблет и телефон ---------- */
@media (max-width: 1000px) {
  .home-cols { grid-template-columns: 1fr 1fr; }
  .box--ask { grid-column: 1 / -1; }
  .layout--side { grid-template-columns: 240px 1fr; gap: 24px; }
}
@media (max-width: 820px) {
  .header-row { min-height: 66px; }
  .logo img { width: 190px; }
  .top-links { display: none; }
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; margin-left: auto;
    background: rgba(255, 255, 255, .18); border: 0; border-radius: 10px; padding: 10px 12px; cursor: pointer; color: #fff;
  }
  .menu-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }
  .menu-toggle b { position: absolute; left: -9999px; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav ul a { justify-content: flex-start; text-align: left; border-bottom: 1px solid var(--line); padding: 13px 4px; }
  .main-nav ul a.is-active { border-bottom-color: var(--line); box-shadow: inset 4px 0 0 var(--green); padding-left: 12px; }
  .main-nav__extra { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 4px 16px; }
  .main-nav__extra a { font-weight: 600; font-size: .9rem; }

  .hero__in { grid-template-columns: 1fr; padding-top: 26px; }
  .hero__pic { justify-self: center; }
  .sections { margin-top: 20px; }
  .home-cols { grid-template-columns: 1fr; }
  .page-band__in { height: 84px; }
  .page-band__pic { height: 104px; }
  .tagline { font-size: 1.25rem; }
  .layout--side, .layout--contacts { grid-template-columns: 1fr; }
  .side-nav { position: static; order: 2; }
  .page-text { padding: 22px 18px 26px; }
  .page-pic { float: none; display: block; margin: 0 auto 16px; width: 100%; max-width: 360px; }
  .footer-row { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 14px; }
  .page-band__pic { display: none; }
  .news-card { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
