/* =========================================
   CHAPTER DETAIL PAGE - SCRIBES GLOBAL
   ========================================= */

.chapter-detail-hero {
  height: 500px;
  position: relative;
  overflow: hidden;
}

.chapter-detail-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-detail-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.3) 0%, rgba(26, 26, 46, 0.9) 100%);
  display: flex;
  align-items: flex-end;
  padding: 4rem 0 3rem;
}

.chapter-hero-content {
  width: 100%;
}

.chapter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(45, 156, 219, 0.95);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.chapter-hero-title {
  font-size: 3.5rem;
  font-family: var(--font-heading);
  color: white;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.chapter-hero-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
}

.chapter-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chapter-hero-meta-item i {
  color: #D4AF37;
}

/* Main Content */
.chapter-detail-content {
  padding: 4rem 0;
  background: white;
}

.chapter-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.chapter-main-content {
  /* Main content area */
}

.chapter-section {
  margin-bottom: 3rem;
}

.chapter-section-title {
  font-size: 2rem;
  font-family: var(--font-heading);
  color: var(--dark-bg);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--gray-200);
  position: relative;
}

.chapter-section-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #6B46C1 0%, #2D9CDB 100%);
}

.chapter-about-text {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--gray-700);
}

.chapter-about-text p {
  margin-bottom: 1.5rem;
}

/* Gallery */
.chapter-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

/* Upcoming Events */
.chapter-events-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chapter-event-card {
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.03) 0%, rgba(45, 156, 219, 0.03) 100%);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  cursor: pointer;
}

.chapter-event-card:hover {
  border-color: rgba(107, 70, 193, 0.3);
  transform: translateX(10px);
  box-shadow: 0 4px 20px rgba(107, 70, 193, 0.1);
}

.event-card-date {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.event-date-badge {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #6B46C1 0%, #2D9CDB 100%);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.event-date-day {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.event-date-month {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
}

.event-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-bg);
  margin-bottom: 0.5rem;
}

.event-card-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* Sidebar */
.chapter-sidebar {
  /* Sidebar styles */
}

.chapter-info-card {
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 2px solid var(--gray-200);
  transition: all var(--transition-base);
}

.chapter-info-card:hover {
  border-color: rgba(107, 70, 193, 0.3);
  box-shadow: 0 8px 30px rgba(107, 70, 193, 0.15);
}

.info-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark-bg);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-card-title i {
  color: #6B46C1;
}

.info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-icon {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.125rem;
}

.info-icon.purple {
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.1) 0%, rgba(107, 70, 193, 0.15) 100%);
  color: #6B46C1;
}

.info-icon.gold {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.15) 100%);
  color: #D4AF37;
}

.info-icon.teal {
  background: linear-gradient(135deg, rgba(45, 156, 219, 0.1) 0%, rgba(45, 156, 219, 0.15) 100%);
  color: #2D9CDB;
}

.info-icon.green {
  background: linear-gradient(135deg, rgba(81, 207, 102, 0.1) 0%, rgba(81, 207, 102, 0.15) 100%);
  color: #51CF66;
}

.info-content h4 {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.info-content p {
  font-size: 1rem;
  color: var(--dark-bg);
  font-weight: 600;
  margin: 0;
}

.info-content a {
  color: #6B46C1;
  text-decoration: none;
  transition: color var(--transition-base);
}

.info-content a:hover {
  color: #2D9CDB;
}

/* Join Button */
.join-chapter-btn {
  width: 100%;
  padding: 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 2rem;
  background: linear-gradient(135deg, #6B46C1 0%, #2D9CDB 100%);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(107, 70, 193, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.join-chapter-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(107, 70, 193, 0.4);
}

/* Join Modal */
.join-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.join-modal.active {
  display: flex;
}

.join-modal-content {
  background: white;
  border-radius: var(--radius-2xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.join-modal-header {
  padding: 2rem;
  border-bottom: 2px solid var(--gray-200);
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.03) 0%, rgba(45, 156, 219, 0.03) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.join-modal-header h2 {
  margin: 0;
  font-size: 1.75rem;
  color: var(--dark-bg);
}

.join-modal-close {
  background: var(--gray-100);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  font-size: 1.25rem;
  color: var(--gray-600);
}

.join-modal-close:hover {
  background: #EB5757;
  color: white;
  transform: rotate(90deg);
}

.join-modal-body {
  padding: 2rem;
}

/* Empty State */
.empty-state-inline {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.03) 0%, rgba(45, 156, 219, 0.03) 100%);
  border-radius: var(--radius-xl);
}

.empty-state-inline i {
  font-size: 3rem;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.empty-state-inline h4 {
  font-size: 1.25rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.empty-state-inline p {
  color: var(--gray-600);
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .chapter-content-grid {
    grid-template-columns: 1fr;
  }
  
  .chapter-sidebar {
    order: -1;
  }
}

@media (max-width: 768px) {
  .chapter-detail-hero {
    height: 400px;
  }
  
  .chapter-hero-title {
    font-size: 2.25rem;
  }
  
  .chapter-hero-meta {
    flex-direction: column;
    gap: 1rem;
  }
  
  .chapter-section-title {
    font-size: 1.5rem;
  }
  
  .chapter-gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .chapter-about-text {
    font-size: 1rem;
  }
}