/* ========================================
   Bruviti About Page Styles
   Professional B2B About page using existing design system
   ======================================== */

/* ========================================
   Main Layout
   ======================================== */

.about-main {
  padding-top: 72px; /* Account for fixed header */
  min-height: 100vh;
}

/* ========================================
   Hero Section - Using existing patterns
   ======================================== */

.hero-about {
  /* Padding now handled by .section-connected class */
  background: linear-gradient(180deg, 
    var(--primary-dark) 0%, 
    #0f0f0f 50%, 
    var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
  /* margin-bottom removed - spacing handled by section classes */
}

.hero-about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at top left, rgba(255, 107, 53, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(255, 107, 53, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem); /* Match existing hero-title pattern */
  line-height: 1.1;
  font-weight: 300; /* Match existing h1 weight */
  color: var(--text-white);
  margin-bottom: var(--space-6);
  letter-spacing: -1px; /* Match existing h1 letter-spacing */
}

.hero-description {
  font-size: clamp(1.25rem, 2vw, 1.5rem); /* Match existing hero-subtitle pattern */
  line-height: 1.5;
  color: var(--light-gray);
  font-weight: 400;
  max-width: 700px;
  margin: 0 auto;
}

/* ========================================
   Mission/Vision Section - Using existing patterns
   ======================================== */

.mission-vision {
  /* Padding now handled by .section-group-start class */
  background: var(--primary-dark);
  /* Margins removed - spacing handled by section classes */
}

.mission-vision-grid {
  display: flex;
  flex-direction: column; /* Stack cards vertically */
  gap: var(--space-8);
  max-width: 1000px;
  margin: 0 auto;
  align-items: stretch; /* Ensure equal heights */
}

.mission-card,
.vision-card {
  flex: 1;
  background: var(--secondary-dark); /* Match existing .card background */
  border: 1px solid rgba(64, 64, 64, 0.3); /* Match existing .card border */
  border-radius: 0; /* Match existing .card border-radius */
  padding: var(--space-8); /* Match existing .card padding */
  position: relative;
  transition: border-color var(--transition-base), transform var(--transition-base); /* Match existing .card transition */
  overflow: hidden; /* Match existing .card overflow */
  margin-bottom: var(--space-6); /* Match existing .card margin-bottom */
  display: flex;
  flex-direction: column;
  min-height: 300px; /* Increased minimum height for better appearance */
}

.mission-card:last-child,
.vision-card:last-child {
  margin-bottom: 0; /* Match existing .card :last-child */
}

/* Hover effects removed to eliminate orange rollovers per bugs #12 & #23 */
/* .mission-card:hover,
.vision-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-4px);
} */

/* MUCH LARGER header text within cards - very prominent */
.mission-vision .vision-card h3,
.mission-vision .mission-card h3 {
  font-size: 28px; /* 28px - very large and prominent */
  font-weight: 600; /* Bold weight for maximum prominence */
  color: var(--text-bright-gray); /* Changed from orange to light gray for neutral appearance */
  margin-bottom: 16px; /* 16px - explicit spacing */
  line-height: 1.35; /* Match existing h3 line-height */
}

/* MUCH LARGER body text within cards - very readable */
.mission-vision .vision-card p,
.mission-vision .mission-card p {
  font-size: 20px; /* 20px - large and very readable */
  line-height: 1.6; /* Improved line height for readability */
  color: var(--text-primary-gray); /* Match existing body text color */
  font-weight: 300; /* Match existing body text weight */
  flex-grow: 1; /* Fill available space for equal heights */
  margin: 0; /* Remove default margins */
}

/* ========================================
   Leadership Team Section - Using existing patterns
   ======================================== */

.leadership-team {
  /* Padding now handled by .section-group-middle class */
  background: linear-gradient(180deg, 
    var(--primary-dark) 0%, 
    #0f0f0f 50%, 
    var(--primary-dark) 100%);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem); /* Match existing h2 responsive sizing */
  font-weight: 300; /* Match existing h2 weight */
  text-align: center;
  color: var(--text-white);
  margin-bottom: var(--space-10);
  letter-spacing: -0.5px; /* Match existing h2 letter-spacing */
  line-height: 1.25; /* Match existing h2 line-height */
}

/* Leadership Grid - Flip Card Layout */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  max-width: 1200px;
  margin: 0 auto;
}

/* Flip Card Container */
.leadership-card {
  background: var(--secondary-dark);
  border: 1px solid rgba(64, 64, 64, 0.3);
  border-radius: 0;
  width: 100%;
  height: 500px; /* Increased height to fit Sanmitra's complete bio without scrolling */
  perspective: 1000px;
  cursor: pointer;
  position: relative;
  margin-bottom: var(--space-6);
}

.leadership-card:last-child {
  margin-bottom: 0;
}

