/* ==================================================================
   RESET & GLOBAL
   ================================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-bg: #f6f7f9;
  --secondary-bg: #ebedef;
  --accent: #383838;
  --accent-contrast: #979797;

  --button-main: #232323;
  --button-hover: #393939;
  --button-alt: #e2e2e2;
  --button-alt-hover: #d0d0d0;

  --box-shadow: 0 6px 24px rgba(50, 50, 50, 0.08),
                0 1.5px 8px rgba(30, 30, 30, 0.07);
  --box-radius: 13px;

  --text-main: #26292c;
  --text-muted: #57595b;
  --border-light: #d3d4d6;

  --gradient-glow: linear-gradient(120deg, #f5f6f7 60%, #ebedef 100%);

  --danger: #c23a2b;
  --success: #3b6b3d;

  --gold: #f5c950;
  --accent-blue: #2483d6;

  /* Brand reds for CTAs + title */
  --brand-red-1: #a20707;
  --brand-red-2: #c02c2c;

  /* Hero sizing */
  --hero-height-desktop: 610px;
  --hero-height-mobile: 520px;
}

html,
body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: var(--text-main);
  background: linear-gradient(120deg, #f5f6f7 0%, #e9eaed 100%);
  min-height: 100vh;
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: #bbb #f6f7f9;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 10px;
  background: #f6f7f9;
}

::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 7px;
}

::-webkit-scrollbar-thumb:hover {
  background: #888;
}

main {
  flex: 1;
}

.container {
  width: 93%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.4rem 1.2rem;
}

/* ==================================================================
   HEADER
   ================================================================== */

header[role="banner"] {
  background: rgb(246 247 249 / 0.96);
  padding: 1.2rem 2.5rem;
  border-bottom: 1.5px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 0.5rem;
  box-shadow: 0 2px 12px rgb(60 60 60 / 0.04);
  backdrop-filter: blur(4px);
}

.logo {
  font-size: 2rem;
  font-weight: 900;
  color: #a20707;
  text-decoration: none;
  letter-spacing: 0.02em;
  line-height: 1;
  display: flex;
  align-items: center;
  height: 42px;
  user-select: none;
  text-shadow: 0 1px 6px rgb(40 40 40 / 0.09);
}

nav,
.account-controls,
.header-right,
.lang-switcher {
  display: flex;
  align-items: center;
}

nav,
.account-controls {
  gap: 2rem;
}

.account-controls,
.header-right {
  gap: 1.2rem;
}

.header-right {
  gap: 1.5rem;
}

nav a,
.account-controls a,
.header-right a {
  color: var(--text-main);
  font-weight: 600;
  text-decoration: none;
  padding: 5px 0;
  border-bottom: 2.5px solid transparent;
  line-height: 1.5;
  font-size: 1.06rem;
  background: none;
  outline: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  border-radius: 6px 6px 0 0;
  transition:
    color 0.18s,
    border-bottom 0.18s,
    background 0.19s,
    box-shadow 0.15s;
}

nav a:hover,
.account-controls a:hover,
.header-right a:hover {
  color: var(--accent);
  border-bottom: 2.5px solid var(--accent-contrast);
  background: var(--secondary-bg);
  box-shadow: 0 2px 10px rgb(60 60 60 / 0.04);
}

.lang-switcher {
  position: relative;
}

