/* ==========================================================================
   Warstwa zgodnosci ze starym motywem.

   Czesc tresci redakcyjnych zawiera wlasny HTML oparty o klasy z custom.css
   poprzedniego motywu (.karta, .node, .dyrekcja, #tabelka...). Te reguly
   zostaly z niego przeniesione i objete klasa .sp-legacy, zeby dzialaly
   wylacznie wewnatrz obszaru tresci i nie zderzaly sie z Tailwindem -
   nazwy takie jak .title, .content czy .card sa zbyt ogolne, by wpuszczac
   je globalnie.

   Plik jest statyczny: NIE przechodzi przez build Tailwinda.
   Docelowo znika, gdy tresc zostanie przepisana.
   ========================================================================== */

.sp-legacy .button-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 20px;
    }

.sp-legacy .icon {
      width: 32px;
      height: 32px;
      flex-shrink: 0;
    }

.sp-legacy .text-block {
      display: flex;
      flex-direction: column;
      line-height: 1.3;
    }

.sp-legacy .title {
      font-size: 16px;
      font-weight: 600;
      color: #fff;
    }

.sp-legacy .subtitle {
      font-size: 13px;
      color: #f0f0f0;
    }

.sp-legacy .vulcan { background:#90caf9; }

.sp-legacy .office { background:#ffcc80; }

.sp-legacy .teams { background:#b39ddb; }

.sp-legacy .moodle { background:#ffab91; }

.sp-legacy .plan { background:#a5d6a7; }

.sp-legacy .content {
  margin: 0 40px 40px 40px;
}

.sp-legacy .content img {
  display: block;
  margin: 20px auto;
  max-width: 300px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.sp-legacy .content p {
  text-align: justify;
  line-height: 1.6;
}

.sp-legacy .kadra {
  font-family: Arial, sans-serif;
  background: #f8f9fa;
  color: #333;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.sp-legacy .kadra h1 {
  text-align: center;
  color: #3a7bd5; 
}

.sp-legacy .kadra .dyrekcja-container {
  text-align: center;
  margin-bottom: 40px;
}

.sp-legacy .kadra .node {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  margin: 6px;
  cursor: pointer;
  transition: transform 0.2s;
}

.sp-legacy .kadra .node:hover {
  transform: scale(1.05);
}

.sp-legacy .kadra .dyrekcja { background: #3a7bd5; }

.sp-legacy .kadra .przedmiot { 
  background: #2a9d8f; 
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sp-legacy .kadra .nauczyciel { 
  background: #f4a261; 
  display: block; 
  margin-top: 5px; 
  cursor: default;
}

.sp-legacy .kadra .subjects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.sp-legacy .kadra .subject-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 16px;
  text-align: center;
}

.sp-legacy .kadra .subject-card .node.przedmiot {
  margin-bottom: 10px;
  font-weight: bold;
}

.sp-legacy .kadra .teachers {
  height: 0;
  overflow: hidden;
  transition: height 0.4s ease;
}

.sp-legacy .kadra .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 14px;
}

.sp-legacy .kadra .arrow.rotate {
  transform: rotate(90deg);
}

@media (max-width: 768px) {
.sp-legacy .kadra .subjects {
    grid-template-columns: 1fr;
  }
}

.sp-legacy .social-icons {
      display: flex;
      gap: 20px;
      align-items: center;
    }

.sp-legacy .social-icons a {
      color: #4a5568;
      font-size: 15px;
      text-decoration: none;
      transition: color 0.3s ease, filter 0.3s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

.sp-legacy .social-icons a.s-email:hover {
      color: #EA4335;
      filter: drop-shadow(0 0 8px rgba(234, 67, 53, 0.6));
    }

.sp-legacy .social-icons a.s-facebook:hover {
      color: #1877F2;
      filter: drop-shadow(0 0 8px rgba(24, 119, 242, 0.6));
    }

.sp-legacy .social-icons a.s-youtube:hover {
      color: #FF0000;
      filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.6));
    }

@media (max-width: 480px) {
.sp-legacy .social-icons {
        gap: 10px;
    }
}

.sp-legacy .card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #cdd8ee;
    margin-bottom: 2rem;
    box-shadow: 0 3px 14px rgba(26, 54, 120, 0.1);
    background: #ffffff;
}

.sp-legacy .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(200, 80, 20, 0.18);
    border-color: #e67e22;
}

.sp-legacy .card:hover .card-image img {
    transform: scale(1.05);
}

.sp-legacy .card.accent {
    border-top: 4px solid #d43333;
}

.sp-legacy .card.accent .card-header {
    background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
}

.sp-legacy .kadra {
      font-family: Arial, sans-serif;
      background: #f8f9fa;
      color: #333;
      padding: 20px;
      max-width: 1200px;
      margin: 0 auto;
    }

.sp-legacy .kadra h1 {
      text-align: center;
      color: #3a7bd5; 
    }

.sp-legacy .kadra .dyrekcja-container {
      text-align: center;
      margin-bottom: 40px;
    }

.sp-legacy .kadra .node {
      display: inline-block;
      padding: 10px 16px;
      border-radius: 8px;
      color: white;
      margin: 6px;
      cursor: pointer;
      transition: transform 0.2s;
    }

.sp-legacy .kadra .node:hover {
      transform: scale(1.05);
    }

.sp-legacy .kadra .dyrekcja { background: #3a7bd5; }

.sp-legacy .kadra .przedmiot { 
      background: #2a9d8f; 
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

.sp-legacy .kadra .nauczyciel { 
      background: #f4a261; 
      display: block; 
      margin-top: 5px; 
      cursor: default;
    }

.sp-legacy .kadra .subjects {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
      max-width: 1000px;
      margin: 0 auto;
    }

.sp-legacy .kadra .subject-card {
      background: white;
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      padding: 16px;
      text-align: center;
    }

.sp-legacy .kadra .subject-card .node.przedmiot {
      margin-bottom: 10px;
      font-weight: bold;
    }

.sp-legacy .kadra .teachers {
      height: 0;
      overflow: hidden;
      transition: height 0.4s ease;
    }

.sp-legacy .kadra .arrow {
      display: inline-block;
      transition: transform 0.3s ease;
      font-size: 14px;
    }

.sp-legacy .kadra .arrow.rotate {
      transform: rotate(90deg);
    }

.sp-legacy .big_napis {

      text-align: center;
      font-size: 36px !important;
      font-weight: bold;
    }

@media (max-width: 768px) {
.sp-legacy .kadra .subjects {
        grid-template-columns: 1fr;
      }
}

.sp-legacy .karta {
      position: relative;
      overflow: hidden;
      background: linear-gradient(135deg, #dbeafe 0%, #fde8d8 100%);
      border-radius: 12px;
      padding: 24px 28px;
      margin: 30px auto;
      width: 90%;
      border: 1px solid #c8d8f8;
      box-shadow: 0 4px 18px rgba(26, 54, 120, 0.11);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      animation: fadeInUp 0.6s ease forwards;
      opacity: 0;
      transform: translateY(20px);
    }

.sp-legacy .karta:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 28px rgba(26, 54, 120, 0.18);
    }

.sp-legacy .karta h2 {
      margin-top: 0;
      font-size: 20px;
      color: #1a237e;
      text-align: center;
      font-weight: 600;
      letter-spacing: 0.5px;
    }

.sp-legacy .karta p {
     margin: 12px 0;
      font-size: 15px;
    }

.sp-legacy .karta a {
      position: relative;
      display: inline-block;
      color: #0d47a1;
      text-decoration: none;
      font-weight: 500;
      background: rgba(255, 255, 255, 0.6);
      padding: 8px 12px;
      border-radius: 6px;
      transition: background 0.2s ease, transform 0.2s ease;
      overflow: hidden;
    }

.sp-legacy .karta a:hover {
      background: rgba(255, 255, 255, 0.9);
      transform: translateY(-1px);
    }

.sp-legacy .karta a:active {
      transform: scale(0.98);
    }

.sp-legacy .divider {
      width: 80%;
      height: 1px;
      background: rgba(255,255,255,0.5);
      margin: 15px auto;
    }

.sp-legacy #tekst-tresc {
      font-family: "Segoe UI", Arial, sans-serif;
      background-color: #f8fbff;
      padding: 20px;
      border-radius: 10px;
      box-shadow: 0 0 10px rgba(0,0,0,0.08);
      max-width: 1000px;
      margin: 40px auto;
    }

.sp-legacy .naglowek-sp1 {
      background: linear-gradient(90deg, #0b2e6d 0%, #1c55aa 100%);
      color: white;
      text-align: center;
      font-size: 1.2em;
      font-weight: 600;
      padding: 10px 0;
      border-radius: 8px 8px 0 0;
      letter-spacing: 1px;
    }

.sp-legacy #tekst-tresc .tytul {
      text-align: center;
      font-weight: bold;
      color: #0b2e6d;
      font-size: 1.5em;
      margin: 25px 0 20px 0;
    }

.sp-legacy #ramka {
      border: 2px solid #c7d7ec;
      border-radius: 10px;
      background-color: #ffffff;
      padding: 15px;
      box-shadow: 0 0 8px rgba(0,0,0,0.06);
      
      
      opacity: 0;
      transform: translateY(30px);
      transition: opacity 1s ease, transform 1s ease;
    }

.sp-legacy #ramka.visible {
      opacity: 1;
      transform: translateY(0);
    }

.sp-legacy #tabelka {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.95em;
      color: #222;
      margin-top: 10px;
      
      table-layout: fixed;
    }

.sp-legacy #tabelka th:first-child,
.sp-legacy #tabelka td:first-child {
      width: 18%;
    }