/* Card Inner Container for 3D Flip */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  transform-style: preserve-3d;
}

/* Card Front and Back */
.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-8);
  box-sizing: border-box;
}

.card-back {
  transform: rotateY(180deg);
  background: var(--secondary-dark);
  border: 1px solid rgba(64, 64, 64, 0.3);
}

/* Desktop: Hover to flip */
@media (min-width: 768px) {
  .leadership-card:hover .card-inner {
    transform: rotateY(180deg);
  }
  
  .leadership-card:hover {
    border-color: var(--accent-orange);
  }
}

/* Mobile: Click to flip */
@media (max-width: 767px) {
  .leadership-card.flipped .card-inner {
    transform: rotateY(180deg);
  }
  
  .leadership-card.flipped {
    border-color: var(--accent-orange);
  }
}

.team-photo-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 0; /* Match existing design system - no border radius */
  background: var(--secondary-dark); /* Use existing background color */
  border: 1px solid var(--medium-gray); /* Add border to match design system */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  position: relative;
  overflow: hidden;
}

/* Actual team photos */
.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 0; /* Match existing design system - no border radius */
  border: 1px solid var(--medium-gray); /* Add border to match design system */
  object-fit: cover;
  margin: 0 auto var(--space-4);
  display: block;
}

.photo-placeholder-text {
  font-size: 2rem;
  font-weight: 400; /* Match existing font weight */
  color: var(--text-white); /* Use existing text color */
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.team-name {
  font-size: 1.25rem; /* Match existing h4 size */
  font-weight: 400; /* Match existing h4 weight */
  color: var(--text-white);
  margin-bottom: var(--space-2);
  line-height: 1.4; /* Match existing h4 line-height */
}

.team-title {
  font-size: 1rem; /* Match existing minimum font size */
  color: var(--accent-orange);
  font-weight: 400; /* Match existing font weight */
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team-bio {
  font-size: 1rem; /* Match existing minimum font size */
  line-height: 1.75; /* Match existing body text line-height */
  color: var(--text-primary-gray); /* Match existing body text color */
  text-align: left;
  margin-bottom: var(--space-3);
  font-weight: 300; /* Match existing body text weight */
}

.team-education {
  font-size: 1rem; /* Match existing minimum font size */
  color: var(--light-gray); /* Use existing light gray color */
  font-style: italic;
  text-align: left;
  font-weight: 300; /* Match existing body text weight */
}

/* Bio Content Styles for Card Back - Clean, Text-Focused Design */
.bio-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  padding: 15px; /* Reduced margins for more content space */
  box-sizing: border-box;
  overflow: hidden; /* NO SCROLLING - content must fit within card */
}

.bio-text {
  font-size: 0.95rem; /* Optimized size for content fit */
  line-height: 1.5; /* Tighter line height for better space utilization */
  color: rgba(255, 255, 255, 0.95);
  margin: 0; /* No margins for maximum content space */
  font-weight: 300;
  text-align: left;
  flex-grow: 1;
  overflow: hidden; /* Prevent text overflow */
  display: flex;
  align-items: flex-start; /* Align text to top for better space usage */
}

/* ========================================
   AI Engineers Section - Using existing patterns
   ======================================== */

.ai-engineers {
  /* Padding now handled by .section-group-end class */
  background: var(--primary-dark);
}

.section-subtitle {
  font-size: 1.25rem; /* Match existing h5 size */
  color: var(--light-gray);
  text-align: center;
  margin-bottom: var(--space-10);
  font-weight: 400; /* Match existing h5 weight */
  line-height: 1.5; /* Match existing h5 line-height */
}

/* ========================================
   AI Engineers Grid - New Video Overlay Layout
   ======================================== */

.engineers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns x 2 rows for 6 engineers */
  gap: 30px;
  margin-top: 40px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.ai-engineer-card {
  background: var(--secondary-dark); /* Match existing card background */
  border: 1px solid rgba(64, 64, 64, 0.3); /* Match existing card border */
  border-radius: 0; /* Match existing design system */
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ai-engineer-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-orange);
}

/* Remove grayscale on hover for better interaction */
.ai-engineer-card:hover .engineer-video {
  filter: grayscale(0%);
  -webkit-filter: grayscale(0%);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 200px;
  background: var(--secondary-dark);
  border-radius: 0; /* Sharp corners to match design system */
  overflow: hidden;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Engineer Video Styling - Static Thumbnails */
.engineer-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* Sharp corners to match design system */
  background: var(--secondary-dark);
  pointer-events: none; /* Disable video interaction */
  transition: transform 0.3s ease, filter 0.3s ease; /* Added filter transition */
  filter: grayscale(100%); /* Apply grayscale to video thumbnails */
  -webkit-filter: grayscale(100%); /* Safari/Chrome compatibility */
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
  opacity: 0;
  pointer-events: none; /* Let parent handle clicks */
}