.lang-switcher select {
  padding: 0.45rem 1.8rem 0.45rem 0.75rem;
  font-size: 1.01rem;
  border-radius: 8px;
  border: 1.2px solid var(--border-light);
  background: var(--secondary-bg);
  font-weight: 500;
  color: var(--text-main);
  margin-left: 0.5rem;
  appearance: none;
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(50 50 50 / 0.03);
  background-image: url("data:image/svg+xml;charset=UTF-8,<svg width='12' height='8' xmlns='http://www.w3.org/2000/svg'><path d='M1 1l5 5 5-5' stroke='%23383838' stroke-width='2' fill='none' fill-rule='evenodd'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 10px;
}

.mobile-toggle {
  display: none;
  background: none;
  font-size: 2rem;
  border: none;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
  height: 40px;
  margin-left: 0.8rem;
  color: var(--text-main);
  transition: background 0.1s;
}

.mobile-toggle:focus {
  outline: 2px solid var(--accent-contrast);
  background: #ededed;
}

/* Header responsive */

@media (max-width: 1100px) {
  header[role="banner"] {
    padding: 1rem;
  }

  .logo {
    font-size: 1.45rem;
  }

  .header-right {
    gap: 1rem;
  }
}

@media (max-width: 900px) {
  .logo {
    font-size: 1.15rem;
  }
}

@media (max-width: 768px) {
  header[role="banner"] {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    padding: 0.7rem 0.5rem 0.3rem;
  }

  .logo {
    font-size: 1.12rem;
    height: 36px;
    margin-bottom: 0.3rem;
  }

  nav {
    flex-direction: column;
    width: 100%;
    display: none;
    gap: 0.2rem;
    margin-top: 0.3rem;
  }

  nav.show {
    display: flex;
    background: var(--primary-bg);
    padding: 0.7rem 0 0.4rem;
    border-radius: 0 0 13px 13px;
    box-shadow: 0 2px 10px rgb(30 30 30 / 0.07);
    z-index: 9;
  }

  .mobile-toggle {
    display: flex;
    position: absolute;
    right: 1.5rem;
    top: 1.1rem;
    z-index: 15;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--primary-bg);
    border-radius: 6px;
    height: 40px;
    width: 44px;
    min-width: 44px;
    box-shadow: 0 2px 8px rgb(50 60 70 / 0.07);
  }

  .header-right {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    margin-top: 0.2rem;
  }

  .account-controls {
    width: 100%;
    gap: 0.7rem;
    margin: 0.2rem 0;
  }

  .lang-switcher {
    width: 100%;
    margin-top: 0.2rem;
    justify-content: flex-start;
  }
}

@media (max-width: 500px) {
  .logo {
    font-size: 0.98rem;
  }

  .mobile-toggle {
    right: 0.7rem;
  }

  nav {
    font-size: 0.97rem;
  }
}

/* ==================================================================
   CONTENT BLOCKS
   ================================================================== */

.white-box,
.info-block {
  background: var(--primary-bg);
  border-radius: var(--box-radius);
  box-shadow: var(--box-shadow);
  border: 1.5px solid var(--border-light);
  color: var(--text-main);
  transition:
    box-shadow 0.18s,
    background 0.16s,
    transform 0.14s;
  padding: 2rem;
  margin-bottom: 2rem;
}

.white-box .meta {
  font-size: 0.89rem;
  color: var(--text-muted);
  margin-bottom: 0.42rem;
  display: block;
}

.white-box:hover,
.white-box:focus-within {
  background: var(--gradient-glow);
  box-shadow:
    0 8px 32px rgb(40 40 40 / 0.13),
    0 1.5px 8px rgb(30 30 30 / 0.11);
  transform: translateY(-4px) scale(1.012);
}

