/* =========================================================================
   RDF Theme — design system (from WDC64 landing)
   ========================================================================= */

:root {
  --burgundy: #941417;
  --burgundy-dark: #5e0b0e;
  --burgundy-deep: #360406;
  --burgundy-light: #b51c20;
  --gold: #f6b01f;
  --gold-light: #fed268;
  --gold-dark: #c7880b;
  --gold-glow: rgba(246, 176, 31, 0.35);
  --brand-dark: #101010;
  --brand-gray: #f8f9fa;
  --bg: #fff;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --rdf-focus-ring: 0 0 0 3px rgba(246, 176, 31, 0.45);
  --rdf-text-muted: #4b5563;
  --rdf-text-subtle: #6b7280;
}

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

html { scroll-behavior: smooth; }

/* Utility classes used in header.php */
.scroll-smooth { scroll-behavior: smooth; }
.min-h-screen { min-height: 100vh; min-height: 100dvh; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.min-w-0 { min-width: 0; }
.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.rdf-body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--brand-dark);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--gold);
  color: var(--brand-dark);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ---- Icons ---- */
.rdf-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
}

.rdf-icon--sm {
  width: 14px;
  height: 14px;
}

.rdf-icon--stat {
  width: 18px;
  height: 18px;
}

.rdf-icon--brand {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

/* ---- Layout ---- */
.rdf-header {
  position: relative;
  z-index: 100;
  border-bottom: 1px solid rgba(246, 176, 31, 0.2);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.rdf-header-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

@media (min-width: 640px) {
  .rdf-header-inner { padding: 16px 48px; }
}

@media (min-width: 1024px) {
  .rdf-header-inner { padding: 16px 64px; }
}

.rdf-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.rdf-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rdf-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 16, 16, 0.45);
  z-index: 90;
}

.rdf-mobile-top {
  display: none;
}

@media (max-width: 1023px) {
  .rdf-mobile-top {
    display: block;
    padding:
      max(12px, env(safe-area-inset-top, 0px))
      max(68px, calc(16px + env(safe-area-inset-right, 0px) + 44px))
      12px
      max(16px, env(safe-area-inset-left, 0px));
  }

  .rdf-header {
    display: none;
  }
}

.rdf-mobile-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  min-height: 44px;
}

.rdf-mobile-brand-logo {
  display: block;
  width: auto;
  height: 64px;
  max-height: 64px;
  object-fit: contain;
  object-position: left center;
}

.rdf-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  left: auto;
  z-index: 110;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(246, 176, 31, 0.4);
  border-radius: 12px;
  background: #fff;
  padding: 0 11px;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.rdf-mobile-toggle span {
  display: block;
  width: 100%;
  min-width: 22px;
  height: 2px;
  min-height: 2px;
  flex-shrink: 0;
  background: var(--burgundy);
  border-radius: 1px;
  transform-origin: center;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
}

.rdf-mobile-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.rdf-mobile-toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.rdf-mobile-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1023px) {
  .rdf-mobile-toggle {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .rdf-mobile-toggle { display: none; }
}

.lg-hidden { display: flex; }
@media (min-width: 1024px) {
  .lg-hidden { display: none !important; }
}

/* ---- Mobile sidebar ---- */
.rdf-sidebar {
  display: none;
}

@media (max-width: 1023px) {
  .rdf-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 320px;
    max-width: min(320px, 88vw);
    height: 100vh;
    height: -webkit-fill-available;
    height: 100dvh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding:
      max(28px, env(safe-area-inset-top, 0px))
      max(28px, env(safe-area-inset-right, 0px))
      max(28px, env(safe-area-inset-bottom, 0px))
      max(28px, env(safe-area-inset-left, 0px));
    border-right: 1px solid rgba(246, 176, 31, 0.2);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow-y: auto;
  }

  .rdf-sidebar.is-open {
    transform: translateX(0);
  }

  .rdf-sidebar-top {
    flex: 1;
    min-height: 0;
  }

  .rdf-sidebar .rdf-brand {
    margin-bottom: 32px;
  }

  .rdf-sidebar-nav .rdf-nav-link {
    display: flex;
    width: 100%;
  }

  .rdf-sidebar-bottom {
    flex-shrink: 0;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid rgba(246, 176, 31, 0.2);
  }

  body.rdf-nav-open {
    overflow: hidden;
  }
}

