/* Body */
.body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Container */
@media (min-width: 1440px) {
  .container {
    max-width: 1440px !important;
  }
}

/* Header */
@media (min-width: 992px) {
  #header .header-nav-main nav > ul > li > a {
    font-weight: 500;
    font-size: 16px;
    padding-left: 1.3rem !important;
    padding-right: 1.3rem !important;
  }
}

@media (max-width: 1280px) {
  #header .header-nav-main nav > ul > li > a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Nav-link hover grow animation */
#header .header-nav-main nav > ul > li > a {
  transition: transform 0.3s ease, color 0.3s ease;
  transform-origin: center;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#header .header-nav-main nav > ul > li > a:hover {
  transform: scale(1.1);
}

#header .header-nav-main nav > ul > li > a i {
  transition: transform 0.3s ease;
}

#header .header-nav-main nav > ul > li > a:hover i {
  transform: scale(1.2);
}

/* Desktop: Show only icons */
@media (min-width: 992px) {
  #header .header-nav-main nav > ul > li > a .nav-label {
    display: none !important;
  }

  /* Center nav-links vertically within navbar */
  #header .header-nav-main nav > ul {
    align-items: center !important;
    display: flex !important;
  }

  #header .header-nav-main nav > ul > li {
    display: flex !important;
    align-items: center !important;
  }

  #header .header-nav-main nav > ul > li > a {
    padding: 0.75rem !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: row !important;
    white-space: nowrap !important;
  }

  #header .header-nav-main nav > ul > li > a i {
    font-size: 1.25rem !important;
    margin: 0 !important;
  }
}

/* iPad view (991px to 1200px) - Fix navbar nav items wrapping */
@media (min-width: 992px) and (max-width: 1199px) {
  /* Reduce padding on nav items to prevent wrapping */
  #header .header-nav-main nav > ul > li > a {
    padding: 0.6rem !important;
    width: 45px !important;
    height: 45px !important;
    min-width: 45px !important;
    min-height: 45px !important;
    max-width: 45px !important;
    max-height: 45px !important;
  }

  #header .header-nav-main nav > ul > li > a i {
    font-size: 1.1rem !important;
  }

  /* Reduce spacing between nav items */
  #header .header-nav-main nav > ul {
    gap: 0.25rem !important;
  }

  /* Reduce margin on nav container */
  #header .header-nav-main nav {
    margin-right: 0.5rem !important;
  }

  /* Reduce button sizes */
  #header .btn-outline-primary,
  #header .btn-primary {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
  }

  /* Reduce logo title size if needed */
  #header .header-logo .logo-title {
    height: 50px !important;
  }
}

/* Mobile: Show icons and labels side by side */
@media (max-width: 991px) {
  #header .header-nav-main nav > ul > li > a .nav-label {
    display: inline !important;
    font-size: 14px !important;
    font-weight: 500 !important;
  }

  #header .header-nav-main nav > ul > li > a {
    padding: 0.75rem 1rem !important;
    min-height: 45px !important;
    max-height: 45px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 0.5rem !important;
    border-radius: 6px !important;
    display: flex !important;
    flex-direction: row !important;
    white-space: nowrap !important;
  }

  #header .header-nav-main nav > ul > li > a i {
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
  }
}

#header .btn-primary i {
  font-size: 18px !important;
  transition: transform 0.3s ease !important;
  margin: 0 !important;
}

#header .btn-primary:hover i {
  transform: scale(1.1) !important;
}

/* Font Size */
.custom-font-size-1 {
  font-size: clamp(28px, 4px + 0.05 * 100vw, 64px);
  line-height: 1.1;
}

/* Hero */
.custom-hero-bg {
  position: absolute;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 300ms;
}

.custom-hero-bg svg {
  width: 100vw;
  height: 100vh;
}

.custom-hero-bg:after {
  content: "";
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  position: absolute;
  opacity: 0.8;
  background-color: var(--dark);
}

.custom-hero-bg.loaded {
  opacity: 1;
}

.custom-stop-color-1 {
  stop-color: var(--primary);
}

.custom-hero-font-1 {
  font-size: clamp(28px, 0px + 0.0583333333 * 100vw, 70px);
  line-height: 1.1;
}

.custom-hero-heading {
  position: absolute;
  width: 100%;
  bottom: 0;
  text-align: center;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0) 100%);
}

@media (max-width: 991px) {
  .custom-hero-heading {
    bottom: 80px;
  }
}

.custom-hero-heading strong {
  text-transform: uppercase;
  font-size: 13cqw;
  line-height: 13cqw;
}

/* Page Header */
.page-header .custom-hero-bg {
  height: 500px;
}

