/*
 * Baltic Education - Centralny arkusz stylów
 * Oparty na BALTIC_STYLE_GUIDE.md
 * Ostatnia aktualizacja: 2025-10-18
 */

/* ==================== 1. SYSTEM KOLORÓW ==================== */
:root {
  /* Paleta Główna - Dark Blue Theme */
  --bg: #0c1224;           /* Główne tło - ciemny granat */
  --surface: #0f1733;      /* Powierzchnie - karty, sekcje */
  --line: #1d2a55;         /* Linie, obramowania */

  /* Brand Colors */
  --brand: #2e6bff;        /* Niebieski - główny akcent */
  --brand2: #00c2b8;       /* Turkusowy - drugi akcent */

  /* Text */
  --text: #e8ecff;         /* Tekst główny - jasny */
  --muted: #c7d2fe;        /* Tekst wyciszony */
  --white: #fff;

  /* Status */
  --ok: #22c55e;           /* Sukces - zielony */
  --warn: #f59e0b;         /* Ostrzeżenie - pomarańczowy */
  --danger: #dc2626;       /* Błąd - czerwony */

  /* Utilities */
  --shadow: 0 10px 40px rgba(0,0,0,.25);
  --radius: 18px;
}

/* ==================== 2. RESET & BASE ==================== */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, "Noto Sans", Arial, sans-serif;
  color: var(--text);
  background: #1a2332;
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--brand2);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  text-decoration: underline;
}

/* ==================== 3. TYPOGRAFIA ==================== */
h1 {
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.1;
  margin: 18px 0 12px;
  color: var(--white);
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--white);
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--white);
  font-weight: 600;
}

.lead {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 820px;
  line-height: 1.6;
}

small, .note {
  font-size: 13px;
  color: var(--muted);
}

/* ==================== 4. LAYOUT & SPACING ==================== */
.container, .wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Grid Systems */
.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cols {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}

/* Spacing utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

/* ==================== 5. BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary, .btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #001225;
  box-shadow: 0 6px 24px rgba(8,10,20,.25);
}

.btn-primary:hover, .btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(46, 107, 255, 0.3);
  text-decoration: none;
}

.btn-secondary, .btn-outline, .btn.ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-secondary:hover, .btn-outline:hover, .btn.ghost:hover {
  border-color: var(--brand);
  color: var(--white);
  text-decoration: none;
}

.btn-success {
  background: linear-gradient(to right, #16a34a, #22c55e);
  color: white;
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== 6. CARDS ==================== */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  padding: 18px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 107, 255, 0.5);
  box-shadow: 0 8px 24px rgba(46, 107, 255, 0.2);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

/* ==================== 7. BADGES & PILLS ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-warning {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.4);
}

.badge-danger {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.badge-info {
  background: rgba(147, 51, 234, 0.2);
  color: #c084fc;
  border: 1px solid rgba(147, 51, 234, 0.3);
}

.eyebrow {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(46,107,255,.15);
  color: #bcd3ff;
  border: 1px solid rgba(46,107,255,.25);
  font-weight: 600;
  letter-spacing: 0.2px;
  font-size: 0.875rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,194,184,.12);
  border: 1px solid rgba(0,194,184,.3);
  color: #bafff5;
  font-weight: 600;
  font-size: 0.875rem;
}

.chip {
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  cursor: pointer;
  user-select: none;
  transition: all 0.3s;
}

.chip:hover {
  border-color: var(--brand);
}

.chip[data-active="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #001225;
  font-weight: 700;
}

/* ==================== 8. FORMS ==================== */
.form-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand);
}

.form-input::placeholder {
  color: #64748b;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.checkbox {
  margin-top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ==================== 9. HEADER & NAVIGATION ==================== */
header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(140%) blur(8px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
  z-index: 50;
  padding: 1rem 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo, .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white);
  text-decoration: none;
}

.logo img {
  height: 32px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.35));
}

.brand .logo, .brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}

.brand .title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.sub {
  font-size: 12px;
  color: var(--muted);
}

.menu {
  display: flex;
  gap: 18px;
  align-items: center;
}

.menu a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
}

.menu a:hover {
  color: var(--brand2);
  text-decoration: none;
}

/* ==================== 10. HERO SECTION ==================== */
.hero {
  position: relative;
  padding: 56px 0 32px;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(46,107,255,.25), transparent),
              radial-gradient(1000px 600px at 120% 0%, rgba(0,194,184,.2), transparent);
}

.hero h1 {
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.1;
  margin: 18px 0 12px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

/* ==================== 11. ALERTS ==================== */
.alert-success, .spots-success {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 0.75rem;
  padding: 1rem;
  color: #22c55e;
  font-weight: 500;
}

.alert-warning, .spots-warning {
  background: rgba(251, 146, 60, 0.2);
  border: 1px solid rgba(251, 146, 60, 0.4);
  border-radius: 0.75rem;
  padding: 1rem;
  color: #fb923c;
  font-weight: 500;
}

.alert-error, .error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  color: #f87171;
}

/* ==================== 12. TABLES ==================== */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
}

td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ==================== 13. MODALS ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
}

.modal-close:hover {
  opacity: 1;
}

/* ==================== 14. LOADING STATES ==================== */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--brand);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

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

.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.05) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==================== 15. ANIMACJE ==================== */
.gradient-text {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ==================== 16. SPECIFIC PATTERNS ==================== */
/* KPI / Stats Cards */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 14px 0;
}

.kpi {
  padding: 16px;
  border-radius: 14px;
  background: rgba(15,23,51,.6);
  border: 1px dashed var(--line);
}

.kpi b {
  font-size: 22px;
  color: var(--white);
}

/* Testimonials */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.quote {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  position: relative;
}

.quote:before {
  content: """;
  position: absolute;
  left: 16px;
  top: -16px;
  font-size: 60px;
  line-height: 1;
  color: var(--brand);
  opacity: 0.25;
}

/* Pricing Cards */
.pricing-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  transition: all 0.3s;
}

.pricing-card.featured {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(46, 107, 255, 0.1), rgba(0, 194, 184, 0.1));
  box-shadow: 0 8px 32px rgba(46, 107, 255, 0.2);
}

.pricing-amount {
  font-size: 3rem;
  font-weight: bold;
  background: linear-gradient(to right, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 1rem 0;
}

/* Course List Item */
.course-list-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s;
  position: relative;
}

.course-list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(46, 107, 255, 0.5);
  box-shadow: 0 8px 24px rgba(46, 107, 255, 0.2);
}

.spots-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(251, 146, 60, 0.2);
  border: 1px solid var(--warn);
  color: var(--warn);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Video wrapper */
.video-wrap {
  aspect-ratio: 16/9;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==================== 17. FOOTER ==================== */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--brand2);
}

.mini-foot {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--muted);
  padding: 16px 0;
}

.mini-foot .wrap {
  max-width: 1100px;
  margin-inline: auto;
  padding: 0 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

/* ==================== 18. ACCESSIBILITY ==================== */
:focus-visible {
  outline: 2px solid var(--brand2);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==================== 19. RESPONSIVE ==================== */
@media (max-width: 960px) {
  .grid-2, .grid-3, .cols, .hero-grid, .footer-grid, .kpis, .testimonials {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .hide-sm {
    display: none;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .container, .wrap {
    padding: 0 1rem;
  }

  .hero {
    padding: 32px 0 24px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