/* ---- Brand ---- */
.rdf-brand {
  display: block;
  flex-shrink: 0;
}

.rdf-brand-logo {
  display: block;
  width: 100%;
  max-width: 120px;
  height: auto;
}

/* ---- Nav ---- */
.rdf-header-nav {
  display: none;
}

@media (min-width: 1024px) {
  .rdf-header-nav {
    display: block;
    position: static;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }
}

.rdf-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 1024px) {
  .rdf-header-nav > .rdf-nav,
  .rdf-header-nav .rdf-nav {
    display: flex;
    align-items: center;
    gap: 4px;
  }
}

.rdf-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  transition: color 0.2s ease, background 0.2s ease;
}

@media (min-width: 1024px) {
  .rdf-nav-link {
    white-space: nowrap;
  }
}

.rdf-nav-item.has-children > .rdf-nav-link {
  padding-right: 12px;
}

.rdf-nav-link:hover,
.rdf-nav-item.is-active > .rdf-nav-link {
  color: var(--gold-dark);
  background: rgba(246, 176, 31, 0.05);
}

.rdf-nav-link-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.rdf-nav-caret {
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  opacity: 0.55;
  flex-shrink: 0;
}

.rdf-nav-item.is-open > .rdf-nav-link .rdf-nav-caret {
  transform: rotate(-135deg);
  opacity: 1;
}

.rdf-submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
  display: none;
}

@media (max-width: 1023px) {
  .rdf-nav-item.is-open > .rdf-submenu {
    display: block;
  }
}

@media (min-width: 1024px) {
  .rdf-nav-item.has-children {
    position: relative;
  }

  .rdf-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(246, 176, 31, 0.22);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 28px -16px rgba(16, 16, 16, 0.25);
    z-index: 20;
  }

  /* Невидимый мост — курсор не теряет hover при переходе к подпунктам */
  .rdf-nav-item.has-children > .rdf-submenu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
  }

  .rdf-nav-item.has-children:hover > .rdf-submenu,
  .rdf-nav-item.has-children:focus-within > .rdf-submenu {
    display: block;
  }

  .rdf-submenu .rdf-nav-link {
    white-space: normal;
  }
}

.rdf-submenu .rdf-nav-link {
  font-size: 14px;
  padding: 8px 14px;
}

/* ---- Lang switcher ---- */
.rdf-header-lang .rdf-lang {
  margin-bottom: 0;
  min-width: 96px;
}

.rdf-sidebar-bottom .rdf-lang {
  margin-bottom: 0;
}

.rdf-lang {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  width: 100%;
  max-width: 112px;
  padding: 4px;
  background: #f3f4f6;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.rdf-lang-btn {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 0;
  padding: 5px 4px;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  border-radius: 7px;
  color: var(--rdf-text-subtle);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.rdf-lang-btn:active {
  transform: scale(0.98);
}

.rdf-lang-btn.is-active {
  background: #fff;
  color: var(--burgundy);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* ---- Footer ---- */
.rdf-footer {
  border-top: 1px solid rgba(246, 176, 31, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

.rdf-footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 28px 24px;
  text-align: center;
}

@media (min-width: 640px) {
  .rdf-footer-inner { padding: 32px 48px; }
}

@media (min-width: 1024px) {
  .rdf-footer-inner { padding: 32px 64px; }
}

.rdf-footer-copy {
  margin: 0;
  font-size: 14px;
  color: var(--rdf-text-subtle);
}

/* ---- Glass ---- */
.glass-panel {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(246, 176, 31, 0.22);
}

.glass-panel-gold {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(254, 246, 230, 0.7) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(246, 176, 31, 0.4);
}

/* ---- Typography helpers ---- */
.rdf-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 8px;
}

.rdf-h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--burgundy);
  line-height: 1.15;
  margin: 0;
}

.rdf-h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--burgundy);
  line-height: 1.2;
  margin: 0;
}

.rdf-h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 12px;
}

