/*
Theme Name: Bootcamp Blog
Theme URI: https://bootcamp.al
Description: Custom WordPress theme for the Bootcamp.al blog. Matches the Next.js site design.
Version: 1.0.0
Author: Bootcamp.al
Author URI: https://bootcamp.al
Text Domain: bootcamp-blog
*/

:root {
  --primary: 168 65% 45%;
  --primary-foreground: 0 0% 100%;
  --accent: 12 85% 62%;
  --accent-foreground: 0 0% 100%;
  --background: 45 30% 98%;
  --foreground: 220 40% 13%;
  --card: 0 0% 100%;
  --card-foreground: 220 40% 13%;
  --secondary: 45 25% 94%;
  --secondary-foreground: 220 40% 13%;
  --muted: 45 20% 92%;
  --muted-foreground: 220 15% 45%;
  --border: 45 20% 88%;
  --input: 45 20% 88%;
  --ring: 168 65% 45%;
  --radius: 1rem;
  --shadow-soft: 0 4px 20px -4px hsl(220 40% 13% / 0.08);
  --shadow-card: 0 8px 30px -8px hsl(220 40% 13% / 0.1);
  --shadow-glow: 0 0 40px hsl(168 65% 45% / 0.2);
  --gradient-hero: linear-gradient(135deg, hsl(168 65% 45% / 0.1) 0%, hsl(12 85% 62% / 0.1) 100%);
  --gradient-card: linear-gradient(180deg, hsl(0 0% 100%) 0%, hsl(45 30% 98%) 100%);
  --gradient-primary: linear-gradient(135deg, hsl(168 65% 45%) 0%, hsl(168 70% 38%) 100%);
}

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

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.text-gradient {
  background-image: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: hsl(var(--card) / 0.85);
  backdrop-filter: blur(24px);
  border: 1px solid hsl(var(--border) / 0.4);
  transition: all 0.5s ease;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px -20px hsl(168 65% 45% / 0.45);
}

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

.blog-card:hover .blog-card-title {
  color: hsl(var(--primary));
}

.blog-card-image {
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1.25rem;
  aspect-ratio: 16 / 9;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card-category {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: hsl(168 65% 45% / 0.12);
  color: hsl(168 65% 45%);
  margin-bottom: 0.75rem;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.blog-card-title a {
  color: inherit;
}

.blog-card-title a:hover {
  color: hsl(var(--primary));
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.blog-card-meta svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.8;
}

.blog-card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-post-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 1.5rem;
  margin-bottom: 2rem;
}

.blog-post-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, hsl(var(--foreground) / 0.8) 0%, transparent 60%);
}

.blog-post-hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  color: white;
  width: 100%;
}

.blog-post-hero-content h1 {
  font-size: 1.875rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .blog-post-hero-content h1 {
    font-size: 2.5rem;
  }
}

.blog-post-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.blog-post-content {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.blog-post-content h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  font-size: 1.375rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post-content p {
  margin-bottom: 1.25rem;
  color: hsl(var(--foreground) / 0.85);
  line-height: 1.75;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

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

.blog-post-content blockquote {
  border-left: 4px solid hsl(var(--primary));
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: hsl(var(--primary) / 0.05);
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
}

.blog-post-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  background: hsl(var(--foreground) / 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 0.375rem;
}

.blog-post-content pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  background: hsl(var(--foreground) / 0.05);
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-post-content pre code {
  background: none;
  padding: 0;
}

.blog-post-content img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

.blog-post-content a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-post-content a:hover {
  opacity: 0.8;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
}

.pagination a:hover {
  background: hsl(var(--primary));
  color: white;
  border-color: hsl(var(--primary));
}

.pagination .current {
  background: hsl(var(--primary));
  color: white;
  border-color: hsl(var(--primary));
}

.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.back-to-blog:hover {
  color: hsl(var(--primary));
}

.back-to-blog svg {
  width: 1rem;
  height: 1rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-listing-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-listing-header h1 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .blog-listing-header h1 {
    font-size: 3rem;
  }
}

.blog-listing-header p {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  max-width: 36rem;
  margin: 0 auto;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.lang-switcher:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--secondary));
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fade-up 0.8s ease-out forwards;
}
