:root {
  --hds-ink: #0f2a2b;
  --hds-teal: #055154;
  --hds-deep: #02383a;
  --hds-accent: #0f8f73;
  --hds-accent-2: #17b68e;
  --hds-sand: #eef4f1;
  --hds-mist: #f7faf8;
  --hds-line: #d7e3de;
  --hds-white: #fff;
  --hds-muted: #5a6f6d;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(2, 56, 58, 0.12);
  --wrap: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.75rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--hds-ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(23, 182, 142, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(5, 81, 84, 0.08), transparent 55%),
    linear-gradient(180deg, #f4f8f6 0%, #ffffff 28%, #f7faf8 100%);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--hds-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--hds-deep); }

.hds-wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.hds-wrap--narrow { width: min(100% - 2rem, 760px); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: .5rem 1rem; z-index: 10000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.screen-reader-text,
.hds-hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Header */
.hds-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(247, 250, 248, 0.88);
  border-bottom: 1px solid rgba(215, 227, 222, 0.8);
}
.hds-header__inner {
  width: min(100% - 2rem, var(--wrap));
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 78px;
}
.hds-logo img { height: 56px; width: auto; object-fit: contain; }
.hds-logo .custom-logo { height: 56px; width: auto; }

.hds-nav { display: flex; align-items: center; gap: 1rem; }
.hds-nav__list {
  display: flex; gap: .15rem 1rem; list-style: none; margin: 0; padding: 0; align-items: center; flex-wrap: wrap;
}
.hds-nav__list a {
  color: var(--hds-deep); text-decoration: none; font-weight: 600; font-size: .95rem; letter-spacing: .01em;
}
.hds-nav__list a:hover { color: var(--hds-accent); }

.hds-lang { display: flex; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.hds-lang a {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px;
  text-decoration: none; font-size: .75rem; font-weight: 700; color: var(--hds-teal); border: 1px solid var(--hds-line);
}
.hds-lang .is-active a { background: var(--hds-accent); color: #fff; border-color: var(--hds-accent); }

.hds-nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; padding: 10px; cursor: pointer;
}
.hds-nav-toggle span {
  display: block; height: 2px; background: var(--hds-deep); margin: 6px 0; border-radius: 2px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 0; border-radius: 999px; padding: .85rem 1.35rem; font-weight: 700; font-family: inherit;
  cursor: pointer; text-decoration: none; transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--hds-accent); color: #fff; }
.btn--primary:hover { background: var(--hds-deep); color: #fff; }
.btn--ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.45); }
.btn--ghost:hover { background: #fff; color: var(--hds-deep); }
.btn--dark { background: var(--hds-deep); color: #fff; }
.btn--sm { padding: .55rem 1rem; font-size: .9rem; }

/* Hero */
.hds-hero {
  position: relative;
  min-height: min(78vh, 720px);
  color: #fff;
  overflow: hidden;
  background: var(--hds-deep);
}
.hds-hero__track { position: absolute; inset: 0; }
.hds-hero__slide {
  position: absolute; inset: 0;
  display: grid; align-items: end;
  background:
    linear-gradient(120deg, rgba(2,56,58,.78), rgba(5,81,84,.45)),
    var(--hero-image) center/cover no-repeat;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  transition: opacity .7s ease, transform .9s ease, visibility .7s;
}
.hds-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 1;
}
.hds-hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(23,182,142,.35), transparent 40%),
    linear-gradient(180deg, transparent 40%, rgba(2,56,58,.55));
  pointer-events: none;
}
.hds-hero__content {
  position: relative; z-index: 1; padding: 5rem 0 5.5rem;
  animation: hdsHeroIn .7s ease both;
}
.hds-hero__slide:not(.is-active) .hds-hero__content { animation: none; }
@keyframes hdsHeroIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hds-hero h1 {
  font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08; margin: .4rem 0 1rem; max-width: 16ch; font-weight: 700;
}
.hds-hero__lead { font-size: 1.15rem; max-width: 40ch; opacity: .95; }
.hds-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hds-eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700;
  color: var(--hds-accent); margin: 0 0 .5rem;
}
.hds-hero .hds-eyebrow { color: rgba(255,255,255,.8); }

