:root {
      --bg-overlay: rgba(255, 255, 255, 0.9);
      --primary: #2563eb;
      --primary-soft: #dbeafe;
      --text-main: #0f172a;
      --text-muted: #6b7280;
      --border-radius-lg: 18px;
      --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.16);
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      min-height: 100vh;
      display: flex;
      align-items: stretch;
      justify-content: center;
      padding: 16px;
      background-image: url("/media/background.png");
      background-size: cover;
      background-position: center;
      background-attachment: fixed;
      color: var(--text-main);
    }

    .page-wrapper {
      width: 100%;
      max-width: 1100px;
      margin: auto;
    }

    .card {
      background: var(--bg-overlay);
      border-radius: 24px;
      box-shadow: var(--shadow-soft);
      padding: 24px 20px 28px;
      backdrop-filter: blur(12px);
    }

    @media (min-width: 768px) {
      .card {
        padding: 32px 36px 40px;
        border-radius: 28px;
      }
    }

    @media (min-width: 1024px) {
      .page-wrapper {
        max-width: 1280px;
      }

      .card {
        min-height: calc(100vh - 80px);
      }
    }

    /* HEADER: LOGO + PAVADINIMAS */
    .header {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }

    .logo {
  width: 220px;              /* platesnis */
  height: auto;              /* automatinis aukštis */
  border-radius: 12px;       /* švelniai apvalinti kampai */
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

    .header-text {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .header-title {
      font-size: 1.4rem;
      font-weight: 600;
      letter-spacing: 0.01em;
    }

    @media (min-width: 768px) {
      .header-title {
        font-size: 1.7rem;
      }
    }

    .header-subtitle {
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    /* TEKSTO JUOSTOS / BLOKAI */
    .text-block {
      border-radius: var(--border-radius-lg);
      padding: 16px 16px;
      background: #FBE9DB;
      border: 1px solid rgba(37, 99, 235, 0.18);
      margin-bottom: 24px;
      font-size: 0.95rem;
      line-height: 1.5;
    }

    @media (min-width: 768px) {
      .text-block {
        padding: 18px 20px;
        font-size: 1rem;
      }
    }

    .text-block strong {
      font-weight: 600;
    }

    /* MOKYMŲ BLOKAS */
    .section-title {
      font-size: 1.05rem;
      font-weight: 600;
      margin-bottom: 12px;
    }

    .section-subtitle {
      font-size: 0.9rem;
      color: var(--text-muted);
      margin-bottom: 18px;
    }

  /* ---------- KORTELIŲ IŠDĖSTYMAS – FLEX GRID ---------- */

/* Mobiluose – viena kolona */
.training-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
}

/* Kortelės plotis adaptuojasi prie ekrano */
.training-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.96);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);

  /* svarbi dalis */
  flex: 1 1 clamp(260px, 30vw, 340px);   /* automatinis plotis */
  max-width: 360px;                      /* kad kortelės neaugtų per plačiai */
}

/* hover ir pan. palieki tokius, kokie buvo */

    .training-item a {
      display: flex;
      flex-direction: column;
      height: 100%;
      color: inherit;
      text-decoration: none;
    }

    .training-image {
      width: 100%;
      aspect-ratio: 16 / 9;                /* gražus santykis */
      min-height: 150px;
      max-height: 220px;
      background-size: cover;
      background-position: center;
      position: relative;
    }

    .training-label {
      position: absolute;
      inset: auto 10px 10px 10px;
      padding: 6px 10px;
      border-radius: 999px;
      font-size: 0.8rem;
      background: rgba(15, 23, 42, 0.78);
      color: white;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .training-item:hover,
    .training-item:focus-within {
      transform: translateY(-3px);
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
    }

    .training-item:active {
      transform: translateY(0);
      box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
    }

    .training-info {
      padding: 10px 12px 12px;
      background: rgba(248, 250, 252, 0.96);
      color: var(--text-main);
      font-size: 0.85rem;
      line-height: 1.45;
      border-radius: 0 0 16px 16px;
    }

    .training-info-title {
      font-weight: 600;
      margin-bottom: 4px;
    }

    .training-info-text {
      color: var(--text-muted);
    }

    /* APATINIS TEKSTO BLOKAS */
    .footer-block {
      margin-top: 8px;
      padding-top: 16px;
      border-top: 1px solid rgba(148, 163, 184, 0.4);
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    .footer-block strong {
      color: var(--text-main);
      font-weight: 600;
    }

    /* COOKIE MODAL */
    .cookie-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.55);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      transition: opacity 0.2s ease;
    }

    .cookie-backdrop.cookie-hidden {
      opacity: 0;
      pointer-events: none;
    }

    .cookie-modal {
      max-width: 520px;
      width: 92%;
      background: rgba(255, 255, 255, 0.98);
      border-radius: 20px;
      padding: 20px 20px 18px;
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
      border: 1px solid rgba(148, 163, 184, 0.5);
    }

    @media (min-width: 640px) {
      .cookie-modal {
        padding: 22px 26px 20px;
      }
    }

    .cookie-title {
      font-size: 1.1rem;
      font-weight: 600;
      margin-bottom: 8px;
    }

    .cookie-text {
      font-size: 0.9rem;
      color: var(--text-muted);
      line-height: 1.5;
      margin-bottom: 10px;
    }

    .cookie-text ul {
      margin: 6px 0 8px 18px;
      padding-left: 0;
    }

    .cookie-text li {
      margin-bottom: 3px;
    }

    .cookie-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 6px;
    }

    .cookie-btn-primary {
      border: none;
      border-radius: 999px;
      padding: 8px 18px;
      font-size: 0.9rem;
      font-weight: 500;
      background: #FBE9DB;
      color: #00000;
      cursor: pointer;
    }

    .cookie-btn-primary:hover {
      opacity: 0.95;
    }

    .cookie-link {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-top: 6px;
    }
    
    .training-visited-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    pointer-events: none;
    font-family: inherit;
    line-height: 1.2;
    white-space: nowrap;
}

