/* ==========================================================================
   ABOUT US TEMPLATE EXCLUSIVE STYLING LAYER
   ========================================================================== */

/* ==========================================================================
   Hero Section Layout & Overlay
   ========================================================================== */
.about-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  background: url('../images/about_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 */
.about-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  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;
}

#history, #mission, #esg, #team {
  scroll-margin-top: 50px;
}

/* Section Element Dividers & Content Columns */
.about-divider {
  max-width: 100px;
  margin: 0 auto 40px auto;
  background-color: var(--color-primary);
}

.about-intro-txt {
  line-height: 1.5;
}

.about-intro-txt.no-margin {
  margin-bottom: 0;
}

/* ==========================================================================
   Mission & Vision Blueprint Details (with Animated Box Integration)
   ========================================================================== */

.mission-box {
  margin: 0 auto 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-primary);
  padding: 20px;
  text-align: center;
  font-size: 4.5rem;
  font-weight: 900;
}

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

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

.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;
    }
}

/* Chrome, Safari, and Opera 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;
    }
}

/* ==========================================================================
   Environmental, Social & Governance (ESG) Pillars
   ========================================================================== */

.esg-wrapper {
  margin: 0 auto;
}

.esg-lead-txt {
  line-height: 1.5;
  margin-bottom: 40px!important;
}

/* Flexbox Row Container */
.esg-row {
  display: flex;
  align-items: center; /* Vertically centers icon and content on standard view */
  gap: 25px;
  margin-bottom: 50px;
}

.esg-row:last-child {
  margin-bottom: 0;
}

/* Standalone Flex Icon & Entry Upward Animation State */
.esg-icon {
  width: 70px;
  height: auto;
  flex-shrink: 0; /* Prevents icon from distorting */
  
  /* Initial hidden state: pushed down 40px */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Active state added by JS when visible in viewport */
.esg-icon.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.esg-pillar {
  padding-left: 25px;
  border-left: 3px solid var(--color-white-highlight);
}

.esg-pillar h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: left !important; /* Forces system override over global centered headings */
}

.esg-pillar p {
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
  .about-hero {
    padding: 60px 20px;
  }

  .esg-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
  }

  .esg-icon {
    width: 100px;
    align-self: center; /* Horizontally centers icon above content on mobile */
  }

  .esg-pillar {
    width: 100%;
    border-left: none;
    border-top: 3px solid var(--color-white-highlight);
    padding-left: 0;
    padding-top: 20px;
  }
  
  .esg-pillar h3 {
    text-align: center !important;
  }
}

/* ==========================================================================
   Our Team Specialists Grid Styling
   ========================================================================== */

.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;
}

.specialist-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  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;
}

/* Responsive adjust for mobile view */
@media (max-width: 768px) {
  .specialist-grid {
    grid-template-columns: 1fr;
  }
}