/* Title Animation Styles 
 * A modern CSS animation to replace the original Flash headers
 */

.animated-title {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  overflow: hidden;
  background: transparent;
  padding: 15px;
  border-radius: 3px;
  max-width: 100%;
  height: 80px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.animated-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.3), rgba(252, 252, 252, 0.4));
  z-index: 0;
}

.title-icon {
  animation: fadeIn 0.8s ease-in-out, spin 5s infinite linear;
  margin-right: 15px;
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.title-text {
  position: relative;
  z-index: 1;
  font-family: 'Arial', sans-serif;
  font-size: 2.2rem !important;
  font-weight: bold;
  color: var(--dark) !important;
  text-transform: lowercase;
  letter-spacing: -1px;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.8s ease-out forwards;
  animation-delay: 0.3s;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8); /* Subtle text shadow for better readability */
}

.title-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left;
  opacity: 0;
  z-index: 0;
  animation: fadeIn 1.2s ease-in-out forwards;
  animation-delay: 0.5s;
}

/* Animations */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes slideUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Section-specific styles */
[data-section="introduction"] .title-icon {
  color: var(--primary);
}

[data-section="approach"] .title-icon {
  color: var(--secondary);
}

[data-section="business"] .title-icon {
  color: #7B00CE;
}

[data-section="technical"] .title-icon {
  color: #00A3CE;
}

[data-section="project"] .title-icon {
  color: #CEAE00;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .animated-title {
    height: auto;
    min-height: 60px;
  }
  
  .title-text {
    font-size: 1.8rem !important;
  }
}