.rdf-section-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding-inline: 24px;
}

@media (min-width: 640px) {
  .rdf-section-inner { padding-inline: 48px; }
}

@media (min-width: 1024px) {
  .rdf-section-inner { padding-inline: 64px; }
}

.rdf-section-inner--narrow { max-width: 768px; }

.rdf-section-head { margin-bottom: 48px; }

.rdf-section-lead {
  margin: 16px 0 0;
  max-width: 720px;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--brand-dark);
}

.rdf-section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.rdf-page { padding: 0 0 80px; }
.rdf-page-header { margin-bottom: 40px; }

.rdf-breadcrumbs {
  margin-top: 14px;
}

.rdf-breadcrumbs-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--rdf-text-subtle);
}

.rdf-breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.rdf-breadcrumbs-item::marker {
  content: '';
  display: none;
}

.rdf-breadcrumbs-item:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 10px;
  border-right: 1.5px solid #c4c4c4;
  border-top: 1.5px solid #c4c4c4;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.rdf-breadcrumbs a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.rdf-breadcrumbs a:hover {
  color: var(--burgundy);
}

.rdf-breadcrumbs-item.is-current span,
.rdf-breadcrumbs-item span[aria-current='page'] {
  color: var(--brand-dark);
  font-weight: 500;
}

.rdf-content {
  font-size: 16px;
  line-height: 1.7;
  color: #374151;
}

.rdf-content p { margin: 0 0 16px; }

/* Gutenberg blocks — core block CSS is stripped on the front for performance */
.rdf-content :where(.wp-block) {
  margin-top: 0;
  margin-bottom: 1.25em;
}

.rdf-content :where(.wp-block:last-child) {
  margin-bottom: 0;
}

.rdf-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.rdf-content.is-layout-constrained > .alignwide {
  max-width: 1152px;
  margin-left: auto;
  margin-right: auto;
}

.rdf-content.is-layout-constrained > .alignfull {
  max-width: none;
}

.rdf-content :where(h1, h2, h3, h4, h5, h6) {
  color: var(--brand-dark);
  line-height: 1.25;
  font-weight: 700;
  margin: 1.5em 0 0.75em;
}

.rdf-content :where(h1:first-child, h2:first-child, h3:first-child) {
  margin-top: 0;
}

.rdf-content :where(ul, ol) {
  margin: 0 0 16px;
  padding-left: 1.5em;
}

.rdf-content :where(blockquote) {
  margin: 0 0 16px;
  padding: 12px 20px;
  border-left: 4px solid var(--gold);
  color: #4b5563;
}

.rdf-content :where(table) {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 16px;
  -webkit-overflow-scrolling: touch;
}

.rdf-content :where(th, td) {
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  text-align: left;
}

.rdf-content :where(img) {
  border-radius: 8px;
}

.rdf-content :where(a) {
  color: var(--burgundy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rdf-content :where(a:hover) {
  color: var(--gold-dark);
}

/* ---- Buttons ---- */
.rdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  height: auto;
  padding: 10px 18px;
  box-sizing: border-box;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(246, 176, 31, 0.4);
  line-height: 1;
}

.rdf-btn:active {
  transform: translateY(0);
}

.rdf-btn svg,
.rdf-btn .rdf-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--gold);
}

.rdf-btn-primary {
  background: var(--burgundy);
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(148, 20, 23, 0.35);
}

.rdf-btn-primary:hover {
  background: var(--burgundy-light);
  transform: translateY(-2px);
}

.rdf-btn-ghost {
  background: #fff;
  color: var(--brand-dark);
}

.rdf-btn-ghost:hover {
  background: #fff;
  border-color: var(--gold);
  transform: translateY(-2px);
}

.rdf-btn-tag {
  font-size: 12px;
  color: var(--gold-dark);
  font-weight: 600;
}

.rdf-link-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--burgundy);
}

.rdf-link-all:hover { color: var(--gold-dark); }

.rdf-section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 16px;
  font-weight: 400;
  color: var(--burgundy);
  background: none;
  border: none;
  padding: 0;
  transition: color 0.2s ease;
}

