/* ═══════════════════════════════════════════════
   إدارة الرحلات - Sailing Schedules
   ═══════════════════════════════════════════════ */

.template-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.template-card {
  background: var(--bg-glass);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-500), var(--nile-400));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.template-card:hover {
  border-color: var(--gold-500);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-gold);
}

.template-card:hover::before,
.template-card.active::before {
  opacity: 1;
}

.template-card.active {
  border-color: var(--gold-500);
  background: rgba(212, 175, 55, 0.06);
}

.template-card .template-duration {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold-500);
  margin-bottom: var(--space-sm);
}

.template-card .template-route {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 6px;
}

.template-card .template-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template-card .template-highlights .tag {
  font-size: 0.72rem;
}

/* ─── Itinerary Timeline ─── */
.itinerary-timeline {
  position: relative;
  padding-right: 30px;
}

.itinerary-timeline::before {
  content: '';
  position: absolute;
  right: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-500), var(--nile-400), var(--gold-500));
  opacity: 0.3;
}

.timeline-day {
  position: relative;
  margin-bottom: var(--space-lg);
  padding-right: var(--space-lg);
}

.timeline-day::before {
  content: '';
  position: absolute;
  right: -26px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-500);
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--gold-500);
  z-index: 1;
}

.timeline-day .day-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.timeline-day .day-number {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  color: var(--text-inverse);
  padding: 2px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
}

.timeline-day .day-title {
  font-size: 1rem;
  font-weight: 700;
}

.timeline-day .day-content {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.timeline-day .day-section {
  margin-bottom: var(--space-sm);
}

.timeline-day .day-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.timeline-day .day-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ─── Trip Calendar ─── */
.trip-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.trip-entry {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--transition-fast);
  border-right: 4px solid var(--gold-500);
}

.trip-entry:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
}

.trip-entry.active { border-right-color: var(--success); }
.trip-entry.upcoming { border-right-color: var(--nile-400); }
.trip-entry.completed { border-right-color: var(--text-muted); }

.trip-entry .trip-ship {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-500);
  margin-bottom: 4px;
}

.trip-entry .trip-dates {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.trip-entry .trip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

/* ─── Esna Lock Schedule ─── */
.lock-schedule {
  width: 100%;
}

.lock-entry {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-glass);
}

.lock-entry:last-child {
  border-bottom: none;
}

.lock-position {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.lock-entry .lock-info {
  flex: 1;
}

.lock-entry .lock-ship-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.lock-entry .lock-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

@media (max-width: 768px) {
  .trip-calendar-grid { grid-template-columns: 1fr; }
}
