/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  font-family: 'Mulish', sans-serif;
  background: #fff;
}

/* ===============================
   Leadership Section Styles
=============================== */
.leadership-section {
  background: #fff;
  padding: 100px 81px;
  text-align: center;
}

.leadership-section h2 {
  font-size: 35px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #111;
  margin-right: 85%;
}

.leader-subtitle {
  color: #555;
  font-size: 18px;
  margin-bottom: 50px;
  margin-right: 83%;
  font-weight: 700;
  margin-top: 1%;
}

/* Container */
.leadership-container {
  display: flex;
  flex-wrap: wrap;
  /* justify-content: center; */
  gap: 40px;
}

/* ========== Leader Card ========== */
.leader-card {
  position: relative;
  /* overflow: hidden; */
  transition: transform 0.3s ease;
}

.leader-card:hover {
  transform: translateY(-6px);
}

/* Leader Image (BORDER RADIUS REMOVED) */
.leader-image img {
  width: 100%;
  display: block;
  transition: filter 0.5s ease;
  border-radius: 0;
}

.leader-image {
  overflow: hidden;
  /* ✅ CORRECT PLACE */
}


.leader-card:hover .leader-image img {
  filter: grayscale(100%);
}

/* Overlay (Red card) */
.leader-overlay {
  position: absolute;
  /* Reset constraints */
  inset: auto;
  top: auto;
  bottom: 60px;
  left: 0;
  width: 100%;
  height: auto;
  margin: 0;

  background: #781111CC;
  color: #fff;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.5s ease;
  padding: 25px;
  display: flex;
  flex-direction: column;
  text-align: justify;
}

.leader-card:hover .leader-overlay {
  opacity: 1;
  transform: translateY(0);
}

.leader-overlay h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}


.leader-overlay .overlay-text {
  font-size: 11px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;

  /* Smooth expansion effect */
  max-height: 55px;
  /* approx 3 lines */
  transition: max-height 0.5s ease-in-out;
}

.leader-overlay .overlay-text.expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;

  /* Large enough to fit full content */
  max-height: 500px;
}

.read-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  /* Slightly larger for mobile/desktop readability */
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* ===============================
   Balaji Leader Overlay
=============================== */
.b-leader-overlay {
  position: absolute;
  inset: 0;
  background: #781111CC;
  color: #fff;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.5s ease;
  padding: 25px;
  display: flex;
  flex-direction: column;
  text-align: justify;
  width: 94%;
  left: 3%;
  margin-bottom: 10%;
  top: 61%;
}

.b-leader-overlay h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #fff;
}

.b-leader-overlay p {
  font-size: 12px;
  line-height: 1.7;
  color: #f8f8f8;
  max-width: 100%;
  text-align: justify;
}

.balaji-card:hover .b-leader-overlay {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Info Card */
.leader-info {
  background: #781111;
  color: #fff;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0 0 12px 12px;
  position: relative;
  z-index: 2;
}

/* Text container */
.info-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.4;
}

.info-text h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.info-text p {
  font-size: 0.82rem;
  margin-top: 2px;
  opacity: 0.95;
}

/* LinkedIn Icon */
.leader-info a img {
  width: 30px;
  height: 30px;
  display: block;
  margin-left: 10px;
  transition: transform 0.3s ease;
  border-radius: 0;
}

.leader-info a img:hover {
  transform: scale(1.1);
}

/* Balaji Card */
.balaji-card {
  flex: 1 1 100%;
  /* max-width: 1046px; */
  margin: 0 auto 50px;
}

.balaji-card .leader-image img {
  border-radius: 0;
}

.balaji-card .leader-info {
  max-width: 400px;
  margin: -25px auto 0;
  border-radius: 12px;
  margin-top: 1%;
}

/* Other Leaders */
.leader-card:not(.balaji-card) {
  flex: 1 1 calc(33.333% - 40px);
  /* max-width: 340px; */
}

/* =========== Tablet & Small Laptop (Landscape) =========== */
@media (max-width: 1024px) {
  .leadership-section {
    padding: 94px 40px;
  }

  .leadership-section h2,
  .leader-subtitle {
    margin-right: 0;
    text-align: center;
  }

  .leader-image img,
  .balaji-card .leader-image img {
    height: auto;
    /* Allow natural height or set a reasonable fixed height */
    /* aspect-ratio: 4/3; */
    /* Enforce a ratio if needed, or stick to auto */
    object-fit: cover;
    border-radius: 0;
  }
}

