/* Modern Events Block Styles */

.wp-block-phearum-events {
  margin: 3rem 0;
}

.phearum-events {
  width: 100%;
  position: relative;
}

/* Grid Layout */

.phearum-events-grid {
  display: grid;
  gap: 2rem;
}

.phearum-events-grid.columns-1 {
  grid-template-columns: 1fr;
}

.phearum-events-grid.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.phearum-events-grid.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.phearum-events-grid.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* List Layout */

.phearum-events-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

/* Timeline Layout - Enhanced */

.phearum-events-timeline {
  position: relative;
  padding-left: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.phearum-events-timeline::before {
  content: '';
  position: absolute;
  left: 1.2rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.animate-fade-in {
  opacity: 0;
  transform: translateY(30px);
}

.timeline-item.animate-fade-in.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.25rem;
  top: 1.5rem;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
  z-index: 2;
}

/* Event Card - Modern Professional Design */

.event-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
}

/* Border Radius */

.event-card.radius-none {
  border-radius: 0;
}

.event-card.radius-sm {
  border-radius: 8px;
}

.event-card.radius-md {
  border-radius: 12px;
}

.event-card.radius-lg {
  border-radius: 16px;
}

.event-card.radius-xl {
  border-radius: 20px;
}

/* Card Styles */

.event-card.style-flat {
  border: 1px solid #e2e8f0;
  box-shadow: none;
  background: white;
}

.event-card.style-bordered {
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background: white;
}