.sp-legacy #tabelka th small {
      display: block;
      font-weight: 400;
      font-size: 0.82em;
      line-height: 1.35;
      margin-top: 3px;
      white-space: normal;
    }

.sp-legacy #tabelka th,
.sp-legacy #tabelka td {
      border: 1px solid #c7d7ec;
      padding: 10px;
      text-align: center;
    }

.sp-legacy #tabelka th {
      background-color: #0b2e6d;
      color: #ffffff;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-size: 0.9em;
    }

.sp-legacy #tabelka tr:nth-child(even) td {
      background-color: #f3f8ff;
    }

.sp-legacy #tabelka td:hover {
      background-color: #e0efff;
    }

.sp-legacy #tabelka td:first-child {
      font-weight: bold;
      background-color: #eaf2fb;
      color: #0b2e6d;
    }

.sp-legacy #tabelka th:first-child {
      border-top-left-radius: 8px;
    }

.sp-legacy #tabelka th:last-child {
      border-top-right-radius: 8px;
    }

.sp-legacy #tekst-tresc .spacer {
      margin-top: 20px;
    }

/* ==========================================================================
   NADPISANIA WŁASNE (dopisywane po wygenerowanej części)

   #ramka ma w starym motywie `opacity: 0` i pokazuje się dopiero, gdy
   JavaScript dopisze klasę .visible. Skrypt ten jest wklejony osobno
   w treści każdej podstrony specjalisty — strona zbiorcza go nie ma,
   więc wszystkie trzy tabele pozostawały niewidoczne.

   Zamiast powielać skrypt pokazujemy zawartość od razu. Treść widoczna
   bez JavaScriptu jest i tak zachowaniem właściwszym: przy wyłączonych
   skryptach stary wariant ukrywał tabelę godzin bezpowrotnie.
   ========================================================================== */
