/**
 * CCT PAK 20 - ECCLESIASTICAL CARD PROFILE DESIGN SYSTEM (MẪU A)
 * Clean Architecture • Zero Important Rules • Pure CSS Specificity
 * Neon Pink (#ff37ff) Hover on Desktop Only • Zero Hover Effects on Mobile
 * 2 Cards Per Row on Desktop • 1 Card on Mobile • Equal Heights & Aligned Buttons
 */

/* ==========================================================================
   0. DESKTOP VIEWPORT SPACING & HEADER OPTIMIZATION (TỐI ƯU KHOẢNG ĐỆM PHẦN ĐẦU)
   - Giảm padding-top trang, breadcrumb, tiêu đề, meta bar
   - Giúp toàn bộ 4 thẻ nhân vật hiển thị trọn vẹn trong tầm nhìn, không cần cuộn
   ========================================================================== */
@media (min-width: 992px) {
  .abt-page {
    padding-top: 14px;
    padding-bottom: 40px;
  }

  .abt-doc .abt-crumb {
    margin-bottom: 6px;
    font-size: 0.8rem;
  }

  .abt-doc .abt-title {
    font-size: 1.65rem;
    margin-bottom: 6px;
    line-height: 1.25;
  }

  .abt-doc .abt-title::after {
    margin-top: 8px;
    width: 42px;
  }

  .abt-doc .abt-meta {
    margin: 8px 0 14px;
    padding-bottom: 10px;
    gap: 6px 20px;
    font-size: 0.74rem;
  }
}


.church-county-section .county-tenure-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #b45309;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Default: Mobile iOS cards hidden on desktop */
.church-county-section .county-card-mobile {
  display: none;
}

/* ==========================================================================
   2. CARD ECCLESIASTICAL (MẪU A) - BASE STATE (NO !IMPORTANT)
   ========================================================================== */