.rdf-section-link:hover {
  color: var(--gold-dark);
}

.rdf-section-link .rdf-icon {
  color: var(--gold);
  transition: transform 0.25s ease;
}

.rdf-section-link:hover .rdf-icon {
  transform: translateX(4px);
}

/* ---- Hero ---- */
.rdf-hero {
  position: relative;
  overflow: hidden;
  padding: 0 0 64px;
  background-color: var(--bg);
}

#hero .rdf-section-inner {
  padding-top: 24px;
}

@media (min-width: 640px) {
  #hero .rdf-section-inner { padding-top: 48px; }
}

@media (min-width: 1024px) {
  #hero .rdf-section-inner { padding-top: 64px; }
}

.rdf-hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 28px;
}

.rdf-hero-inner::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: 0;
  height: 62%;
  background: linear-gradient(
    180deg,
    #fef6e6 0%,
    #fef6e6 12%,
    rgba(254, 246, 230, 0) 100%
  );
  z-index: 0;
  pointer-events: none;
}

@supports (width: 100cqw) {
  .rdf-hero-inner {
    container-type: inline-size;
  }

  .rdf-hero-inner::before {
    height: calc(100% - (100cqw * 9 / 30));
  }
}

.rdf-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 672px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.rdf-world-map {
  position: relative;
  z-index: 1;
}

.rdf-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: var(--gold);
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 500;
}

.rdf-hero-title {
  margin: 20px 0 0;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  color: #101010;
}

.rdf-hero-lead {
  margin: 16px 0 0;
  max-width: 640px;
  font-size: 20px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--brand-dark);
}

.rdf-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---- Partners row ---- */
.rdf-partners {
  padding: 48px 0;
  border-top: 1px solid rgba(246, 176, 31, 0.15);
  border-bottom: 1px solid rgba(246, 176, 31, 0.15);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}

.rdf-partners-title {
  margin-bottom: 28px;
}

.rdf-partners-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
}

.rdf-partner-card {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  text-align: center;
}

.rdf-partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  height: 100px;
}

.rdf-partner-logo img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.rdf-partner-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--brand-dark);
  font-weight: 400;
}

.rdf-partner-fallback {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

@media (max-width: 1023px) {
  .rdf-partners-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .rdf-partners-row {
    grid-template-columns: 1fr;
  }
}

/* ---- Stats ---- */
.rdf-stats { padding: 80px 0; }

.rdf-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .rdf-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

.tilt-card-wrapper {
  perspective: none;
}

.tilt-card {
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  min-height: 224px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  will-change: auto;
}

.tilt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -12px rgba(148, 20, 23, 0.18);
}

.watermark-number {
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 112px;
  font-weight: 700;
  line-height: 1;
  color: rgba(148, 20, 23, 0.04);
  user-select: none;
  pointer-events: none;
  z-index: 0;
  transition: color 0.15s ease;
}

.tilt-card:hover .watermark-number {
  color: rgba(246, 176, 31, 0.14);
  transform: none;
}

.rdf-stat-body {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 192px;
}

.rdf-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  color: var(--burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  margin-bottom: 16px;
  opacity: 0.85;
}

.rdf-stat-icon .rdf-icon,
.rdf-stat-icon svg {
  width: 32px;
  height: 32px;
}

.rdf-stat-num {
  font-size: 48px;
  font-weight: 700;
  color: var(--burgundy);
  line-height: 1;
}

.rdf-stat-label {
  font-size: 16px;
  font-weight: 600;
  margin: 8px 0 0;
}

/* ---- Programs ---- */
.rdf-programs {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(246, 176, 31, 0.15);
}

.rdf-programs-panel {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 16px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .rdf-programs-panel { grid-template-columns: repeat(3, 1fr); }
}

.rdf-program-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 32px;
}

.rdf-program-item + .rdf-program-item {
  border-top: 1px solid rgba(246, 176, 31, 0.25);
}

@media (min-width: 768px) {
  .rdf-program-item + .rdf-program-item {
    border-top: none;
    border-left: 1px solid rgba(246, 176, 31, 0.25);
  }
}

.rdf-program-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(148, 20, 23, 0.08);
  color: var(--burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 20, 23, 0.15);
}