.sp-legacy #ramka {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   ANIMACJE wymagane przez przeniesione reguly.

   Pierwsza wersja ekstraktora pomijala wszystkie @keyframes, przez co
   .karta zostawala z opacity: 0 i animacja, ktorej nie bylo - karty na
   stronie Konkursy przedmiotowe byly niewidoczne mimo poprawnej tresci.
   @keyframes sa globalne, wiec nie da sie ich objac klasa .sp-legacy.
   ========================================================================== */

@keyframes fadeInUp {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }

@keyframes fadeInUp {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }

/* ==========================================================================
   RETUSZ PALETY — dopasowanie treści redakcyjnych do nowego motywu.

   Przeniesione reguły zachowały paletę starego projektu: pastelowy gradient
   błękit-brzoskwinia, niebieskie nagłówki (#1a237e) i bladoniebieskie
   pigułki odnośników (#0d47a1). Obok granatowego nagłówka i czerwonych
   akcentów nowego motywu karty odcinały się jak wklejone z innej strony.

   Zmieniamy wyłącznie kolory i obramowania — układ, odstępy i animacja
   wejścia zostają takie, jak były, więc treść stron nie wymaga poprawek.
   ========================================================================== */

.sp-legacy .karta {
  background: #FFFFFF;
  border: 1px solid #DDE4EC;
  box-shadow: 0 2px 10px rgba(13, 35, 58, 0.07);
}

