/* ============================================
   ExamConnect — Social Section (Mixed Design 2+3)
   Dark hero + Color flip cards
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

.ec-soc {
  padding: 60px 0 !important;
  background: transparent !important;
  font-family: 'Poppins', sans-serif;
}

.ec-soc * {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif !important;
}

.ec-soc .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.ec-soc-wrap {
  background: linear-gradient(135deg, #0F4C81 0%, #245c57 100%);
  padding: 40px 30px;
  border-radius: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 76, 129, 0.15);
}

.ec-soc-wrap::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.ec-soc-wrap::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

/* === HEADING === */
.ec-soc-head {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.ec-soc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: #FAC775;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ec-soc-badge .dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: ec-soc-pulse 2s infinite;
}

@keyframes ec-soc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.ec-soc-title {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 6px;
  line-height: 1.2;
  color: #fff;
}

.ec-soc-title b {
  background: linear-gradient(135deg, #F59E0B, #FAC775);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ec-soc-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  max-width: 500px;
  margin: 0 auto;
}

/* === GRID === */
.ec-soc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* === CARDS === */
.ec-soc-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 22px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
  display: block !important;
  text-decoration: none !important;
}

.ec-soc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 0;
}

/* Brand color gradients on hover */
.ec-soc-card.youtube::before { background: linear-gradient(135deg, #FF0000, #cc0000); }
.ec-soc-card.whatsapp::before { background: linear-gradient(135deg, #25D366, #128C7E); }
.ec-soc-card.telegram::before,
.ec-soc-card.telegarm::before { background: linear-gradient(135deg, #29B6F6, #0288D1); }
.ec-soc-card.instagram::before { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.ec-soc-card.facebook::before { background: linear-gradient(135deg, #1877F2, #0d5fc4); }
.ec-soc-card.twitter::before,
.ec-soc-card.x::before { background: linear-gradient(135deg, #1DA1F2, #0d8bd9); }
.ec-soc-card.linkedin::before { background: linear-gradient(135deg, #0A66C2, #054a8c); }

/* Default fallback for unknown platforms */
.ec-soc-card::before { background: linear-gradient(135deg, #327b74, #0F4C81); }

.ec-soc-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: transparent;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  text-decoration: none !important;
}

.ec-soc-card:hover::before {
  opacity: 1;
}

.ec-soc-card > * {
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}

/* Icon */
.ec-soc-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: all 0.35s ease;
  overflow: hidden;
}

.ec-soc-icon img {
  max-width: 28px !important;
  max-height: 28px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  border-radius: 0 !important;
}

.ec-soc-icon svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

/* Default icon backgrounds based on platform */
.ec-soc-card.youtube .ec-soc-icon { background: #FF0000; }
.ec-soc-card.whatsapp .ec-soc-icon { background: #25D366; }
.ec-soc-card.telegram .ec-soc-icon,
.ec-soc-card.telegarm .ec-soc-icon { background: linear-gradient(135deg, #29B6F6, #0288D1); }
.ec-soc-card.instagram .ec-soc-icon { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.ec-soc-card.facebook .ec-soc-icon { background: #1877F2; }
.ec-soc-card.twitter .ec-soc-icon,
.ec-soc-card.x .ec-soc-icon { background: #1DA1F2; }
.ec-soc-card.linkedin .ec-soc-icon { background: #0A66C2; }
.ec-soc-card .ec-soc-icon { background: linear-gradient(135deg, #327b74, #0F4C81); }

/* Icon on hover - glassy white */
.ec-soc-card:hover .ec-soc-icon {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.15) rotate(-6deg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* Name */
.ec-soc-name {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0 0 3px !important;
  display: block;
  text-transform: capitalize;
}

/* CTA label */
.ec-soc-cta {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  transition: color 0.3s;
}

.ec-soc-card:hover .ec-soc-cta {
  color: rgba(255, 255, 255, 0.95);
}

/* Footer */
.ec-soc-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 1;
}

.ec-soc-footer b {
  color: #FAC775;
  font-weight: 700;
}

/* === Empty State === */
.ec-soc-empty {
  text-align: center;
  padding: 32px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  position: relative;
  z-index: 1;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 991px) {
  .ec-soc {
    padding: 40px 0 !important;
  }
  
  .ec-soc-wrap {
    padding: 30px 22px;
  }
  
  .ec-soc-title {
    font-size: 24px;
  }
  
  .ec-soc-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (max-width: 575px) {
  .ec-soc {
    padding: 30px 0 !important;
  }
  
  .ec-soc-wrap {
    padding: 24px 16px;
  }
  
  .ec-soc-title {
    font-size: 20px;
  }
  
  .ec-soc-subtitle {
    font-size: 12px;
  }
  
  .ec-soc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .ec-soc-card {
    padding: 18px 10px;
  }
  
  .ec-soc-icon {
    width: 42px;
    height: 42px;
  }
  
  .ec-soc-name {
    font-size: 12px !important;
  }
}
/* ============================================
   MOBILE FIX — Grid stability + conflict override
   ============================================ */
@media (max-width: 767px) {
  .ec-soc-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    position: relative !important;
    z-index: 1 !important;
  }

  .ec-soc-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 130px;
    margin: 0 !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    /* backdrop-filter mobile pe issue karta hai - solid bg use karo */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

  /* Hover transform mobile/touch pe disable */
  .ec-soc-card:hover {
    transform: none !important;
  }

  /* Card ke andar content stable rahe */
  .ec-soc-card > * {
    position: relative !important;
    z-index: 1 !important;
  }
  .ec-soc-card::before {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
  }
}

@media (max-width: 400px) {
  .ec-soc-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .ec-soc-card {
    padding: 16px 8px !important;
    min-height: 120px;
  }
  .ec-soc-icon {
    width: 40px !important;
    height: 40px !important;
  }
  .ec-soc-name {
    font-size: 11px !important;
  }
  .ec-soc-cta {
    font-size: 9px !important;
  }
}