/* --------------------------------------------------
   ASSEMBLIES PAGE STYLES
-------------------------------------------------- */

.assemblies-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 100px;
  min-height: 100vh;
}

/* Header */
.assemblies-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.assemblies-title {
  margin: 0 0 8px;
  font-size: 32px;
  color: #16315f;
  font-weight: 700;
}

.assemblies-subtitle {
  margin: 0;
  color: #5d6483;
  font-size: 15px;
  line-height: 1.6;
}

.assemblies-actions {
  display: flex;
  gap: 12px;
}

.assemblies-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px solid #1e3a8a;
  border-radius: 12px;
  background: white;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.assemblies-filter-btn:hover {
  background: #1e3a8a;
  color: white;
}

/* Filter Panel */
.assembly-filters {
  background: white;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.assembly-filters.hidden {
  display: none;
}

.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-row input,
.filter-row select {
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  background: #f9fafb;
  flex: 1;
  min-width: 200px;
}

.filter-row input:focus,
.filter-row select:focus {
  outline: none;
  border-color: #1e3a8a;
  background: white;
}

/* Assemblies Grid */
.assemblies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* Assembly Card */
.assembly-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  cursor: pointer;
}

.assembly-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border-color: #1e3a8a;
}

/* Card Header with Image/Color */
.assembly-card-header {
  height: 120px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.assembly-card-header.assembly-ohio {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.assembly-card-header.assembly-pennsylvania {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.assembly-card-header.assembly-indiana {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.assembly-card-header.assembly-michigan {
  background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
}

.assembly-card-header.assembly-kentucky {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
}

.assembly-card-image {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.assembly-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assembly-card-icon {
  width: 64px;
  height: 64px;
  background: white;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

.assembly-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #1e3a8a;
}

/* Card Body */
.assembly-card-body {
  padding: 20px;
}

.assembly-card-name {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.3;
}

.assembly-card-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 16px;
}

.assembly-card-details {
  display: grid;
  gap: 12px;
}

.assembly-card-detail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #4b5563;
}

.assembly-card-detail-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.assembly-card-detail-text {
  line-height: 1.5;
}

.assembly-card-detail-label {
  font-weight: 600;
  color: #374151;
}

/* Conference Highlight */
.assembly-conference-highlight {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.assembly-conference-highlight.active {
  background: #d1fae5;
  border-color: #34d399;
}

.assembly-conference-icon {
  font-size: 20px;
}

.assembly-conference-text {
  font-size: 13px;
  color: #92400e;
  font-weight: 500;
}

.assembly-conference-highlight.active .assembly-conference-text {
  color: #065f46;
}

/* Card Footer */
.assembly-card-footer {
  padding: 16px 20px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  gap: 8px;
}

.assembly-card-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.assembly-card-btn.primary {
  background: #1e3a8a;
  color: white;
}

.assembly-card-btn.primary:hover {
  background: #2563eb;
}

.assembly-card-btn.secondary {
  background: #f3f4f6;
  color: #4b5563;
}

.assembly-card-btn.secondary:hover {
  background: #e5e7eb;
}

/* Loading State */
.assemblies-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #1e3a8a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

/* Empty State */
.assemblies-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.assemblies-empty.hidden {
  display: none;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.assemblies-empty h3 {
  margin: 0 0 8px;
  color: #374151;
  font-size: 20px;
}

.assemblies-empty p {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
}

/* Assembly Detail Modal */
.assembly-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assembly-modal.hidden {
  display: none;
}

.assembly-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.assembly-detail-content {
  position: relative;
  background: white;
  border-radius: 24px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.assembly-detail-header {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
}

.assembly-detail-close {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  font-size: 24px;
  color: #374151;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.assembly-detail-close:hover {
  background: white;
  transform: scale(1.05);
}

.assembly-detail-body {
  overflow-y: auto;
  flex: 1;
}

/* Detail Hero */
.assembly-detail-hero {
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  position: relative;
}

.assembly-detail-hero.assembly-ohio {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.assembly-detail-hero.assembly-pennsylvania {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.assembly-detail-hero.assembly-indiana {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.assembly-detail-hero.assembly-michigan {
  background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
}

.assembly-detail-hero.assembly-kentucky {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
}

.assembly-detail-image {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.assembly-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assembly-detail-icon {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 40px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

/* Detail Info */
.assembly-detail-info {
  padding: 24px;
}

.assembly-detail-name {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

.assembly-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.assembly-detail-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f3f4f6;
  border-radius: 20px;
  font-size: 14px;
  color: #4b5563;
}

/* Detail Sections */
.assembly-detail-section {
  margin-bottom: 24px;
}

.assembly-detail-section:last-child {
  margin-bottom: 0;
}

.assembly-detail-section h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.assembly-detail-text {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.7;
}

/* Conference Info Box */
.assembly-conference-box {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 16px;
  padding: 20px;
  margin-top: 8px;
}

.assembly-conference-box.active {
  background: #d1fae5;
  border-color: #34d399;
}

.assembly-conference-box h5 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.assembly-conference-box.active h5 {
  color: #065f46;
}

.assembly-conference-dates {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}

.assembly-conference-theme {
  font-size: 14px;
  color: #6b7280;
  font-style: italic;
}

/* Contact Buttons */
.assembly-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.assembly-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.assembly-action-btn.full-width {
  grid-column: 1 / -1;
}

.assembly-action-btn.directions {
  background: #1e3a8a;
  color: white;
}

.assembly-action-btn.directions:hover {
  background: #2563eb;
}

.assembly-action-btn.call {
  background: #059669;
  color: white;
}

.assembly-action-btn.call:hover {
  background: #10b981;
}

.assembly-action-btn.email {
  background: #7c3aed;
  color: white;
}

.assembly-action-btn.email:hover {
  background: #8b5cf6;
}

.assembly-action-btn.website {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.assembly-action-btn.website:hover {
  background: #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
  .assemblies-grid {
    grid-template-columns: 1fr;
  }
  
  .assemblies-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .assembly-detail-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .assembly-detail-actions {
    grid-template-columns: 1fr;
  }
}

/* ========== THEME SUPPORT ========== */

/* Dark Theme */
body.dark-theme .assemblies-container {
  background: #12181f;
}

body.dark-theme .assemblies-title,
body.dark-theme .assembly-card-title,
body.dark-theme .assembly-detail-name {
  color: #ffffff;
}

body.dark-theme .assemblies-subtitle,
body.dark-theme .assembly-card-address,
body.dark-theme .assembly-card-meta,
body.dark-theme .assembly-detail-address,
body.dark-theme .assembly-detail-contact {
  color: #ffffff;
}

body.dark-theme .assembly-card,
body.dark-theme .assembly-detail-content {
  background: #1e1e1e;
  border-color: #3d3d3d;
}

body.dark-theme .assembly-card:hover {
  background: #2d2d2d;
}

body.dark-theme .assembly-card-btn.secondary {
  background: #2d2d2d;
  color: #e8e8e8;
}

body.dark-theme .assemblies-search-box input {
  background: #1e1e1e;
  border-color: #3d3d3d;
  color: #e8e8e8;
}

body.dark-theme .assembly-detail-label {
  color: #e8e8e8;
}

body.dark-theme .assembly-detail-value {
  color: #ffffff;
}

body.dark-theme .assembly-distance-highlight {
  background: #2d2d2d;
}

body.dark-theme .assembly-distance-text {
  color: #e8e8e8;
}

/* Parchment Theme */
body.parchment-theme .assemblies-container {
  background: #f5e6c8;
}

body.parchment-theme .assemblies-title,
body.parchment-theme .assembly-card-title,
body.parchment-theme .assembly-detail-name {
  color: #1a1a1a;
}

body.parchment-theme .assemblies-subtitle,
body.parchment-theme .assembly-card-address,
body.parchment-theme .assembly-card-meta,
body.parchment-theme .assembly-detail-address,
body.parchment-theme .assembly-detail-contact {
  color: #3d2914;
}

body.parchment-theme .assembly-card,
body.parchment-theme .assembly-detail-content {
  background: #fff8e7;
  border-color: #d4c4a8;
}

body.parchment-theme .assembly-card:hover {
  background: #f0e6d0;
}

body.parchment-theme .assembly-card-btn.secondary {
  background: #f0e6d0;
  color: #3d2914;
}

body.parchment-theme .assemblies-search-box input {
  background: #fff8e7;
  border-color: #d4c4a8;
  color: #3d2914;
}

body.parchment-theme .assembly-detail-label {
  color: #3d2914;
}

body.parchment-theme .assembly-detail-value {
  color: #1a1a1a;
}

body.parchment-theme .assembly-distance-highlight {
  background: #f0e6d0;
}

body.parchment-theme .assembly-distance-text {
  color: #3d2914;
}

/* Light Theme */
body.light-theme .assemblies-container {
  background: #f8fafc;
}
