/* ============================================================
   tulon.net — Main Stylesheet
   Bootstrap 5 + własne style
   ============================================================ */

:root {
  --primary-dark:   #0f172a;
  --primary-blue:   #2563eb;
  --blue-light:     #3b82f6;
  --accent:         #7c3aed;
  --success-green:  #16a34a;
  --bg-light:       #f8fafc;
  --bg-section:     #f1f5f9;
  --card-shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,.10);
  --border-radius:  .875rem;
  --transition:     .2s ease;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-light);
  color: #334155;
  -webkit-font-smoothing: antialiased;
}

.main-content { min-height: calc(100vh - 64px - 80px); }

.bg-section { background: var(--bg-section); }

/* ─── Nawigacja ─────────────────────────────────────────────── */
.site-nav {
  background-color: var(--primary-dark) !important;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.brand-name { font-weight: 800; font-size: 1.3rem; color: #f1f5f9; }
.brand-dot  { color: #60a5fa; }

.site-nav .nav-link {
  color: #94a3b8 !important;
  font-size: .9rem;
  font-weight: 500;
  padding: .5rem .75rem !important;
  border-radius: .5rem;
  transition: color var(--transition), background var(--transition);
}
.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  color: #f1f5f9 !important;
  background: rgba(255,255,255,.08);
}
.site-nav .nav-link i { opacity: .75; }

/* ─── Hero (strona główna) ───────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a5f 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  overflow: hidden;
}
.hero-greeting { font-size: 1rem; color: #93c5fd; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; margin-bottom: .25rem; }
.hero-name     { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; margin-bottom: .5rem; }
.hero-title    { font-size: 1.2rem; color: #7dd3fc; font-weight: 500; margin-bottom: .75rem; }
.hero-tagline  { font-size: 1rem; color: #94a3b8; max-width: 520px; line-height: 1.7; }

.btn-hero { font-size: .9rem; font-weight: 500; border-radius: 2rem; padding: .5rem 1.25rem; }

.hero-photo {
  width: 180px; height: 180px;
  border-radius: 50%; object-fit: cover;
  border: 4px solid rgba(255,255,255,.15);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.hero-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.03);
}
.shape-1 { width: 500px; height: 500px; top: -150px; right: -100px; }
.shape-2 { width: 300px; height: 300px; bottom: -80px; left: -60px; }

/* ─── Tech stack carousel ───────────────────────────────────── */
.stack-carousel-section {
  background:
    radial-gradient(circle at 15% 30%, rgba(59, 130, 246, .10), transparent 45%),
    radial-gradient(circle at 90% 70%, rgba(16, 185, 129, .08), transparent 45%),
    linear-gradient(180deg, #f8fbff 0%, #f7fafc 100%);
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.stack-carousel-note {
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.stack-carousel-mask {
  overflow: hidden;
  position: relative;
  border-radius: 1rem;
}

.stack-carousel-mask::before,
.stack-carousel-mask::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 84px;
  z-index: 3;
  pointer-events: none;
}

.stack-carousel-mask::before {
  left: 0;
  background: linear-gradient(90deg, #f8fbff 20%, transparent 100%);
}

.stack-carousel-mask::after {
  right: 0;
  background: linear-gradient(270deg, #f8fbff 20%, transparent 100%);
}

.stack-carousel-track {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 1rem;
  animation: stack-scroll-rtl 30s linear infinite;
  will-change: transform;
}

.stack-carousel-mask:hover .stack-carousel-track {
  animation-play-state: paused;
}

.stack-carousel-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

.stack-logo-item {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  width: clamp(125px, 11vw, 155px);
  min-width: clamp(125px, 11vw, 155px);
  height: clamp(105px, 10vw, 125px);
  padding: .6rem .5rem;
  border-radius: .85rem;
  text-decoration: none;
  text-align: center;
  color: #0f172a;
  background: rgba(255, 255, 255, .8);
  border: 1px solid #dbe6f5;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.stack-logo-item-static {
  cursor: default;
}

.stack-logo-item img {
  display: block;
  width: auto;
  height: auto;
  max-width: clamp(36px, 8vw, 54px);
  max-height: clamp(36px, 8vw, 54px);
  flex-shrink: 0;
  object-fit: contain;
}

.stack-logo-item span {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
}

.stack-logo-item:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
  color: #0f172a;
}

@keyframes stack-scroll-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - .5rem)); }
}

/* ─── Feature cards (skróty na homepage) ────────────────────── */
.feature-card {
  display: block;
  background: #fff;
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--primary-blue);
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  color: #334155;
  height: 100%;
}
.feature-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  border-left-color: var(--accent);
  color: #0f172a;
}
.feature-icon {
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.feature-card p  { font-size: .9rem; color: #64748b; flex-grow: 1; }
.feature-link    { font-size: .85rem; font-weight: 600; color: var(--primary-blue); }

/* ─── Nagłówki sekcji ───────────────────────────────────────── */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a5f 100%);
  color: #fff;
  padding: 2.5rem 0;
}
.page-header h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: .25rem; }
.page-header .text-muted { color: #94a3b8 !important; }

/* ─── Karty wpisów blogowych ────────────────────────────────── */
.post-card {
  display: block;
  background: #fff;
  border-radius: var(--border-radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  color: #334155;
}
.post-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  color: #0f172a;
}
.post-card-body { padding: 1.5rem; }
.post-title  { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; color: #0f172a; }
.post-excerpt { font-size: .875rem; line-height: 1.6; margin-bottom: .75rem; }
.post-card { cursor: pointer; }
.post-tags { position: relative; z-index: 2; }

/* ─── Tagi ───────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  background: #ede9fe;
  color: #5b21b6;
  padding: .15rem .6rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
  margin: .1rem;
  transition: background var(--transition), color var(--transition);
}
.tag:hover, .tag-active {
  background: var(--accent);
  color: #fff;
}

/* ─── Back link ──────────────────────────────────────────────── */
.back-link { color: var(--primary-blue); font-weight: 500; font-size: .9rem; }
.back-link:hover { color: var(--accent); }

/* ─── Blog detail ────────────────────────────────────────────── */
.post-heading    { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; color: #0f172a; }
.post-description { font-size: 1.1rem; }

.post-content { font-size: 1.05rem; line-height: 1.85; color: #374151; }
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  font-weight: 700; color: #0f172a; margin-top: 2rem; margin-bottom: .75rem;
}
.post-content h2 { font-size: 1.5rem; border-bottom: 2px solid #e2e8f0; padding-bottom: .5rem; }
.post-content h3 { font-size: 1.2rem; }
.post-content a  { color: var(--primary-blue); }
.post-content a:hover { color: var(--accent); }
.post-content blockquote {
  border-left: 4px solid var(--primary-blue);
  padding: .75rem 1rem;
  margin: 1.5rem 0;
  background: #f0f4ff;
  border-radius: 0 .5rem .5rem 0;
  color: #475569;
}
.post-content pre {
  border-radius: .625rem;
  overflow-x: auto;
  font-size: .88rem;
}
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.post-content th, .post-content td { border: 1px solid #e2e8f0; padding: .625rem .875rem; text-align: left; }
.post-content th { background: #f8fafc; font-weight: 700; }
.post-content img { max-width: 100%; border-radius: .5rem; }

/* ─── Karty szkoleń ─────────────────────────────────────────── */
.training-card {
  display: block;
  background: #fff;
  border-radius: var(--border-radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  color: #334155;
}
.training-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  color: #0f172a;
}
.training-card-body { padding: 1.5rem; }
.training-title    { font-size: .95rem; font-weight: 700; color: #0f172a; }

/* Typ szkolenia — odznaki */
.training-type-badge {
  display: inline-block;
  padding: .2rem .75rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 700;
}
.badge-online  { background: #dcfce7; color: #166534; }
.badge-offline { background: #fef3c7; color: #92400e; }
.badge-hybrid  { background: #ede9fe; color: #4c1d95; }

/* ─── Training detail ───────────────────────────────────────── */
.training-detail-card {
  background: #fff;
  border-radius: var(--border-radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--card-shadow);
}
.training-info-list li {
  display: flex;
  justify-content: space-between;
  padding: .6rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: .9rem;
}
.training-info-list li:last-child { border-bottom: none; }
.info-label { color: #64748b; display: flex; align-items: center; gap: .4rem; }
.section-subtitle { font-weight: 700; color: #0f172a; }

.certificate-image { max-height: 600px; }
.certificate-embed { width: 100%; height: 650px; border: 1px solid #e2e8f0; border-radius: .5rem; }

/* ─── About / O mnie ────────────────────────────────────────── */
.about-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a5f 100%);
  color: #fff;
  padding: 3rem 0;
}
.about-photo {
  width: 160px; height: 160px;
  border-radius: 50%; object-fit: cover;
  border: 4px solid rgba(255,255,255,.2);
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.about-photo-placeholder {
  width: 160px; height: 160px;
  border-radius: 50%; background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
}
.about-title { font-size: 1.1rem; }
.about-hero h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }

.about-section-title {
  font-size: 1.15rem; font-weight: 700; color: #0f172a;
  padding-bottom: .625rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

/* ─── Skill bars ─────────────────────────────────────────────── */
.skill-bar {
  height: 8px;
  border-radius: 9999px;
  background: #e2e8f0;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent));
  border-radius: 9999px;
  transition: width 1s cubic-bezier(.4, 0, .2, 1);
  width: 0;
}
.skill-name { color: #334155; }

/* ─── Timeline ───────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before {
  content: '';
  position: absolute; left: .45rem; top: .6rem; bottom: 0;
  width: 2px; background: #e2e8f0;
}
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -1.75rem; top: .4rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary-blue);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-blue);
}
.timeline-content h5 { font-size: 1rem; font-weight: 700; color: #0f172a; }
.timeline-period {
  font-size: .78rem;
  color: #64748b;
  white-space: nowrap;
  font-weight: 500;
  background: #f1f5f9;
  padding: .1rem .5rem;
  border-radius: 9999px;
}

/* ─── Stopka ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-brand .brand-name { font-weight: 800; color: #f1f5f9; font-size: 1.1rem; }
.footer-brand .brand-dot  { color: #60a5fa; }
.footer-link { color: #64748b; transition: color var(--transition); }
.footer-link:hover { color: #f1f5f9; }

/* ─── Empty states ───────────────────────────────────────────── */
.empty-state { padding: 4rem 0; }
.empty-state i { opacity: .35; }

/* ─── Paginacja ──────────────────────────────────────────────── */
.pagination .page-link {
  border: none;
  color: var(--primary-blue);
  border-radius: .5rem !important;
  margin: 0 .125rem;
  font-weight: 500;
}
.pagination .page-item.active .page-link {
  background: var(--primary-blue);
  color: #fff;
}

/* ─── Bootstrap subtle colors (polyfill dla starszych BS) ────── */
.bg-success-subtle { background: #dcfce7 !important; }
.bg-secondary-subtle { background: #f1f5f9 !important; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 3rem 0; }
  .hero-name { font-size: 2rem; }
  .about-hero { padding: 2rem 0; }
  .stack-logo-item {
    width: clamp(108px, 30vw, 132px);
    min-width: clamp(108px, 30vw, 132px);
    height: clamp(96px, 28vw, 114px);
    padding: .6rem .5rem;
  }
  .stack-logo-item span { font-size: .68rem; }
  .stack-logo-item img {
    max-width: clamp(32px, 12vw, 46px);
    max-height: clamp(32px, 12vw, 46px);
  }
  .stack-carousel-mask::before,
  .stack-carousel-mask::after { width: 44px; }
}