.hds-hero__controls {
  position: absolute; left: 0; right: 0; bottom: 1.25rem; z-index: 3;
  display: flex; align-items: center; justify-content: flex-end; gap: .65rem;
  pointer-events: none;
}
.hds-hero__controls > * { pointer-events: auto; }
.hds-hero__nav {
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(255,255,255,.45);
  background: rgba(2,56,58,.35); color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(6px);
  transition: background .2s ease, border-color .2s ease;
}
.hds-hero__nav:hover { background: var(--hds-accent); border-color: var(--hds-accent); }
.hds-hero__dots { display: flex; gap: .4rem; align-items: center; }
.hds-hero__dot {
  width: 9px; height: 9px; border-radius: 999px; border: 0; padding: 0;
  background: rgba(255,255,255,.4); cursor: pointer; transition: width .25s ease, background .25s ease;
}
.hds-hero__dot.is-active { width: 26px; background: #fff; }

/* Sections */
.hds-section { padding: 5rem 0; }
.hds-section__head { margin-bottom: 2rem; }
.hds-section__head h1,
.hds-section__head h2,
.hds-about h2,
.hds-contact h2 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15; margin: 0; color: var(--hds-deep);
}
.hds-section__head--row {
  display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap;
}
.hds-link { font-weight: 700; text-decoration: none; color: var(--hds-accent); }
.hds-link:hover { text-decoration: underline; }

/* About */
.hds-about__grid {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 62ch);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
  justify-content: center;
  margin-inline: auto;
}
.hds-about__media {
  margin: 0; border-radius: calc(var(--radius) + 4px); overflow: hidden; box-shadow: var(--shadow);
  max-width: 280px;
}
.hds-about__media img { width: 100%; aspect-ratio: 3/4; object-fit: cover; filter: grayscale(1); display: block; }
.hds-about__body p { font-size: 1.05rem; line-height: 1.7; }
.hds-about__credit {
  margin-top: 1.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--hds-teal); font-size: .9rem;
}

/* Board */
.hds-board { background: linear-gradient(180deg, transparent, rgba(238,244,241,.9) 20%, transparent); }
.hds-board__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
}
.hds-board__card {
  background: var(--hds-white); border: 1px solid var(--hds-line); border-radius: var(--radius);
  padding: 1rem; text-align: center; transition: transform .25s ease, box-shadow .25s ease;
}
.hds-board__card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.hds-board__photo {
  width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; margin-bottom: .85rem; background: var(--hds-sand);
}
.hds-board__photo img { width: 100%; height: 100%; object-fit: cover; }
.hds-board__card h3 { font-size: 1rem; margin: 0 0 .25rem; color: var(--hds-deep); }
.hds-board__card p { margin: 0; color: var(--hds-muted); font-size: .9rem; }

