:root {
  --hurid-purple: #7968a0;
  --hurid-purple-deep: #5b4b82;
  --hurid-accent: #ea9b41;
  --hurid-text: #303030;
  --hurid-muted: #5c5c5c;
  --hurid-bg: #f7f6fa;
  --hurid-white: #ffffff;
  --hurid-line: #e4dfec;
  --header-h: 6.5rem;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
#o-projektu {
  scroll-margin-top: var(--header-h);
}
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--hurid-text);
  background: var(--hurid-bg);
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--hurid-purple-deep); }
a:hover { color: var(--hurid-accent); }

.site-header {
  background: #314573;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  padding: 0.65rem 0 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: inherit; }
.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-text small {
  display: block;
  font-size: 0.85rem;
  opacity: 0.85;
  font-weight: 400;
}
.brand-text strong { font-size: 18px; font-weight: 600; line-height: 1.25; }
.brand-text strong span { font-weight: 500; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.15rem;
  justify-content: flex-end;
}
.nav a {
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: normal;
  font-size: 18px;
  font-weight: 600;
  padding: 0.55rem 0.8rem;
  border-radius: 4px;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--hurid-accent);
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}
.wrap-wide {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}
.page-stack {
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
}

.ribbon-section {
  padding: 0;
  margin: 0;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.section-head h1,
.section-head h2 {
  margin: 0;
  color: var(--hurid-purple-deep);
  font-size: 1.45rem;
}
.ribbon-controls { display: flex; gap: 0.4rem; }
.ribbon-controls button {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--hurid-line);
  background: #fff;
  color: var(--hurid-purple-deep);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}
