/* ================================================================
   SRI KASI NATTUKOTTAI NAGARA SATRAM
   Members Directory Stylesheet – members.css
   ================================================================ */

.members-section {
  padding: 10px 0;
  background: linear-gradient(180deg, var(--clr-bg) 0%, #FFFFFF 100%);
}

.section-divider-line {
  width: 60px;
  height: 3px;
  background: var(--clr-primary);
  margin: 12px auto 16px;
  border-radius: 2px;
}

/* ── Banner Override ── */
.page-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 100px 0;
  text-align: center;
  color: #FFFFFF;
}

.page-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 27, 14, 0.7);
  /* Warm brown overlay */
  z-index: 1;
}

.page-banner-content {
  position: relative;
  z-index: 2;
}

.page-banner-icon {
  font-size: 3rem;
  color: var(--clr-accent);
  margin-bottom: 15px;
}

.page-banner-title {
  font-family: var(--ff-display);
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--clr-accent);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.page-banner-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 500;
  max-width: 600px;
  margin: 0 auto 20px;
}

.page-breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.page-breadcrumb a {
  color: var(--clr-accent);
  transition: opacity 0.3s;
}

.page-breadcrumb a:hover {
  opacity: 0.8;
}

.bc-sep {
  opacity: 0.5;
}

.bc-curr {
  opacity: 0.9;
}

/* ── Stats Section ── */
.members-stats-section {
  padding: 10px 0 20px;
  background: var(--clr-body-bg);
}

.members-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.members-stats-card {
  background: #FFF9F4;
  border: 1px solid #EAD4C3;
  border-radius: 8px;
  padding: 30px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(232, 99, 26, 0.03);
}

.members-stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(232, 99, 26, 0.12);
  border-color: var(--clr-primary);
}

/* Ornate corner brackets style */
.members-stats-card::before,
.members-stats-card::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--clr-primary);
  pointer-events: none;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.members-stats-card::before {
  top: 6px;
  left: 6px;
  border-right: none;
  border-bottom: none;
}

.members-stats-card::after {
  bottom: 6px;
  right: 6px;
  border-left: none;
  border-top: none;
}

.members-stats-card-corners::before,
.members-stats-card-corners::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--clr-primary);
  pointer-events: none;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.members-stats-card-corners::before {
  top: 6px;
  right: 6px;
  border-left: none;
  border-bottom: none;
}

.members-stats-card-corners::after {
  bottom: 6px;
  left: 6px;
  border-right: none;
  border-top: none;
}

.members-stats-card:hover::before,
.members-stats-card:hover::after,
.members-stats-card:hover .members-stats-card-corners::before,
.members-stats-card:hover .members-stats-card-corners::after {
  opacity: 1;
  width: 14px;
  height: 14px;
}

/* Icons styling */
.members-stats-icon {
  font-size: 2.2rem;
  color: var(--clr-accent);
  margin-bottom: 12px;
  line-height: 1;
}

.members-stats-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--clr-primary);
  /* Primary orange numbers */
  margin-bottom: 8px;
  font-family: var(--ff-display);
  line-height: 1.1;
}

.members-stats-label {
  font-size: 0.85rem;
  color: var(--clr-text);
  font-weight: 600;
  line-height: 1.4;
  max-width: 160px;
}

/* ── Committee Cards Grid ── */
.committee-section {
  padding-bottom: 60px;
}

.committee-section-title {
  text-align: center;
  font-family: var(--ff-display);
  font-size: 2.2rem;
  color: var(--clr-text);
  font-weight: 700;
}

.committee-section-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: var(--clr-text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

.member-row-center {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  width: 100%;
}

.member-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 32px;
}

/* ── Committee Tree Layout ── */
.committee-tree {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}

.tree-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.tree-node {
  position: relative;
  z-index: 5;
}

/* President Node Spec */
.president-node {
  width: 100%;
  max-width: 600px;
}

.president-card-horizontal {
  background: var(--clr-primary-d);
  border: 1px solid var(--clr-accent);
  border-radius: 12px;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.president-card-horizontal:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(232, 99, 26, 0.25);
  border-color: var(--clr-primary);
}

/* Background Temple Outline in President Card */
.president-card-horizontal::after {
  content: '';
  position: absolute;
  right: 15px;
  bottom: 0;
  width: 120px;
  height: 110px;
  background-image: url('images/logo-kasi.png');
  /* Logo outline */
  background-size: contain;
  background-position: bottom right;
  background-repeat: no-repeat;
  opacity: 0.08;
  pointer-events: none;
  filter: brightness(0) invert(1);
}

