/* RTP Live Section Styles */
.rtp-section {
  display: block;
  padding: 60px 0; /* Zero horizontal padding for mobile */
  
  /* Mobile Full Width Breakout */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 24px;
  margin-bottom: 24px;
  border-radius: 0;
  border-left: none;
  border-right: none;

  background: #0f172a;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 10;
}

/* Restore padding for inner content that shouldn't touch edges */
.rtp-head, .rtp-seo-text {
  padding-left: 20px;
  padding-right: 20px;
}

@media (min-width: 640px) {
  .rtp-section {
    width: auto;
    left: auto;
    right: auto;
    margin: 24px 0;
    border-radius: 24px;
    padding: 60px 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.5);
  }
  .rtp-head, .rtp-seo-text {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Background Accents */
.rtp-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.rtp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}

.rtp-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rtp-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rtp-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: rtpPulse 2s infinite;
}

@keyframes rtpPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Grid & Mobile Layout */
.rtp-grid {
  display: grid;
  grid-template-columns: 1fr; /* Default Mobile: 1 kolom (Full Width) */
  gap: 8px; /* Gap kecil antar kartu vertikal */
  position: relative;
  z-index: 2;
  padding: 0; /* Pastikan tidak ada padding di grid */
}

@media (min-width: 480px) { .rtp-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 16px; } }
@media (min-width: 768px) { .rtp-grid { grid-template-columns: repeat(3, 1fr); padding: 0; } }
@media (min-width: 1024px) { .rtp-grid { grid-template-columns: repeat(4, 1fr); } }

/* Card Design */
.rtp-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.rtp-card:hover {
  transform: translateY(-5px);
  border-color: #38bdf8;
  box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.3);
}

.rtp-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0f172a;
}

.rtp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.rtp-card:hover .rtp-thumb img {
  transform: scale(1.1);
}

.rtp-provider-logo {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}

/* RTP Meter Overlay */
.rtp-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(to top, rgba(15,23,42,1) 0%, rgba(15,23,42,0.8) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.rtp-percent-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rtp-label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.rtp-value {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.rtp-value.high { color: #4ade80; }
.rtp-value.med { color: #facc15; }
.rtp-value.low { color: #ef4444; }

/* Content Body */
.rtp-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #1e293b;
}

.rtp-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
}

.rtp-bar-wrap {
  height: 6px;
  background: #334155;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.rtp-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  width: 0%; /* JS will animate this */
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

/* Color states for bar */
.rtp-card[data-status="high"] .rtp-bar-fill { background: linear-gradient(90deg, #16a34a, #4ade80); }
.rtp-card[data-status="med"] .rtp-bar-fill { background: linear-gradient(90deg, #ca8a04, #facc15); box-shadow: 0 0 10px rgba(250, 204, 21, 0.4); }
.rtp-card[data-status="low"] .rtp-bar-fill { background: linear-gradient(90deg, #dc2626, #ef4444); box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }

.rtp-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.rtp-pattern-btn {
  margin-top: auto;
  display: block;
  text-align: center;
  background: #334155;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px;
  border-radius: 8px;
  transition: 0.2s;
  border: 1px solid rgba(255,255,255,0.05);
  text-decoration: none;
}

.rtp-pattern-btn:hover {
  background: #3b82f6;
  color: #fff;
  border-color: #60a5fa;
}

/* SEO Description Text */
.rtp-seo-text {
  margin-top: 40px;
  padding: 24px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.rtp-seo-text h3 {
  margin: 0 0 12px;
  font-size: 18px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rtp-seo-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #94a3b8;
}

/* Animation for Hours */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.rtp-update-time {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}
.rtp-update-time::before {
  content: '🕒';
  font-size: 14px;
}
