/* ============================================
   RozliczFlote.pl - Custom Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Navbar scroll effect --- */
#navbar {
  background: transparent;
  backdrop-filter: none;
}

#navbar.scrolled {
  background: rgba(10, 15, 44, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* --- Hero floating card --- */
.floating-card {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* --- Glassmorphism --- */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* --- Feature cards hover --- */
.feature-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.12);
}

/* --- Scroll animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Form focus effects --- */
.form-input {
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* --- Gradient text --- */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Pulse animation for badges --- */
.pulse-dot {
  animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* --- Blog card hover --- */
.blog-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.blog-card:hover .blog-card-image {
  transform: scale(1.05);
}

.blog-card-image {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- CTA button glow --- */
.cta-glow {
  position: relative;
}

.cta-glow::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #3b82f6, #818cf8);
  z-index: -1;
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cta-glow:hover::after {
  opacity: 0.5;
}

/* --- Loading spinner --- */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
}

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

/* --- Admin styles --- */
.admin-sidebar a.active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-right: 3px solid #3b82f6;
}

/* --- Hero pattern overlay --- */
.hero-pattern {
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px
  );
  background-size: 32px 32px;
}

/* --- Checkmark list --- */
.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  background: #3b82f6;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* --- Blog article content --- */
.article-content table {
  border-collapse: collapse;
  width: 100%;
  overflow-x: auto;
  display: block;
  max-width: 100%;
}

.article-content table thead {
  background: #0a0f2c;
  color: #fff;
}

.article-content table th,
.article-content table td {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  border-bottom: 1px solid #f3f4f6;
}

.article-content table tr:nth-child(even) {
  background: #f9fafb;
}

.article-content table tr:hover {
  background: #eff6ff;
}

.article-content figure {
  margin: 2rem 0;
}

.article-content figure figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #9ca3af;
  margin-top: 0.75rem;
  font-style: italic;
}

.article-content img {
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-content blockquote {
  border-left: 4px solid #3b82f6;
  background: rgba(59, 130, 246, 0.04);
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  color: #374151;
  font-style: normal;
}

/* --- Article typography (prose fallback) --- */
.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  scroll-margin-top: 6rem;
  line-height: 1.3;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 6rem;
  line-height: 1.4;
}

.article-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  scroll-margin-top: 6rem;
}

.article-content p {
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.article-content a {
  color: #3b82f6;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.3);
  text-underline-offset: 2px;
}

.article-content a:hover {
  text-decoration-color: #3b82f6;
}

.article-content ul,
.article-content ol {
  color: #4b5563;
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-content li::marker {
  color: #3b82f6;
}

.article-content strong {
  color: #111827;
  font-weight: 600;
}

.article-content code {
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: 'Fira Code', ui-monospace, monospace;
  color: #3b82f6;
}

.article-content pre {
  background: #0a0f2c;
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.article-content pre code {
  background: transparent;
  color: #e5e7eb;
  padding: 0;
  font-size: 0.875rem;
}

.article-content > *:first-child {
  margin-top: 0;
}

/* --- TOC active link --- */
.toc-link.active {
  color: #3b82f6;
  border-color: #3b82f6;
  font-weight: 500;
}

/* --- Mobile TOC arrow --- */
details[open] .details-arrow {
  transform: rotate(180deg);
}

/* --- Cookie consent banner --- */
#cookie-banner > div {
  background: #0a0f2c !important;
  backdrop-filter: none;
}

/* --- Line clamp --- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