.rdf-program-icon .rdf-icon,
.rdf-program-icon svg {
  width: 24px;
  height: 24px;
}

.rdf-program-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.25;
}

@media (min-width: 640px) {
  .rdf-program-title { font-size: 18px; }
}

/* ---- News ---- */
.rdf-news {
  padding: 64px 0;
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(246, 176, 31, 0.15);
}

.rdf-news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .rdf-news-grid { grid-template-columns: 7fr 5fr; }
}

.news-item { position: relative; overflow: hidden; }

.news-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3.5px;
  background: linear-gradient(to bottom, #f6b01f, #941417);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

.news-item:hover::before { transform: scaleY(1); }

.rdf-news-main {
  border-radius: 16px;
  padding: 24px;
}

.rdf-news-cover {
  position: relative;
  height: 256px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  background: linear-gradient(to top right, var(--burgundy), var(--burgundy-dark), var(--brand-dark));
  border: 1px solid rgba(246, 176, 31, 0.3);
  background-size: cover;
  background-position: center;
}

.rdf-news-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 600;
}

.rdf-news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  color: var(--rdf-text-subtle);
  margin-bottom: 8px;
}

.rdf-news-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  transition: color 0.2s;
}

.rdf-news-main:hover .rdf-news-title { color: var(--burgundy); }

.rdf-news-excerpt {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
  margin: 12px 0 0;
}

.rdf-news-more {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--burgundy);
}

.rdf-news-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rdf-news-side-item {
  border-radius: 12px;
  padding: 20px;
  flex: 1;
}

.rdf-news-side-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  transition: color 0.2s;
}

.rdf-news-side-item:hover .rdf-news-side-title { color: var(--burgundy); }

.rdf-news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Participants ---- */
.rdf-participants-filters {
  display: grid;
  grid-template-columns: minmax(200px, 1.45fr) repeat(3, minmax(150px, 1fr));
  gap: 12px 16px;
  align-items: end;
  margin-bottom: 32px;
}

.rdf-participants-filters .rdf-filter-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--rdf-text-subtle);
}

.rdf-participants-filters input,
.rdf-participants-filters .rdf-select select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(246, 176, 31, 0.22);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--brand-dark);
}

.rdf-participants-filters input:focus,
.rdf-participants-filters .rdf-select select:focus {
  outline: none;
}

.rdf-participants-filters input:focus-visible,
.rdf-participants-filters .rdf-select select:focus-visible {
  outline: none;
  box-shadow: var(--rdf-focus-ring);
}

.rdf-participants-filters input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.rdf-select {
  position: relative;
}

.rdf-select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
}

.rdf-select::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--burgundy);
  border-bottom: 1.5px solid var(--burgundy);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.rdf-participants-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 32px 0;
  text-align: center;
  color: rgba(17, 17, 17, 0.65);
}

@media (max-width: 900px) {
  .rdf-participants-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rdf-participants-filters .rdf-filter-field--search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .rdf-participants-filters {
    grid-template-columns: 1fr;
  }
}

.rdf-participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

.rdf-participant-card {
  border-radius: 16px;
  overflow: hidden;
}

.rdf-participant-card.is-entering {
  animation: rdf-participant-enter 0.4s ease both;
}

@keyframes rdf-participant-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rdf-participants-load {
  position: relative;
  min-height: 48px;
  margin-top: 8px;
}

.rdf-participants-sentinel {
  height: 1px;
}

.rdf-participants-loading {
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
}

.rdf-participants-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(127, 29, 29, 0.15);
  border-top-color: var(--burgundy);
  border-radius: 50%;
  animation: rdf-spin 0.7s linear infinite;
}

@keyframes rdf-spin {
  to { transform: rotate(360deg); }
}

.rdf-participant-card-photo {
  position: relative;
}

.rdf-participant-card-photo > .wp-post-image,
.rdf-participant-card-photo > img:not(.rdf-participant-flag),
.rdf-participant-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.rdf-participant-placeholder {
  background: var(--burgundy-deep);
}

.rdf-participant-flag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 26px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

.rdf-participant-card-body { padding: 16px; }