.president-avatar-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  padding: 6px;
  border: 2px solid var(--clr-accent);
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.president-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.president-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.president-role-tag {
  font-size: 0.8rem;
  color: var(--clr-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.president-name-text {
  font-family: var(--ff-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #FFFFFF;
}

.president-desc-text {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
}

.president-details-row {
  display: flex;
  gap: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  padding-top: 10px;
}

.president-detail-item-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.president-detail-item-inline i {
  color: var(--clr-accent);
}

/* Ornate corners for President Card */
.president-card-horizontal::before,
.president-card-horizontal::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2.5px solid var(--clr-accent);
  pointer-events: none;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.president-card-horizontal::before {
  top: 6px;
  left: 6px;
  border-right: none;
  border-bottom: none;
}

.president-card-horizontal::after {
  bottom: 6px;
  right: 6px;
  border-left: none;
  border-top: none;
}

.president-card-horizontal-corners::before,
.president-card-horizontal-corners::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2.5px solid var(--clr-accent);
  pointer-events: none;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.president-card-horizontal-corners::before {
  top: 6px;
  right: 6px;
  border-left: none;
  border-bottom: none;
}

.president-card-horizontal-corners::after {
  bottom: 6px;
  left: 6px;
  border-right: none;
  border-top: none;
}

.president-card-horizontal:hover::before,
.president-card-horizontal:hover::after,
.president-card-horizontal:hover .president-card-horizontal-corners::before,
.president-card-horizontal:hover .president-card-horizontal-corners::after {
  width: 18px;
  height: 18px;
}

/* Tree Connectors */
.tree-connector-v {
  width: 2px;
  height: 60px;
  background: #EAD4C3;
  position: relative;
  z-index: 1;
}

.tree-row-group {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tree-connector-h {
  position: absolute;
  top: 0;
  left: calc((100% - 60px) / 6);
  right: calc((100% - 60px) / 6);
  height: 2px;
  background: #EAD4C3;
  z-index: 1;
}

.tree-grid-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  position: relative;
  z-index: 2;
  gap: 30px;
}

.tree-node-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.tree-connector-v-short {
  width: 2px;
  height: 25px;
  background: #EAD4C3;
}

.tree-connector-v-extend {
  width: 2px;
  height: 75px;
  /* Extends down to meet Row 2 top connector */
  background: #EAD4C3;
  position: absolute;
  bottom: -75px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

/* Sub Card styling */
.committee-card-horizontal {
  background: #FFF9F4;
  border: 1px solid #EAD4C3;
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  width: 100%;
  box-shadow: 0 4px 15px rgba(232, 99, 26, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.committee-card-horizontal:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(232, 99, 26, 0.12);
  border-color: var(--clr-primary);
}

.committee-avatar-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid var(--clr-accent);
  padding: 3px;
  flex-shrink: 0;
  background: #FFFFFF;
}

.committee-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.committee-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.committee-card-role {
  font-size: 0.72rem;
  color: var(--clr-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.committee-card-name {
  font-family: var(--ff-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--clr-text);
}

.committee-card-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
  border-top: 1px dashed rgba(232, 99, 26, 0.15);
  padding-top: 6px;
}

.committee-card-detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--clr-text-muted);
}

.committee-card-detail-item i {
  color: var(--clr-primary);
  font-size: 0.85rem;
}

/* Ornate corners for sub cards */
.committee-card-horizontal::before,
.committee-card-horizontal::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--clr-primary);
  pointer-events: none;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.committee-card-horizontal::before {
  top: 5px;
  left: 5px;
  border-right: none;
  border-bottom: none;
}

.committee-card-horizontal::after {
  bottom: 5px;
  right: 5px;
  border-left: none;
  border-top: none;
}

.committee-card-horizontal-corners::before,
.committee-card-horizontal-corners::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--clr-primary);
  pointer-events: none;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.committee-card-horizontal-corners::before {
  top: 5px;
  right: 5px;
  border-left: none;
  border-bottom: none;
}

.committee-card-horizontal-corners::after {
  bottom: 5px;
  left: 5px;
  border-right: none;
  border-top: none;
}

.committee-card-horizontal:hover::before,
.committee-card-horizontal:hover::after,
.committee-card-horizontal:hover .committee-card-horizontal-corners::before,
.committee-card-horizontal:hover .committee-card-horizontal-corners::after {
  opacity: 1;
  width: 12px;
  height: 12px;
}

/* ── General Body Section (Locked) ── */
.general-body-section {
  padding-top: 40px;
}

/* ── Directory Lock Banner ── */
.directory-lock-banner {
  background: #FFF9F4;
  border: 1px solid #EAD4C3;
  border-radius: 12px;
  padding: 24px 35px;
  max-width: 1100px;
  margin: 40px auto 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(232, 99, 26, 0.03);
  gap: 30px;
  box-sizing: border-box;
}

/* Background Temple Outline in Lock Banner */
.directory-lock-banner::after {
  content: '';
  position: absolute;
  right: 25px;
  bottom: 0;
  width: 150px;
  height: 100%;
  background-image: url('images/logo-kasi.png');
  /* Logo outline */
  background-size: contain;
  background-position: bottom right;
  background-repeat: no-repeat;
  opacity: 0.04;
  pointer-events: none;
}

.lock-banner-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.lock-mandala-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lock-mandala-outer {
  position: absolute;
  inset: 0;
  border: 1.5px dashed var(--clr-accent);
  border-radius: 50%;
  animation: mandala-spin-slow 25s linear infinite;
}

@keyframes mandala-spin-slow {
  to {
    transform: rotate(360deg);
  }
}

.lock-mandala-inner {
  width: 60px;
  height: 60px;
  background: #FFF0E4;
  border: 1.5px solid var(--clr-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-primary);
  font-size: 1.4rem;
  box-shadow: 0 4px 10px rgba(232, 99, 26, 0.08);
  position: relative;
  z-index: 2;
}

.lock-banner-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.lock-banner-title {
  font-family: var(--ff-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--clr-primary-d);
}

.lock-banner-desc {
  font-size: 0.92rem;
  color: var(--clr-text);
  line-height: 1.55;
}

.lock-banner-desc a {
  color: var(--clr-primary);
  font-weight: 700;
  text-decoration: underline;
}

.lock-banner-right {
  position: relative;
  z-index: 3;
}

.lock-banner-btn {
  display: inline-block;
  background: var(--clr-primary-d);
  /* Primary dark orange background */
  color: #FFFFFF !important;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none !important;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(200, 78, 16, 0.15);
}

.lock-banner-btn:hover {
  background: var(--clr-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(232, 99, 26, 0.25);
}

/* Ornate corners for Lock Banner */
.directory-lock-banner::before,
.directory-lock-banner::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--clr-primary);
  pointer-events: none;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.directory-lock-banner::before {
  top: 5px;
  left: 5px;
  border-right: none;
  border-bottom: none;
}

.directory-lock-banner::after {
  bottom: 5px;
  right: 5px;
  border-left: none;
  border-top: none;
}

.directory-lock-banner-corners::before,
.directory-lock-banner-corners::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--clr-primary);
  pointer-events: none;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.directory-lock-banner-corners::before {
  top: 5px;
  right: 5px;
  border-left: none;
  border-bottom: none;
}

