/* School Societies Section Specific Styles */

/* Section Container */
.societies-section {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}

/* Background Elements */
.societies-bg-element {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}

.societies-bg-1 {
  top: -10%;
  left: -5%;
  width: 40%;
  height: 40%;
  background: linear-gradient(45deg, #e74c3c, #f39c12);
  animation: float 15s ease-in-out infinite;
}

.societies-bg-2 {
  bottom: -15%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: linear-gradient(45deg, #8e44ad, #3498db);
  animation: float 20s ease-in-out infinite reverse;
}

/* Section Title */
.societies-title-container {
  position: relative;
  margin-bottom: 4rem;
  text-align: center;
}

.societies-title-icon {
  position: absolute;
  top: -2.5rem;
  left: -2.5rem;
  font-size: 5rem;
  color: rgba(142, 68, 173, 0.1);
  transform: rotate(-15deg);
  animation: float 6s ease-in-out infinite;
}

.societies-title-line {
  width: 6rem;
  height: 0.25rem;
  margin: 0.75rem auto 0;
  border-radius: 1rem;
  background: linear-gradient(to right, #e74c3c, #f39c12);
  animation: pulse 3s infinite;
}

/* Society Cards - Mobile Optimized */
.society-card {
  position: relative;
  height: 100%;
  transition: all 0.3s ease;
  z-index: 1;
  backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
}

/* Desktop hover effects */
@media (hover: hover) and (pointer: fine) {
  .society-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
  }
}

/* Active state for mobile touch */
.society-card:active {
  transform: scale(0.98);
  transition: all 0.2s ease;
}

.society-inner {
  position: relative;
  height: 100%;
  padding: 2rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  transition: all 0.4s ease;
  z-index: 10;
}

.dark .society-inner {
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.society-card:hover .society-inner {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.dark .society-card:hover .society-inner {
  background: rgba(40, 40, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Society Logo */
.society-logo-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  will-change: transform;
}

.dark .society-logo-container {
  background: transparent;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.society-card:hover .society-logo-container {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.society-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 50%;
  will-change: transform;
}

.society-card:hover .society-logo {
  transform: scale(1.05);
}

/* Add animation classes for JavaScript interactions */
.society-card-visible {
  animation: societyCardFadeIn 0.8s forwards;
}

.society-revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Initial state for scroll reveal */
.society-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 3D tilt effect reset */
.society-card .society-inner {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Button ripple effect */
.society-button-ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transform: scale(0);
  animation: societyButtonRipple 1s linear;
  pointer-events: none;
}

@keyframes societyCardFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes societyButtonRipple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Society Content */
.society-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
  background: linear-gradient(to right, #e74c3c, #f39c12);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.society-card:hover .society-name {
  color: #e74c3c;
}

.dark .society-card:hover .society-name {
  color: #f39c12;
}

.society-description {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #4b5563;
  line-height: 1.6;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.dark .society-description {
  color: #ccc;
}

/* Society Divider */
.society-divider {
  width: 3rem;
  height: 0.125rem;
  margin: 0 auto 1.5rem;
  background: linear-gradient(to right, #e74c3c, #f39c12);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.society-card:hover .society-divider {
  width: 5rem;
}

/* Society Button */
.society-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(to right, #e74c3c, #f39c12);
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.society-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
}

.society-button i {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.society-button:hover i {
  transform: translateX(3px);
}

/* Decorative Elements */
.society-corner {
  position: absolute;
  width: 2rem;
  height: 2rem;
  border-width: 2px;
  transition: all 0.3s ease;
}

.society-corner-tl {
  top: -0.25rem;
  left: -0.25rem;
  border-top-style: solid;
  border-left-style: solid;
  border-top-left-radius: 0.5rem;
  border-color: rgba(231, 76, 60, 0.5);
}

.society-corner-br {
  bottom: -0.25rem;
  right: -0.25rem;
  border-bottom-style: solid;
  border-right-style: solid;
  border-bottom-right-radius: 0.5rem;
  border-color: rgba(243, 156, 18, 0.5);
}

.society-card:hover .society-corner {
  width: 2.5rem;
  height: 2.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .societies-section {
    padding: 4rem 0;
  }

  .society-logo-container {
    width: 80px;
    height: 80px;
  }

  .society-name {
    font-size: 1.25rem;
  }
}