.sp-legacy .karta:hover {
  box-shadow: 0 16px 40px -12px rgba(13, 35, 58, 0.28);
}

/* Nagłówek sekcji jak w pozostałych częściach motywu: czerwony pasek
   z lewej zamiast wyśrodkowanego niebieskiego napisu. */
.sp-legacy .karta h2 {
  color: #0D233A;
  text-align: left;
  letter-spacing: -0.01em;
  padding-left: 0.9rem;
  border-left: 4px solid #C82333;
}

/* Odnośniki do plików: białe kafelki z granatowym tekstem, czerwony akcent
   przy najechaniu — ten sam język co listy wpisów w nowym motywie. */
.sp-legacy .karta a {
  color: #0D233A;
  background: #F2F5F8;
  border: 1px solid #DDE4EC;
  border-left: 3px solid #B9C7D7;
  font-weight: 600;
}

.sp-legacy .karta a:hover {
  background: #FFFFFF;
  border-left-color: #C82333;
  color: #C82333;
}

/* --- rodzina .kadra (Rada Rodziców, dawna strona kadry) -------------------
   Stary projekt kodował hierarchię trzema niepowiązanymi barwami:
   niebieski = dyrekcja, morski = przedmiot, pomarańczowy = nauczyciel.
   Zastępujemy je odcieniami granatu — hierarchia zostaje czytelna,
   a czerwień pozostaje zarezerwowana dla elementów interaktywnych. */
.sp-legacy .kadra h1 {
  color: #0D233A;
}

.sp-legacy .kadra .dyrekcja  { background: #0D233A; }
.sp-legacy .kadra .przedmiot { background: #2F4C6F; }
.sp-legacy .kadra .nauczyciel { background: #5B7595; }

.sp-legacy .kadra .node:hover {
  transform: translateY(-1px);
}

/* --- .card: kolory wpisane w treść strony COVID-19 -----------------------
   Ta strona ma własny blok <style> z regułami `.card`, `.card h2` i
   `.card a` w starej palecie. Nie edytujemy treści — wystarczy selektor
   o wyższej szczegółowości: `.sp-legacy .card a` (0,2,1) przebija
   `.card a` (0,1,1) niezależnie od kolejności w dokumencie. */
.sp-legacy .card {
  background: #FFFFFF;
  border: 1px solid #DDE4EC;
}

.sp-legacy .card h2 {
  color: #0D233A;
  text-align: left;
  padding-left: 0.9rem;
  border-left: 4px solid #C82333;
}

.sp-legacy .card a {
  color: #0D233A;
  font-weight: 600;
}

.sp-legacy .card a:hover {
  color: #C82333;
}
