/* ==============================
   BLOG & CASES STYLES
   ============================== */

html {
  height: auto;
  overflow-y: auto;
}

.blog-body {
  background-color: var(--bg-primary);
  color: var(--color-text-main);
  font-family: var(--font-main);
  overflow-x: hidden;
  overflow-y: visible;
  height: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.blog-header {
  padding: 40px 5%;
  position: relative;
  text-align: center;
}

.back-to-home {
  position: absolute;
  left: 5%;
  top: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  transition: color 0.3s ease;
}

.back-to-home:hover {
  color: var(--color-orange);
}

.blog-main-title {
  font-family: var(--font-display);
  font-size: 3rem;
  color: #fff;
  margin-bottom: 10px;
}

.blog-subtitle {
  color: var(--color-text-muted);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Carousel Layout */
.blog-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 60px 0;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  padding: 0 60px;
}

.carousel-track {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 20px;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

/* Navigation Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--color-orange);
  border-color: var(--color-orange);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Case Cards */
.case-card {
  flex: 0 0 100%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  overflow: hidden;
  scroll-snap-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .case-card { flex: 0 0 calc(50% - 15px); }
}

@media (min-width: 1024px) {
  .case-card { flex: 0 0 calc(33.333% - 20px); }
}

.case-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 107, 0, 0.4);
}

.case-image {
  height: 250px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.case-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.case-tag {
  align-self: flex-start;
  background: rgba(255, 107, 0, 0.2);
  color: var(--color-orange);
  padding: 6px 12px;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.case-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 15px;
  line-height: 1.3;
}

.case-desc {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  flex: 1;
}

.case-results {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.case-results li {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
}

/* Individual Case Navigation */
.case-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.case-nav-btn {
  color: var(--color-orange);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.case-nav-btn:hover {
  color: #fff;
  transform: translateY(-2px);
}

/* ==============================
   LIGHT THEME OVERRIDES
   ============================== */
body.theme-light.blog-body {
  background-color: #f5f7fa;
  color: #1a2540;
}

body.theme-light .blog-main-title,
body.theme-light h2,
body.theme-light h3 {
  color: #0d1b2a !important;
}

body.theme-light p {
  color: #4a5568 !important;
}

body.theme-light .blog-card,
body.theme-light .case-card {
  background: #ffffff !important;
  border-color: #dde3ee !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body.theme-light .blog-card:hover {
  background: #fdfdfd !important;
}

body.theme-light .back-to-home,
body.theme-light .case-nav-btn {
  color: #1a2540;
}

body.theme-light .back-to-home:hover,
body.theme-light .case-nav-btn:hover {
  color: var(--color-orange);
}

body.theme-light .lang-btn {
  background: #ffffff;
  color: #1a2540;
  border-color: #dde3ee;
}

body.theme-light .lang-btn.active {
  background: #0d1b2a;
  color: #ffffff;
}

/* Fix for inline styled case containers */
body.theme-light div[style*="background: rgba(255,255,255,0.03)"] {
  background: #ffffff !important;
  border-color: #dde3ee !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

body.theme-light .blog-subtitle {
  color: #4a5568;
}