.ribbon-controls button:hover { background: var(--hurid-purple); color: #fff; }

.ribbon {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0 0 0.75rem;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}
.ribbon::-webkit-scrollbar { height: 8px; }
.ribbon::-webkit-scrollbar-thumb { background: var(--hurid-purple); border-radius: 4px; }

.news-card {
  flex: 0 0 calc((100% - 2rem) / 3);
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--hurid-line);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 6px 16px rgba(91, 75, 130, 0.08);
}
.news-card:hover { color: inherit; transform: translateY(-2px); }
.news-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: #ddd;
}
.news-card .card-body { padding: 0.85rem 1rem 1.1rem; }
.news-card time {
  display: block;
  color: var(--hurid-accent);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.news-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
  color: var(--hurid-purple-deep);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card p {
  margin: 0;
  font-size: 1.02rem;
  color: var(--hurid-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.about {
  background: #fff;
  margin: 1.5rem 0 0;
  padding: 1.75rem 1.25rem 2rem;
  border-radius: 12px;
  border: 1px solid var(--hurid-line);
  font-size: 1.125rem;
}
.about h2 {
  margin-top: 0;
  color: var(--hurid-purple-deep);
  font-size: 1.85rem;
}
.about .lead { font-size: 1.22rem; }
.partners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
.partner-ph {
  border: 1px dashed var(--hurid-purple);
  border-radius: 8px;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  text-decoration: none;
  color: var(--hurid-purple-deep);
  background: #faf9fc;
  font-weight: 600;
  font-size: 1.02rem;
}
.signing {
  margin: 1.25rem 0;
  max-width: 760px;
}
.signing img { width: 100%; height: auto; border-radius: 8px; }
.media-links { padding-left: 1.2rem; }

.page-title {
  padding: 1.5rem 0 0.5rem;
  color: var(--hurid-purple-deep);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding-bottom: 2.5rem;
  width: 100%;
  margin: 0;
}
.news-grid .news-card { flex: none; width: 100%; }
.news-grid .news-card img { height: 200px; }

.doc-groups {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 2.5rem;
}
.doc-group {
  background: #fff;
  border: 1px solid var(--hurid-line);
  border-radius: 10px;
  padding: 1.1rem 1.25rem 0.5rem;
}
.doc-group h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  color: var(--hurid-purple-deep);
}
.doc-group ul { list-style: none; margin: 0; padding: 0; }
.doc-group li {
  border-top: 1px solid var(--hurid-line);
  padding: 0.7rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.doc-group .soon { color: var(--hurid-muted); font-style: italic; }

.placeholder-box {
  background: #fff;
  border: 1px solid var(--hurid-line);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.article { background: #fff; border-radius: 12px; overflow: hidden; margin: 1rem auto 2.5rem; border: 1px solid var(--hurid-line); }
.article img.hero { width: 100%; max-height: 420px; object-fit: cover; }
.article .body { padding: 1.25rem 1.5rem 2rem; }

.site-footer {
  background: #3a3a3a;
  color: #efefef;
  padding: 0 0 1.25rem;
  font-size: 0.92rem;
}
.logo-strip {
  background: #fff;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hurid-line);
}
.logo-strip-inner {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.logo-strip img {
  height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.logo-strip .strip-programme { height: 52px; justify-self: start; max-width: min(340px, 34vw); }
.logo-strip .strip-project { justify-self: center; }
.logo-strip .strip-ured { height: 54px; justify-self: end; max-width: min(280px, 30vw); }

.donor-bar {
  background: #fff;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
}
.donor-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.25rem;
  width: min(1120px, 100%);
  margin-inline: auto;
  flex-wrap: wrap;
}
.donor-row a {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.donor-row img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}
.donor-row .donor-wide { height: 40px; max-width: 190px; }
.donor-divider {
  width: 1px;
  height: 52px;
  background: #c8c8c8;
  flex: 0 0 auto;
}
.footer-aside { margin-top: 2.15rem; }
.support-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.support-row p { margin: 0; flex: 1; }
.zaklada-logo {
  display: block;
  width: 88px;
  height: auto;
  flex: 0 0 auto;
  margin: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.5rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 1.5rem;
}
.site-footer a { color: #fff; }
.site-footer h3 { margin: 0 0 0.6rem; font-size: 1.05rem; color: var(--hurid-accent); }
.socials { display: flex; gap: 0.65rem; margin: 0.85rem 0 0; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 50%;
  color: #fff;
}
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.disclaimer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  border-top: 1px solid #555;
  padding-top: 1rem;
  font-size: 0.8rem;
  color: #cfcfcf;
}

@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-card { flex-basis: calc((100% - 1rem) / 2); }
  .footer-grid { grid-template-columns: 1fr; }
  .header-bar { flex-direction: column; align-items: flex-start; }
  .nav { width: 100%; justify-content: flex-start; }
  .logo-strip-inner { grid-template-columns: 1fr; justify-items: center; }
  .logo-strip .strip-programme,
  .logo-strip .strip-ured { justify-self: center; max-width: 280px; }
}

@media (max-width: 640px) {
  .logo-strip img { height: 48px; }
  .logo-strip .strip-ured { height: 40px; }
  .news-card { flex-basis: 88vw; }
  .ribbon { scroll-padding-inline: 0; }
}

body.hurid-nu-page {
  margin: 0 !important;
  padding: 0 !important;
  background: var(--hurid-bg) !important;
  background-image: none !important;
  color: var(--hurid-text) !important;
}
body.hurid-nu-page #masthead,
body.hurid-nu-page .hfe-skip-link,
body.hurid-nu-page footer:not(.site-footer),
body.hurid-nu-page .elementor-location-header,
body.hurid-nu-page .elementor-location-footer {
  display: none !important;
}
body.hurid-nu-page header.site-header {
  background: #314573 !important;
  background-image: none !important;
  color: #fff !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
}
body.hurid-nu-page header.site-header .nav a {
  color: #fff !important;
}
body.hurid-nu-page header.site-header .nav a:hover,
body.hurid-nu-page header.site-header .nav a[aria-current="page"] {
  color: var(--hurid-accent) !important;
}
body.hurid-nu-page .header-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
body.hurid-nu-page .brand {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  color: #fff !important;
}
body.hurid-nu-page .brand-logo {
  width: 52px !important;
  height: 52px !important;
}
body.hurid-nu-page .wrap,
body.hurid-nu-page .wrap-wide {
  width: min(1120px, calc(100% - 2rem)) !important;
  margin-inline: auto !important;
}
