@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,700&display=swap');

:root {
  --primary: #001134;
  --secondary: #ff571d;
  --text-main: #555555;
  --heading-main: #001134;
  --light-bg: #f8fafc;
  --dark-bg: #001134;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-main);
  background-color: #ffffff;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  color: var(--heading-main);
}

/* Fix text contrast on dark backgrounds */
.bg-primary,
.bg-dark,
.bg-dark-navy,
.dark,
header,
footer,
.hero-banner,
.page-banner,
.hero-slide {
  color: #ffffff;
}

/* Headings inside any dark container or hero banner MUST BE WHITE */
.hero-banner h1, .hero-banner h2, .hero-banner h3,
.page-banner h1, .page-banner h2, .page-banner h3,
.page-banner-title,
.hero-slide h1, .hero-slide h2, .hero-slide h3,
section.bg-primary h1, section.bg-primary h2, section.bg-primary h3, section.bg-primary h4,
.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary h4, .bg-primary h5, .bg-primary h6,
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.bg-dark-navy h1, .bg-dark-navy h2, .bg-dark-navy h3, .bg-dark-navy h4, .bg-dark-navy h5, .bg-dark-navy h6,
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
[class*="from-primary"] h1, [class*="from-primary"] h2, [class*="from-primary"] h3,
[class*="bg-gradient"] h1, [class*="bg-gradient"] h2, [class*="bg-gradient"] h3,
header h1, header h2, header h3, header h4, header h5, header h6,
footer h1, footer h2, footer h3, footer h4, footer h5, footer h6,
h1.text-white, h2.text-white, h3.text-white, h4.text-white, h5.text-white, h6.text-white {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* Paragraphs and descriptions inside banners */
.hero-banner p,
.hero-slide p,
.page-banner p {
  color: #e2e8f0 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Headings inside search modal or specific light boxes */
#search-modal .bg-white h1,
#search-modal .bg-white h2,
#search-modal .bg-white h3,
#search-modal .bg-white p {
  color: var(--heading-main) !important;
  text-shadow: none !important;
}

.text-secondary {
  color: #ff571d !important;
}

.font-script {
  font-family: 'Dancing Script', cursive;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #001134;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ff571d;
}

/* Header sticky animation */
.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(0, 17, 52, 0.96) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
  animation: slideDown 0.35s ease-out;
}

.header-sticky,
.header-sticky nav a,
.header-sticky span,
.header-sticky button {
  color: #ffffff !important;
}

.header-sticky nav a.text-secondary,
.header-sticky nav a:hover,
.header-sticky .text-secondary {
  color: #ff571d !important;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* =============================================================
 * Flatsome-style Scroll Entrance Animations
 * ============================================================= */
[data-animate] {
  opacity: 0 !important;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.8s ease;
  will-change: transform, opacity, filter;
}

[data-animate="fadeInLeft"] {
  transform: translate3d(-60px, 0, 0);
}

[data-animate="fadeInRight"] {
  transform: translate3d(60px, 0, 0);
}

[data-animate="fadeInUp"] {
  transform: translate3d(0, 50px, 0);
}

[data-animate="fadeInDown"] {
  transform: translate3d(0, -50px, 0);
}

[data-animate="blurIn"] {
  filter: blur(14px);
  transform: scale(0.94);
}

[data-animate="zoomIn"] {
  transform: scale(0.88);
}

/* When activated by IntersectionObserver */
[data-animated="true"] {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
  filter: blur(0px) !important;
}

/* =============================================================
 * Hero Banner & Layered Machinery Animations
 * ============================================================= */
.banner-title-top {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 300;
  color: #ff571d;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.banner-title-top::before {
  content: "";
  width: 70px;
  height: 2px;
  background-color: #ff571d;
  display: inline-block;
  vertical-align: middle;
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes floatReverse {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(10px) rotate(1deg);
  }
}

.float-anim {
  animation: floatSlow 5s ease-in-out infinite;
}

.float-anim-reverse {
  animation: floatReverse 6s ease-in-out infinite;
}

/* Slider transitions */
.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.98);
  position: absolute;
  inset: 0;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  position: relative;
}

/* =============================================================
 * Service Cards Interactive Transformation (Template 8040 Match)
 * ============================================================= */
.service-card {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  background-color: #ffffff;
  border-radius: 14px;
}

.service-card .service-icon-box {
  position: absolute;
  right: 20px;
  top: -32px;
  width: 64px;
  height: 64px;
  background-color: #ff571d;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(255, 87, 29, 0.35);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
}

.service-card:hover {
  background-color: #001134 !important;
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(0, 17, 52, 0.22);
}

.service-card:hover h3 {
  color: #ff571d !important;
}

.service-card:hover p {
  color: #ffffff !important;
}

.service-card:hover a {
  color: #ff571d !important;
}

.service-card:hover .service-icon-box {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 12px 35px rgba(255, 87, 29, 0.55);
}

/* =============================================================
 * Video Play Button Ripple Pulse (Mission Section)
 * ============================================================= */
.play-pulse {
  position: relative;
}

.play-pulse::before,
.play-pulse::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 87, 29, 0.75);
  animation: pulseRing 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

.play-pulse::after {
  animation-delay: 1.1s;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.85);
    opacity: 0.95;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

/* =============================================================
 * Mission Skill Bars Smooth Fill Animation
 * ============================================================= */
.skill-progress-bar {
  width: 0%;
  transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =============================================================
 * Partner Logos (Monochrome to Full Color on Hover)
 * ============================================================= */
.partner-logo-item img {
  filter: grayscale(100%);
  opacity: 0.65;
  transition: all 0.35s ease;
}

.partner-logo-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-4px) scale(1.06);
}

/* Tab filter transitions */
.portfolio-item {
  transition: all 0.4s ease-in-out;
}
.portfolio-item.hidden-item {
  display: none;
  opacity: 0;
  transform: scale(0.95);
}

/* Accordion transition */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.35s ease;
}
.accordion-item.active .accordion-content {
  max-height: 500px;
}
.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

/* Hover effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 17, 52, 0.12);
}

/* Badge & Section Top Tag */
.section-tag {
  color: #ff571d;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Custom button styles */
.btn-primary-custom {
  background-color: #001134;
  color: #ffffff !important;
  transition: all 0.3s ease;
}
.btn-primary-custom:hover {
  background-color: #ff571d;
  color: #ffffff !important;
}

.btn-secondary-custom {
  background-color: #ff571d;
  color: #ffffff !important;
  transition: all 0.3s ease;
}
.btn-secondary-custom:hover {
  background-color: #001134;
  color: #ffffff !important;
}

/* Header nav links contrast */
header nav a {
  color: #ffffff;
  position: relative;
  transition: color 0.3s ease;
}
header nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: #ff571d;
  transition: width 0.3s ease;
}
header nav a:hover::after,
header nav a.active::after {
  width: 100%;
}
header nav a:hover {
  color: #ff571d !important;
}
header nav a.text-secondary {
  color: #ff571d !important;
}

