/* ============================================================
   RAFFLES SECTION - Modern & Appealing Design
   ============================================================ */

/* Main Raffles Section */
.raffles_list_index {
  background: transparent;
  padding: 4rem 0;
  margin: 0 auto;
  max-width: 62rem;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Section Header */
.rf-head {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.rf-headline {
  font-size: 3.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF6B35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 3rem rgba(255, 215, 0, 0.4);
  animation: titlePulse 3s ease-in-out infinite alternate;
  margin: 0;
}

@keyframes titlePulse {
  0% {
    filter: drop-shadow(0 0 1rem rgba(255, 215, 0, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 2rem rgba(255, 215, 0, 0.9));
  }
}

/* Main Grid */
.rf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 0 auto;
  padding: 0 1rem;
  justify-content: center;
  justify-items: center;
}

/* Active Raffles Grid - Force Center Alignment */
.raffles-active {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center !important;
  align-items: flex-start;
  gap: 2rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Raffle Cards */
.rf-card {
  background: linear-gradient(135deg, 
    rgba(43, 42, 42, 0.95) 0%, 
    rgba(35, 35, 35, 0.95) 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.5rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(15px);
  box-shadow: 
    0 1rem 2rem rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  width: 100%;
  max-width: 450px;
}

.rf-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 215, 0, 0.1) 50%, 
    transparent 100%);
  transition: left 0.8s ease;
  z-index: 1;
}

.rf-card:hover::before {
  left: 100%;
}

.rf-card:hover {
  transform: translateY(-0.75rem) scale(1.02);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 1.5rem 3rem rgba(0, 0, 0, 0.5),
    0 0 3rem rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.rf-card * {
  position: relative;
  z-index: 2;
}

/* Badge */
.rf-badge {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  display: inline-block;
  margin-bottom: 1.5rem;
  box-shadow: 0 0.5rem 1rem rgba(255, 107, 53, 0.4);
  animation: badgeGlow 2s ease-in-out infinite alternate;
}

@keyframes badgeGlow {
  0% {
    box-shadow: 0 0.5rem 1rem rgba(255, 107, 53, 0.4);
  }
  100% {
    box-shadow: 0 0.5rem 1.5rem rgba(255, 107, 53, 0.7);
  }
}

/* Title */
.rf-title {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.3;
  text-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
}

.rf-title--big {
  font-size: 2rem;
}

/* Description */
.rf-desc {
  color: #ccc;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

/* Meta Information */
.rf-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rf-end {
  color: #ff8a00;
  font-size: 0.875rem;
  font-weight: 600;
}

.rf-countdown {
  color: #FFD700;
  font-weight: 800;
  font-size: 1.125rem;
  text-shadow: 0 0 1rem rgba(255, 215, 0, 0.5);
  animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Pills */
.rf-pill {
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  display: inline-block;
}

.rf-pill-ok {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: #fff;
  box-shadow: 0 0 1rem rgba(76, 175, 80, 0.4);
}

.rf-pill-warn {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: #fff;
  box-shadow: 0 0 1rem rgba(255, 152, 0, 0.4);
}

/* Footer */
.rf-footer {
  margin-top: 2rem;
}

/* Actions */
.rf-actions {
  margin-bottom: 1.5rem;
}

.rf-actions .btn {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  border-radius: 1rem;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.rf-actions .btn-danger {
  background: linear-gradient(135deg, #FF4444 0%, #CC0000 100%);
  color: #fff;
  box-shadow: 0 0.5rem 1.5rem rgba(255, 68, 68, 0.4);
}

.rf-actions .btn-danger:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 0.75rem 2rem rgba(255, 68, 68, 0.6);
  background: linear-gradient(135deg, #FF6666 0%, #EE0000 100%);
}

.rf-actions .btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: #fff;
  box-shadow: 0 0.5rem 1.5rem rgba(108, 117, 125, 0.4);
}

/* Details */
.rf-details {
  margin-top: 1rem;
}

.rf-details summary {
  color: #ff8a00;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 1rem;
  background: rgba(255, 138, 0, 0.1);
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 138, 0, 0.2);
  transition: all 0.3s ease;
  list-style: none;
  text-align: center;
}

.rf-details summary:hover {
  background: rgba(255, 138, 0, 0.2);
  border-color: rgba(255, 138, 0, 0.4);
  transform: translateY(-0.125rem);
}

.rf-details summary::marker {
  display: none;
}

.rf-details summary::before {
  content: "\25B6"; /* ▶ right-pointing triangle (using unicode escape to avoid encoding issues) */
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
}

.rf-details[open] summary::before {
  transform: rotate(90deg); /* turn to downward when open */
}

/* Table Wrapper */
.rf-table-wrap {
  margin-top: 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.rf-table-wrap .table {
  margin: 0;
  background: transparent;
}

.rf-table-wrap .table th {
  background: linear-gradient(135deg, #FF4444 0%, #CC0000 100%);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  border: none;
  padding: 1rem;
}

.rf-table-wrap .table td {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
}

.rf-table-wrap .table tbody tr:hover td {
  background: rgba(255, 138, 0, 0.1);
}

/* More Details */
.rf-more {
  margin-top: 1rem;
}

.rf-more summary {
  color: #ff8a00;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  background: rgba(255, 138, 0, 0.1);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 138, 0, 0.2);
  transition: all 0.3s ease;
  list-style: none;
  text-align: center;
}

.rf-more summary:hover {
  background: rgba(255, 138, 0, 0.2);
  border-color: rgba(255, 138, 0, 0.4);
}

.rf-more summary::marker {
  display: none;
}

.rf-more summary::before {
  content: "\25B6"; /* ▶ */
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
}

.rf-more[open] summary::before {
  transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .raffles_list_index {
    max-width: 100%;
    padding: 3rem 1rem;
  }
  
  .rf-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .raffles_list_index {
    padding: 2rem 0.5rem;
  }
  
  .rf-headline {
    font-size: 2.5rem;
    letter-spacing: 0.1rem;
  }
  
  .rf-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 0.5rem;
  }
  
  .raffles-active {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 0 0.5rem;
  }
  
  .rf-card {
    padding: 1.5rem;
    border-radius: 1rem;
  }
  
  .rf-card:hover {
    transform: translateY(-0.5rem) scale(1.01);
  }
  
  .rf-title {
    font-size: 1.5rem;
  }
  
  .rf-title--big {
    font-size: 1.75rem;
  }
  
  .rf-meta {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .rf-actions .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .rf-headline {
    font-size: 2rem;
  }
  
  .rf-card {
    padding: 1rem;
    margin: 0 0.25rem;
  }
  
  .rf-badge {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
  
  .rf-title {
    font-size: 1.25rem;
  }
  
  .rf-title--big {
    font-size: 1.5rem;
  }
  
  .rf-actions .btn {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }
}

/* Loading States */
.rf-card.loading {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.05) 25%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .rf-card,
  .rf-badge,
  .rf-countdown,
  .rf-headline {
    animation: none;
  }
  
  .rf-card:hover {
    transform: none;
  }
}