.page-header .custom-hero-bg svg {
  height: 500px;
}

@keyframes arrowMove {
  0% {
    margin-top: 0;
  }
  50% {
    margin-top: -30px;
  }
  100% {
    margin-top: 0;
  }
}

/* Elements */
.custom-el-1 {
  opacity: 0.1;
  align-items: center;
  display: flex;
  justify-content: center;
  flex-direction: column;
  animation: arrowMove 3000ms linear;
  animation-iteration-count: infinite;
}

.custom-el-1 img {
  margin-bottom: -100px;
}

.custom-el-pos-1 {
  top: 55%;
  left: -60px;
}

.custom-el-2 {
  opacity: 0.1;
  align-items: center;
  display: flex;
  justify-content: center;
  flex-direction: column;
  animation: arrowMove 3000ms linear;
  animation-iteration-count: infinite;
}

.custom-el-2 img {
  margin-bottom: -47px;
}

.custom-el-pos-2 {
  top: 80%;
  right: -30px;
}

.custom-el-3 {
  width: 100%;
  height: 100%;
  max-width: 220px;
  max-height: 220px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.custom-el-3 .custom-el-3-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.custom-el-3 .custom-el-3-img img {
  transition: transform 2s;
  will-change: transform;
}

.custom-el-3-pos-1 {
  top: 30%;
  z-index: 1;
}

.custom-el-3-pos-2 {
  top: -30%;
}

.custom-el-4-pos {
  margin-top: -15px;
}

.custom-el-pos-5 {
  left: -60px;
  top: 35%;
}

/* Custom Marquee */
.custom-marquee-1 .js-marquee-wrapper,
.custom-marquee-1 .js-marquee,
.custom-marquee-1 .js-marquee > span {
  display: flex;
}

/* Custom Avatar */
.custom-avatar-1 {
  width: 70px;
  height: 70px;
  position: relative;
}

.custom-avatar-1-info {
  position: absolute;
  top: -30px;
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
  letter-spacing: -0.5px;
  font-weight: 600;
  margin-left: -15px;
  opacity: 0.5;
}

.custom-avatar-1-info .animated-icon {
  transform: rotate(120deg);
  float: left;
  margin-right: 5px;
}

/* Custom Popover */
.custom-popover-1 {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -1px;
}

/* Custom Btn */
.custom-btn-1 {
  width: 200px;
  height: 200px;
  line-height: 190px;
  border-radius: 100%;
  white-space: nowrap;
}

/* Custom Grid */
.custom-grid-1 {
  margin-top: -70px;
  position: relative;
}

.custom-grid-1 .container {
  margin: 0 auto;
}

.custom-grid-1 .container .row {
  margin: 0;
}

.custom-grid-1 .container .row > * {
  padding: 0;
  background-color: var(--light);
  min-height: 220px;
  align-items: center;
  overflow: hidden;
}

@media (max-width: 991px) {
  .custom-grid-1 .container .row > * {
    border: 1px solid var(--grey-100);
  }
}

@media (min-width: 992px) {
  .custom-grid-1 .container .row > *:nth-child(1),
  .custom-grid-1 .container .row > *:nth-child(3),
  .custom-grid-1 .container .row > *:nth-child(6),
  .custom-grid-1 .container .row > *:nth-child(8) {
    background-color: var(--grey-100);
  }
}

.custom-grid-1 .custom-grid-1-item {
  position: relative;
}

.custom-grid-1 .custom-grid-1-item .custom-grid-1-img {
  transition: opacity 300ms;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.custom-grid-1 .custom-grid-1-item .custom-grid-1-img img {
  transition: transform 2s;
  will-change: transform;
  transform: scale(0.75);
}

.custom-grid-1 .custom-grid-1-item .custom-grid-1-img:after {
  content: "";
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  position: absolute;
  opacity: 0.7;
  background-color: var(--dark);
}

.custom-grid-1 .custom-grid-1-item .custom-grid-1-text {
  position: relative;
  z-index: 1;
}

.custom-grid-1 .custom-grid-1-item:hover .custom-grid-1-img {
  opacity: 1;
}

.custom-grid-1 .custom-grid-1-item:hover .custom-grid-1-img img {
  transform: scale(1);
}

.custom-grid-1 .custom-grid-1-item:hover h3 {
  color: var(--light) !important;
}

/* Custom Projects */
@media (max-width: 991px) {
  .custom-projects-1 .border-end {
    border: 0 !important;
  }
}

/* Custom Border Radius */
.custom-border-radius-1 {
  border-radius: 0 100px 0 100px;
}

.custom-border-radius-2 {
  border-radius: 100px 0 0 0;
}

.custom-border-radius-3 {
  border-radius: 100px 100px 100px 0;
}

.custom-border-radius-4 {
  border-radius: 200px 10px 10px 10px;
}

.custom-border-radius-5 {
  border-radius: 0 0 100px 0;
}

/* Custom Section */
.custom-section-1 {
  margin-top: -70px;
  padding-top: 70px;
}

/* Custom Carousel */
@media (min-width: 1200px) {
  .custom-carousel-1 > .owl-carousel {
    width: calc(100vw - ((100vw - 1400px) / 2));
  }
}

/* iPad view (991px to 1200px) - Hide logo title */
@media (min-width: 992px) and (max-width: 1199px) {
  /* Hide logo title on iPad view */
  #header .header-logo .logo-title {
    display: none !important;
  }
}

/* Responsive testimonial text sizes */
/* Mobile devices (up to 575px) */
@media (max-width: 575px) {
  /* Testimonial quote text */
  .custom-carousel-1 blockquote p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
  }

  /* Client name */
  .custom-carousel-1 .card-body h6 {
    font-size: 0.85rem !important;
  }

  /* Star rating text */
  .custom-carousel-1 .card-body .mt-2 span {
    font-size: 0.85rem !important;
  }

  /* Star icons */
  .custom-carousel-1 .card-body .mt-2 i {
    font-size: 0.85rem !important;
  }
}

