/* ===== Discover Page — "ما تدري وين تروح؟" ===== */

/* ===== Hero ===== */
.discover-hero {
  background: linear-gradient(135deg, #0a1628 0%, #162040 40%, #1a2d50 70%, #0d1f3c 100%);
  color: white;
  padding: 70px 20px 55px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.discover-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 25% 40%, rgba(201,168,76,0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 60%, rgba(8,145,178,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.discover-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), #0891b2, var(--gold), transparent);
}

.discover-hero h2 {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 14px;
  position: relative;
  line-height: 1.4;
}

.discover-hero h2 span {
  display: inline-block;
  animation: diceWiggle 3s ease-in-out infinite;
  font-size: 48px;
}

@keyframes diceWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
}

.discover-hero > p {
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  max-width: 560px;
  margin: 0 auto 30px;
  position: relative;
  line-height: 1.8;
}

/* Floating emojis background */
.discover-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-emoji {
  position: absolute;
  font-size: 32px;
  opacity: 0.08;
  animation: floatUp 12s ease-in-out infinite;
}

.e1 { top: 15%; right: 10%; animation-delay: 0s; }
.e2 { top: 60%; right: 20%; animation-delay: 2s; }
.e3 { top: 30%; left: 8%; animation-delay: 4s; }
.e4 { top: 70%; left: 15%; animation-delay: 1s; }
.e5 { top: 20%; left: 30%; animation-delay: 3s; }
.e6 { top: 55%; right: 35%; animation-delay: 5s; }

@keyframes floatUp {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.08; }
  50% { transform: translateY(-20px) rotate(10deg); opacity: 0.15; }
}

/* Mega dice button */
.mega-dice-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--gold), #dbb960, var(--gold-dark));
  color: var(--primary);
  border: none;
  padding: 18px 48px;
  border-radius: 60px;
  font-family: 'Tajawal', sans-serif;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 8px 30px rgba(201,168,76,0.4);
  z-index: 1;
}

.mega-dice-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 40px rgba(201,168,76,0.5);
}

.mega-dice-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.mega-dice-btn .dice-icon {
  font-size: 30px;
  animation: diceWiggle 3s ease-in-out infinite;
}

.mega-dice-btn.rolling .dice-icon {
  animation: diceRoll 0.15s linear infinite;
}

@keyframes diceRoll {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(90deg); }
  50% { transform: rotate(180deg); }
  75% { transform: rotate(270deg); }
  100% { transform: rotate(360deg); }
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  position: relative;
}

.hero-stats strong {
  color: var(--gold);
  font-weight: 800;
}

.stat-dot {
  opacity: 0.3;
}

/* ===== Discover Section ===== */
.discover-section {
  max-width: var(--max-width);
  margin: 36px auto;
  padding: 0 20px;
}

.section-heading {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--gold);
  margin-top: 8px;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 22px;
}

/* ===== Day Plan ===== */
.plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.plan-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.plan-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-refresh,
.btn-share-plan,
.btn-back {
  padding: 10px 20px;
  border-radius: 50px;
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid;
  min-height: 44px;
}

.btn-refresh {
  background: var(--gold);
  color: var(--primary);
  border-color: var(--gold);
}

.btn-refresh:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(201,168,76,0.3);
}

.btn-share-plan {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-share-plan:hover {
  background: var(--primary);
  color: white;
}

.btn-back {
  background: transparent;
  color: var(--text-light);
  border-color: var(--border);
}

.btn-back:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Day plan timeline */
.day-plan-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.day-plan-container::before {
  content: '';
  position: absolute;
  right: 30px;
  top: 30px;
  bottom: 30px;
  width: 3px;
  background: linear-gradient(to bottom, var(--gold), #0891b2, var(--gold));
  border-radius: 3px;
  z-index: 0;
}

.plan-slot {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  position: relative;
  z-index: 1;
  animation: slotAppear 0.5s ease forwards;
  opacity: 0;
  transform: translateX(20px);
}

.plan-slot:nth-child(1) { animation-delay: 0.1s; }
.plan-slot:nth-child(2) { animation-delay: 0.25s; }
.plan-slot:nth-child(3) { animation-delay: 0.4s; }
.plan-slot:nth-child(4) { animation-delay: 0.55s; }
.plan-slot:nth-child(5) { animation-delay: 0.7s; }

@keyframes slotAppear {
  to { opacity: 1; transform: translateX(0); }
}

.slot-time {
  min-width: 60px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
}

.slot-time .time-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 4px;
  box-shadow: 0 3px 10px rgba(201,168,76,0.2);
}

.slot-time .time-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.slot-card {
  flex: 1;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border-right: 4px solid var(--gold);
  transition: all 0.3s ease;
  min-width: 0;
}

.slot-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.slot-card .slot-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-dark);
  background: rgba(201,168,76,0.1);
  padding: 2px 10px;
  border-radius: 50px;
  margin-bottom: 6px;
}