.rdf-participant-country {
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-dark);
}

.rdf-participant-name {
  font-size: 16px;
  font-weight: 600;
  margin: 4px 0 0;
}

.rdf-rank {
  font-size: 13px;
  font-weight: 500;
  color: var(--burgundy);
}

.rdf-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.rdf-filter-btn {
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(246, 176, 31, 0.3);
  font-size: 13px;
  font-weight: 500;
  background: #fff;
}

.rdf-filter-btn.is-active,
.rdf-filter-btn:hover {
  background: var(--burgundy);
  color: #fff;
  border-color: var(--burgundy);
}

/* ---- Media / streams / partners page ---- */
.rdf-media-albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.rdf-media-album {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rdf-media-album:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(16, 16, 16, 0.12);
}

.rdf-media-album-cover {
  position: relative;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, var(--burgundy), var(--brand-dark));
}

.rdf-media-album-cover img,
.rdf-media-album-cover-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rdf-media-album-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  color: var(--burgundy);
}

.rdf-media-album-count--video {
  color: var(--brand-dark);
}

.rdf-media-album-title {
  display: block;
  padding: 14px 16px 16px;
  font-size: 15px;
  font-weight: 600;
}

.rdf-media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.rdf-media-gallery-item {
  border: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  background: transparent;
}

.rdf-media-gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.rdf-media-gallery-item:hover img {
  transform: scale(1.03);
}

.rdf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 16, 16, 0.92);
}

.rdf-lightbox[hidden] {
  display: none !important;
}

body.rdf-lightbox-open {
  overflow: hidden;
}

.rdf-lightbox-figure {
  margin: 0;
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 48px);
}

.rdf-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.rdf-lightbox-close,
.rdf-lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.rdf-lightbox-close:hover,
.rdf-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.rdf-lightbox-close {
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}

.rdf-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.rdf-lightbox-prev { left: max(16px, env(safe-area-inset-left, 0px)); }
.rdf-lightbox-next { right: max(16px, env(safe-area-inset-right, 0px)); }

.rdf-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.rdf-media-section-gap {
  margin-top: 48px;
}

.rdf-media-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(246, 176, 31, 0.2);
  background: #fff;
}

.rdf-media-item img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.rdf-media-item span {
  display: block;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
}

.rdf-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 16px 0;
  background: #000;
}

.rdf-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.rdf-results { display: flex; flex-direction: column; gap: 24px; }

.rdf-broadcasts-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rdf-broadcast-block {
  border-radius: 16px;
  padding: 24px;
}

.rdf-broadcast-title {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(246, 176, 31, 0.25);
}

.rdf-broadcast-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rdf-broadcast-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(16, 16, 16, 0.06);
}

.rdf-broadcast-row:last-child { border-bottom: none; }

.rdf-broadcast-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--brand-dark);
}

.rdf-broadcast-watch {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.rdf-broadcast-watch:active {
  background: var(--gold-dark);
}

@media (max-width: 480px) {
  .rdf-broadcast-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.rdf-broadcast-watch:hover { background: var(--gold-light); }

.rdf-broadcast-empty {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

/* ---- Schedule ---- */
.rdf-schedule {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rdf-schedule-day {
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}

.rdf-schedule-day-title {
  margin: 0;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--burgundy);
  background: rgba(246, 176, 31, 0.1);
  border-bottom: 1px solid rgba(246, 176, 31, 0.25);
}

.rdf-schedule-events {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.rdf-schedule-event {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: baseline;
  margin: 0;
  padding: 14px 24px;
  font-size: 16px;
  color: var(--brand-dark);
  line-height: 1.4;
  border-bottom: 1px solid rgba(16, 16, 16, 0.06);
}

.rdf-schedule-event:last-child { border-bottom: none; }

.rdf-schedule-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-dark);
  white-space: nowrap;
}

.rdf-schedule-time--empty {
  color: #9ca3af;
  font-weight: 500;
}

.rdf-schedule-title {
  font-weight: 500;
}

@media (max-width: 640px) {
  .rdf-schedule-day-title,
  .rdf-schedule-event {
    padding-left: 20px;
    padding-right: 20px;
  }

  .rdf-schedule-event {
    grid-template-columns: 64px 1fr;
    gap: 12px;
  }
}

.rdf-result-card,
.rdf-video-card {
  border-radius: 16px;
  padding: 24px;
}

.rdf-contacts-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.rdf-contacts-top--single {
  grid-template-columns: 1fr;
}

.rdf-contacts-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  overflow: hidden;
  border-radius: 16px;
}

.rdf-contacts-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
}