/* Small tablets (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  /* Testimonial quote text */
  .custom-carousel-1 blockquote p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  /* Client name */
  .custom-carousel-1 .card-body h6 {
    font-size: 0.9rem !important;
  }

  /* Star rating text */
  .custom-carousel-1 .card-body .mt-2 span {
    font-size: 0.9rem !important;
  }
}

/* Tablets (768px to 991px) */
@media (min-width: 768px) and (max-width: 1439px) {
  /* Testimonial quote text */
  .custom-carousel-1 blockquote p {
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
  }

  /* Client name */
  .custom-carousel-1 .card-body h6 {
    font-size: 1rem !important;
  }
}

/* Custom Content */
.custom-page-content {
  margin-top: -70px;
}

/* Custom Padding */
.custom-padding-top-1 {
  padding-top: 70px;
}

.custom-padding-bottom-1 {
  padding-bottom: 70px;
}

/* Footer */
#footer {
  margin-top: -70px;
  background-color: #fafafa !important;
}

/* Accordion hover functionality - Open on hover */
#about .toggle section {
  transition: all 0.3s ease;
  cursor: pointer;
}

#about .toggle section .toggle-content {
  display: none;
  overflow: hidden;
}

#about .toggle section.active .toggle-content,
#about .toggle section:hover .toggle-content {
  display: block !important;
}

#about .toggle section .toggle-title {
  transition: color 0.3s ease;
}

#about .toggle section:hover .toggle-title {
  color: var(--primary) !important;
}

/* Typing Animation */
.typing-text {
  position: relative;
  display: inline;
  color: var(--secondary);
  line-height: 1;
  white-space: nowrap;
}

/* Keep typing text color unchanged in dark mode */
.text-light .typing-text,
.bg-dark--100 .typing-text,
body .typing-text {
  color: var(--secondary) !important;
}

.typing-text::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 0;
  animation: blink 1s infinite;
  color: white;
  font-weight: bold;
  line-height: inherit;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Board Members Page Styles */
.main {
  padding-top: 60px;
}

/* Fix navigation visibility - only on desktop (where collapse is not used) */
@media (min-width: 992px) {
  .header-nav-main nav {
    display: block !important;
  }

  .header-nav-main .nav {
    display: flex !important;
  }
}

/* On mobile, respect Bootstrap collapse behavior */
@media (max-width: 991px) {
  .header-nav-main nav:not(.show) {
    display: none !important;
  }

  .header-nav-main nav.show {
    display: block !important;
  }

  /* Remove max-height constraint so menu can expand fully without scrolling */
  #header .header-nav-main nav {
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
  }

  #header .header-nav-main nav > ul {
    overflow: visible !important;
  }
}

.header-nav-main .nav-link {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}