.event-card.style-elevated {
  border: 1px solid rgba(226, 232, 240, 0.5);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

/* Shadow Intensities - Enhanced */

.event-card.shadow-none {
  box-shadow: none;
}

.event-card.shadow-low {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.event-card.shadow-medium {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.event-card.shadow-high {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Enhanced Hover Effects */

.event-card[data-hover-animation="true"]:hover {
  transform: translateY(-8px) scale(1.02);
}

.event-card[data-hover-animation="true"]:hover.shadow-low {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.event-card[data-hover-animation="true"]:hover.shadow-medium {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 15px 20px -5px rgba(0, 0, 0, 0.1);
}

.event-card[data-hover-animation="true"]:hover.shadow-high {
  box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3), 0 20px 30px -5px rgba(0, 0, 0, 0.15);
}

/* Card Padding - Optimized */

.event-card.padding-sm {
  padding: 0;
}

.event-card.padding-md {
  padding: 0;
}

.event-card.padding-lg {
  padding: 0;
}

.event-card.padding-xl {
  padding: 0;
}

/* Event Status Badge */

.event-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.event-status.upcoming {
  background: rgba(16, 185, 129, 0.9);
  color: white;
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.event-status.today {
  background: rgba(245, 158, 11, 0.9);
  color: white;
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
  animation: gentle-pulse 2s infinite;
}

.event-status.past {
  background: rgba(107, 114, 128, 0.9);
  color: white;
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

/* Event Image */

.event-image {
  width: 100%;
  height: 200px;
  -o-object-fit: cover;
     object-fit: cover;
  transition: all 0.4s ease;
}

.event-card[data-hover-animation="true"]:hover .event-image {
  transform: scale(1.05);
}

/* Event Content */

.event-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-title {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1f2937;
}

.event-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.event-title a:hover {
  color: #667eea;
}

.event-excerpt {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* Event Meta Information */

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.event-date,
.event-location,
.event-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
  font-weight: 500;
}

.event-date svg,
.event-location svg,
.event-price svg {
  color: #667eea;
  flex-shrink: 0;
}

/* Event Categories */

.event-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.event-category {
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  color: #667eea;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.event-category:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  transform: translateY(-1px);
}

/* Event Actions */

.event-actions {
  margin-top: auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.event-link,
.event-registration-btn {
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.event-registration-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.event-registration-btn:hover {
  opacity: 0.9;
  background-color: transparent;
  color: inherit;
}

/* Speaker Information */

.speaker-info {
  background: rgba(102, 126, 234, 0.05);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.speaker-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.speaker-position {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.speaker-bio {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
}

/* Responsive Design - Mobile First */

@media (max-width: 768px) {
  .phearum-events-grid.columns-3,
    .phearum-events-grid.columns-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .phearum-events-grid.columns-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .phearum-events-timeline {
    padding-left: 2rem;
  }

  .phearum-events-timeline::before {
    left: 1rem;
  }

  .timeline-item::before {
    left: -1.5rem;
  }

  .event-content {
    padding: 1.5rem;
  }

  .event-title {
    font-size: 1.25rem;
  }

  .event-image {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .phearum-events-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .event-content {
    padding: 1rem;
  }

  .event-title {
    font-size: 1.125rem;
  }

  .event-meta {
    gap: 0.5rem;
  }

  .event-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .event-registration-btn {
    justify-content: center;
  }

  .event-image {
    height: 140px;
  }
}

/* Animation Keyframes */

@keyframes gentle-pulse {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Dark Mode Support */

@media (prefers-color-scheme: dark) {
  .event-card {
    background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
    border-color: rgba(75, 85, 99, 0.8);
    color: #f9fafb;
  }

  .event-title {
    color: #f9fafb;
  }

  .event-title a:hover {
    color: #a5b4fc;
  }

  .event-excerpt {
    color: #d1d5db;
  }

  .event-date,
    .event-location,
    .event-price {
    color: #e5e7eb;
  }

  .speaker-info {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #a5b4fc;
  }

  .speaker-name {
    color: #f9fafb;
  }
}

/* Print Styles */

@media print {
  .event-status,
    .event-registration-btn {
    display: none;
  }

  .event-card {
    -moz-column-break-inside: avoid;
         break-inside: avoid;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }

  .event-image {
    height: 120px;
  }
}

/* Custom Card Styling Classes */

.event-card-hover-glow:hover {
  box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.25) !important;
}

.event-card-hover-rotate:hover {
  transform: rotate(1deg);
}

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

.event-card-hover-lift:hover {
  transform: translateY(-4px);
}

/* Hover Shadow Effects - Can combine with animations */

.event-card-hover-shadow-light:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.event-card-hover-shadow-medium:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.event-card-hover-shadow-heavy:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

/* Special case: Glow animation already has shadow, don't override */

.event-card-hover-glow.event-card-hover-shadow-light:hover,
.event-card-hover-glow.event-card-hover-shadow-medium:hover,
.event-card-hover-glow.event-card-hover-shadow-heavy:hover {
  box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.25) !important;
}

/* Card spacing classes */

.spacing-tight {
  gap: 0.5rem;
}

.spacing-normal {
  gap: 1rem;
}

.spacing-relaxed {
  gap: 1.5rem;
}

.spacing-loose {
  gap: 2rem;
}

/* Animation Transitions */

.event-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Adjustments for Animations */

@media (prefers-color-scheme: dark) {
  .event-card-hover-glow:hover {
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.4) !important;
  }
}

/* Speaker Information Styles */

.event-speaker {
  /* display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0;
    padding: 12px;
    background: rgba(249, 250, 251, 0.8);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color, #3b82f6); */
  margin-bottom: 1rem;
}

.speaker-photo {
  flex-shrink: 0;
}

.speaker-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.speaker-info {
  flex-grow: 1;
  min-width: 0;
}

.speaker-name {
  font-weight: 600;
  color: var(--primary-color, #1f2937);
  margin-bottom: 4px;
  font-size: 14px;
}

.speaker-name strong {
  color: var(--primary-color, #3b82f6);
}

.speaker-position {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 2px;
}

.speaker-company {
  font-size: 13px;
  color: #9ca3af;
  font-style: italic;
}

/* Dark mode support for speaker section */

.dark .event-speaker {
  background: rgba(31, 41, 55, 0.6);
  border-left-color: var(--primary-color, #60a5fa);
}

.dark .speaker-name {
  color: #f3f4f6;
}

.dark .speaker-name strong {
  color: var(--primary-color, #60a5fa);
}

.dark .speaker-position {
  color: #d1d5db;
}

.dark .speaker-company {
  color: #9ca3af;
}