/* =========== Mobile Devices (Portrait) =========== */
@media (max-width: 768px) {
  .leadership-section {
    padding: 40px 20px;
  }

  /* Center the title and subtitle */
  .leadership-section h2 {
    font-size: 28px;
    margin-right: 0;
    text-align: center;
  }

  .leader-subtitle {
    font-size: 16px;
    margin-right: 0;
    text-align: center;
    margin-bottom: 30px;
  }

  .leadership-container {
    gap: 30px;
  }

  /* Card Layout Reset for Mobile Stack */
  .leader-card,
  .balaji-card,
  .leader-card:not(.balaji-card) {
    flex: 1 1 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    height: auto;
    /* Let content dictate height */
    margin-bottom: 40px;
    /* Increased gap between cards */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Added subtle shadow for depth */
    border-radius: 12px;
  }

  /* Image Area */
  .leader-image,
  .balaji-card .leader-image {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
  }

  .leader-image img,
  .balaji-card .leader-image img {
    width: 100%;
    height: auto;
    /* Restored to auto to maintain aspect ratio */
    min-height: 250px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    /* Add radius top */
  }

  /* 
     TRANSFORM OVERLAYS TO STATIC BLOCKS 
     This places the description physically below the image, always visible.
  */
  .leader-overlay,
  .b-leader-overlay {
    position: relative;
    inset: auto;
    opacity: 1 !important;
    /* Force visible */
    visibility: visible !important;
    transform: none !important;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 20px 20px 10px 20px;
    /* Bottom padding reduced */
    background: #781111;
    /* Solid brand color */
    color: #fff;
    text-align: left;
    display: block;
    top: auto;
    left: auto;
    bottom: auto;
  }

  /* Hide duplicate Name in Overlay (since it appears in Info card) */
  .leader-overlay h4,
  .b-leader-overlay h4 {
    display: none;
  }

  /* Description text */
  .leader-overlay .overlay-text {
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.6;
    color: #fff;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    /* Adjust max-height for mobile font size (14px * 1.6 * 4 lines ~= 90px) */
    max-height: 100px;
    /* Show a bit more on mobile by default */
  }

  /* Balaji has no read-more, so show all text */
  .b-leader-overlay p {
    font-size: 14px;
    line-height: 1.6;
    color: #fff;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
    margin-bottom: 15px;
  }

  /* Info Card (Name/Title) adjustment to merge with description block */
  .leader-info,
  .balaji-card .leader-info {
    width: 100%;
    max-width: 100%;
    margin: 0;
    /* Remove negative margins */
    border-radius: 0 0 12px 12px;
    background: #6a0f0f;
    /* Slightly darker to distinguish or same #781111 */
    padding: 15px 20px 25px 20px;
    /* Adjusted padding */
  }

  /* LinkedIn Icon sizing for mobile touch */
  .leader-info a img {
    width: 28px;
    height: 28px;
  }

  /* Specific tweak for Balaji Info Card if needed */
  .balaji-card .leader-info {
    margin-top: 0;
    background: #781111;
    /* Keep uniform if preferred */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle separator */
  }

  /* Resetting hover effects that might interfere */
  .leader-card:hover .leader-image img {
    filter: none;
  }

  /* Hide overlay in slider section since content is commented out */
  .leadership-section2 .leader-overlay {
    display: none !important;
  }
}


/* =========== Small Phones =========== */
@media (max-width: 480px) {
  .leadership-section h2 {
    font-size: 24px;
  }

  /* Ensure images aren't too tall on small screens */
  /* .leader-image img,
  .balaji-card .leader-image img {
    max-height: 350px;
  } */
}

/* Slider Viewport */
/* Slider Viewport */
.leadership-section2 {
  width: 100%;
  overflow: hidden;
  padding: 20px 5px;
  position: relative;
  /* Context for absolute positioning */
  margin-top: -5%;
}

/* Slider Track */
.leader-track {
  display: flex;
  gap: 30px;
  transition: transform 0.4s ease-in-out;
  width: max-content;
}

/* Individual Card in Slider */
.leadership-section2 .leader-cord {
  flex: 0 0 270px;
  /* Fixed width - Reduced from 340px */
  width: 300px;
  max-width: 100%;
  padding: 0;
  margin: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .leadership-section2 .leader-cord {
    flex: 0 0 280px;
    width: 280px;
  }
}

@media (max-width: 768px) {
  .leader-slider-header {
    flex-direction: row;
    align-items: center;
  }

  .leader-slider-header h2 {
    font-size: 24px;
  }

  .leader-slider-header p {
    font-size: 14px;
  }

  .leadership-section2 .leader-cord {
    flex: 0 0 260px;
    width: 260px;
  }
}

@media (max-width: 480px) {
  .leadership-section2 .leader-cord {
    flex: 0 0 85vw;
    width: 85vw;
  }

  .slider-nav-buttons {
    display: none;
    /* Optional: hide nav on mobile if swipe is preferred, but user asked for buttons. keeping them. */
    display: flex;
  }
}


/* Header with Title and Buttons */
/* Header for Leadership Slider (Bottom Section) */
.leader-slider-header {
  margin-top: 40px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 10px;
}

.leader-title-group {
  text-align: left;
}

.leader-slider-header h2 {
  font-size: 35px;
  font-weight: 800;
  color: #111;
  margin-bottom: 5px;
}

.leader-slider-header p {
  color: #555;
  font-size: 18px;
  font-weight: 700;
}

/* Original Title Style for Top Section (CXO Team) */
.leader-cord2Tittle {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  margin-left: 20px;
  /* Or adjust as needed based on original */
  text-align: left;
  /* Ensure left align */
}

.leader-cord2Tittle h1 {
  font-size: 35px;
  font-weight: 800;
  color: #111;
  margin-bottom: 10px;
}

/* New Absolute Navigation Arrows */
.nav-arrow {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  /* Ensure flex is active */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #555;

  /* Absolute Positioning */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  /* High z-index to sit on top of cards */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Position Left and Right */
/* Position Left and Right */
.prev-slide {
  left: -2px;
}

.next-slide {
  right: 0;
}

.nav-arrow:hover {
  background: #781111;
  border-color: #781111;
  color: #fff;
}

.nav-arrow:disabled {
  opacity: 0;
  /* Fully hide disabled buttons or use 0.3 */
  pointer-events: none;
}

.arrow-icon {
  width: 20px;
  height: 20px;
}