/* Header Styles - Dengan tinggi yang sangat kecil */

.tech-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 4px 0; /* Padding sangat kecil */
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  background: rgba(8, 15, 40, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(72, 100, 255, 0.15);
  height: 60px; /* Tetapkan tinggi header secara eksplisit */
  display: flex;
  align-items: center;
}

.tech-header:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(72, 100, 255, 0) 0%, rgba(72, 100, 255, 0.05) 50%, rgba(72, 100, 255, 0) 100%);
  animation: headerGlow 8s infinite alternate;
}

.header-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.light-beam {
  position: absolute;
  width: 1px; /* Thinner beams */
  height: 100%;
  background: linear-gradient(to bottom, rgba(72, 100, 255, 0), rgba(72, 100, 255, 0.7), rgba(72, 100, 255, 0));
  opacity: 0.3; /* Reduced opacity */
  filter: blur(1px);
}

.light-beam:nth-child(1) {
  left: 20%;
  animation: beamMove 15s infinite alternate;
}

.light-beam:nth-child(2) {
  left: 50%;
  animation: beamMove 12s infinite alternate-reverse;
}

.light-beam:nth-child(3) {
  left: 80%;
  animation: beamMove 18s infinite alternate;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  width: 100%;
  height: 100%;
}

.logo {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 100%;
}

.logo img {
  height: 60px; /* Logo yang proporsional dengan header kecil */
  filter: drop-shadow(0 0 8px rgba(72, 100, 255, 0.6));
  transition: all 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px rgba(72, 100, 255, 0.8));
}

.header-actions {
  position: relative;
  z-index: 2;
}

.back-to-blog-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px; /* Padding sangat kecil */
  background: rgba(72, 100, 255, 0.1);
  color: #fff;
  font-weight: 600;
  font-size: 12px; /* Font lebih kecil */
  text-decoration: none;
  border-radius: 16px; /* Border radius lebih kecil */
  border: 1px solid rgba(72, 100, 255, 0.3);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  height: 24px; /* Tetapkan tinggi tombol */
}

.back-to-blog-btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(72, 100, 255, 0) 0%, rgba(72, 100, 255, 0.2) 50%, rgba(72, 100, 255, 0) 100%);
  transform: translateX(-100%);
  transition: all 0.6s ease;
}

.back-to-blog-btn i {
  margin-right: 6px; /* Smaller margin */
  font-size: 12px; /* Smaller icon */
  transition: transform 0.3s ease;
}

.back-to-blog-btn:hover {
  background: rgba(72, 100, 255, 0.2);
  border-color: rgba(72, 100, 255, 0.5);
  box-shadow: 0 0 20px rgba(72, 100, 255, 0.4);
  transform: translateY(-2px);
}

.back-to-blog-btn:hover:before {
  transform: translateX(100%);
}

.back-to-blog-btn:hover i {
  transform: translateX(-3px);
}

.back-to-blog-btn:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(72, 100, 255, 0.3);
}

/* Glowing dot effect */
.back-to-blog-btn:after {
  content: '';
  position: absolute;
  width: 3px; /* Smaller dot */
  height: 3px; /* Smaller dot */
  border-radius: 50%;
  background: #4864ff;
  top: 50%;
  left: 10px; /* Adjusted position */
  transform: translateY(-50%);
  box-shadow: 0 0 10px 2px rgba(72, 100, 255, 0.8);
  opacity: 0;
  transition: all 0.3s ease;
}

.back-to-blog-btn:hover:after {
  opacity: 1;
  animation: pulseDot 1.5s infinite;
}

/* Scrolled header style */
.tech-header.scrolled {
  padding: 2px 0; /* Padding lebih kecil saat scroll */
  height: 36px; /* Tinggi lebih kecil saat scroll */
  background: rgba(8, 15, 40, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Animations */
@keyframes headerGlow {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes beamMove {
  0% {
    transform: translateX(-50px) scaleY(1);
    opacity: 0.2;
  }
  50% {
    transform: translateX(50px) scaleY(1.2);
    opacity: 0.5;
  }
  100% {
    transform: translateX(-50px) scaleY(1);
    opacity: 0.2;
  }
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(72, 100, 255, 0.8);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(72, 100, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(72, 100, 255, 0);
  }
}

/* Responsive styles */
@media (max-width: 768px) {
  .tech-header {
    padding: 3px 0;
    height: 36px;
  }
  
  .logo img {
    height: 28px;
  }
  
  .back-to-blog-btn {
    padding: 3px 10px;
    font-size: 11px;
    height: 22px;
  }
}

@media (max-width: 480px) {
  .tech-header {
    padding: 2px 0;
    height: 32px;
  }
  
  .logo img {
    height: 24px;
  }
  
  .back-to-blog-btn {
    padding: 2px 8px;
    font-size: 10px;
    height: 20px;
  }
  
  .back-to-blog-btn i {
    margin-right: 4px;
    font-size: 10px;
  }
}