.ai-engineer-card:hover .play-button {
  opacity: 1;
  background: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

.play-icon {
  width: 24px;
  height: 24px;
  fill: white;
  margin-left: 3px; /* Slight offset for visual centering */
}


.ai-engineer-card h3 {
  font-size: 1.25rem; /* 20px */
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 8px;
  margin-top: 0;
}

.ai-engineer-card p {
  font-size: 1rem; /* 16px */
  color: var(--light-gray);
  margin: 0;
  font-weight: 400;
}

/* ========================================
   Video Overlay Modal
   ======================================== */

.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.video-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 90%;
  max-width: 800px;
  background: var(--secondary-dark);
  border: 1px solid var(--medium-gray);
  border-radius: 0; /* Sharp corners to match design system */
  padding: 30px;
  transition: transform 0.3s ease;
}

.video-overlay.active .video-container {
  transform: translate(-50%, -50%) scale(1);
}

.close-button {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: var(--light-gray);
  transition: color 0.3s ease;
}

.close-button:hover {
  color: var(--text-white);
}

.video-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 20px;
  text-align: center;
}

.modal-video {
  width: 100%;
  height: 400px;
  border-radius: 0; /* Sharp corners to match design system */
  background: var(--primary-dark);
}

/* ========================================
   CTA Section - Using existing patterns
   ======================================== */

.cta-about {
  padding: var(--space-section-lg) 0; /* 160px top/bottom desktop */
  background: linear-gradient(135deg, 
    var(--secondary-dark) 0%, 
    #1f1f1f 50%, 
    var(--secondary-dark) 100%);
  position: relative;
  overflow: hidden;
}

.cta-about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at center, var(--accent-orange-5) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem); /* Match existing h2 responsive sizing */
  font-weight: 300; /* Match existing h2 weight */
  color: var(--text-white);
  margin-bottom: var(--space-5); /* Match existing h2 margin-bottom */
  line-height: 1.25; /* Match existing h2 line-height */
  letter-spacing: -0.5px; /* Match existing h2 letter-spacing */
}

.cta-description {
  font-size: 1.125rem; /* Match existing body text size */
  line-height: 1.75; /* Match existing body text line-height */
  color: var(--text-primary-gray); /* Match existing body text color */
  margin-bottom: var(--space-6);
  font-weight: 300; /* Match existing body text weight */
}

/* ========================================
   Responsive Design - Match existing patterns from main.css
   ======================================== */

/* Tablet (768px - 1023px): Match existing tablet patterns */
@media (min-width: 768px) and (max-width: 1023px) {
  .mission-vision-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .leadership-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
  }
  
  /* Tablet: 2 columns x 3 rows */
  .engineers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

/* Mobile (320px - 767px): Match existing mobile patterns */
@media (max-width: 767px) {
  .hero-about {
    /* Padding now handled by connected section class mobile styles */
  }
  
  /* Section padding now handled by connected section classes on mobile */
  .cta-about {
    padding: var(--space-section-mobile) 0; /* 60px top/bottom mobile */
  }
  
  /* Mission/Vision cards stack on mobile */
  .mission-vision-grid {
    flex-direction: column; /* Stack cards vertically on mobile */
    gap: var(--space-6); /* Use mobile-optimized gap */
  }
  
  .vision-card,
  .mission-card {
    flex: none; /* Remove flex grow on mobile */
    padding: var(--space-4); /* Match existing mobile card padding */
    min-height: auto; /* Allow natural height on mobile */
    margin-bottom: 20px; /* Add spacing between cards */
  }
  
  .mission-card {
    margin-bottom: 0; /* Remove bottom margin from last card */
  }
  
  /* Maintain MUCH LARGER text sizes on mobile for better readability */
  .mission-vision .vision-card h3,
  .mission-vision .mission-card h3 {
    font-size: 24px; /* 24px - still very large on mobile */
    margin-bottom: 12px; /* 12px - reduced for mobile */
  }
  
  .mission-vision .vision-card p,
  .mission-vision .mission-card p {
    font-size: 18px; /* 18px - large and readable on mobile */
    line-height: 1.5; /* Tighter line height for mobile */
  }
  
  .leadership-grid {
    gap: var(--space-3); /* 12px - very compact mobile spacing */
  }
  
  .leadership-card {
    height: 450px; /* Adjusted height for mobile to fit content */
  }
  
  .card-front,
  .card-back {
    padding: var(--space-4); /* Match existing mobile card padding */
  }
  
  .bio-content {
    padding: 12px; /* Reduced mobile padding for more content space */
  }
  
  .bio-text {
    font-size: 0.9rem; /* Optimized for mobile content fit */
    line-height: 1.4; /* Tighter line height for mobile space optimization */
  }
  
  .team-photo-placeholder,
  .team-photo {
    width: 100px;
    height: 100px;
  }
  
  .photo-placeholder-text {
    font-size: 1.75rem;
  }
  
  .engineer-photo-placeholder {
    width: 70px;
    height: 70px;
  }
  
  .engineer-photo-placeholder .photo-placeholder-text {
    font-size: 1.25rem;
  }
  
  /* Mobile: 1 column x 6 rows (stacked) */
  .engineers-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .ai-engineer-card {
    padding: 15px;
  }
  
  .video-thumbnail {
    height: 150px;
  }
  
  .engineer-video {
    height: 100%;
    object-fit: cover;
  }
  
  /* Mobile modal adjustments */
  .video-container {
    width: 95%;
    padding: 20px;
  }
  
  .modal-video {
    height: 250px;
  }
  
  .photo-placeholder-text {
    font-size: 2rem;
  }
  
  
  /* Typography adjustments to match existing mobile patterns */
  .hero-title {
    font-size: clamp(2rem, 5vw + 1rem, 3rem); /* Match existing mobile h1 */
    line-height: 1.2;
    font-weight: 300;
    letter-spacing: -0.5px;
    margin-bottom: 1.5rem;
  }
  
  .hero-description {
    font-size: clamp(1.125rem, 3vw + 0.25rem, 1.5rem); /* Match existing mobile responsive */
    line-height: 1.4;
  }
  
  .section-title {
    font-size: clamp(1.5rem, 4vw + 0.5rem, 2rem); /* Match existing mobile h2 */
    line-height: 1.25;
    font-weight: 300;
    letter-spacing: -0.25px;
    margin-bottom: 1.25rem;
  }
  
  .mission-title,
  .vision-title {
    font-size: 26px; /* 26px - large on tablet */
    line-height: 1.3;
    font-weight: 600;
  }
  
  .mission-text,
  .vision-text {
    font-size: 19px; /* 19px - large and readable on tablet */
    line-height: 1.6;
    font-weight: 300;
  }
}