section {
  background: var(--primary-bg);
  padding: 3rem 2.2rem;
  margin: 2rem auto;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgb(40 40 40 / 0.07);
  border: 1.3px solid var(--border-light);
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

section p {
  font-size: 1rem;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .white-box {
    padding: 14px;
  }

  h1 {
    font-size: 1.45rem;
  }

  h2 {
    font-size: 1.07rem;
  }
}

/* ==================================================================
   FOOTER
   ================================================================== */

footer {
  background: var(--accent);
  text-align: center;
  padding: 2.1rem;
  color: #e9eaeb;
  font-size: 0.97rem;
  box-shadow: 0 -3px 22px rgb(30 30 30 / 0.11);
}

footer a {
  color: #ffe27a;
  text-decoration: underline;
  font-weight: 600;
  text-underline-offset: 2.5px;
  transition: color 0.15s;
}

footer a:hover,
footer a:focus {
  color: #fff;
  text-decoration-thickness: 2.2px;
}

/* ==================================================================
   TYPOGRAPHY & TABLES
   ================================================================== */

h1,
.page-title {
  font-size: 2.35rem;
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 0.85rem;
  text-shadow: 0 2px 8px rgb(30 30 30 / 0.05);
  letter-spacing: 0.02em;
}

h2 {
  font-size: 1.43rem;
  color: var(--accent-contrast);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.text-accent {
  color: var(--accent);
}

.text-center {
  text-align: center;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.table-style,
.sys-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-top: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgb(30 30 30 / 0.06);
}

.table-style th,
.sys-table th {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 1em 1.2em;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
  letter-spacing: 0.03em;
}

.table-style td,
.sys-table td {
  background: var(--secondary-bg);
  color: var(--text-main);
  padding: 1em 1.2em;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.sys-table td {
  background: #f7f7f7;
}

.sys-table tr:nth-child(even) td {
  background: #ededed;
}

/* ==================================================================
   HERO + DOWNLOAD (shared)
   Bright video + single centered glass card + centered CTA
   ================================================================== */

.hero,
.hero-download {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: var(--hero-height-desktop); /* uniform hero height on all pages */
  color: #fff;
  text-align: center;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 4px 32px rgb(40 40 40 / 0.1);
  padding: 2.5rem;
  isolation: isolate; /* guarantees card is above decorative layers */
}

/* Fallback gradient for generic hero */
.hero {
  background: linear-gradient(120deg, #222325 0%, #343438 100%);
}

/* Download hero (with image) */
.hero-download {
  background:
    url(/assets/bg-download.webp) no-repeat center center,
    linear-gradient(120deg, #36393e 0%, #44474a 100%);
  background-size: cover, cover;
}

/* Subtle dark overlay for download hero */
.hero-download::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(36 36 36 / 0.7);
  z-index: 0;
}

/* Video under content; no heavy scrim */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  filter: brightness(1) contrast(1.06) saturate(1.08);
}

/* Subtle texture only; optional texture via --hero-texture */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      40% 30% at 50% 40%,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0) 70%
    ),
    var(--hero-texture, transparent);
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  opacity: 0.45;
}

/* Kill old grid/shimmer if still present */
.hero::after,
.hero .hero-shimmer {
  content: none !important;
  display: none !important;
}