.org-chart-container {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.org-box {
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  margin: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.org-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.org-box.board-directors {
  background: #000;
  color: #fff;
  border-color: #000;
}

.org-box.ceo {
  background: #1d2f98;
  color: #fff;
  border-color: #1d2f98;
}

.org-box.coo {
  background: #f27113;
  color: #fff;
  border-color: #f27113;
}

.org-box.cto {
  background: #000;
  color: #fff;
  border-color: #000;
}

.org-box.director {
  background: #000;
  color: #fff;
  border-color: #000;
}

.org-box.finance {
  background: #f27113;
  color: #fff;
  border-color: #f27113;
}

.org-box.sales {
  background: #1d2f98;
  color: #fff;
  border-color: #1d2f98;
}

.org-box.manager {
  background: #8b4513;
  color: #fff;
  border-color: #8b4513;
}

.org-box.staff {
  background: #000;
  color: #fff;
  border-color: #000;
}

.org-box h4,
.org-box h5,
.org-box h6 {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

/* Team Member Styles */
.team-member {
  padding: 1.5rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.team-photo-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.team-photo-triangle-left,
.team-photo-triangle-right {
  width: 100%;
  height: 100%;
  clip-path: polygon(0% 0%, 100% 0%, 0% 100%);
  overflow: hidden;
  position: relative;
}

.team-photo-triangle-right {
  clip-path: polygon(100% 0%, 100% 100%, 0% 100%);
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.team-photo-container:hover .team-photo {
  transform: scale(1.1);
}

.team-member h4 {
  color: #1d2f98;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.team-member .text-primary {
  color: #f27113 !important;
  font-size: 0.9rem;
}

.team-member p {
  color: #666;
  line-height: 1.6;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main {
    padding-top: 60px;
  }

  .org-chart-container {
    padding: 1rem;
  }

  .org-box {
    margin: 0.25rem;
    padding: 0.75rem;
    min-height: 60px;
  }

  .org-box h4,
  .org-box h5,
  .org-box h6 {
    font-size: 0.8rem;
  }

  .team-photo-container {
    width: 100px;
    height: 100px;
  }

  .team-member {
    padding: 1rem;
  }

  .team-member h4 {
    font-size: 1rem;
  }

  .team-member p {
    font-size: 0.85rem;
  }

  /* Mobile navigation fixes */
  .header-nav-main .nav {
    flex-direction: column;
    width: 100%;
  }

  .header-nav-main .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 576px) {
  .org-box h4,
  .org-box h5,
  .org-box h6 {
    font-size: 0.7rem;
  }

  .team-photo-container {
    width: 80px;
    height: 80px;
  }
}

/* Interactive Organization Chart Styles */
.interactive-org-chart {
  position: relative;
  padding: 2rem 0;
  min-height: 600px;
}

.org-level {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
  position: relative;
}

/* Ensure consistent card widths at all levels */
.org-level .org-node {
  width: 100%;
  max-width: 280px;
}

.org-level .org-card {
  width: 100%;
}

.org-level-1 {
  margin-top: 0;
}

.org-node {
  position: relative;
  margin: 1rem;
  width: 100%;
  max-width: 280px;
}

.org-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 240px;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

.org-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(29, 47, 152, 0.1), transparent);
  transition: left 0.5s;
  pointer-events: none;
  z-index: 1;
}

.org-card:hover::before {
  left: 100%;
}

.interactive-card {
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.org-card-front,
.org-card-back {
  backface-visibility: hidden;
  transition: transform 0.6s;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.org-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotateY(180deg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  color: #000;
  border-radius: 12px;
  overflow-y: auto;
}

/* Smaller text in card back */
.org-card-back h5 {
  font-size: 1rem !important;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.org-card-back h6 {
  font-size: 0.85rem !important;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.org-card-back p {
  font-size: 0.75rem !important;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.org-card-back .text-small {
  font-size: 0.7rem !important;
  line-height: 1.3;
}

.org-card-back .text-muted {
  font-size: 0.7rem !important;
}

.interactive-card:hover .org-card-front {
  transform: rotateY(180deg);
}

.interactive-card:hover .org-card-back {
  transform: rotateY(0deg);
}

.org-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.org-avatar-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  position: relative;
  overflow: hidden;
  border: 3px solid #1d2f98;
  background: linear-gradient(135deg, #1d2f98 0%, #f27113 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.org-avatar-wrapper.small {
  width: 50px;
  height: 50px;
  margin-bottom: 0.5rem;
}

.org-avatar-wrapper i {
  font-size: 2rem;
  color: #fff;
}

.org-avatar-wrapper.small i {
  font-size: 1.5rem;
}

.org-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.org-card:hover .org-avatar {
  transform: scale(1.1);
}

.org-avatar-badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 30px;
  height: 30px;
  background: #f27113;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.875rem;
  border: 3px solid #fff;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(242, 113, 19, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(242, 113, 19, 0);
  }
}

/* All cards are white with dark text */
.org-card {
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #e9ecef;
}

.org-card h5,
.org-card h6,
.org-card p {
  color: #000 !important;
}

.org-card .text-muted {
  color: #6c757d !important;
}

/* Vertical Branch Structure */
.org-vertical-branch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Ensure gaps between columns */
.org-level-3 .row {
  margin-left: 0;
  margin-right: 0;
}

.org-level-3 .row > div {
  padding-left: 1rem;
  padding-right: 1rem;
  margin-bottom: 1rem;
}

.org-level-3 .row > div:first-child {
  padding-left: 0;
}

.org-level-3 .row > div:last-child {
  padding-right: 0;
}

/* Finance & Admin - icon styling */
.org-finance-node .org-avatar-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.org-finance-node .org-avatar-wrapper i {
  font-size: 2.5rem;
  color: #1d2f98;
}

/* Vertical stacking for subordinates */
.org-subordinates-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.org-subordinates-vertical .org-node {
  width: 100%;
  max-width: 280px;
  margin: 0.5rem 0;
}

.org-subordinates-vertical .org-card {
  width: 100%;
}

/* Small vertical connector lines between stacked cards */
.connector-vertical-small {
  width: 2px;
  height: 25px;
  border-left: 2px dotted #000;
  background: transparent;
  margin: 0.5rem auto;
  position: relative;
  animation: growLine 0.6s ease-out forwards;
  opacity: 0;
}

.org-level-4-coo,
.org-level-4-cto,
.org-level-4-director,
.org-level-4-finance,
.org-level-5 {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  width: 100%;
}

.connector-coo,
.connector-cto,
.connector-director,
.connector-sales {
  height: 30px;
  margin: 0.5rem auto;
}

/* Ensure white cards have proper contrast */
.org-card-front {
  background: #fff;
  color: #000;
}

/* Connector Lines */
.org-connector-line {
  width: 2px;
  height: 40px;
  border-left: 2px dotted #000;
  background: transparent;
  margin: 0 auto;
  position: relative;
  animation: growLine 0.8s ease-out forwards;
  opacity: 0;
}

.connector-1 {
  animation-delay: 0.3s;
}

.connector-2 {
  animation-delay: 0.5s;
  height: 40px;
}

.connector-3 {
  animation-delay: 0.7s;
  height: 50px;
}

@keyframes growLine {
  from {
    opacity: 0;
    transform: scaleY(0);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.org-connector-line::before,
.org-connector-line::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeInDot 0.5s ease-out forwards;
}

.org-connector-line::before {
  top: -5px;
  animation-delay: 0.2s;
}

.org-connector-line::after {
  bottom: -5px;
  animation-delay: 0.4s;
}

@keyframes fadeInDot {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

/* Horizontal connectors for level 3 */
.org-level-3 {
  position: relative;
}

/* Horizontal dotted line from CEO to executives */
.org-level-3::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 5%;
  right: 5%;
  height: 2px;
  border-top: 2px dotted #000;
  background: transparent;
  animation: growHorizontal 0.8s ease-out 0.5s forwards;
  opacity: 0;
}

/* Vertical connector from horizontal line to each executive */
.org-vertical-branch::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 30px;
  border-left: 2px dotted #000;
  background: transparent;
  opacity: 0;
  animation: growLine 0.6s ease-out 0.9s forwards;
}

@keyframes growHorizontal {
  from {
    opacity: 0;
    left: 50%;
    right: 50%;
  }
  to {
    opacity: 1;
    left: 10%;
    right: 10%;
  }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .org-card {
    height: 180px;
    min-height: 180px;
    padding: 1rem;
  }

  .org-avatar-wrapper {
    width: 80px;
    height: 80px;
    margin-bottom: 0.75rem;
  }

  .org-level-3::before {
    width: calc(100% - 100px);
  }
}

@media (max-width: 768px) {
  .org-card {
    height: 160px;
    min-height: 160px;
    padding: 0.75rem;
  }

  .org-avatar-wrapper {
    width: 70px;
    height: 70px;
  }

  .interactive-card:hover .org-card-front,
  .interactive-card:hover .org-card-back {
    transform: none;
  }

  .org-card-back {
    position: relative;
    transform: none;
    margin-top: 1rem;
  }

  .interactive-card:hover .org-card-back {
    transform: none;
  }

  /* Mobile: Adjust column layout */
  .org-level-3 .row > div {
    margin-bottom: 2rem;
  }
}

/* Blinking Badge Animation */
.blinking-badge {
  animation: badgeBlink 3s infinite;
}

@keyframes badgeBlink {
  0%,
  50% {
    opacity: 1;
  }
  25%,
  75% {
    opacity: 0.3;
  }
}