/* Small mobile (320px - 480px): Match existing small mobile patterns */
@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.5rem, 6vw, 2.5rem); /* Match existing small mobile h1 */
    font-weight: 300;
    letter-spacing: -0.25px;
    padding: 0 var(--space-2); /* Add padding to prevent edge touching */
  }
  
  .hero-description {
    font-size: 1rem; /* Match existing small mobile body text */
  }
  
  .section-title {
    font-size: 1.75rem; /* Match existing small mobile h2 */
    font-weight: 300;
    letter-spacing: -0.25px;
  }
  
  .mission-title,
  .vision-title {
    font-size: 22px; /* 22px - still large on small mobile */
    font-weight: 600;
  }
  
  .mission-text,
  .vision-text {
    font-size: 17px; /* 17px - large and readable on small mobile */
    font-weight: 300;
  }
  
  .leadership-grid {
    grid-template-columns: 1fr;
  }
  
  .leadership-card {
    height: 400px; /* Adjusted height for small mobile to fit content */
  }
  
  .engineers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Prevent horizontal overflow globally - match existing pattern */
  * {
    max-width: 100vw;
  }
  
  .container,
  .container-wide,
  .container-narrow,
  .container-xl {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* ========================================
   Accessibility Enhancements - Match existing patterns
   ======================================== */

/* Focus states for interactive elements - match existing focus patterns */
.leadership-card:focus-within,
.engineer-member:focus-within {
  outline: 2px solid var(--accent-orange);
  outline-offset: 3px; /* Match existing focus offset */
  border-radius: 0; /* Match existing focus border-radius */
}

/* High contrast mode support - match existing patterns */
@media (prefers-contrast: high) {
  .mission-card,
  .vision-card,
  .leadership-card {
    border-width: 2px; /* Match existing high contrast pattern */
  }
  
  .team-photo-placeholder,
  .team-photo,
  .engineer-photo-placeholder {
    border: 2px solid var(--text-white);
  }
}

/* Reduced motion support - match existing patterns */
@media (prefers-reduced-motion: reduce) {
  .leadership-card,
  .engineer-member,
  .mission-card,
  .vision-card,
  .engineer-video {
    transition: none; /* Match existing reduced motion pattern */
  }
  
  .leadership-card:hover,
  .engineer-member:hover {
    /* .mission-card:hover and .vision-card:hover removed - hover effects disabled */
    transform: none; /* Match existing reduced motion pattern */
  }
  
  /* Still apply/remove grayscale but without transition */
  .engineer-video {
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
  }
  
  .ai-engineer-card:hover .engineer-video {
    filter: grayscale(0%);
    -webkit-filter: grayscale(0%);
  }
  
  .card-inner {
    transition: none; /* Disable flip animation for reduced motion */
  }
}