.church-county-section .card-ecclesiastical {
  background: #ffffff;
  border-radius: 18px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 18px rgba(20, 26, 62, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
  margin: 0;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Card Navy Header */
.church-county-section .card-ecc-header {
  height: 72px;
  background: linear-gradient(135deg, #141a3e 0%, #1e2568 100%);
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 18px;
  flex-shrink: 0;
}

.church-county-section .card-ecc-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #f59e0b;
}

.church-county-section .card-ecc-cat {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.church-county-section .card-ecc-tenure {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.16);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Avatar Wrapper & Perfect Circular Shape */
.church-county-section .card-ecc-avatar-wrap {
  width: 100px;
  height: 100px;
  margin: -50px auto 8px;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}

.church-county-section .card-ecclesiastical .card-ecc-avatar-wrap img.card-ecc-avatar {
  width: 100px;
  height: 100px;
  max-width: 100px;
  max-height: 100px;
  min-width: 100px;
  min-height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #ffffff;
  padding: 4px;
  border: 3px solid #f59e0b;
  box-shadow: 0 4px 14px rgba(20, 26, 62, 0.18);
  margin: 0;
  display: block;
}

/* Monogram tile (ยังไม่มีภาพถ่าย) — วงแหวนทองขนาดเดียวกับภาพถ่ายจริง
   ใช้ระบบ .person-mono ร่วมกับ about.php; พื้นงาช้างมาจาก theme-modern.css */
.church-county-section .card-ecc-avatar-wrap .card-ecc-avatar.person-mono {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #f59e0b;
  box-shadow: 0 4px 14px rgba(20, 26, 62, 0.18);
  overflow: hidden;
  background-color: #fbf8f2;
}

.church-county-section .card-ecc-avatar-wrap .card-ecc-avatar.person-mono--md {
  font-size: 2.4rem;
}

/* Role Badge anchored at bottom right of circular avatar */
.church-county-section .card-ecc-role-badge {
  position: absolute;
  bottom: 2px;
  right: -4px;
  background: #141a3e;
  color: #fbbf24;
  border: 2px solid #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 14px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 6;
}

/* Card Body - Flex Column for Equal Heights & Button Alignment */
.church-county-section .card-ecc-body {
  padding: 12px 20px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.church-county-section .card-ecc-name {
  font-size: 17px;
  font-weight: 700;
  color: #141a3e;
  line-height: 1.35;
  margin: 6px 0 8px;
  word-break: break-word;
}

.church-county-section .card-ecc-title-tag {
  display: inline-block;
  background: #f1f5f9;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 14px;
  border-radius: 16px;
  margin: 0 auto 10px;
  border: 1px solid #e2e8f0;
  width: fit-content;
}

.church-county-section .card-ecc-title-tag.is-president {
  background: #fef3c7;
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
}

/* Locked Affiliation Height: Guarantees footer alignment across 1-line and 2-line churches */
.church-county-section .card-ecc-affiliation {
  font-size: 13px;
  color: #475569;
  margin-bottom: 16px;
  line-height: 1.45;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Card Footer - ALWAYS PUSHED TO THE BOTTOM AT EQUAL LEVEL */
.church-county-section .card-ecc-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
  width: 100%;
}

/* Contact Action Buttons */
.church-county-section .btn-ecc-contact {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.church-county-section .btn-ecc-contact.has-tel {
  background: #f0fdf4;
  color: #166534;
  border: 1.5px solid #bbf7d0;
}

.church-county-section .btn-ecc-contact.no-tel {
  background: #f8fafc;
  color: #334155;
  border: 1.5px solid #cbd5e1;
}

/* ==========================================================================
   3. VACANT POSITION STYLES (ตำแหน่งว่าง: ไม่มี)
   ========================================================================== */
.church-county-section .card-ecclesiastical.is-vacant {
  background: #fcfdfd;
  border-style: dashed;
  border-color: #cbd5e1;
}

.church-county-section .card-ecclesiastical.is-vacant .card-ecc-avatar-wrap img.card-ecc-avatar {
  border-color: #cbd5e1;
  opacity: 0.8;
}

.church-county-section .card-ecclesiastical.is-vacant .card-ecc-name {
  color: #64748b;
  font-style: italic;
  font-size: 15px;
}

/* ==========================================================================
   4. DESKTOP ONLY: NEON PINK (#ff37ff) HOVER EFFECT
   - Strictly active on desktop mouse hover (min-width: 992px & hover: hover)
   - Zero jump / zero transform, pure radiant neon pink halo
   ========================================================================== */
@media (min-width: 992px) and (hover: hover) {
  /* Neon Pink glow on active cards */
  .church-county-section .card-ecclesiastical:hover {
    border-color: #ff37ff;
    box-shadow: 0 0 10px rgba(255, 55, 255, 0.5), 0 0 20px rgba(255, 55, 255, 0.25);
  }

  /* Neon Pink glow on vacant cards */
  .church-county-section .card-ecclesiastical.is-vacant:hover {
    border-color: #ff37ff;
    box-shadow: 0 0 10px rgba(255, 55, 255, 0.35), 0 0 18px rgba(255, 55, 255, 0.15);
  }

  /* Desktop button hover styling */
  .church-county-section .btn-ecc-contact.has-tel:hover {
    background: #166534;
    color: #ffffff;
    border-color: #166534;
  }

  .church-county-section .btn-ecc-contact.no-tel:hover {
    background: #141a3e;
    color: #ffffff;
    border-color: #141a3e;
  }
}

/* ==========================================================================
   5. MOBILE (< 992px) & TOUCH DEVICES: ZERO HOVER EFFECTS (STRICTLY NO HOVER)
   - Disables all sticky hover, glow, or color-changing states on mobile
   ========================================================================== */
@media (max-width: 991.98px), (hover: none) {
  /* Force static border and shadow on mobile (never changes on tap/scroll) */
  .church-county-section .card-ecclesiastical:hover,
  .church-county-section .card-ecclesiastical:active,
  .church-county-section .card-ecclesiastical:focus {
    border-color: #e2e8f0;
    box-shadow: 0 4px 18px rgba(20, 26, 62, 0.05);
    transform: none;
  }

  .church-county-section .card-ecclesiastical.is-vacant:hover,
  .church-county-section .card-ecclesiastical.is-vacant:active,
  .church-county-section .card-ecclesiastical.is-vacant:focus {
    border-color: #cbd5e1;
    box-shadow: none;
    transform: none;
  }

  /* Mobile button states: instant tactile feel without sticky hover */
  .church-county-section .btn-ecc-contact.has-tel:hover,
  .church-county-section .btn-ecc-contact.has-tel:focus {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
  }

  .church-county-section .btn-ecc-contact.has-tel:active {
    background: #dcfce7;
    color: #15803d;
  }

  .church-county-section .btn-ecc-contact.no-tel:hover,
  .church-county-section .btn-ecc-contact.no-tel:focus {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
  }

  .church-county-section .btn-ecc-contact.no-tel:active {
    background: #e2e8f0;
    color: #1e293b;
  }

  /* Mobile compact sizing */
  .church-county-section .card-ecc-header {
    height: 64px;
    padding: 10px 14px;
  }

  .church-county-section .card-ecc-avatar-wrap {
    width: 90px;
    height: 90px;
    margin: -45px auto 6px;
  }

  .church-county-section .card-ecclesiastical .card-ecc-avatar-wrap img.card-ecc-avatar {
    width: 90px;
    height: 90px;
    max-width: 90px;
    max-height: 90px;
    min-width: 90px;
    min-height: 90px;
  }

  .church-county-section .card-ecc-body {
    padding: 10px 14px 16px;
  }
  
  .church-county-section .card-ecc-name {
    font-size: 15.5px;
  }

  .church-county-section .card-ecc-affiliation {
    font-size: 12.5px;
    min-height: 38px;
  }
  
  .church-county-section .btn-ecc-contact {
    height: 48px;
    min-height: 48px;
    font-size: 13px;
  }
}

/* ==========================================================================
   DYNAMIC SOCIAL CHANNEL BUTTON CLUSTER (TIER 2) - ZERO !IMPORTANT
   ========================================================================== */
.church-social-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.btn-social-channel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-social-channel.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  min-height: 32px;
}

.btn-social-channel.btn-md {
  padding: 8px 14px;
  font-size: 13.5px;
  min-height: 38px;
}

.btn-social-channel.btn-lg {
  padding: 10px 18px;
  font-size: 14.5px;
  min-height: 44px;
}

/* Branded Channel Color Palettes (ZERO !important) */
.btn-social-channel.btn-channel-line {
  background-color: #06C755;
  color: #ffffff;
  border-color: #06C755;
}
.btn-social-channel.btn-channel-line:hover {
  background-color: #05a847;
  border-color: #05a847;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(6, 199, 85, 0.35);
}

.btn-social-channel.btn-channel-facebook {
  background-color: #1877F2;
  color: #ffffff;
  border-color: #1877F2;
}
.btn-social-channel.btn-channel-facebook:hover {
  background-color: #1464cc;
  border-color: #1464cc;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(24, 119, 242, 0.35);
}

.btn-social-channel.btn-channel-youtube {
  background-color: #FF0000;
  color: #ffffff;
  border-color: #FF0000;
}
.btn-social-channel.btn-channel-youtube:hover {
  background-color: #cc0000;
  border-color: #cc0000;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(255, 0, 0, 0.35);
}

.btn-social-channel.btn-channel-phone {
  background-color: #2563EB;
  color: #ffffff;
  border-color: #2563EB;
}
.btn-social-channel.btn-channel-phone:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
}

.btn-social-channel.btn-channel-email {
  background-color: #1a2258;
  color: #ffffff;
  border-color: #1a2258;
}
.btn-social-channel.btn-channel-email:hover {
  background-color: #121634;
  border-color: #121634;
}

.btn-social-channel.btn-channel-map {
  background-color: #EA4335;
  color: #ffffff;
  border-color: #EA4335;
}
.btn-social-channel.btn-channel-map:hover {
  background-color: #c5372c;
  border-color: #c5372c;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(234, 67, 53, 0.35);
}

.btn-social-channel.btn-channel-website {
  background-color: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}
.btn-social-channel.btn-channel-website:hover {
  background-color: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(13, 148, 136, 0.35);
}

.btn-social-channel.btn-channel-email {
  background-color: #d93025;
  color: #ffffff;
  border-color: #d93025;
}
.btn-social-channel.btn-channel-email:hover {
  background-color: #b3261e;
  border-color: #b3261e;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(217, 48, 37, 0.35);
}