/* Cards */
.hds-cards { display: grid; gap: 1.25rem; }
.hds-cards--3 { grid-template-columns: repeat(3, 1fr); }
.hds-cards--4 { grid-template-columns: repeat(4, 1fr); }
.hds-card {
  background: var(--hds-white); border: 1px solid var(--hds-line); border-radius: var(--radius);
  overflow: hidden; position: relative; transition: transform .25s ease, box-shadow .25s ease;
}
.hds-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.hds-card > a:not(.hds-card__pdf) {
  display: block; color: inherit; text-decoration: none; padding: 1.15rem; height: 100%;
}
.hds-card__media { margin: -1.15rem -1.15rem 1rem; aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg, #02383a, #0f8f73); }
.hds-card__media img { width: 100%; height: 100%; object-fit: cover; }
.hds-card__media img[src*="card-fallback-logo"],
.hds-card__media img[src*="logo-drustvo"] { object-fit: contain; padding: 1.25rem; background: linear-gradient(135deg, #02383a, #0f8f73); }
.hds-card h2, .hds-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 0 0 .5rem; color: var(--hds-deep); line-height: 1.25; }
.hds-card p { color: var(--hds-muted); margin: 0 0 1rem; }
.hds-card__date {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--hds-accent); margin-bottom: .4rem;
}
.hds-card__pdf {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  background: rgba(255, 255, 255, .95);
  color: var(--hds-deep);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(2, 56, 58, .18);
}
.hds-card__pdf:hover {
  background: var(--hds-accent);
  color: #fff;
}

.hds-news { background: var(--hds-deep); color: #fff; }
.hds-news .hds-eyebrow, .hds-news h2, .hds-news .hds-link { color: #fff; }
.hds-news .hds-card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.hds-news .hds-card h3, .hds-news .hds-card .hds-link { color: #fff; }
.hds-news .hds-card p { color: rgba(255,255,255,.78); }
.hds-news .hds-card__date { color: var(--hds-accent-2); }

.hds-links-block { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--hds-line); }
.hds-links-block h3 { margin: 0 0 .75rem; font-family: var(--font-display); color: var(--hds-deep); }
.hds-links-block ul { margin: 0; padding-left: 1.1rem; columns: 2; gap: 2rem; }
.hds-links-block a { color: var(--hds-teal); }

/* Education */
.hds-edu__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.hds-edu__item {
  display: grid; place-items: center; min-height: 120px; padding: 1rem; text-align: center;
  border-radius: var(--radius); background: var(--hds-white); border: 1px solid var(--hds-line);
  text-decoration: none; color: var(--hds-deep); font-weight: 700; transition: .2s ease;
}
.hds-edu__item:hover { background: var(--hds-deep); color: #fff; border-color: var(--hds-deep); }

/* Gallery */
.hds-gallery__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem;
}
.hds-gallery__item {
  display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; background: var(--hds-sand);
  cursor: zoom-in; position: relative;
}
.hds-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hds-gallery__item:hover img { transform: scale(1.05); }

/* Lightbox */
.hds-lightbox {
  position: fixed; inset: 0; z-index: 10050;
  display: grid; place-items: center;
  background: rgba(2, 56, 58, .88);
  padding: 1.25rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.hds-lightbox.is-open {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.hds-lightbox__figure {
  margin: 0; max-width: min(1100px, 100%); max-height: min(86vh, 100%);
  display: grid; gap: .75rem; justify-items: center;
}
.hds-lightbox__figure img {
  max-width: 100%; max-height: min(78vh, 900px);
  width: auto; height: auto; object-fit: contain;
  border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
  background: #012628;
}
.hds-lightbox__caption {
  margin: 0; color: rgba(255,255,255,.85); font-size: .92rem; font-weight: 600;
}
.hds-lightbox__close,
.hds-lightbox__nav {
  position: absolute; border: 0; cursor: pointer;
  color: #fff; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px);
  transition: background .2s ease;
}
.hds-lightbox__close:hover,
.hds-lightbox__nav:hover { background: var(--hds-accent); border-color: var(--hds-accent); }
.hds-lightbox__close {
  top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 999px;
  font-size: 1.5rem; line-height: 1;
}
.hds-lightbox__nav {
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 999px; font-size: 1.75rem; line-height: 1;
  display: grid; place-items: center;
}
.hds-lightbox__nav--prev { left: 1rem; }
.hds-lightbox__nav--next { right: 1rem; }
@media (max-width: 640px) {
  .hds-lightbox__nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .hds-lightbox__nav--prev { left: .4rem; }
  .hds-lightbox__nav--next { right: .4rem; }
}

/* Partners */
.hds-partners__track {
  display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory;
}
.hds-partners__item {
  flex: 0 0 160px; height: 88px; display: grid; place-items: center; background: #fff;
  border: 1px solid var(--hds-line); border-radius: 12px; padding: .75rem; scroll-snap-align: start;
}
.hds-partners__item img { max-height: 54px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .85; }
.hds-partners__item:hover img { filter: none; opacity: 1; }

/* Contact */
.hds-contact {
  background:
    linear-gradient(135deg, rgba(2,56,58,.92), rgba(15,143,115,.78)),
    url("../images/bkg-contact.webp") center/cover;
  color: #fff;
}
.hds-contact h2, .hds-contact .hds-eyebrow { color: #fff; }
.hds-contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.hds-contact__list { list-style: none; padding: 0; margin: 1.5rem 0; }
.hds-contact__list li { margin-bottom: 1rem; }
.hds-contact__list a { color: #fff; }
.hds-contact__list strong { display: block; opacity: .7; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }

.hds-form { display: grid; gap: .75rem; }
.hds-form input,
.hds-form textarea {
  width: 100%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12);
  color: #fff; border-radius: 12px; padding: .9rem 1rem; font: inherit;
}
.hds-form input::placeholder,
.hds-form textarea::placeholder { color: rgba(255,255,255,.7); }
.hds-form__msg { min-height: 1.2em; margin: 0; font-weight: 600; }

/* Membership modal */
.hds-modal[hidden] { display: none !important; }
.hds-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; }
.hds-modal__backdrop { position: absolute; inset: 0; background: rgba(2,56,58,.62); }
.hds-modal__dialog {
  position: relative; z-index: 1; width: min(960px, 100%); max-height: min(90vh, 900px);
  overflow: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 1.5rem;
}
.hds-modal__close {
  position: absolute; top: .6rem; right: .8rem; border: 0; background: transparent;
  font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--hds-deep);
}
.hds-modal__grid,
.hds-modal__grid--page {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: start;
}
.hds-modal__info h2, .hds-modal__form h3, .hds-modal__form h2 {
  font-family: var(--font-display); color: var(--hds-deep); margin-top: 0;
}
.hds-modal__form .hds-form input,
.hds-modal__form .hds-form textarea,
.hds-modal__grid--page .hds-form input {
  background: #fff; color: var(--hds-ink); border: 1px solid var(--hds-line);
}
.hds-modal__form .hds-form input::placeholder { color: #8a9b99; }
.hds-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; color: var(--hds-ink); }
.hds-pay-list { padding-left: 1.1rem; }
.hds-pay-list li { margin-bottom: .4rem; }

/* Footer */
.hds-footer {
  position: relative;
  background: var(--hds-deep);
  color: rgba(255,255,255,.86);
  padding-top: 3.25rem;
}
.hds-footer a { color: #fff; }
.hds-footer__inner {
  position: relative; z-index: 1;
  width: min(100% - 2rem, var(--wrap)); margin: 0 auto 2rem;
  display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 2.5rem; align-items: start;
}
.hds-footer__brand img {
  width: 96px; height: 96px; object-fit: contain;
  margin-bottom: .85rem;
  border-radius: 50%;
  background: #fff;
  padding: .2rem;
}
.hds-footer__tagline {
  margin: 0 0 .35rem; font-family: var(--font-display);
  font-size: 1.15rem; color: #fff; line-height: 1.25;
}
.hds-footer__site { font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.hds-footer__meta { margin: .85rem 0 0; color: rgba(255,255,255,.78); line-height: 1.7; }
.hds-footer__meta a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.28); }
.hds-footer__label {
  margin: 0 0 .85rem; font-size: .75rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 700; color: rgba(255,255,255,.55);
}
.hds-footer__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1.25rem;
}
.hds-footer__list a { text-decoration: none; font-weight: 600; }
.hds-footer__list a:hover { color: var(--hds-accent-2); }
.hds-footer__note {
  margin: 0 0 1rem; max-width: 28ch; color: rgba(255,255,255,.72); line-height: 1.55;
}
.hds-footer__cta .btn { margin-top: .25rem; }
.hds-footer__bar {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  width: min(100% - 2rem, var(--wrap)); margin: 0 auto; padding: 1rem 0 1.4rem;
  font-size: .92rem;
}
.hds-credit a { font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.45); }

/* Single */
.hds-article h1 { font-family: var(--font-display); color: var(--hds-deep); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
.hds-article__meta { color: var(--hds-muted); font-weight: 600; }
.hds-article__media { margin: 1.5rem 0; border-radius: var(--radius); overflow: hidden; }
.hds-article__content { font-size: 1.05rem; }

/* Responsive */
@media (max-width: 980px) {
  .hds-about__grid,
  .hds-contact__grid,
  .hds-modal__grid,
  .hds-modal__grid--page,
  .hds-footer__inner { grid-template-columns: 1fr; }
  .hds-footer__list { grid-template-columns: 1fr 1fr; }
  .hds-cards--3, .hds-cards--4, .hds-board__grid, .hds-edu__grid, .hds-gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hds-links-block ul { columns: 1; }
  .hds-nav-toggle { display: block; }
  .hds-nav {
    position: fixed; inset: 78px 0 auto 0; display: none; flex-direction: column;
    align-items: stretch; background: #fff; padding: 1rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--hds-line); box-shadow: var(--shadow);
  }
  .hds-nav.is-open { display: flex; }
  .hds-nav__list { flex-direction: column; align-items: stretch; }
  .hds-nav .btn { width: fit-content; }
}

@media (max-width: 640px) {
  .hds-cards--3, .hds-cards--4, .hds-board__grid, .hds-edu__grid, .hds-gallery__grid {
    grid-template-columns: 1fr;
  }
  .hds-hero { min-height: 70vh; }
}
