/* ==========================================================================
   VALVES & ACTUATORS EXCLUSIVE STYLING LAYER (valves_and_actuators.css)
   ========================================================================== */

/* ==========================================================================
   1. HERO BANNER
   ========================================================================== */
.valves-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  background: url('../images/valves_hero.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  box-sizing: border-box;
}

/* Dark semi-transparent overlay for contrast */
.valves-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
  margin: 0 auto;
  color: #ffffff;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 300;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 1px;
  color: var(--color-secondary);
  line-height: 1.1;
}

.hero-content p {
  font-size: 1.4rem;
  line-height: 1.6;
  font-weight: 400;
  margin: 0;
  color: var(--color-white);
  text-align: left;
}

#overview, #controls, #support {
  scroll-margin-top: 50px;
}

#overview h2 span {
  display: block;
  font-size: 2.25rem;
}

.valves-intro-txt {
  line-height: 1.6;
  margin-bottom: 30px;
}

.valves-body-txt {
  margin-top: 25px;
  line-height: 1.6;
}

/* ==========================================================================
   2. OVERVIEW CARD GRID
   ========================================================================== */
.valves-grid-wrapper {
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.valves-lead-txt {
  grid-column: 1 / -1;
  line-height: 1.6;
  margin-bottom: 35px !important;
}

.valves-card {
  background: var(--color-white);
  border: 1.5px solid var(--color-white-highlight);
  border-radius: 3px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 0;
  box-shadow: 0 4px 12px rgba(15, 184, 254, 0.15); 
}

.esg-icon {
  width: auto;
  height: 100px;
  flex-shrink: 0;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.esg-icon.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.valves-card-content {
  width: 100%;
  text-align: center;
}

.valves-card-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-align: center !important;
}

.valves-card-content p {
  font-size: 1.4rem;
  line-height: 1.5;
  margin: 0;
  text-align: left;
}

/* ==========================================================================
   3. ANIMATED MISSION / CONTROLS BOX
   ========================================================================== */
.mission-box {
  margin: 0 auto 30px auto;
  padding: 3px;
  background-color: transparent;
  
  background-image: 
    linear-gradient(var(--color-secondary), var(--color-secondary)),
    linear-gradient(var(--color-secondary), var(--color-secondary)),
    linear-gradient(var(--color-secondary), var(--color-secondary)),
    linear-gradient(var(--color-secondary), var(--color-secondary)),
    linear-gradient(var(--color-secondary), var(--color-secondary));
  
  background-repeat: no-repeat;
  background-position: 
    top center, 
    top right, 
    top left, 
    bottom left,
    bottom right;
  
  background-size: 0 3px, 3px 0, 3px 0, 0 3px, 0 3px;
  will-change: background-size;
}

.mission-box.is-visible {
  animation: drawBorderFromCenter 4s ease-in-out forwards;
  -webkit-animation: drawBorderFromCenter 4s ease-in-out forwards;
}

.mission-container {
  background: var(--color-primary);
  padding: 30px;
  text-align: center;
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: 1px;
}

.mission-container p {
  margin-bottom: 10px !important;
}

.mission-container span {
  text-transform: uppercase;
  font-weight: 400;
  font-size: 1.75rem;
  color: var(--color-white-highlight);
  display: block;
  line-height: 1.2;
  margin-top: -15px;
}

@keyframes drawBorderFromCenter {
    0% { background-size: 0 3px, 3px 0, 3px 0, 0 3px, 0 3px; }
    20% { background-size: 100% 3px, 3px 0, 3px 0, 0 3px, 0 3px; }
    66% { background-size: 100% 3px, 3px 100%, 3px 100%, 0 3px, 0 3px; }
    100% { background-size: 100% 3px, 3px 100%, 3px 100%, 51% 3px, 51% 3px; }
}

@-webkit-keyframes drawBorderFromCenter {
    0% { background-size: 0 3px, 3px 0, 3px 0, 0 3px, 0 3px; }
    20% { background-size: 100% 3px, 3px 0, 3px 0, 0 3px, 0 3px; }
    66% { background-size: 100% 3px, 3px 100%, 3px 100%, 0 3px, 0 3px; }
    100% { background-size: 100% 3px, 3px 100%, 3px 100%, 51% 3px, 51% 3px; }
}

/* ==========================================================================
   4. SUPPORT PILLARS WRAPPER
   ========================================================================== */
.support-pillars-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 40px;
}

.support-pillar {
  background: var(--color-white);
  border: 1.5px solid var(--color-white-highlight);
  border-radius: 3px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 0;
  box-shadow: 0 4px 12px rgba(15, 184, 254, 0.15); 
}

.pillar-header {
  margin-bottom: 15px;
}

.pillar-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  line-height: 1.3;
}

.pillar-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-secondary);
}

.support-pillar p {
  color: #4a5568;
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 0;
  text-align: left;
}

/* ==========================================================================
   5. MANUFACTURERS CAROUSEL
   ========================================================================== */
.valves-swiper-section {
  background-color: var(--color-dark);
  padding: 40px 0 100px 0;
  width: 100%;
  position: relative;
  box-sizing: border-box;
}

#logo-content {
  padding: 60px 20vh 40px 20vh;
}

.valves-swiper-container {
  margin: 0 auto;
  padding: 0 20vh;
  position: relative;
  box-sizing: border-box;
}

.valves-logo-swiper {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.valves-logo-swiper .swiper-wrapper {
  box-sizing: border-box;
}

.valves-logo-swiper .swiper-slide.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  height: 90px;
  padding: 12px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.valves-logo-swiper .swiper-slide.logo-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.valves-swiper-container .swiper-button-prev.valves-swiper-prev,
.valves-swiper-container .swiper-button-next.valves-swiper-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 0;
  width: 20vh;
  height: 100%;
  background-color: var(--color-dark);
  color: var(--color-primary);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease;
}

.valves-swiper-container .swiper-button-prev.valves-swiper-prev::after,
.valves-swiper-container .swiper-button-next.valves-swiper-next::after {
  font-size: 30px;
  font-weight: bold;
}

.valves-swiper-container .swiper-button-prev.valves-swiper-prev:hover,
.valves-swiper-container .swiper-button-next.valves-swiper-next:hover {
  color: var(--color-secondary);
  transition: color 0.25s ease;
}

/* ==========================================================================
   6. CALL TO ACTION SECTION
   ========================================================================== */
#cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  .support-pillars-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .valves-grid-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .valves-card {
    padding: 30px 20px;
  }

  .valves-icon {
    width: 150px;
    align-self: center;
  }

  .valves-hero {
    padding: 60px 20px;
  }

  .mission-container {
    font-size: 1.5rem;
  }

  .mission-container span {
    font-size: 1.5rem!important;
  }

  .valves-swiper-container {
    padding: 0 40px;
  }
  
  .valves-swiper-container .swiper-button-prev.valves-swiper-prev,
  .valves-swiper-container .swiper-button-next.valves-swiper-next {
    width: 30px;
    height: 30px;
  }

  .valves-swiper-container .swiper-button-prev.valves-swiper-prev::after,
  .valves-swiper-container .swiper-button-next.valves-swiper-next::after {
    font-size: 11px;
  }
  
  #logo-content {
    padding: 0 20px 40px 20px;
  }
}