/* ==========================================================================
   CD-MAX PAGE STYLESHEET (cd-max.css)
   ========================================================================== */

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

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

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

.hero-content #cd-max-logo {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  margin: 0 auto 20px;
}

.hero-content h1 {
  font-size: 3rem;
  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;
}

/* --------------------------------------------------------------------------
   KEY ADVANTAGES BACKGROUND (#features)
   -------------------------------------------------------------------------- */
#features {
  background-image: url('../images/cdmax_component.png');
  background-size: auto 95%;
  background-repeat: no-repeat;
  background-position: bottom right;
  padding-right: 40vh;
}

.advantages-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 30px;
  margin-top: 40px;
  padding-left: 15px;
  color: var(--color-white);
  line-height: 1.35;
  font-size: 1.3rem;
}

.container-blue.advantages-list li {
  font-size: 1.4rem;
  line-height: 1.3;
  text-transform: none;
  display: inline;
}

.advantages-list li span {
  font-size: 1.4rem!important;
  line-height: 1.3!important;
  display: inline!important;
  text-transform: none!important;
}

.advantages-list li::marker {
  color: var(--color-secondary);
  font-size: 1em;
}

@media (max-width: 768px) {
  .advantages-list {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   2. MISSION & VISION / ANIMATED BOX DETAILS
   -------------------------------------------------------------------------- */
.mission-box {
  margin: 40px auto;
  padding: 3px;
  background-color: transparent;
  
  /* 5 border layers: Top, Right, Left, Bottom-Left, Bottom-Right */
  background-image: 
    linear-gradient(var(--color-secondary), var(--color-secondary)), /* Top */
    linear-gradient(var(--color-secondary), var(--color-secondary)), /* Right */
    linear-gradient(var(--color-secondary), var(--color-secondary)), /* Left */
    linear-gradient(var(--color-secondary), var(--color-secondary)), /* Bottom-Left */
    linear-gradient(var(--color-secondary), var(--color-secondary)); /* Bottom-Right */
  
  background-repeat: no-repeat;
  background-position: 
    top center, 
    top right, 
    top left, 
    bottom left,
    bottom right;
  
  /* Initial state: all border sizes set to 0 width/height */
  background-size: 0 3px, 3px 0, 3px 0, 0 3px, 0 3px;
  will-change: background-size;
}

/* Animation triggers on viewport visibility class */
.mission-box.is-visible {
  animation: drawBorderFromCenter 4s ease-in-out forwards;
  -webkit-animation: drawBorderFromCenter 4s ease-in-out forwards;
}

.mission-container {
  background: var(--color-white);
  padding: 40px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
}

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

.mission-container span {
  text-transform: uppercase;
  font-weight: 500;
  font-size: 2.25rem;
  color: var(--color-primary);
  display: block;
  line-height: 1.2;
  margin-top: 10px;
}

.mission-container span sub {
  font-size: 1.25rem;
  font-weight: 700;
}

.mission-headline {
  font-size: 3.5rem;
  line-height: 1.2;
  font-weight: 300;
  margin-bottom: 30px;
  display: block;
}

.mission-body-txt {
  opacity: 0.9;
  margin-top: 20px;
}

/* Standard Animations Engine */
@keyframes drawBorderFromCenter {
    0% {
      /* Top: 0%, Right: 0%, Left: 0%, Bottom-L: 0%, Bottom-R: 0% */
      background-size: 0 3px, 3px 0, 3px 0, 0 3px, 0 3px;
    }
    20% {
      /* Step 1: Top line expands from center out to 100% width */
      background-size: 100% 3px, 3px 0, 3px 0, 0 3px, 0 3px;
    }
    66% {
      /* Step 2: Side lines grow down to 100% height */
      background-size: 100% 3px, 3px 100%, 3px 100%, 0 3px, 0 3px;
    }
    100% {
      /* Step 3: Bottom lines expand from outer corners inward to center */
      background-size: 100% 3px, 3px 100%, 3px 100%, 51% 3px, 51% 3px;
    }
}

/* Webkit Engine Variants */
@-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;
    }
}

/* --------------------------------------------------------------------------
   PROCESS HIGHLIGHT CARD (#chemistry)
   -------------------------------------------------------------------------- */
.process-card {
  margin-top: 40px;
  background: var(--color-primary);
  border: 1.5px solid var(--color-secondary);
  border-radius: 3px;
  padding: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.process-card h3 {
  font-size: 2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-white);
  margin-top: 0;
  margin-bottom: 40px;
  text-align: center;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
}

.process-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  color: var(--color-white);
}

.process-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  min-width: 25px;
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-radius: 50%;
}

@media (max-width: 768px) {
  .process-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   3. FEATURE & CARD GRIDS
   -------------------------------------------------------------------------- */
#applications {
  background-image: url('../images/cdmax_close.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
   
.team-intro-txt {
  text-align: left;
  margin: 0 auto 50px auto !important;
  color: var(--color-white);
  line-height: 1.5;
  font-size: 1.4rem;
}

.specialist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 40px;
}

.specialist-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 3px;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
}

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

.specialist-tag {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-secondary);
  margin: 5px 0;
}

.specialist-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-white-highlight);
  text-transform: uppercase;
  margin: 0;
  line-height: 1.3;
  text-align: center;
}

.specialist-card p {
  color: var(--color-white);
  font-size: 1.3rem;
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. SPECIFICATIONS & ROW LAYOUTS
   -------------------------------------------------------------------------- */
   
.specs-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 30px;
  margin: 40px 0;
  padding-left: 15px;
  color: var(--color-black);
  line-height: 1.35;
  font-size: 1.4rem;
}

.container-white.specs-list li {
  font-size: 1.4rem;
  line-height: 1.3;
  text-transform: none;
  display: inline;
}

.specs-list li span {
  color: var(--color-primary);
  font-weight: 900;
}

.specs-list li::marker {
  color: var(--color-primary);
  font-size: 1em;
}

@media (max-width: 768px) {
  .specs-list {
    grid-template-columns: 1fr;
  }
}

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

/* --------------------------------------------------------------------------
   6. RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .container-white,
  .container-blue,
  .container-black {
    padding: 60px 6%;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .esg-row {
    flex-direction: column;
  }
  
  #features {
  background-image: none;
  padding-right: 25px;
}
}

@media (max-width: 768px) {
  .specialist-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .mission-container {
    font-size: 1.2rem!important;
    line-height: 1.5;
  }
  
  .mission-container span {
    font-size: 2rem!important;
  }
  
  .process-card {
    padding: 20px 20px 30px 20px;
  }
}