/* TY Stage18 — polish: TY-5 official style */

:root {
  --ty-bg: #f7f1e8;
  --ty-bg-soft: #fffdf8;
  --ty-card: #ffffff;
  --ty-burgundy: #7a1f2b;
  --ty-burgundy-2: #9b2f3e;
  --ty-text: #2b2320;
  --ty-muted: #756a64;
  --muted: var(--ty-muted);
  --ty-border: rgba(122, 31, 43, 0.16);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  color: var(--ty-text);
}

h1, h2, h3 { font-weight: 800; }

h1 {
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 {
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h3 {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p { font-size: 17px; line-height: 1.68; }

.ty-container,
.site-container,
.site-header__inner,
.site-footer--redesign .site-container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

@media (max-width: 640px) {
  .ty-container,
  .site-container,
  .site-header__inner {
    width: min(100% - 28px, 1200px);
  }
}

.text-block { max-width: 760px; color: var(--ty-muted); }

.ty-section { padding: 88px 0; }
.ty-about, .ty-news, .ty-archive { background: var(--ty-bg-soft); }
.ty-docs { background: var(--ty-bg); }

.section-head {
  max-width: 760px;
  margin-bottom: 36px;
}

.section-head h2 { margin-bottom: 14px; }
.section-head p { margin: 0; color: var(--muted); }
.section-cta { margin-top: 32px; text-align: center; }

.ty-section-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ty-burgundy);
}

.ty-section-label--light { color: rgba(255, 255, 255, 0.9); }

/* Header */
.site-header--redesign {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 84px;
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ty-border);
}

.site-header__inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ty-text);
  min-width: 0;
}

.site-logo .brand-logo,
.site-logo .custom-logo { width: 44px; height: auto; flex-shrink: 0; }

.site-logo__text { display: grid; gap: 2px; min-width: 0; }

.site-logo__title {
  font-size: 19px;
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--ty-burgundy);
}

.site-logo__subtitle {
  font-size: 12px;
  line-height: 1.2;
  opacity: 0.68;
  color: var(--ty-muted);
}

.site-nav { display: flex; align-items: center; flex: 1; justify-content: center; }

.mobile-nav-cta { display: none; }

.primary-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ty-text);
  transition: background 0.2s ease, color 0.2s ease;
}

.primary-menu a:hover {
  background: rgba(122, 31, 43, 0.09);
  color: var(--ty-burgundy);
}

.header-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.header-phone {
  font-size: 15px;
  font-weight: 800;
  color: var(--ty-burgundy);
  text-decoration: none;
}

.header-hours { font-size: 12px; color: var(--ty-muted); }

.btn-header { min-height: 40px !important; padding: 0 18px !important; font-size: 14px !important; margin-top: 4px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ty-burgundy);
  border-radius: 2px;
}

/* Buttons */
.ty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: none;
}

.ty-btn:hover { transform: translateY(-1px); }

.ty-btn--primary {
  background: var(--ty-burgundy);
  color: #fff;
  box-shadow: 0 14px 30px rgba(122, 31, 43, 0.22);
}

.ty-btn--secondary {
  background: #fff;
  color: var(--ty-burgundy);
  border: 1px solid var(--ty-border);
}

.ty-btn--light {
  background: #fff;
  color: var(--ty-burgundy);
}

/* Hero — no photo */
.ty-hero {
  position: relative;
  background:
    radial-gradient(circle at 78% 16%, rgba(122, 31, 43, 0.14), transparent 28%),
    radial-gradient(circle at 18% 84%, rgba(122, 31, 43, 0.07), transparent 34%),
    linear-gradient(135deg, #fffdf8 0%, #f7f1e8 100%);
  padding: 104px 0 86px;
  overflow: hidden;
}

.ty-hero::after {
  content: "";
  position: absolute;
  right: -180px;
  top: 80px;
  width: 440px;
  height: 440px;
  border-radius: 999px;
  background: rgba(122, 31, 43, 0.08);
  filter: blur(2px);
  pointer-events: none;
}

.ty-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 64px;
  align-items: center;
}

.ty-hero__content { max-width: 760px; }

.ty-hero__content::before {
  content: "";
  display: block;
  width: 72px;
  height: 5px;
  border-radius: 99px;
  background: var(--ty-burgundy);
  margin-bottom: 28px;
}

.ty-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(122, 31, 43, 0.09);
  color: var(--ty-burgundy);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.ty-hero h1 {
  font-size: clamp(42px, 5.2vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.04em;
  color: var(--ty-text);
  margin-bottom: 24px;
}

.ty-hero p {
  max-width: 720px;
  font-size: 20px;
  line-height: 1.7;
  color: var(--ty-muted);
  margin: 0 0 34px;
}

.ty-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.ty-hero__panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 30px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(122, 31, 43, 0.15);
  box-shadow: 0 32px 90px rgba(43, 35, 32, 0.1);
}

.ty-panel-card {
  position: relative;
  display: block;
  padding: 24px 24px 24px 26px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(122, 31, 43, 0.13);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ty-panel-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 4px;
  border-radius: 99px;
  background: var(--ty-burgundy);
}

.ty-panel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(43, 35, 32, 0.08);
}

.ty-panel-card__label {
  margin-bottom: 9px;
  color: var(--ty-burgundy);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ty-panel-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.34;
  color: var(--ty-text);
}

.ty-hero__quick {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--ty-border);
}

.ty-hero__quick a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--ty-border);
  color: var(--ty-burgundy);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ty-hero__quick a:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ty-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(122, 31, 43, 0.12);
  box-shadow: 0 18px 44px rgba(43, 35, 32, 0.055);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ty-card::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 99px;
  background: var(--ty-burgundy);
  margin-bottom: 22px;
}