.slot-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.slot-card .slot-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.slot-card .slot-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.slot-card .slot-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slot-card .slot-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.slot-card .slot-actions a {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.slot-card .slot-actions .btn-detail {
  background: var(--gold);
  color: var(--primary);
}

.slot-card .slot-actions .btn-detail:hover {
  background: var(--gold-light);
}

.slot-card .slot-actions .btn-map {
  border: 1.5px solid var(--border);
  color: var(--text-light);
}

.slot-card .slot-actions .btn-map:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

/* Plan summary */
.plan-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(10,22,40,0.04), rgba(201,168,76,0.06));
  border-radius: var(--radius);
  margin-top: 18px;
  border: 1px solid rgba(201,168,76,0.15);
}

.plan-summary .summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.plan-summary .summary-item .summary-icon {
  font-size: 18px;
}

.plan-summary .summary-item strong {
  color: var(--gold-dark);
}

/* ===== Occasions Grid ===== */
.occasions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.occasion-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  border-top: 3px solid var(--gold);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Tajawal', sans-serif;
}

.occasion-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-gold);
  border-color: var(--gold);
}

.occasion-card.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201,168,76,0.05), rgba(201,168,76,0.02));
}

.occasion-card .occasion-icon {
  font-size: 40px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.occasion-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.occasion-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Budget Grid ===== */
.budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.budget-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px 14px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  border-top: 3px solid var(--gold);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Tajawal', sans-serif;
}

.budget-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-gold);
  border-color: var(--gold);
}

.budget-card.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201,168,76,0.06), rgba(201,168,76,0.02));
}

.budget-card .budget-emoji {
  font-size: 36px;
  margin-bottom: 8px;
  line-height: 1.2;
}

.budget-card .budget-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.budget-card .budget-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Budget estimate */
.budget-estimate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(201,168,76,0.1), rgba(201,168,76,0.03));
  border-radius: var(--radius);
  margin-bottom: 18px;
  border: 1px solid rgba(201,168,76,0.2);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.budget-estimate .budget-amount {
  color: var(--gold-dark);
  font-size: 20px;
  font-weight: 900;
}

/* ===== Loading / Rolling Animation ===== */
.plan-loading {
  text-align: center;
  padding: 40px 20px;
}

.plan-loading .loading-dice {
  font-size: 60px;
  animation: diceRoll 0.2s linear infinite;
  display: inline-block;
  margin-bottom: 14px;
}

.plan-loading p {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .discover-hero {
    padding: 50px 16px 40px;
  }

  .discover-hero h2 {
    font-size: 28px;
  }

  .discover-hero h2 span {
    font-size: 32px;
  }

  .discover-hero > p {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .mega-dice-btn {
    padding: 14px 36px;
    font-size: 18px;
  }

  .mega-dice-btn .dice-icon {
    font-size: 24px;
  }

  .hero-stats {
    font-size: 12px;
    gap: 8px;
  }

  .section-heading {
    font-size: 22px;
  }

  .discover-section {
    padding: 0 16px;
    margin: 28px auto;
  }

  /* Timeline: left-side minimal */
  .day-plan-container::before {
    right: 22px;
  }

  .slot-time {
    min-width: 44px;
  }

  .slot-time .time-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .slot-time .time-label {
    font-size: 10px;
  }

  .slot-card {
    padding: 14px;
  }

  .slot-card h3 {
    font-size: 16px;
  }

  .plan-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .plan-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .btn-refresh,
  .btn-share-plan,
  .btn-back {
    padding: 8px 16px;
    font-size: 13px;
  }

  .occasions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .occasion-card {
    padding: 18px 12px;
  }

  .occasion-card .occasion-icon {
    font-size: 32px;
  }

  .occasion-card h3 {
    font-size: 14px;
  }

  .occasion-card p {
    font-size: 11px;
  }

  .budget-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .budget-card {
    padding: 18px 10px;
  }

  .plan-summary {
    gap: 14px;
    padding: 14px 16px;
  }

  .plan-summary .summary-item {
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .occasions-grid {
    grid-template-columns: 1fr;
  }

  .budget-grid {
    grid-template-columns: 1fr 1fr;
  }

  .discover-hero h2 {
    font-size: 24px;
  }
}