.directory-lock-banner-corners::after {
  bottom: 5px;
  left: 5px;
  border-right: none;
  border-top: none;
}

.directory-lock-banner:hover::before,
.directory-lock-banner:hover::after,
.directory-lock-banner:hover .directory-lock-banner-corners::before,
.directory-lock-banner:hover .directory-lock-banner-corners::after {
  opacity: 1;
  width: 14px;
  height: 14px;
}

/* ── Responsive media queries ── */
@media (max-width: 991px) {
  .desktop-only-spacer {
    display: none !important;
  }

  .tree-connector-v,
  .tree-connector-h,
  .tree-connector-v-short,
  .tree-connector-v-extend {
    display: none !important;
  }

  .tree-grid-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .tree-row-group {
    margin-bottom: 20px;
  }

  .tree-node-col {
    width: 100%;
  }

  .members-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .page-banner-title {
    font-size: 2.4rem;
  }

  .directory-lock-banner {
    flex-direction: column;
    padding: 30px 24px;
    gap: 24px;
    text-align: center;
  }

  .lock-banner-left {
    flex-direction: column;
    gap: 16px;
  }

  .lock-banner-info {
    text-align: center;
  }

  .directory-lock-banner::after {
    display: none;
  }
}

@media (max-width: 767px) {
  .tree-grid-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .members-stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-banner {
    padding: 80px 0;
  }

  .page-banner-title {
    font-size: 2rem;
  }
}

/* ── SVG Avatar Theme Branding Overrides ── */
.member-avatar-svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.president-avatar-wrap .member-avatar-svg circle.bg {
  fill: #FFF9F4 !important;
}

.president-avatar-wrap .member-avatar-svg circle.head,
.president-avatar-wrap .member-avatar-svg path.body {
  fill: var(--clr-primary-d) !important;
}

.committee-avatar-wrap .member-avatar-svg circle.bg {
  fill: var(--clr-primary-d) !important;
}

.committee-avatar-wrap .member-avatar-svg circle.head,
.committee-avatar-wrap .member-avatar-svg path.body {
  fill: #FFF9F4 !important;
}