.rdf-contacts-info {
  margin-top: 32px;
}

.rdf-contacts-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rdf-contacts-item {
  margin: 0;
}

.rdf-contacts-item dt {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-dark);
}

.rdf-contacts-item dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--brand-dark);
}

.rdf-contacts-item a {
  color: var(--burgundy);
  font-weight: 400;
  width: fit-content;
  max-width: 100%;
}

.rdf-contacts-item a:hover { color: var(--gold-dark); }

.rdf-contacts-person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.rdf-contacts-person-name {
  font-weight: 600;
}

.rdf-contacts-map {
  width: 100%;
  min-height: 280px;
  height: 100%;
  overflow: hidden;
  background: #f3f4f6;
  border-radius: 16px;
}

.rdf-contacts-content { margin-top: 28px; }

/* ---- Home contacts ---- */
.rdf-home-contacts {
  padding: 64px 0 80px;
  border-top: 1px solid rgba(246, 176, 31, 0.15);
}

.rdf-home-contacts-title {
  margin-bottom: 32px;
}

.rdf-home-contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.rdf-home-contacts-grid--single {
  grid-template-columns: 1fr;
}

.rdf-home-contacts-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rdf-home-contacts-photo {
  border-radius: 16px;
  overflow: hidden;
  min-height: 280px;
  background: #f3f4f6;
}

.rdf-home-contacts-photo a {
  display: block;
  width: 100%;
  height: 100%;
}

.rdf-home-contacts-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .rdf-home-contacts-grid {
    grid-template-columns: 1fr;
  }

  .rdf-home-contacts-photo img {
    min-height: 220px;
  }
}

@media (max-width: 768px) {
  .rdf-contacts-top {
    grid-template-columns: 1fr;
  }

  .rdf-contacts-photo {
    min-height: 220px;
  }

  .rdf-contacts-map {
    min-height: 240px;
  }
}

.rdf-schedule-content { margin-top: 32px; }

.rdf-partners-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rdf-partners-list-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
}

.rdf-partners-list-logo {
  flex-shrink: 0;
  width: 140px;
}

.rdf-partners-list-img {
  display: block;
  width: 100%;
  height: auto;
}

.rdf-partners-list-body {
  flex: 1;
  min-width: 0;
}

.rdf-partners-list-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 400;
  color: var(--brand-dark);
}

.rdf-partners-list-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--brand-dark);
}

.rdf-partners-list-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .rdf-partners-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .rdf-partners-list-logo {
    width: 120px;
  }
}

.rdf-single-thumb {
  margin-bottom: 32px;
  border-radius: 16px;
  overflow: hidden;
}

.rdf-single-thumb img { width: 100%; }

.rdf-404 {
  text-align: center;
  padding-top: clamp(64px, 18vw, 128px);
}
.rdf-404 .rdf-btn { margin-top: 32px; }

/* ---- Focus visibility ---- */
.rdf-nav-link:focus-visible,
.rdf-btn:focus-visible,
.rdf-lang-btn:focus-visible,
.rdf-mobile-toggle:focus-visible,
.rdf-lightbox-close:focus-visible,
.rdf-lightbox-nav:focus-visible,
.rdf-broadcast-watch:focus-visible,
.rdf-section-link:focus-visible,
.rdf-link-all:focus-visible,
.rdf-breadcrumbs a:focus-visible,
.rdf-media-gallery-item:focus-visible {
  outline: none;
  box-shadow: var(--rdf-focus-ring);
}

/* ---- Animations ---- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  .scroll-smooth {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .tilt-card:hover,
  .rdf-btn-primary:hover,
  .rdf-btn-ghost:hover {
    transform: none;
  }
}
