/* Style the header */
.header {
  position: relative;
  text-align: center;
  color: white;
  padding: 0;
  overflow: hidden;
}

/* Header carousel animation */
.carousel-item {
  transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

.carousel-item img {
  transition: transform 8s ease-out;
  animation: kenBurns 8s ease-out infinite alternate;
}

@keyframes kenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

.header-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate(-50%, -70%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.title-image {
  margin-top: 0.3rem;
  margin-bottom: 0.6rem;
  width: 60%;
  transition: transform 0.3s ease;
}

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

@media (max-width: 575.98px) {
  .title-image {
    width: 50%;
  }
}

/* Hover effects for SVG clickable areas */
.hover_group {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hover_group:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.hover_group rect {
  transition: opacity 0.3s ease;
}

.hover_group:hover rect {
  opacity: 0.4 !important;
}

#projectsvg {
  position: relative;
  width: 100%;
  padding-bottom: 77%;
  vertical-align: middle;
  margin: 0;
  overflow: hidden;
  animation: fadeIn 1.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#projectsvg svg {
  display: inline-block;
  position: absolute;
  top: 0;
  left: 0;
}

/* Smooth scroll animations for sections */
h2 {
  animation: slideInLeft 0.8s ease-out;
  transition: color 0.3s ease;
}

h2:hover {
  color: #0066cc;
}

h5 {
  animation: fadeIn 1s ease-out;
  line-height: 1.6;
}

/* Navigation animations */
.navbar {
  transition: background-color 0.3s ease;
}

.navbar a {
  position: relative;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.navbar a:hover {
  transform: translateY(-2px);
  color: #0066cc !important;
}

.navbar a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 50%;
  background-color: #0066cc;
  transition: width 0.3s ease, left 0.3s ease;
}

.navbar a:hover::after {
  width: 100%;
  left: 0;
}

/* Card and image animations */
img.d-block {
  transition: transform 0.3s ease, filter 0.3s ease;
}

img.d-block:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* Carousel control animations */
.carousel-control-prev,
.carousel-control-next {
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 1;
}

/* Fade in from bottom animation for content */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade in animation class for scroll trigger */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Button pulse animation */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.navbar-brand {
  animation: pulse 2s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.1);
}

/* Video container animations */
.ratio {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.ratio:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Smooth link transitions */
a {
  transition: all 0.3s ease;
}

/* Container animations */
.container, .container-fluid {
  animation: fadeIn 1s ease-out;
}
