/* BCL Petroleum Group - Morph Transitions */
/* ===== MORPH TRANSITION SYSTEM ===== */

:root {
  --morph-duration: 0.8s;
  --morph-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --morph-scale: 1.05;
}

/* ===== BASE MORPH CLASSES ===== */
.morph-container {
  position: relative;
  overflow: hidden;
  transition: all var(--morph-duration) var(--morph-easing);
}

.morph-element {
  position: relative;
  transition: all var(--morph-duration) var(--morph-easing);
  transform-origin: center center;
}

.morph-active {
  transform: scale(var(--morph-scale));
  z-index: 10;
}

/* ===== HERO SECTION MORPH ===== */
.hero-morph {
  position: relative;
  overflow: hidden;
}

.hero-morph .hero-content {
  transition: all var(--morph-duration) var(--morph-easing);
  transform-origin: center center;
}

.hero-morph:hover .hero-content {
  transform: scale(1.02) translateY(-10px);
  filter: brightness(1.1);
}

.hero-morph .hero-bg {
  transition: all var(--morph-duration) var(--morph-easing);
  transform-origin: center center;
}

.hero-morph:hover .hero-bg {
  transform: scale(1.1);
  filter: blur(1px) brightness(0.9);
}

/* ===== CARD MORPH TRANSITIONS ===== */
.morph-card {
  position: relative;
  overflow: hidden;
  transition: all var(--morph-duration) var(--morph-easing);
  border-radius: 12px;
  cursor: pointer;
}

.morph-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(12, 49, 122, 0.1) 0%, 
    rgba(255, 215, 0, 0.1) 100%);
  opacity: 0;
  transition: all var(--morph-duration) var(--morph-easing);
  z-index: 1;
}

.morph-card:hover::before {
  opacity: 1;
}

.morph-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 20px 40px rgba(12, 49, 122, 0.3);
  border-color: var(--bcl-gold);
}

.morph-card .card-body {
  position: relative;
  z-index: 2;
  transition: all var(--morph-duration) var(--morph-easing);
}

.morph-card:hover .card-body {
  transform: translateY(-5px);
}

/* ===== SERVICE CARDS MORPH ===== */
.service-morph {
  position: relative;
  overflow: hidden;
  transition: all var(--morph-duration) var(--morph-easing);
}

.service-morph::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, 
    rgba(255, 215, 0, 0.3) 0%, 
    transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all var(--morph-duration) var(--morph-easing);
  z-index: 1;
}

.service-morph:hover::after {
  width: 200%;
  height: 200%;
}

.service-morph:hover {
  transform: translateY(-20px) rotateY(5deg);
  box-shadow: 0 25px 50px rgba(12, 49, 122, 0.4);
}

/* ===== LEADERSHIP CARDS MORPH ===== */
.leadership-morph {
  position: relative;
  overflow: hidden;
  transition: all var(--morph-duration) var(--morph-easing);
}

.leadership-morph .leadership-image {
  transition: all var(--morph-duration) var(--morph-easing);
  transform-origin: center center;
}

.leadership-morph:hover .leadership-image {
  transform: scale(1.1) rotate(2deg);
  filter: brightness(1.2) contrast(1.1);
}

.leadership-morph:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(255, 215, 0, 0.3);
}

/* ===== NAVIGATION MORPH ===== */
.nav-morph {
  position: relative;
  overflow: hidden;
}

.nav-morph .nav-link {
  position: relative;
  transition: all var(--morph-duration) var(--morph-easing);
  z-index: 2;
}

.nav-morph .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    var(--bcl-primary) 0%, 
    var(--bcl-gold) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: all var(--morph-duration) var(--morph-easing);
  z-index: -1;
  border-radius: 20px;
}

.nav-morph .nav-link:hover::before {
  transform: scaleX(1);
}

.nav-morph .nav-link:hover {
  color: white !important;
  transform: translateY(-2px);
}

/* ===== BUTTON MORPH ===== */
.btn-morph {
  position: relative;
  overflow: hidden;
  transition: all var(--morph-duration) var(--morph-easing);
  transform-origin: center center;
}

.btn-morph::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all var(--morph-duration) var(--morph-easing);
  z-index: 1;
}

.btn-morph:hover::before {
  width: 300%;
  height: 300%;
}

.btn-morph:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(12, 49, 122, 0.4);
}

/* ===== TEXT MORPH ===== */
.text-morph {
  transition: all var(--morph-duration) var(--morph-easing);
  display: inline-block;
}

.text-morph:hover {
  transform: scale(1.1);
  color: var(--bcl-gold) !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ===== IMAGE MORPH ===== */
.img-morph {
  transition: all var(--morph-duration) var(--morph-easing);
  transform-origin: center center;
}

.img-morph:hover {
  transform: scale(1.1) rotate(1deg);
  filter: brightness(1.1) contrast(1.1) saturate(1.2);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* ===== SECTION TRANSITIONS ===== */
.section-morph {
  position: relative;
  overflow: hidden;
}

.section-morph::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 215, 0, 0.1) 50%, 
    transparent 100%);
  transition: all 1.5s var(--morph-easing);
  z-index: 1;
}

.section-morph:hover::before {
  left: 100%;
}

/* ===== ADVANCED MORPH EFFECTS ===== */
.morph-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.morph-3d .morph-element {
  transform-style: preserve-3d;
  transition: all var(--morph-duration) var(--morph-easing);
}

.morph-3d:hover .morph-element {
  transform: rotateY(10deg) rotateX(5deg) translateZ(20px);
}

/* ===== LIQUID MORPH ===== */
.liquid-morph {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.liquid-morph::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    var(--bcl-primary) 0deg,
    var(--bcl-gold) 90deg,
    var(--bcl-primary) 180deg,
    var(--bcl-gold) 270deg,
    var(--bcl-primary) 360deg
  );
  opacity: 0;
  transition: all var(--morph-duration) var(--morph-easing);
  animation: rotate 3s linear infinite;
  z-index: 1;
}

.liquid-morph:hover::before {
  opacity: 0.1;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE MORPH ===== */
@media (max-width: 768px) {
  :root {
    --morph-duration: 0.6s;
    --morph-scale: 1.02;
  }
  
  .morph-card:hover {
    transform: translateY(-10px) scale(1.02);
  }
  
  .service-morph:hover {
    transform: translateY(-15px);
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.morph-container,
.morph-element,
.morph-card,
.service-morph,
.leadership-morph {
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .morph-container,
  .morph-element,
  .morph-card,
  .service-morph,
  .leadership-morph,
  .nav-morph,
  .btn-morph,
  .text-morph,
  .img-morph {
    transition: none;
    transform: none !important;
  }
}