/* Single centered glass card for title + text + CTA */
.hero-card {
  position: relative;
  z-index: 2;
  width: min(880px, 92vw);
  margin: 0 auto;
  padding: clamp(16px, 2.3vw, 28px) clamp(18px, 2.6vw, 34px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-radius: 18px;

  background: rgba(18, 22, 26, 0.42);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
          backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.hero-card h1 {
  margin: 4px 0;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: clamp(2rem, 3.2vw + 1rem, 3.2rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-card p {
  margin: 0;
  max-width: 62ch;
  color: #eef2f6;
  font-size: clamp(1rem, 0.8vw + 0.9rem, 1.25rem);
  line-height: 1.55;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* Legacy hero button neutralization so it doesn’t clash with CTA */
.hero .button {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: inherit;
}

/* If some pages still render bare H1/P inside hero, keep them readable */
.hero > h1,
.hero > p {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.35rem 0.75rem;
  background: rgba(14, 16, 20, 0.2);
  -webkit-backdrop-filter: blur(6px) saturate(125%);
          backdrop-filter: blur(6px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* Countdown / iframe inside hero – flat, no extra card */
.countdown-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 820px;
  min-width: 0;
  height: 250px;
  display: block;
  margin: 12px auto 0;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* HERO responsive */

@media (max-width: 900px) {
  .hero,
  .hero-download {
    min-height: var(--hero-height-mobile);
  }

  .main-register-btn {
    font-size: 1.05rem;
    padding: 0.8rem 2rem;
  }
}

@media (max-width: 768px) {
  .hero-video {
    display: none;
  }

  .hero-card {
    width: 92vw;
    padding: 0.9rem 1rem;
  }
}

@media (max-width: 700px) {
  .countdown-frame {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: 370px !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
    position: static !important;
  }

  .hero,
  .container,
  .parent-of-countdown-frame {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 600px) {
  .countdown-frame {
    height: 340px !important;
    margin: 0 auto 2.2rem auto !important;
  }
}

/* ==================================================================
   MAIN HERO CTA BUTTON (Rev 2)
   ================================================================== */

.main-register-btn {
  /* Palette */
  --btn-red-1: #a20707;
  --btn-red-2: #c02c2c;
  --btn-dark-1: #5a5a5a; /* hover start */
  --btn-dark-2: #232323; /* hover end   */

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.92rem 2.6rem;
  border: 0;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--btn-red-1) 0%, var(--btn-red-2) 100%);
  box-shadow:
    0 10px 28px rgba(162, 7, 7, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 0.12s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    filter 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Sheen sweep (hover/focus) */
.main-register-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 20%,
    rgba(255, 255, 255, 0) 40%
  );
  transform: translateX(-120%);
  opacity: 0;
}

@keyframes btnSheen {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }
  12% {
    opacity: 0.65;
  }
  60% {
    transform: translateX(120%);
    opacity: 0;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

.main-register-btn:hover::before,
.main-register-btn:focus-visible::before {
  animation: btnSheen 1.1s ease forwards;
}

.main-register-btn:hover,
.main-register-btn:focus-visible {
  background: linear-gradient(90deg, var(--btn-dark-1) 0%, var(--btn-dark-2) 100%);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(40, 40, 40, 0.3);
}

/* Pressed */
.main-register-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 6px 18px rgba(40, 40, 40, 0.26);
}

/* Accessible focus ring */
.main-register-btn:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.15),
    0 0 0 6px rgba(162, 7, 7, 0.45),
    0 18px 36px rgba(40, 40, 40, 0.3);
}

/* Optional soft pulse: add data-animate="pulse" on element */
@keyframes ctaPulse {
  0%,
  100% {
    filter: saturate(100%);
    box-shadow: 0 10px 28px rgba(162, 7, 7, 0.26);
  }
  50% {
    filter: saturate(108%);
    box-shadow: 0 14px 34px rgba(162, 7, 7, 0.33);
  }
}

.main-register-btn[data-animate="pulse"] {
  animation: ctaPulse 2.6s ease-in-out infinite;
}

/* Optional arrow/icon nudge */
.main-register-btn .btn-icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.18s ease;
}

.main-register-btn:hover .btn-icon,
.main-register-btn:focus-visible .btn-icon {
  transform: translateX(3px);
}

/* Size variants */
.main-register-btn--lg {
  padding: 1.05rem 2.9rem;
  font-size: 1.18rem;
  border-radius: 16px;
}

.main-register-btn--sm {
  padding: 0.68rem 1.4rem;
  font-size: 0.98rem;
  border-radius: 12px;
}

/* Easy centering helper */
.main-register-btn.is-centered {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

/* Disabled state */
.main-register-btn[aria-disabled="true"],
.main-register-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  background: linear-gradient(90deg, #9a9a9a 0%, #7b7b7b 100%);
  box-shadow: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .main-register-btn,
  .main-register-btn::before {
    transition: none !important;
    animation: none !important;
  }
}

/* ==================================================================
   CLASS + NEWS OVERVIEW
   ================================================================== */

.class-overview {
  background: #ececec;
  padding: 2.1rem;
  margin: 2.2rem auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(70 70 70 / 0.05);
  font-size: 1.13rem;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.1rem;
  margin-top: 2rem;
}

.class-panel {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--secondary-bg);
  border-radius: 11px;
  padding: 1.6rem;
  text-align: center;
  box-shadow: 0 2px 12px rgb(30 30 30 / 0.04);
  border: 1.2px solid var(--border-light);
  transition:
    transform 0.17s,
    box-shadow 0.17s,
    border-color 0.15s,
    background 0.15s;
}

.class-panel:hover,
.class-panel:focus-within {
  border-color: #a20707;
  box-shadow: 0 10px 40px rgb(162 7 7 / 0.12);
  transform: translateY(-6px) scale(1.038);
  background: var(--primary-bg);
}

.class-panel h3 {
  margin-top: 1rem;
  font-size: 1.25rem;
  color: var(--accent);
}

.class-panel .desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.01rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
}

.class-icon {
  width: 215px;
  height: auto;
  border-radius: 13px;
  box-shadow: 0 2px 10px rgb(30 30 30 / 0.05);
  background: #fff;
}

.news-item {
  background: var(--primary-bg);
  padding: 1.18rem 1.5rem;
  border-left: 4px solid var(--accent);
  margin-bottom: 1.65rem;
  border-radius: 9px;
  box-shadow: 0 2px 9px rgb(40 40 40 / 0.06);
  border: 1.2px solid var(--border-light);
  transition:
    box-shadow 0.18s,
    background 0.17s,
    transform 0.12s;
}

.news-item:hover {
  background: var(--secondary-bg);
  box-shadow: 0 8px 22px rgb(40 40 40 / 0.11);
  transform: translateY(-2px) scale(1.014);
}

.news-item .meta {
  font-size: 0.89rem;
  color: var(--text-muted);
  margin-bottom: 0.28rem;
  display: block;
}

/* ==================================================================
   HEADER BUTTONS
   ================================================================== */

.account-controls .btn-register,
.header-right .btn-register,
nav .btn-register,
.account-controls .btn-login,
.header-right .btn-login,
nav .btn-login,
.account-controls .btn-account,
.header-right .btn-account,
nav .btn-account,
.account-controls .btn-logout,
.header-right .btn-logout,
nav .btn-logout {
  display: inline-block;
  font-family: inherit;
  font-size: 1.01rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  border-radius: 8px !important;
  padding: 0.44rem 1.2rem !important;
  margin: 0 0.19em 0 0;
  vertical-align: middle;
  min-height: 2.1em;
  line-height: 1.1;
  border: 1.3px solid transparent;
  box-shadow: 0 1px 4px rgb(44 44 44 / 0.07);
  background: transparent;
  text-decoration: none !important;
  cursor: pointer;
  transition:
    background 0.16s,
    box-shadow 0.12s,
    border 0.12s,
    color 0.1s,
    transform 0.09s;
  z-index: 1;
}

.btn-register {
  background: linear-gradient(90deg, var(--brand-red-1) 0%, var(--brand-red-2) 100%) !important;
  color: #fff !important;
  border-color: var(--brand-red-1) !important;
  box-shadow: 0 1.5px 7px rgb(162 7 7 / 0.09);
}

.btn-register:hover,
.btn-register:focus {
  background: linear-gradient(90deg, var(--brand-red-2) 0%, var(--brand-red-1) 100%) !important;
  color: #fff !important;
  border-color: var(--brand-red-2) !important;
  box-shadow: 0 2px 8px rgb(162 7 7 / 0.14);
  transform: scale(1.01);
}

.btn-login {
  background: linear-gradient(90deg, #373738 0%, #535356 100%) !important;
  color: #fff !important;
  border-color: #383838 !important;
  box-shadow: 0 1px 6px #23232310;
}

.btn-login:hover,
.btn-login:focus {
  background: linear-gradient(90deg, #535356 0%, #373738 100%) !important;
  color: #fff !important;
  border-color: var(--brand-red-1) !important;
  box-shadow: 0 2px 8px #23232316;
  transform: scale(1.01);
}

.btn-account {
  background: linear-gradient(90deg, #f6f7f9 0%, #ebedef 100%) !important;
  color: #232323 !important;
  border-color: #c4c7d0 !important;
  box-shadow: 0 1px 4px rgba(200, 200, 200, 0.07);
}

.btn-account:hover,
.btn-account:focus {
  background: linear-gradient(90deg, #ebedef 0%, #f6f7f9 100%) !important;
  color: var(--brand-red-1) !important;
  border-color: var(--brand-red-1) !important;
  box-shadow: 0 1.5px 8px rgba(162, 7, 7, 0.11);
  transform: scale(1.01);
}

.btn-logout {
  background: transparent !important;
  color: var(--brand-red-1) !important;
  border: 1.3px solid #ecdede !important;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.44rem 1.1rem !important;
  font-size: 1.01rem !important;
  box-shadow: none !important;
}

.btn-logout:hover,
.btn-logout:focus {
  background: var(--brand-red-1) !important;
  color: #fff !important;
  border-color: var(--brand-red-1) !important;
  box-shadow: 0 1.5px 8px rgba(162, 7, 7, 0.11);
  transform: scale(1.01);
}

/* Neutralize nav-pill underline when used as buttons */
nav a.btn-register:hover,
nav a.btn-login:hover,
nav a.btn-account:hover,
nav a.btn-logout:hover,
.account-controls a.btn-register:hover,
.account-controls a.btn-login:hover,
.account-controls a.btn-account:hover,
.account-controls a.btn-logout:hover,
.header-right a.btn-register:hover,
.header-right a.btn-login:hover,
.header-right a.btn-account:hover,
.header-right a.btn-logout:hover {
  background: unset !important;
  border-bottom: none !important;
}

/* ==================================================================
   NEWS GRID & ARCHIVE
   ================================================================== */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(325px, 1fr));
  gap: 2.1rem;
  margin-top: 1.5rem;
}

.news-card {
  background: var(--primary-bg);
  border-radius: 13px;
  box-shadow: 0 3px 18px rgb(30 30 30 / 0.07);
  border: 1.4px solid var(--border-light);
  padding: 2.1rem 1.45rem 1.6rem;
  display: flex;
  flex-direction: column;
  min-height: 235px;
  position: relative;
  transition:
    box-shadow 0.19s,
    transform 0.17s,
    background 0.18s,
    border-color 0.18s;
}

.news-card:hover,
.news-card:focus-within {
  background: var(--gradient-glow);
  box-shadow:
    0 8px 28px rgb(162 7 7 / 0.09),
    0 2px 10px rgb(30 30 30 / 0.1);
  transform: translateY(-7px) scale(1.018);
  border-color: var(--accent);
}

.news-meta {
  font-size: 0.95rem;
  color: var(--accent-contrast);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
  font-weight: 500;
}

.news-title {
  font-size: 1.22rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.7rem;
  line-height: 1.16;
}

.news-preview {
  color: var(--text-muted);
  font-size: 1.03rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 4.4em;
}

.news-btn {
  margin-top: auto;
  align-self: flex-start;
  background: linear-gradient(90deg, #a20707 0%, #c02c2c 100%);
  color: #fff !important;
  font-size: 1.02rem;
  font-weight: 600;
  padding: 0.59em 1.33em;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  box-shadow: 0 2px 10px rgb(162 7 7 / 0.09);
  letter-spacing: 0.02em;
  transition:
    background 0.18s,
    color 0.16s,
    box-shadow 0.15s,
    transform 0.13s;
}

.news-btn:hover,
.news-btn:focus {
  background: linear-gradient(90deg, #c02c2c 0%, #a20707 100%);
  color: #fff !important;
  transform: scale(1.035);
  box-shadow: 0 5px 18px rgb(162 7 7 / 0.15);
}

/* Optional legacy list style, shared news shells */

.news-archive {
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
}

.news-archive-item {
  background: var(--primary-bg);
  border-radius: 12px;
  border: 1.3px solid var(--border-light);
  box-shadow: 0 3px 14px rgba(40, 40, 40, 0.06);
  padding: 1.45rem 1.7rem 1.4rem;
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.13s,
    border-color 0.16s;
}

.news-archive-item:hover,
.news-archive-item:focus-within {
  background: var(--gradient-glow);
  box-shadow:
    0 9px 30px rgba(162, 7, 7, 0.08),
    0 3px 12px rgba(40, 40, 40, 0.12);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.news-archive-item header {
  margin-bottom: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.news-archive-title {
  font-size: 1.25rem;
  margin: 0;
}

.news-archive-title a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
}

.news-archive-title a:hover,
.news-archive-title a:focus {
  color: #a20707;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-archive-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.news-archive-excerpt {
  margin: 0.25rem 0 1rem;
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.7;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-archive-readmore {
  margin-top: 0.3rem;
}

.news-archive-readmore .news-btn {
  font-size: 0.98rem;
  padding: 0.55em 1.4em;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header .page-title {
  margin-bottom: 0.3rem;
}

.page-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
}

.news-page {
  margin-top: 2rem;
}

.news-archive-shell {
  background: var(--primary-bg);
  border-radius: var(--box-radius);
  box-shadow: var(--box-shadow);
  border: 1.4px solid var(--border-light);
  padding: 2.2rem 2.3rem 2.5rem;
}

.news-archive-header {
 დგ
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.7rem;
}

.news-archive-header .page-title {
  margin: 0;
}

.news-archive-header .page-subtitle {
  margin: 0;
}

.news-archive-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.news-archive-empty {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin-top: 1.2rem;
}

.news-archive-footer,
.news-back-links {
  margin-top: 2rem;
}

.news-archive-grid .news-card {
  min-height: 0;
  padding-top: 1.7rem;
  padding-bottom: 1.5rem;
}

.news-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.news-article {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.news-page .mu-hero-article.white-box {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.news-page .mu-hero-article img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.news-more {
  margin-top: 2.8rem;
  padding: 1.9rem 1.6rem 2.3rem;
  background: var(--primary-bg);
  border-radius: var(--box-radius);
  border: 1.3px solid var(--border-light);
  box-shadow: var(--box-shadow);
}

.news-more-subtitle {
  margin: 0.2rem 0 1.2rem;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.news-grid--more .news-card {
  min-height: 0;
  padding-top: 1.5rem;
  padding-bottom: 1.4rem;
}

@media (max-width: 700px) {
  .news-archive-shell {
    padding: 1.6rem 1.2rem 2rem;
  }

  .news-more {
    padding: 1.5rem 1.1rem 1.9rem;
  }
}

.news-page .news-title a {
  color: inherit;
  text-decoration: none;
}

.news-page .news-title a:hover,
.news-page .news-title a:focus {
  color: #a20707;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==================================================================
   RESPONSIVE TYPE TWEAKS
   ================================================================== */

@media (max-width: 600px) {
  h1,
  .h1 {
    font-size: 1.59rem;
  }

  h2,
  .h2 {
    font-size: 1.22rem;
  }

  h3,
  .h3 {
    font-size: 1.08rem;
  }

  h4,
  .h4 {
    font-size: 0.98rem;
  }

  h5,
  .h5 {
    font-size: 0.92rem;
  }

  p,
  .p,
  ul,
  ol {
    font-size: 0.97rem;
  }

  pre,
  code {
    font-size: 0.96rem;
  }
}

/* ==================================================================
   UTILITIES & STATE
   ================================================================== */

.strong-against {
  color: #2d995b;
}

.weak-against {
  color: #c23a2b;
}

body.nav-open,
body.menu-open {
  overflow: hidden;
}

/* Force mobile nav open when burger has aria-expanded="true" */
@media (max-width: 768px) {
  header[role="banner"] .mobile-toggle[aria-expanded="true"] + nav {
    display: flex !important;
  }
}

/* ==================================================================
   DOWNLOAD HERO SPECIFIC
   ================================================================== */

.hero-download {
  /* slightly adjusted padding for buttons, same height as main hero via vars */
  padding: 4.5rem 1.8rem 3rem;
}

.hero-download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0.9rem;
}

/* Three CTAs on download page */
.hero-download-btn {
  font-size: 1.02rem;
  padding: 0.82rem 1.9rem;
}

.hero-download-btn--alt {
  background: linear-gradient(90deg, #2483d6 0%, #1a5da0 100%);
  box-shadow: 0 6px 20px rgba(36, 131, 214, 0.26);
}

.hero-download-btn--alt:hover,
.hero-download-btn--alt:focus-visible {
  background: linear-gradient(90deg, #1a5da0 0%, #2483d6 100%);
}

.hero-download-btn--ghost {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.45) 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.26);
}

.hero-download-btn--ghost:hover,
.hero-download-btn--ghost:focus-visible {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.65) 100%);
}

.download-note-hero {
  margin-top: 0.9rem;
  font-size: 0.98rem;
  color: #e1e5ea;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

@media (max-width: 768px) {
  .hero-download {
    padding: 3.2rem 1rem 2.2rem;
  }

  .hero-download-actions {
    gap: 0.6rem;
  }

  .hero-download-btn {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }
}