.ty-card:hover { transform: translateY(-3px); }
.ty-card p { color: var(--ty-muted); margin: 0; }

/* Join CTA */
.ty-join__box {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 42px;
  border-radius: 30px;
  background: linear-gradient(135deg, #7a1f2b, #9b2f3e);
  color: #fff;
  box-shadow: 0 22px 56px rgba(122, 31, 43, 0.22);
}

.ty-join__box::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.ty-join__box h2 { color: #fff; }
.ty-join__box p { max-width: 720px; color: rgba(255, 255, 255, 0.84); margin: 0; }

/* Documents */
.doc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.doc-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 20px 54px 20px 20px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--ty-border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.doc-card::after {
  content: "→";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  opacity: 0.42;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.doc-card:hover::after {
  transform: translate(4px, -50%);
  opacity: 0.9;
}

.doc-card__icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  background: rgba(122, 31, 43, 0.1);
  color: var(--ty-burgundy);
}

.doc-card__body { display: grid; gap: 4px; }

.doc-card__body strong {
  font-size: 16px;
  line-height: 1.32;
}

.doc-card__body small {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 750;
  opacity: 0.72;
  color: var(--ty-muted);
}

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.news-card__date {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  opacity: 0.55;
  color: var(--ty-burgundy);
  font-weight: 700;
}

.news-card h3 { margin-bottom: 12px; }
.news-card h3 a { color: var(--ty-text); text-decoration: none; }

.news-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 22px;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.78;
  color: var(--ty-muted);
}

.news-card > a:last-child {
  margin-top: auto;
  font-weight: 800;
  color: var(--ty-burgundy);
  text-decoration: none;
}

/* Anticorruption */
.ty-anticorruption__box {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 34px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--ty-border);
  box-shadow: 0 16px 42px rgba(43, 35, 32, 0.06);
}

.ty-anticorruption__icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(122, 31, 43, 0.1);
  color: var(--ty-burgundy);
  font-size: 28px;
  font-weight: 900;
}

.ty-anticorruption__box p { margin: 0; color: var(--ty-muted); }

/* Footer */
.ty-footer,
.site-footer--redesign {
  background: #2b1718;
  color: rgba(255, 255, 255, 0.84);
  padding: 64px 0 30px;
}

.ty-footer a,
.site-footer--redesign a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.site-footer--redesign .footer-top {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr 0.8fr;
  gap: 32px;
  padding-bottom: 36px;
}

.footer-brand { max-width: 360px; }

.footer-brand strong {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

.footer-brand p { font-size: 15px; line-height: 1.6; opacity: 0.78; margin: 0; }

.footer-col h3 {
  margin-bottom: 16px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.72;
  color: #f0d4d9;
}

.footer-col a,
.footer-links-list a {
  display: block;
  padding: 5px 0;
  font-size: 15px;
}

.footer-links-list { list-style: none; margin: 0; padding: 0; }

.site-footer--redesign .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 14px;
}

/* Inner pages */
.ty-site .page-hero {
  --page-hero-bg: linear-gradient(135deg, #fffdf8, #f7f1e8);
  padding: 64px 0 44px;
  background: var(--page-hero-bg);
  color: var(--ty-text);
}

.ty-site .page-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--ty-muted);
}

.breadcrumbs a { color: var(--ty-burgundy); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { text-decoration: underline; }

.entry-content {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 80px;
  font-size: 17px;
  line-height: 1.72;
}

.entry-content h2 { margin-top: 44px; }
.entry-content a { font-weight: 700; color: var(--ty-burgundy); }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.page-is-documents .entry-content > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.page-is-documents .entry-content > ul > li { margin: 0; }

.page-is-documents .entry-content > ul > li > a {
  display: flex;
  align-items: center;
  min-height: 92px;
  padding: 20px 54px 20px 20px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--ty-border);
  text-decoration: none;
  color: var(--ty-text);
  font-weight: 700;
  position: relative;
  box-shadow: 0 8px 24px rgba(43, 35, 32, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-is-documents .entry-content > ul > li > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.doc-list--children { margin-top: 28px; }

.archive-pagination { margin-top: 36px; }

.mobile-phone-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--ty-burgundy);
  text-align: center;
  padding: 14px;
}

.mobile-phone-bar a {
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 1280px) {
  .header-phone,
  .header-hours { display: none; }
  .site-logo__subtitle { display: none; }
}

@media (max-width: 992px) {
  .ty-section { padding: 68px 0; }
  .header-contact { display: none; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    position: fixed;
    inset: 84px 0 auto 0;
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    padding: 24px;
    background: var(--ty-bg-soft);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    z-index: 110;
    flex-direction: column;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav.is-open .mobile-nav-cta { display: block; }
  .primary-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-menu a { padding: 14px 0; font-size: 18px; border-radius: 0; }
  .mobile-nav-cta { margin-top: 16px; }
  .cards-grid, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer--redesign .footer-top { grid-template-columns: 1fr 1fr; }
  .ty-join__box, .ty-anticorruption__box { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .ty-hero { padding: 72px 0; }
  .ty-hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .ty-hero p { font-size: 17px; }
  .ty-hero__actions { flex-direction: column; }
}

@media (max-width: 640px) {
  .ty-section { padding: 52px 0; }
  .ty-btn { width: 100%; }
  .cards-grid, .news-grid, .doc-list,
  .page-is-documents .entry-content > ul {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .site-footer--redesign .footer-top { grid-template-columns: 1fr; }
  .mobile-phone-bar { display: block; }
  body { padding-bottom: 56px; }
}

@media (max-width: 520px) {
  h1 { font-size: 38px; letter-spacing: -0.04em; }
  h2 { font-size: 30px; }
  p { font-size: 16px; }
}
